1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/ctrlsub.h
3 // Purpose: common functionality of wxItemContainer-derived controls
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MOTIF_CTRLSUB_H_
12 #define _WX_MOTIF_CTRLSUB_H_
14 #include "wx/dynarray.h"
15 #include "wx/generic/ctrlsub.h"
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class wxControlWithItems
: public wxControlWithItemsGeneric
24 wxControlWithItems() { }
27 // Motif functions inserting items in the control interpret positions
28 // differently from wx: they're 1-based and 0 means to append
29 unsigned int GetMotifPosition(unsigned int pos
) const
31 return pos
== GetCount() ? 0 : pos
+ 1;
35 DECLARE_ABSTRACT_CLASS(wxControlWithItems
)
36 DECLARE_NO_COPY_CLASS(wxControlWithItems
)
39 #endif // _WX_MOTIF_CTRLSUB_H_