]> git.saurik.com Git - wxWidgets.git/blob - include/wx/choice.h
fix printf() argument type in GetOsInfo()
[wxWidgets.git] / include / wx / choice.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/choice.h
3 // Purpose: wxChoice class interface
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 26.07.99
7 // RCS-ID: $Id$
8 // Copyright: (c) wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CHOICE_H_BASE_
13 #define _WX_CHOICE_H_BASE_
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/defs.h"
20
21 #if wxUSE_CHOICE
22
23 #include "wx/ctrlsub.h" // the base class
24
25 // ----------------------------------------------------------------------------
26 // global data
27 // ----------------------------------------------------------------------------
28
29 extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
30
31 // ----------------------------------------------------------------------------
32 // wxChoice allows to select one of a non-modifiable list of strings
33 // ----------------------------------------------------------------------------
34
35 class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
36 {
37 public:
38 wxChoiceBase() { }
39 virtual ~wxChoiceBase();
40
41 // all generic methods are in wxControlWithItems
42
43 // set/get the number of columns in the control (as they're not supported on
44 // most platforms, they do nothing by default)
45 virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
46 virtual int GetColumns() const { return 1 ; }
47
48 // emulate selecting the item event.GetInt()
49 void Command(wxCommandEvent& event);
50
51 private:
52 DECLARE_NO_COPY_CLASS(wxChoiceBase)
53 };
54
55 // ----------------------------------------------------------------------------
56 // include the platform-dependent class definition
57 // ----------------------------------------------------------------------------
58
59 #if defined(__WXUNIVERSAL__)
60 #include "wx/univ/choice.h"
61 #elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
62 #include "wx/msw/wince/choicece.h"
63 #elif defined(__WXMSW__)
64 #include "wx/msw/choice.h"
65 #elif defined(__WXMOTIF__)
66 #include "wx/motif/choice.h"
67 #elif defined(__WXGTK20__)
68 #include "wx/gtk/choice.h"
69 #elif defined(__WXGTK__)
70 #include "wx/gtk1/choice.h"
71 #elif defined(__WXMAC__)
72 #include "wx/mac/choice.h"
73 #elif defined(__WXCOCOA__)
74 #include "wx/cocoa/choice.h"
75 #elif defined(__WXPM__)
76 #include "wx/os2/choice.h"
77 #endif
78
79 #endif // wxUSE_CHOICE
80
81 #endif
82 // _WX_CHOICE_H_BASE_