]>
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 bool Create(wxWindow
*parent
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
43 int n
= 0, const wxString choices
[] = NULL
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxChoiceNameStr
);
48 // implement base class pure virtuals
49 virtual int DoAppend(const wxString
& item
);
50 virtual int DoInsert(const wxString
& item
, int pos
);
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 MSWCommand(WXUINT param
, WXWORD id
);
64 long MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
65 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
66 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
69 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
70 virtual void DoSetItemClientData( int n
, void* clientData
);
71 virtual void* DoGetItemClientData( int n
) const;
72 virtual void DoSetItemClientObject( int n
, wxClientData
* clientData
);
73 virtual wxClientData
* DoGetItemClientObject( int n
) const;
76 virtual wxSize
DoGetBestSize() const;
77 virtual void DoSetSize(int x
, int y
,
78 int width
, int height
,
79 int sizeFlags
= wxSIZE_AUTO
);
81 // free all memory we have (used by Clear() and dtor)
84 DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice
)
87 #endif // _WX_CHOICE_H_