]>
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
47 inline wxRadioBox( wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
48 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
49 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
50 int majorDim
= 1, long style
= wxRA_HORIZONTAL
,
51 const wxValidator
& val
= wxDefaultValidator
,
52 const wxString
& name
= wxRadioBoxNameStr
)
54 Create( parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
57 bool Create( wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
58 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
59 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
60 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
61 const wxValidator
& val
= wxDefaultValidator
,
62 const wxString
& name
= wxRadioBoxNameStr
);
64 int FindString( const wxString
& s
) const;
65 void SetSelection( int n
);
66 int GetSelection() const;
68 wxString
GetString( int n
) const;
70 wxString
GetLabel( int item
) const;
71 wxString
GetLabel() const { return wxControl::GetLabel(); }
72 void SetLabel( const wxString
& label
);
73 void SetLabel( int item
, const wxString
& label
);
76 void SetLabel( int item
, wxBitmap
*bitmap
);
78 bool Show( bool show
);
79 void Show( int item
, bool show
);
81 bool Enable( bool enable
);
82 void Enable( int item
, bool enable
);
84 virtual wxString
GetStringSelection() const;
85 virtual bool SetStringSelection( const wxString
& s
);
87 virtual int Number() const;
88 int GetNumberOfRowsOrCols() const;
89 void SetNumberOfRowsOrCols( int n
);
95 void GtkDisableEvents();
96 void GtkEnableEvents();
97 bool IsOwnGtkWindow( GdkWindow
*window
);
98 void ApplyWidgetStyle();
100 void ApplyToolTip( GtkTooltips
*tips
, const wxChar
*tip
);
101 #endif // wxUSE_TOOLTIPS
102 wxSize
LayoutItems();
103 void DoSetSize( int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
110 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
115 #endif // __GTKRADIOBOXH__