statline.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/generic/statline.h
  3. // Purpose: a generic wxStaticLine class
  4. // Author: Vadim Zeitlin
  5. // Created: 28.06.99
  6. // Copyright: (c) 1998 Vadim Zeitlin
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_GENERIC_STATLINE_H_
  10. #define _WX_GENERIC_STATLINE_H_
  11. class wxStaticBox;
  12. // ----------------------------------------------------------------------------
  13. // wxStaticLine
  14. // ----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase
  16. {
  17. DECLARE_DYNAMIC_CLASS(wxStaticLine)
  18. public:
  19. // constructors and pseudo-constructors
  20. wxStaticLine() { m_statbox = NULL; }
  21. wxStaticLine( wxWindow *parent,
  22. wxWindowID id = wxID_ANY,
  23. const wxPoint &pos = wxDefaultPosition,
  24. const wxSize &size = wxDefaultSize,
  25. long style = wxLI_HORIZONTAL,
  26. const wxString &name = wxStaticLineNameStr )
  27. {
  28. Create(parent, id, pos, size, style, name);
  29. }
  30. virtual ~wxStaticLine();
  31. bool Create( wxWindow *parent,
  32. wxWindowID id = wxID_ANY,
  33. const wxPoint &pos = wxDefaultPosition,
  34. const wxSize &size = wxDefaultSize,
  35. long style = wxLI_HORIZONTAL,
  36. const wxString &name = wxStaticLineNameStr );
  37. // it's necessary to override this wxWindow function because we
  38. // will want to return the main widget for m_statbox
  39. //
  40. WXWidget GetMainWidget() const;
  41. // override wxWindow methods to make things work
  42. virtual void DoSetSize(int x, int y, int width, int height,
  43. int sizeFlags = wxSIZE_AUTO);
  44. virtual void DoMoveWindow(int x, int y, int width, int height);
  45. protected:
  46. // we implement the static line using a static box
  47. wxStaticBox *m_statbox;
  48. };
  49. #endif // _WX_GENERIC_STATLINE_H_