stattext.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/univ/stattext.h
  3. // Purpose: wxStaticText
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 14.08.00
  7. // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_UNIV_STATTEXT_H_
  11. #define _WX_UNIV_STATTEXT_H_
  12. #include "wx/generic/stattextg.h"
  13. class WXDLLIMPEXP_CORE wxStaticText : public wxGenericStaticText
  14. {
  15. public:
  16. wxStaticText() { }
  17. // usual ctor
  18. wxStaticText(wxWindow *parent,
  19. const wxString& label,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize)
  22. {
  23. Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr);
  24. }
  25. // full form
  26. wxStaticText(wxWindow *parent,
  27. wxWindowID id,
  28. const wxString& label,
  29. const wxPoint& pos = wxDefaultPosition,
  30. const wxSize& size = wxDefaultSize,
  31. long style = 0,
  32. const wxString &name = wxStaticTextNameStr)
  33. {
  34. Create(parent, id, label, pos, size, style, name);
  35. }
  36. // function ctor
  37. bool Create(wxWindow *parent,
  38. wxWindowID id,
  39. const wxString &label,
  40. const wxPoint &pos = wxDefaultPosition,
  41. const wxSize &size = wxDefaultSize,
  42. long style = 0,
  43. const wxString &name = wxStaticTextNameStr);
  44. // implementation only from now on
  45. virtual void SetLabel(const wxString& label);
  46. virtual bool IsFocused() const { return false; }
  47. protected:
  48. // draw the control
  49. virtual void DoDraw(wxControlRenderer *renderer);
  50. virtual void DoSetLabel(const wxString& str);
  51. virtual wxString DoGetLabel() const;
  52. DECLARE_DYNAMIC_CLASS(wxStaticText)
  53. };
  54. #endif // _WX_UNIV_STATTEXT_H_