]>
Commit | Line | Data |
---|---|---|
8d99be5f VZ |
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$ | |
77ffb593 | 8 | // Copyright: (c) wxWidgets team |
65571936 | 9 | // Licence: wxWindows licence |
8d99be5f VZ |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
34138703 JS |
12 | #ifndef _WX_CHOICE_H_BASE_ |
13 | #define _WX_CHOICE_H_BASE_ | |
c801d85f | 14 | |
8d99be5f VZ |
15 | // ---------------------------------------------------------------------------- |
16 | // headers | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
12028905 | 19 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
1b68e0b5 | 20 | #pragma interface "choicebase.h" |
8d99be5f VZ |
21 | #endif |
22 | ||
1e6feb95 VZ |
23 | #if wxUSE_CHOICE |
24 | ||
6c8a980f | 25 | #include "wx/ctrlsub.h" // the base class |
8d99be5f VZ |
26 | |
27 | // ---------------------------------------------------------------------------- | |
28 | // global data | |
29 | // ---------------------------------------------------------------------------- | |
30 | ||
16cba29d | 31 | extern WXDLLEXPORT_DATA(const wxChar*) wxChoiceNameStr; |
8d99be5f VZ |
32 | |
33 | // ---------------------------------------------------------------------------- | |
34 | // wxChoice allows to select one of a non-modifiable list of strings | |
35 | // ---------------------------------------------------------------------------- | |
36 | ||
6c8a980f | 37 | class WXDLLEXPORT wxChoiceBase : public wxControlWithItems |
8d99be5f VZ |
38 | { |
39 | public: | |
6463b9f5 | 40 | wxChoiceBase() { } |
05689a13 | 41 | virtual ~wxChoiceBase(); |
8d99be5f | 42 | |
fc7a2a60 VZ |
43 | // all generic methods are in wxControlWithItems |
44 | ||
3fc2f8c6 | 45 | // set/get the number of columns in the control (as they're not supported on |
8d99be5f VZ |
46 | // most platforms, they do nothing by default) |
47 | virtual void SetColumns(int WXUNUSED(n) = 1 ) { } | |
48 | virtual int GetColumns() const { return 1 ; } | |
49 | ||
6c8a980f VZ |
50 | // emulate selecting the item event.GetInt() |
51 | void Command(wxCommandEvent& event); | |
fc7a2a60 VZ |
52 | |
53 | private: | |
54 | DECLARE_NO_COPY_CLASS(wxChoiceBase) | |
8d99be5f VZ |
55 | }; |
56 | ||
57 | // ---------------------------------------------------------------------------- | |
58 | // include the platform-dependent class definition | |
59 | // ---------------------------------------------------------------------------- | |
60 | ||
926592a8 VS |
61 | #if defined(__WXUNIVERSAL__) |
62 | #include "wx/univ/choice.h" | |
9b141468 | 63 | #elif defined(__SMARTPHONE__) && defined(__WXWINCE__) |
1550d5f8 | 64 | #include "wx/msw/wince/choicece.h" |
926592a8 | 65 | #elif defined(__WXMSW__) |
8d99be5f | 66 | #include "wx/msw/choice.h" |
2049ba38 | 67 | #elif defined(__WXMOTIF__) |
8d99be5f | 68 | #include "wx/motif/choice.h" |
2049ba38 | 69 | #elif defined(__WXGTK__) |
8d99be5f | 70 | #include "wx/gtk/choice.h" |
34138703 | 71 | #elif defined(__WXMAC__) |
8d99be5f | 72 | #include "wx/mac/choice.h" |
e64df9bc DE |
73 | #elif defined(__WXCOCOA__) |
74 | #include "wx/cocoa/choice.h" | |
1777b9bb DW |
75 | #elif defined(__WXPM__) |
76 | #include "wx/os2/choice.h" | |
c801d85f KB |
77 | #endif |
78 | ||
1e6feb95 VZ |
79 | #endif // wxUSE_CHOICE |
80 | ||
c801d85f | 81 | #endif |
34138703 | 82 | // _WX_CHOICE_H_BASE_ |