]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/choice.h
#ifdefed out a typedef not appropriate to MSW; added SetSelection to choice dialog
[wxWidgets.git] / include / wx / gtk / choice.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: choice.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKCHOICEH__
13 #define __GTKCHOICEH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/object.h"
21 #include "wx/list.h"
22 #include "wx/control.h"
23
24 //-----------------------------------------------------------------------------
25 // classes
26 //-----------------------------------------------------------------------------
27
28 class wxChoice;
29
30 //-----------------------------------------------------------------------------
31 // global data
32 //-----------------------------------------------------------------------------
33
34 extern const char *wxChoiceNameStr;
35
36 //-----------------------------------------------------------------------------
37 // wxChoice
38 //-----------------------------------------------------------------------------
39
40 class wxChoice: public wxControl
41 {
42 DECLARE_DYNAMIC_CLASS(wxChoice)
43
44 public:
45
46 wxChoice(void);
47 wxChoice( wxWindow *parent, const wxWindowID id,
48 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
49 const int n = 0, const wxString choices[] = NULL,
50 const long style = 0, const wxString &name = wxChoiceNameStr );
51 bool Create( wxWindow *parent, const wxWindowID id,
52 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
53 const int n = 0, const wxString choices[] = NULL,
54 const long style = 0, const wxString &name = wxChoiceNameStr );
55 void Append( const wxString &item );
56 void Clear(void);
57 int FindString( const wxString &string ) const;
58 int GetColumns(void) const;
59 int GetSelection(void);
60 wxString GetString( const int n ) const;
61 wxString GetStringSelection(void) const;
62 int Number(void) const;
63 void SetColumns( const int n = 1 );
64 void SetSelection( const int n );
65 void SetStringSelection( const wxString &string );
66 };
67
68 #endif // __GTKCHOICEH__