]>
Commit | Line | Data |
---|---|---|
a236aa20 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/motif/ctrlsub.h | |
3 | // Purpose: common functionality of wxItemContainer-derived controls | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2007-07-25 | |
a236aa20 VZ |
6 | // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_MOTIF_CTRLSUB_H_ | |
11 | #define _WX_MOTIF_CTRLSUB_H_ | |
12 | ||
13 | #include "wx/dynarray.h" | |
14 | #include "wx/generic/ctrlsub.h" | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // wxControlWithItems | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
5ffe00d0 | 20 | class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsGeneric |
a236aa20 VZ |
21 | { |
22 | public: | |
23 | wxControlWithItems() { } | |
24 | ||
25 | protected: | |
26 | // Motif functions inserting items in the control interpret positions | |
27 | // differently from wx: they're 1-based and 0 means to append | |
28 | unsigned int GetMotifPosition(unsigned int pos) const | |
29 | { | |
30 | return pos == GetCount() ? 0 : pos + 1; | |
31 | } | |
32 | ||
33 | private: | |
34 | DECLARE_ABSTRACT_CLASS(wxControlWithItems) | |
c0c133e1 | 35 | wxDECLARE_NO_COPY_CLASS(wxControlWithItems); |
a236aa20 VZ |
36 | }; |
37 | ||
38 | #endif // _WX_MOTIF_CTRLSUB_H_ | |
39 |