statbox.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/cocoa/statbox.h
  3. // Purpose: wxStaticBox class
  4. // Author: David Elliott
  5. // Modified by:
  6. // Created: 2003/03/18
  7. // Copyright: (c) 2003 David Elliott
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef __WX_COCOA_STATBOX_H__
  11. #define __WX_COCOA_STATBOX_H__
  12. #include "wx/cocoa/NSBox.h"
  13. // ========================================================================
  14. // wxStaticBox
  15. // ========================================================================
  16. class WXDLLIMPEXP_CORE wxStaticBox: public wxStaticBoxBase, protected wxCocoaNSBox
  17. {
  18. DECLARE_DYNAMIC_CLASS(wxStaticBox)
  19. DECLARE_EVENT_TABLE()
  20. WX_DECLARE_COCOA_OWNER(NSBox,NSView,NSView)
  21. // ------------------------------------------------------------------------
  22. // initialization
  23. // ------------------------------------------------------------------------
  24. public:
  25. wxStaticBox() { }
  26. wxStaticBox(wxWindow *parent, wxWindowID winid, const wxString& title,
  27. const wxPoint& pos = wxDefaultPosition,
  28. const wxSize& size = wxDefaultSize,
  29. long style = 0, const wxString& name = wxStaticBoxNameStr)
  30. {
  31. Create(parent, winid, title, pos, size, style, name);
  32. }
  33. bool Create(wxWindow *parent, wxWindowID winid, const wxString& title,
  34. const wxPoint& pos = wxDefaultPosition,
  35. const wxSize& size = wxDefaultSize,
  36. long style = 0, const wxString& name = wxStaticBoxNameStr);
  37. virtual ~wxStaticBox();
  38. virtual void SetLabel(const wxString& label);
  39. virtual wxString GetLabel() const;
  40. // ------------------------------------------------------------------------
  41. // Cocoa callbacks
  42. // ------------------------------------------------------------------------
  43. protected:
  44. // Static boxes cannot be enabled/disabled
  45. virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { }
  46. // ------------------------------------------------------------------------
  47. // Implementation
  48. // ------------------------------------------------------------------------
  49. public:
  50. virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
  51. protected:
  52. };
  53. #endif // __WX_COCOA_STATBOX_H__