]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/radiobox.h
Deleting and re-adding to get the execute bit set
[wxWidgets.git] / include / wx / gtk1 / radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobox.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __GTKRADIOBOXH__
12 #define __GTKRADIOBOXH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19
20 #if wxUSE_RADIOBOX
21
22 #include "wx/object.h"
23 #include "wx/list.h"
24 #include "wx/control.h"
25 #include "wx/bitmap.h"
26
27 //-----------------------------------------------------------------------------
28 // classes
29 //-----------------------------------------------------------------------------
30
31 class wxRadioBox;
32
33 //-----------------------------------------------------------------------------
34 // global data
35 //-----------------------------------------------------------------------------
36
37 extern const char *wxRadioBoxNameStr;
38
39 //-----------------------------------------------------------------------------
40 // wxRadioBox
41 //-----------------------------------------------------------------------------
42
43 class wxRadioBox: public wxControl
44 {
45
46 DECLARE_DYNAMIC_CLASS(wxRadioBox)
47
48 public:
49 wxRadioBox();
50 inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title,
51 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
52 int n = 0, const wxString choices[] = (const wxString *) NULL,
53 int majorDim = 1, long style = wxRA_HORIZONTAL,
54 const wxValidator& val = wxDefaultValidator,
55 const wxString& name = wxRadioBoxNameStr )
56 {
57 Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
58 }
59 ~wxRadioBox(void);
60 bool Create( wxWindow *parent, wxWindowID id, const wxString& title,
61 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
62 int n = 0, const wxString choices[] = (const wxString *) NULL,
63 int majorDim = 0, long style = wxRA_HORIZONTAL,
64 const wxValidator& val = wxDefaultValidator,
65 const wxString& name = wxRadioBoxNameStr );
66
67 int FindString( const wxString& s) const;
68 void SetSelection( int n );
69 int GetSelection() const;
70
71 wxString GetString( int n ) const;
72
73 wxString GetLabel( int item ) const;
74 wxString GetLabel() const { return wxControl::GetLabel(); }
75 void SetLabel( const wxString& label );
76 void SetLabel( int item, const wxString& label );
77
78 /* doesn't work */
79 void SetLabel( int item, wxBitmap *bitmap );
80
81 bool Show( bool show );
82 void Show( int item, bool show );
83
84 bool Enable( bool enable );
85 void Enable( int item, bool enable );
86
87 virtual wxString GetStringSelection() const;
88 virtual bool SetStringSelection( const wxString& s );
89
90 virtual int Number() const;
91 int GetNumberOfRowsOrCols() const;
92 void SetNumberOfRowsOrCols( int n );
93
94 void OnSize( wxSizeEvent &event );
95 void SetFocus();
96
97 // implementation
98
99 void DisableEvents();
100 void EnableEvents();
101 bool IsOwnGtkWindow( GdkWindow *window );
102 void ApplyWidgetStyle();
103 wxSize LayoutItems();
104
105 bool m_alreadySent;
106 int m_majorDim;
107 wxList m_boxes;
108
109 DECLARE_EVENT_TABLE()
110 };
111
112 #endif
113
114 #endif // __GTKRADIOBOXH__