Code::Blocks  SVN r11506
genericsinglechoicelist.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef GENERICSINGLECHOICELIST_H
7 #define GENERICSINGLECHOICELIST_H
8 
9 
10 //(*HeadersPCH(GenericSingleChoiceList)
11 #include <wx/sizer.h>
12 #include <wx/panel.h>
13 #include <wx/stattext.h>
14 #include <wx/listbox.h>
15 //*)
16 
17 class wxArrayString;
18 class wxString;
19 
21 {
22  public:
23 
25  virtual ~GenericSingleChoiceList();
26 
27  void SetChoices(const wxArrayString& choices, int defChoice);
28  int GetChoice() const { return GenericChoiceList->GetSelection(); }
29  void SetChoice(int choice){ GenericChoiceList->SetSelection(choice); }
30  void SetDescription(const wxString& descr)
31  {
32  lblDescr->SetLabel(descr);
33 
34  GetSizer()->Fit(this);
35  GetSizer()->SetSizeHints(this);
36  }
37 
38  //(*Identifiers(GenericSingleChoiceList)
39  static const long ID_STATICTEXT1;
40  static const long ID_LISTBOX1;
41  //*)
42 
43  protected:
44 
45  //(*Handlers(GenericSingleChoiceList)
46  //*)
47 
48  //(*Declarations(GenericSingleChoiceList)
51  //*)
52 
53  private:
54 
55  DECLARE_EVENT_TABLE()
56 };
57 
58 #endif
GenericSingleChoiceList(wxWindow *parent, wxWindowID id=-1)
void SetChoices(const wxArrayString &choices, int defChoice)
void SetDescription(const wxString &descr)
int wxWindowID