1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxChoice class
4 // Author: Julian Smart
5 // Modified by: Vadim Zeitlin to derive from wxChoiceBase
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "choice.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxChoice
: public wxChoiceBase
25 DECLARE_DYNAMIC_CLASS(wxChoice
)
32 wxChoice(wxWindow
*parent
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
36 int n
= 0, const wxString choices
[] = NULL
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxChoiceNameStr
)
41 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
44 bool Create(wxWindow
*parent
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
48 int n
= 0, const wxString choices
[] = NULL
,
50 const wxValidator
& validator
= wxDefaultValidator
,
51 const wxString
& name
= wxChoiceNameStr
);
53 // implement base class pure virtuals
54 virtual int DoAppend(const wxString
& item
);
55 virtual void Delete(int n
);
58 virtual int GetCount() const;
59 virtual int GetSelection() const;
60 virtual void SetSelection(int n
);
62 virtual int FindString(const wxString
& s
) const;
63 virtual wxString
GetString(int n
) const;
64 virtual void SetString(int n
, const wxString
& s
);
67 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
68 long MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
69 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
70 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
73 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
74 virtual void DoSetItemClientData( int n
, void* clientData
);
75 virtual void* DoGetItemClientData( int n
) const;
76 virtual void DoSetItemClientObject( int n
, wxClientData
* clientData
);
77 virtual wxClientData
* DoGetItemClientObject( int n
) const;
80 virtual wxSize
DoGetBestSize() const;
81 virtual void DoSetSize(int x
, int y
,
82 int width
, int height
,
83 int sizeFlags
= wxSIZE_AUTO
);
85 // free all memory we have (used by Clear() and dtor)
89 #endif // _WX_CHOICE_H_