]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKRADIOBOXH__
12 #define __GTKRADIOBOXH__
22 #include "wx/object.h"
24 #include "wx/control.h"
25 #include "wx/bitmap.h"
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 extern const char *wxRadioBoxNameStr
;
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class wxRadioBox
: public wxControl
46 wxRadioBox() { Init(); }
47 wxRadioBox(wxWindow
*parent
,
49 const wxString
& title
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
53 const wxString choices
[] = (const wxString
*) NULL
,
55 long style
= wxRA_HORIZONTAL
,
56 const wxValidator
& val
= wxDefaultValidator
,
57 const wxString
& name
= wxRadioBoxNameStr
)
61 Create( parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
65 bool Create(wxWindow
*parent
,
67 const wxString
& title
,
68 const wxPoint
& pos
= wxDefaultPosition
,
69 const wxSize
& size
= wxDefaultSize
,
71 const wxString choices
[] = (const wxString
*) NULL
,
73 long style
= wxRA_HORIZONTAL
,
74 const wxValidator
& val
= wxDefaultValidator
,
75 const wxString
& name
= wxRadioBoxNameStr
);
77 int FindString( const wxString
& s
) const;
78 void SetSelection( int n
);
79 int GetSelection() const;
81 wxString
GetString( int n
) const;
83 wxString
GetLabel( int item
) const;
84 wxString
GetLabel() const { return wxControl::GetLabel(); }
85 void SetLabel( const wxString
& label
);
86 void SetLabel( int item
, const wxString
& label
);
89 void SetLabel( int item
, wxBitmap
*bitmap
);
91 bool Show( bool show
);
92 void Show( int item
, bool show
);
94 bool Enable( bool enable
);
95 void Enable( int item
, bool enable
);
97 virtual wxString
GetStringSelection() const;
98 virtual bool SetStringSelection( const wxString
& s
);
100 virtual int Number() const;
101 int GetNumberOfRowsOrCols() const;
102 void SetNumberOfRowsOrCols( int n
);
108 void GtkDisableEvents();
109 void GtkEnableEvents();
110 bool IsOwnGtkWindow( GdkWindow
*window
);
111 void ApplyWidgetStyle();
113 void ApplyToolTip( GtkTooltips
*tips
, const wxChar
*tip
);
114 #endif // wxUSE_TOOLTIPS
115 wxSize
LayoutItems();
117 virtual void DoSetSize( int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
118 virtual void OnInternalIdle();
127 // common part of all ctors
131 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
136 #endif // __GTKRADIOBOXH__