]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/choice.h
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 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "choice.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxChoice
: public wxChoiceBase
30 wxChoice(wxWindow
*parent
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 int n
= 0, const wxString choices
[] = NULL
,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxChoiceNameStr
)
39 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
42 bool Create(wxWindow
*parent
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 int n
= 0, const wxString choices
[] = NULL
,
48 const wxValidator
& validator
= wxDefaultValidator
,
49 const wxString
& name
= wxChoiceNameStr
);
51 // implement base class pure virtuals
52 virtual int DoAppend(const wxString
& item
);
53 virtual int DoInsert(const wxString
& item
, int pos
);
54 virtual void Delete(int n
);
57 virtual int GetCount() const;
58 virtual int GetSelection() const;
59 virtual void SetSelection(int n
);
61 virtual int FindString(const wxString
& s
) const;
62 virtual wxString
GetString(int n
) const;
63 virtual void SetString(int n
, const wxString
& s
);
66 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
67 long MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
68 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
69 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
72 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
73 virtual void DoSetItemClientData( int n
, void* clientData
);
74 virtual void* DoGetItemClientData( int n
) const;
75 virtual void DoSetItemClientObject( int n
, wxClientData
* clientData
);
76 virtual wxClientData
* DoGetItemClientObject( int n
) const;
79 virtual wxSize
DoGetBestSize() const;
80 virtual void DoSetSize(int x
, int y
,
81 int width
, int height
,
82 int sizeFlags
= wxSIZE_AUTO
);
84 // free all memory we have (used by Clear() and dtor)
87 DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice
)
90 #endif // _WX_CHOICE_H_