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

Go to the SVN repository for this file.

1 /////////////////////////////////////////////////////////////////////////////
2 // Name: hello_world_dlg.cpp
3 // Purpose:
4 // Author: Roman Katargin
5 // Modified by:
6 // Created: 06/08/2007 16:56:20
7 // RCS-ID:
8 // Copyright:
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11 
12 #include <ncbi_pch.hpp>
13 
14 
15 #include <wx/bitmap.h>
16 #include <wx/icon.h>
17 #include <wx/sizer.h>
18 #include <wx/stattext.h>
19 #include <wx/button.h>
20 #include <wx/combobox.h>
21 
22 ////@begin includes
23 ////@end includes
24 
25 #include "hello_combo_dlg.hpp"
28 
29 
30 ////@begin XPM images
31 ////@end XPM images
32 
33 
35 
36 /*!
37  * CHelloWorldDlg type definition
38  */
39 
40 IMPLEMENT_DYNAMIC_CLASS( CHelloWorldDlg, wxDialog )
41 
42 
43 /*!
44  * CHelloWorldDlg event table definition
45  */
46 
47 BEGIN_EVENT_TABLE( CHelloWorldDlg, wxDialog )
48 
49 ////@begin CHelloWorldDlg event table entries
50 ////@end CHelloWorldDlg event table entries
51 
53 
54 
55 /*!
56  * CHelloWorldDlg constructors
57  */
58 
60 {
61  Init();
62 }
63 
64 CHelloWorldDlg::CHelloWorldDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
65 {
66  Init();
67  Create(parent, id, caption, pos, size, style);
68 }
69 
70 
71 /*!
72  * CHelloWorldDlg creator
73  */
74 
75 bool CHelloWorldDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
76 {
77 ////@begin CHelloWorldDlg creation
78  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
79  wxDialog::Create( parent, id, caption, pos, size, style );
80 
82  if (GetSizer())
83  {
84  GetSizer()->SetSizeHints(this);
85  }
86  Centre();
87 ////@end CHelloWorldDlg creation
88  return true;
89 }
90 
91 
92 /*!
93  * CHelloWorldDlg destructor
94  */
95 
97 {
98 ////@begin CHelloWorldDlg destruction
99 ////@end CHelloWorldDlg destruction
100 }
101 
102 
103 /*!
104  * Member initialisation
105  */
106 
108 {
109 ////@begin CHelloWorldDlg member initialisation
110 ////@end CHelloWorldDlg member initialisation
111 }
112 
113 
114 /*!
115  * Control creation for CHelloWorldDlg
116  */
117 
119 {
120 ////@begin CHelloWorldDlg content construction
121  // Generated by DialogBlocks, Sat 16 Feb 2008 11:08:50 AM EST (unregistered)
122 
123  CHelloWorldDlg* itemDialog1 = this;
124 
125  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
126  itemDialog1->SetSizer(itemBoxSizer2);
127 
128  //wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Hello World!"), wxDefaultPosition, wxDefaultSize, 0 );
129  //itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
130 
131  wxString choices[] = { _("First"), _("Second"), _("Third"), _("Furst"), _("Sucond"), _("Thurd") };
132  wxArrayString arr_choices( sizeof(choices)/sizeof(wxString), choices );
133 
134  wxComboBox* itemComboBox3 = new CAdvancedFileInput(
135  //wxComboBox* itemComboBox3 = new CAutoCompleteCombo(
136  itemDialog1, wxID_ANY, _(""), wxDefaultPosition, wxSize( 300, -1 ),
137  wxArrayString()
138  );
139  itemBoxSizer2->Add(itemComboBox3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
140 
141  CAutoCompleteCombo* itemComboBox4 = new CAutoCompleteCombo(
142  itemDialog1, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize,
143  wxArrayString()
144  );
145  itemBoxSizer2->Add(itemComboBox4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
146 
147  itemComboBox4->SetBaseItems( arr_choices );
148  //itemComboBox4->SetMatchedOnly( true );
149 
150  itemBoxSizer2->Add(50, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
151 
152  wxButton* itemButton5 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
153  itemBoxSizer2->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
154 
155 ////@end CHelloWorldDlg content construction
156 }
157 
158 
159 /*!
160  * Should we show tooltips?
161  */
162 
164 {
165  return true;
166 }
167 
168 /*!
169  * Get bitmap resources
170  */
171 
172 wxBitmap CHelloWorldDlg::GetBitmapResource( const wxString& name )
173 {
174  // Bitmap retrieval
175 ////@begin CHelloWorldDlg bitmap retrieval
176  wxUnusedVar(name);
177  return wxNullBitmap;
178 ////@end CHelloWorldDlg bitmap retrieval
179 }
180 
181 /*!
182  * Get icon resources
183  */
184 
185 wxIcon CHelloWorldDlg::GetIconResource( const wxString& name )
186 {
187  // Icon retrieval
188 ////@begin CHelloWorldDlg icon retrieval
189  wxUnusedVar(name);
190  return wxNullIcon;
191 ////@end CHelloWorldDlg icon retrieval
192 }
193 
CAdvancedFileInput.
CAutoCompleteComboBox.
void SetBaseItems(const wxArrayString &choices)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
static bool ShowToolTips()
Should we show tooltips?
CHelloWorldDlg()
Constructors.
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=10000, const wxString &caption=_("Empty wxWidets/C++ Toolkit app"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX)
Creation.
~CHelloWorldDlg()
Destructor.
void Init()
Initialises member variables.
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#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
static static static wxID_ANY
Modified on Fri Mar 01 10:07:37 2024 by modify_doxy.py rev. 669887