]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/choice.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKCHOICEH__
11 #define __GTKCHOICEH__
14 #pragma interface "choice.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class wxChoice
: public wxChoiceBase
25 wxChoice( wxWindow
*parent
, wxWindowID id
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
28 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
30 const wxValidator
& validator
= wxDefaultValidator
,
31 const wxString
& name
= wxChoiceNameStr
)
33 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
36 bool Create( wxWindow
*parent
, wxWindowID id
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
39 int n
= 0, const wxString choices
[] = (wxString
*) NULL
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxChoiceNameStr
);
44 // implement base class pure virtuals
48 int GetSelection() const;
49 void SetSelection( int n
);
51 virtual int GetCount() const;
52 int FindString( const wxString
&string
) const;
53 wxString
GetString( int n
) const;
60 void AppendCommon( const wxString
&item
);
61 void ApplyWidgetStyle();
64 virtual int DoAppend(const wxString
& item
);
66 virtual void DoSetClientData( int n
, void* clientData
);
67 virtual void* DoGetClientData( int n
) const;
68 virtual void DoSetClientObject( int n
, wxClientData
* clientData
);
69 virtual wxClientData
* DoGetClientObject( int n
) const;
71 // the above virtuals hide these virtuals in wxChoiceBase
72 virtual void DoSetClientData(void* clientData
)
73 { wxWindowBase::DoSetClientData(clientData
); };
74 virtual void* DoGetClientData() const
75 { return(wxWindowBase::DoGetClientData()); };
76 virtual void DoSetClientObject( wxClientData
* clientData
)
77 { wxWindowBase::DoSetClientObject(clientData
); };
78 virtual wxClientData
* DoGetClientObject() const
79 { return(wxWindowBase::DoGetClientObject()); };
82 DECLARE_DYNAMIC_CLASS(wxChoice
)
86 #endif // __GTKCHOICEH__