statbox.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/univ/statbox.h
  3. // Purpose: wxStaticBox declaration
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 15.08.00
  7. // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_UNIV_STATBOX_H_
  11. #define _WX_UNIV_STATBOX_H_
  12. class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase
  13. {
  14. public:
  15. wxStaticBox() { }
  16. wxStaticBox(wxWindow *parent,
  17. const wxString& label,
  18. const wxPoint& pos = wxDefaultPosition,
  19. const wxSize& size = wxDefaultSize)
  20. {
  21. Create(parent, wxID_ANY, label, pos, size);
  22. }
  23. wxStaticBox(wxWindow *parent, wxWindowID id,
  24. const wxString& label,
  25. const wxPoint& pos = wxDefaultPosition,
  26. const wxSize& size = wxDefaultSize,
  27. long style = 0,
  28. const wxString& name = wxStaticBoxNameStr)
  29. {
  30. Create(parent, id, label, pos, size, style, name);
  31. }
  32. bool Create(wxWindow *parent,
  33. wxWindowID id,
  34. const wxString& label,
  35. const wxPoint& pos = wxDefaultPosition,
  36. const wxSize& size = wxDefaultSize,
  37. long style = 0,
  38. const wxString& name = wxStaticBoxNameStr);
  39. // the origin of the static box is inside the border and under the label:
  40. // take account of this
  41. virtual wxPoint GetBoxAreaOrigin() const;
  42. // returning true from here ensures that we act as a container window for
  43. // our children
  44. virtual bool IsStaticBox() const { return true; }
  45. protected:
  46. // draw the control
  47. virtual void DoDraw(wxControlRenderer *renderer);
  48. // get the size of the border
  49. wxRect GetBorderGeometry() const;
  50. private:
  51. DECLARE_DYNAMIC_CLASS(wxStaticBox)
  52. };
  53. #endif // _WX_UNIV_STATBOX_H_