1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/ctrlsub.h
3 // Purpose: common functionality of wxItemContainer-derived controls
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MOTIF_CTRLSUB_H_
11 #define _WX_MOTIF_CTRLSUB_H_
13 #include "wx/dynarray.h"
14 #include "wx/generic/ctrlsub.h"
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxControlWithItems
: public wxControlWithItemsGeneric
23 wxControlWithItems() { }
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
30 return pos
== GetCount() ? 0 : pos
+ 1;
34 DECLARE_ABSTRACT_CLASS(wxControlWithItems
)
35 wxDECLARE_NO_COPY_CLASS(wxControlWithItems
);
38 #endif // _WX_MOTIF_CTRLSUB_H_