radiobut.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/radiobut.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK_RADIOBUT_H_
  9. #define _WX_GTK_RADIOBUT_H_
  10. //-----------------------------------------------------------------------------
  11. // wxRadioButton
  12. //-----------------------------------------------------------------------------
  13. class WXDLLIMPEXP_CORE wxRadioButton: public wxControl
  14. {
  15. public:
  16. wxRadioButton() { }
  17. wxRadioButton( wxWindow *parent,
  18. wxWindowID id,
  19. const wxString& label,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize,
  22. long style = 0,
  23. const wxValidator& validator = wxDefaultValidator,
  24. const wxString& name = wxRadioButtonNameStr )
  25. {
  26. Create( parent, id, label, pos, size, style, validator, name );
  27. }
  28. bool Create( wxWindow *parent,
  29. wxWindowID id,
  30. const wxString& label,
  31. const wxPoint& pos = wxDefaultPosition,
  32. const wxSize& size = wxDefaultSize,
  33. long style = 0,
  34. const wxValidator& validator = wxDefaultValidator,
  35. const wxString& name = wxRadioButtonNameStr );
  36. virtual void SetLabel(const wxString& label);
  37. virtual void SetValue(bool val);
  38. virtual bool GetValue() const;
  39. virtual bool Enable( bool enable = true );
  40. static wxVisualAttributes
  41. GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
  42. protected:
  43. virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
  44. virtual void DoApplyWidgetStyle(GtkRcStyle *style);
  45. virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
  46. private:
  47. typedef wxControl base_type;
  48. DECLARE_DYNAMIC_CLASS(wxRadioButton)
  49. };
  50. #endif // _WX_GTK_RADIOBUT_H_