]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/choice.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKCHOICEH__
13 #define __GTKCHOICEH__
20 #include "wx/object.h"
22 #include "wx/control.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 extern const char *wxChoiceNameStr
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxChoice
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxChoice
)
47 inline wxChoice( wxWindow
*parent
, wxWindowID id
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
50 int n
= 0, const wxString choices
[] = NULL
,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxChoiceNameStr
)
55 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
[] = NULL
,
62 const wxValidator
& validator
= wxDefaultValidator
,
63 const wxString
& name
= wxChoiceNameStr
);
64 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
);
77 #endif // __GTKCHOICEH__