- DECLARE_DYNAMIC_CLASS(wxRadioBox)
-
- public:
-
- wxRadioBox(void);
- wxRadioBox( wxWindow *parent, const wxWindowID id, const wxString& title,
- const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
- const int n = 0, const wxString choices[] = NULL,
- const int majorDim = 0, const long style = wxRA_HORIZONTAL,
- const wxString &name = wxRadioBoxNameStr );
- bool Create( wxWindow *parent, const wxWindowID id, const wxString& title,
- const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
- const int n = 0, const wxString choices[] = NULL,
- const int majorDim = 0, const long style = wxRA_HORIZONTAL,
- const wxString &name = wxRadioBoxNameStr );
- int FindString( const wxString& s) const;
- void SetSelection( const int n );
- int GetSelection(void) const;
- wxString GetString( const int n ) const;
- wxString GetLabel(void) const;
- void SetLabel( const wxString& label );
- void SetLabel( const int item, const wxString& label );
- void SetLabel( const int item, wxBitmap *bitmap );
- wxString GetLabel( const int item ) const;
- bool Show( const bool show );
- void Enable( const bool enable );
- void Enable( const int item, const bool enable );
- void Show( const int item, const bool show );
- virtual wxString GetStringSelection(void) const;
- virtual bool SetStringSelection( const wxString& s );
- virtual int Number(void) const;
- int GetNumberOfRowsOrCols(void) const;
- void SetNumberOfRowsOrCols( const int n );
-
- private:
-
- GtkRadioButton *m_radio;
-
+
+ // implement wxRadioBoxBase methods
+ virtual bool Show(int n, bool show = true);
+ virtual bool Enable(int n, bool enable = true);
+
+ virtual bool IsItemEnabled(int n) const;
+ virtual bool IsItemShown(int n) const;
+
+
+ // override some base class methods to operate on radiobox itself too
+ virtual bool Show( bool show = true );
+ virtual bool Enable( bool enable = true );
+
+ virtual void SetLabel( const wxString& label );
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ // implementation
+ // --------------
+
+ void SetFocus();
+ void GtkDisableEvents();
+ void GtkEnableEvents();
+ bool IsOwnGtkWindow( GdkWindow *window );
+ void DoApplyWidgetStyle(GtkRcStyle *style);
+#if wxUSE_TOOLTIPS
+ void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
+#endif // wxUSE_TOOLTIPS
+
+ virtual void OnInternalIdle();
+
+ bool m_hasFocus,
+ m_lostFocus;
+ wxList m_boxes;
+
+protected:
+ // common part of all ctors
+ void Init();
+
+ // check that the index is valid
+ // FIXME: remove once GTK will derive from wxRadioBoxBase
+ inline bool IsValid(int n) const { return n >= 0 && n < GetCount(); }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxRadioBox)