stattext.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/motif/stattext.h
  3. // Purpose: wxStaticText class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 17/09/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_STATTEXT_H_
  11. #define _WX_STATTEXT_H_
  12. class WXDLLIMPEXP_CORE wxStaticText: public wxStaticTextBase
  13. {
  14. DECLARE_DYNAMIC_CLASS(wxStaticText)
  15. public:
  16. wxStaticText() { }
  17. wxStaticText(wxWindow *parent, wxWindowID id,
  18. const wxString& label,
  19. const wxPoint& pos = wxDefaultPosition,
  20. const wxSize& size = wxDefaultSize,
  21. long style = 0,
  22. const wxString& name = wxStaticTextNameStr)
  23. {
  24. Create(parent, id, label, pos, size, style, name);
  25. }
  26. bool Create(wxWindow *parent, wxWindowID id,
  27. const wxString& label,
  28. const wxPoint& pos = wxDefaultPosition,
  29. const wxSize& size = wxDefaultSize,
  30. long style = 0,
  31. const wxString& name = wxStaticTextNameStr);
  32. // implementation
  33. // --------------
  34. // operations
  35. virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
  36. {
  37. return false;
  38. }
  39. virtual void SetLabel(const wxString& label);
  40. // Get the widget that corresponds to the label
  41. // (for font setting, label setting etc.)
  42. virtual WXWidget GetLabelWidget() const
  43. { return m_labelWidget; }
  44. virtual void DoSetLabel(const wxString& str);
  45. virtual wxString DoGetLabel() const;
  46. virtual wxSize DoGetBestSize() const;
  47. protected:
  48. WXWidget m_labelWidget;
  49. };
  50. #endif
  51. // _WX_STATTEXT_H_