]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/choice.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCHOICEH__
12 #define __GTKCHOICEH__
19 #include "wx/object.h"
21 #include "wx/control.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 extern const char *wxChoiceNameStr
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class wxChoice
: public wxControl
41 DECLARE_DYNAMIC_CLASS(wxChoice
)
46 inline wxChoice( wxWindow
*parent
, wxWindowID id
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
49 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
51 const wxValidator
& validator
= wxDefaultValidator
,
52 const wxString
& name
= wxChoiceNameStr
)
54 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
57 bool Create( wxWindow
*parent
, wxWindowID id
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 int n
= 0, const wxString choices
[] = (wxString
*) NULL
,
62 const wxValidator
& validator
= wxDefaultValidator
,
63 const wxString
& name
= wxChoiceNameStr
);
65 void Append( const wxString
&item
);
66 void Append( const wxString
&item
, void* clientData
);
67 void Append( const wxString
&item
, wxClientData
* clientData
);
69 void SetClientData( int n
, void* clientData
);
70 void* GetClientData( int n
);
71 void SetClientObject( int n
, wxClientData
* clientData
);
72 wxClientData
* GetClientObject( int n
);
77 int FindString( const wxString
&string
) const;
78 int GetColumns() const;
80 wxString
GetString( int n
) const;
81 wxString
GetStringSelection() const;
83 void SetColumns( int n
= 1 );
84 void SetSelection( int n
);
85 void SetStringSelection( const wxString
&string
);
89 wxList m_clientDataList
;
91 void AppendCommon( const wxString
&item
);
92 void ApplyWidgetStyle();
95 #endif // __GTKCHOICEH__