1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxChoice class interface
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHOICE_H_BASE_
13 #define _WX_CHOICE_H_BASE_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
20 #pragma interface "choicebase.h"
27 #include "wx/ctrlsub.h" // the base class
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 extern WXDLLEXPORT_DATA(const wxChar
*) wxChoiceNameStr
;
35 // ----------------------------------------------------------------------------
36 // wxChoice allows to select one of a non-modifiable list of strings
37 // ----------------------------------------------------------------------------
39 class WXDLLEXPORT wxChoiceBase
: public wxControlWithItems
43 virtual ~wxChoiceBase();
45 // all generic methods are in wxControlWithItems
47 // set/get the number of columns in the control (as they're not supported on
48 // most platforms, they do nothing by default)
49 virtual void SetColumns(int WXUNUSED(n
) = 1 ) { }
50 virtual int GetColumns() const { return 1 ; }
52 // emulate selecting the item event.GetInt()
53 void Command(wxCommandEvent
& event
);
56 DECLARE_NO_COPY_CLASS(wxChoiceBase
)
59 // ----------------------------------------------------------------------------
60 // include the platform-dependent class definition
61 // ----------------------------------------------------------------------------
63 #if defined(__WXUNIVERSAL__)
64 #include "wx/univ/choice.h"
65 #elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
66 #include "wx/msw/wince/choicece.h"
67 #elif defined(__WXMSW__)
68 #include "wx/msw/choice.h"
69 #elif defined(__WXMOTIF__)
70 #include "wx/motif/choice.h"
71 #elif defined(__WXGTK__)
72 #include "wx/gtk/choice.h"
73 #elif defined(__WXMAC__)
74 #include "wx/mac/choice.h"
75 #elif defined(__WXCOCOA__)
76 #include "wx/cocoa/choice.h"
77 #elif defined(__WXPM__)
78 #include "wx/os2/choice.h"
81 #endif // wxUSE_CHOICE