1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxChoice class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr
;
18 class WXDLLEXPORT wxChoice
: public wxChoiceBase
20 DECLARE_DYNAMIC_CLASS(wxChoice
)
26 inline wxChoice(wxWindow
*parent
, wxWindowID id
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 int n
= 0, const wxString choices
[] = NULL
,
32 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxChoiceNameStr
)
36 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
, wxWindowID id
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 int n
= 0, const wxString choices
[] = NULL
,
45 const wxValidator
& validator
= wxDefaultValidator
,
47 const wxString
& name
= wxChoiceNameStr
);
49 // Implement base class virtuals
50 virtual int DoAppend(const wxString
& item
);
51 virtual void Delete(int n
);
54 virtual int GetCount() const;
55 virtual int GetSelection() const ;
56 virtual void SetSelection(int n
);
58 virtual int FindString(const wxString
& s
) const;
59 virtual wxString
GetString(int n
) const ;
60 virtual void SetString(int n
, const wxString
& s
);
63 virtual bool OS2Command(WXUINT param
, WXWORD id
);
64 MRESULT
OS2WindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
67 virtual void DoSetItemClientData( int n
, void* clientData
);
68 virtual void* DoGetItemClientData( int n
) const;
69 virtual void DoSetItemClientObject( int n
, wxClientData
* clientData
);
70 virtual wxClientData
* DoGetItemClientObject( int n
) const;
73 virtual wxSize
DoGetBestSize() const;
74 virtual void DoSetSize(int x
, int y
,
75 int width
, int height
,
76 int sizeFlags
= wxSIZE_AUTO
);
79 #endif // _WX_CHOICE_H_