radiobut.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/radiobut.h
  3. // Purpose: wxRadioButton class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_RADIOBUT_H_
  11. #define _WX_RADIOBUT_H_
  12. class WXDLLIMPEXP_CORE wxRadioButton: public wxControl
  13. {
  14. DECLARE_DYNAMIC_CLASS(wxRadioButton)
  15. protected:
  16. public:
  17. inline wxRadioButton() {}
  18. inline wxRadioButton(wxWindow *parent, wxWindowID id,
  19. const wxString& label,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize, long style = 0,
  22. const wxValidator& validator = wxDefaultValidator,
  23. const wxString& name = wxRadioButtonNameStr)
  24. {
  25. Create(parent, id, label, pos, size, style, validator, name);
  26. }
  27. virtual ~wxRadioButton();
  28. bool Create(wxWindow *parent, wxWindowID id,
  29. const wxString& label,
  30. const wxPoint& pos = wxDefaultPosition,
  31. const wxSize& size = wxDefaultSize, long style = 0,
  32. const wxValidator& validator = wxDefaultValidator,
  33. const wxString& name = wxRadioButtonNameStr);
  34. virtual void SetValue(bool val);
  35. virtual bool GetValue() const ;
  36. // implementation
  37. void Command(wxCommandEvent& event);
  38. wxRadioButton *AddInCycle(wxRadioButton *cycle);
  39. void RemoveFromCycle();
  40. inline wxRadioButton *NextInCycle() {return m_cycle;}
  41. // osx specific event handling common for all osx-ports
  42. virtual bool OSXHandleClicked( double timestampsec );
  43. protected:
  44. wxRadioButton *m_cycle;
  45. };
  46. // Not implemented
  47. #if 0
  48. class WXDLLIMPEXP_FWD_CORE wxBitmap ;
  49. WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxBitmapRadioButtonNameStr[];
  50. class WXDLLIMPEXP_CORE wxBitmapRadioButton: public wxRadioButton
  51. {
  52. DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
  53. protected:
  54. wxBitmap *theButtonBitmap;
  55. public:
  56. inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
  57. inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
  58. const wxBitmap *label,
  59. const wxPoint& pos = wxDefaultPosition,
  60. const wxSize& size = wxDefaultSize, long style = 0,
  61. const wxValidator& validator = wxDefaultValidator,
  62. const wxString& name = wxBitmapRadioButtonNameStr)
  63. {
  64. Create(parent, id, label, pos, size, style, validator, name);
  65. }
  66. bool Create(wxWindow *parent, wxWindowID id,
  67. const wxBitmap *label,
  68. const wxPoint& pos = wxDefaultPosition,
  69. const wxSize& size = wxDefaultSize, long style = 0,
  70. const wxValidator& validator = wxDefaultValidator,
  71. const wxString& name = wxBitmapRadioButtonNameStr);
  72. virtual void SetLabel(const wxBitmap *label);
  73. virtual void SetValue(bool val) ;
  74. virtual bool GetValue() const ;
  75. };
  76. #endif
  77. #endif
  78. // _WX_RADIOBUT_H_