NCBI C++ ToolKit
seq_tree_demo_dlg.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: seq_tree_demo_dlg.cpp 46943 2022-02-16 19:45:17Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors:
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 
32 #include <wx/sizer.h>
33 
34 ////@begin includes
35 ////@end includes
36 
37 #include "seq_tree_demo_dlg.hpp"
38 
40 
41 ////@begin XPM images
42 ////@end XPM images
43 
45 
46 /*!
47  * CSeqTreeDemoDlg type definition
48  */
49 
50 IMPLEMENT_DYNAMIC_CLASS( CSeqTreeDemoDlg, wxDialog )
51 
52 
53 /*!
54  * CSeqTreeDemoDlg event table definition
55  */
56 
57 BEGIN_EVENT_TABLE( CSeqTreeDemoDlg, wxDialog )
58 
59 ////@begin CSeqTreeDemoDlg event table entries
61 
62  EVT_BUTTON( wxID_CANCEL, CSeqTreeDemoDlg::OnCancelClick )
63 
64 ////@end CSeqTreeDemoDlg event table entries
65 
67 
68 
69 /*!
70  * CSeqTreeDemoDlg constructors
71  */
72 
74 {
75  Init();
76 }
77 
78 CSeqTreeDemoDlg::CSeqTreeDemoDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
79 {
80  Init();
81  Create(parent, id, caption, pos, size, style);
82 }
83 
84 
85 /*!
86  * CSeqTreeDemoDlg creator
87  */
88 
89 bool CSeqTreeDemoDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
90 {
91 ////@begin CSeqTreeDemoDlg creation
92  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
93  wxDialog::Create( parent, id, caption, pos, size, style );
94 
96  if (GetSizer())
97  {
98  GetSizer()->SetSizeHints(this);
99  }
100  Centre();
101 ////@end CSeqTreeDemoDlg creation
102  return true;
103 }
104 
105 
106 /*!
107  * CSeqTreeDemoDlg destructor
108  */
109 
111 {
112 ////@begin CSeqTreeDemoDlg destruction
113 ////@end CSeqTreeDemoDlg destruction
114 }
115 
116 
117 /*!
118  * Member initialisation
119  */
120 
122 {
123 ////@begin CSeqTreeDemoDlg member initialisation
124  m_Widget = NULL;
125 ////@end CSeqTreeDemoDlg member initialisation
126 }
127 
128 
129 /*!
130  * Control creation for CSeqTreeDemoDlg
131  */
132 
134 {
135 ////@begin CSeqTreeDemoDlg content construction
136  CSeqTreeDemoDlg* itemDialog1 = this;
137 
138  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
139  itemDialog1->SetSizer(itemBoxSizer2);
140 
141  m_Widget = new CSeqDesktopPanel(itemDialog1, ID_FOREIGN, wxDefaultPosition, wxSize(300, 300), wxTAB_TRAVERSAL | wxNO_BORDER);
142  itemBoxSizer2->Add(m_Widget, 1, wxGROW|wxALL, 5);
143 
144  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
145  itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_RIGHT|wxALL, 5);
146 
147  wxButton* itemButton5 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
148  itemBoxSizer4->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
149 
150 ////@end CSeqTreeDemoDlg content construction
151 }
152 
153 
154 /*!
155  * Should we show tooltips?
156  */
157 
159 {
160  return true;
161 }
162 
163 /*!
164  * Get bitmap resources
165  */
166 
167 wxBitmap CSeqTreeDemoDlg::GetBitmapResource( const wxString& name )
168 {
169  // Bitmap retrieval
170 ////@begin CSeqTreeDemoDlg bitmap retrieval
171  wxUnusedVar(name);
172  return wxNullBitmap;
173 ////@end CSeqTreeDemoDlg bitmap retrieval
174 }
175 
176 /*!
177  * Get icon resources
178  */
179 
180 wxIcon CSeqTreeDemoDlg::GetIconResource( const wxString& name )
181 {
182  // Icon retrieval
183 ////@begin CSeqTreeDemoDlg icon retrieval
184  wxUnusedVar(name);
185  return wxNullIcon;
186 ////@end CSeqTreeDemoDlg icon retrieval
187 }
188 
189 void CSeqTreeDemoDlg::OnCancelClick( wxCommandEvent& event )
190 {
191  Destroy();
192 }
193 
194 void CSeqTreeDemoDlg::OnCloseWindow( wxCloseEvent& event )
195 {
196  Destroy();
197 }
198 
void OnCancelClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
CSeqTreeDemoDlg()
Constructors.
bool Create(wxWindow *parent, wxWindowID id=ID_CSEQTREEDEMODLG, const wxString &caption=_("SeqTreeDemoDlg"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnCloseWindow(wxCloseEvent &event)
wxEVT_CLOSE_WINDOW event handler for ID_CSEQTREEDEMODLG
static bool ShowToolTips()
Should we show tooltips?
~CSeqTreeDemoDlg()
Destructor.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CSeqDesktopPanel * m_Widget
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define NULL
Definition: ncbistd.hpp:225
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
END_EVENT_TABLE()
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Mon Feb 26 04:05:17 2024 by modify_doxy.py rev. 669887