]>
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 /////////////////////////////////////////////////////////////////////////////
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
);
56 bool Create( wxWindow
*parent
, wxWindowID id
,
57 const wxPoint
& pos
= wxDefaultPosition
,
58 const wxSize
& size
= wxDefaultSize
,
59 int n
= 0, const wxString choices
[] = (wxString
*) NULL
,
61 const wxValidator
& validator
= wxDefaultValidator
,
62 const wxString
& name
= wxChoiceNameStr
);
63 void Append( const wxString
&item
);
66 int FindString( const wxString
&string
) const;
67 int GetColumns(void) const;
68 int GetSelection(void);
69 wxString
GetString( int n
) const;
70 wxString
GetStringSelection(void) const;
71 int Number(void) const;
72 void SetColumns( int n
= 1 );
73 void SetSelection( int n
);
74 void SetStringSelection( const wxString
&string
);
78 void ApplyWidgetStyle();
81 #endif // __GTKCHOICEH__