]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/choice.h
Fix wxOSX warnings about int-to-void* casts.
[wxWidgets.git] / include / wx / os2 / choice.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
853dcc57 2// Name: wx/os2/choice.h
0e320a79 3// Purpose: wxChoice class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
37f214d5 7// Copyright: (c) David Webster
65571936 8// Licence: wxWindows licence
0e320a79
DW
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_CHOICE_H_
12#define _WX_CHOICE_H_
13
0934d91c 14// ----------------------------------------------------------------------------
0e320a79 15// Choice item
0934d91c
SN
16// ----------------------------------------------------------------------------
17
53a2db12 18class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase
0e320a79
DW
19{
20 DECLARE_DYNAMIC_CLASS(wxChoice)
21
dcd307ee
DW
22public:
23 // ctors
1ebd017e 24 inline wxChoice() { }
0934d91c 25 virtual ~wxChoice();
0e320a79 26
fb49f3b3
DW
27 inline wxChoice( wxWindow* pParent
28 ,wxWindowID vId
29 ,const wxPoint& rPos = wxDefaultPosition
30 ,const wxSize& rSize = wxDefaultSize
31 ,int n = 0
32 ,const wxString asChoices[] = NULL
33 ,long lStyle = 0
fb49f3b3 34 ,const wxValidator& rValidator = wxDefaultValidator
fb49f3b3
DW
35 ,const wxString& rsName = wxChoiceNameStr
36 )
dcd307ee 37 {
fb49f3b3
DW
38 Create( pParent
39 ,vId
40 ,rPos
41 ,rSize
42 ,n
43 ,asChoices
44 ,lStyle
fb49f3b3 45 ,rValidator
fb49f3b3
DW
46 ,rsName
47 );
dcd307ee 48 }
0e320a79 49
584ad2a3
MB
50 inline wxChoice( wxWindow* pParent
51 ,wxWindowID vId
52 ,const wxPoint& rPos
53 ,const wxSize& rSize
54 ,const wxArrayString& asChoices
55 ,long lStyle = 0
56 ,const wxValidator& rValidator = wxDefaultValidator
57 ,const wxString& rsName = wxChoiceNameStr
58 )
59 {
60 Create( pParent
61 ,vId
62 ,rPos
63 ,rSize
64 ,asChoices
65 ,lStyle
66 ,rValidator
67 ,rsName
68 );
69 }
70
fb49f3b3
DW
71 bool Create( wxWindow* pParent
72 ,wxWindowID vId
73 ,const wxPoint& rPos = wxDefaultPosition
74 ,const wxSize& rSize = wxDefaultSize
75 ,int n = 0
76 ,const wxString asChoices[] = NULL
77 ,long lStyle = 0
fb49f3b3 78 ,const wxValidator& rValidator = wxDefaultValidator
fb49f3b3
DW
79 ,const wxString& rsName = wxChoiceNameStr
80 );
0e320a79 81
584ad2a3
MB
82 bool Create( wxWindow* pParent
83 ,wxWindowID vId
84 ,const wxPoint& rPos
85 ,const wxSize& rSize
86 ,const wxArrayString& asChoices
87 ,long lStyle = 0
88 ,const wxValidator& rValidator = wxDefaultValidator
89 ,const wxString& rsName = wxChoiceNameStr
90 );
91
fb49f3b3 92 //
dcd307ee 93 // Implement base class virtuals
fb49f3b3 94 //
a236aa20
VZ
95 virtual void DoDeleteOneItem(unsigned int n);
96 virtual void DoClear(void);
37f214d5 97
aa61d352
VZ
98 virtual unsigned int GetCount() const;
99 virtual int GetSelection(void) const;
fb49f3b3 100 virtual void SetSelection(int n);
37f214d5 101
aa61d352
VZ
102 virtual wxString GetString(unsigned int n) const;
103 virtual void SetString(unsigned int n, const wxString& rsStr);
0e320a79 104
fb49f3b3 105 //
dcd307ee 106 // OS2 only
fb49f3b3
DW
107 //
108 virtual bool OS2Command( WXUINT uParam
109 ,WXWORD wId
110 );
111 MRESULT OS2WindowProc( WXUINT uMsg
112 ,WXWPARAM wParam
113 ,WXLPARAM lParam
114 );
0e320a79
DW
115
116protected:
a236aa20
VZ
117 virtual int DoInsertItems(const wxArrayStringsAdapter& items,
118 unsigned int pos,
119 void **clientData,
120 wxClientDataType type);
121
0934d91c 122 virtual void DoSetItemClientData(unsigned int n, void* pClientData);
aa61d352 123 virtual void* DoGetItemClientData(unsigned int n) const;
fb49f3b3
DW
124 virtual wxSize DoGetBestSize(void) const;
125 virtual void DoSetSize( int nX
126 ,int nY
127 ,int nWidth
128 ,int nHeight
129 ,int nsizeFlags = wxSIZE_AUTO
130 );
131 void Free(void);
132}; // end of CLASS wxChoice
0e320a79 133
37f214d5 134#endif // _WX_CHOICE_H_