stattext.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/stattext.h
  3. // Purpose: wxStaticText class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_STATTEXT_H_
  11. #define _WX_STATTEXT_H_
  12. class WXDLLIMPEXP_CORE wxStaticText: public wxStaticTextBase
  13. {
  14. public:
  15. wxStaticText() { }
  16. wxStaticText(wxWindow *parent, wxWindowID id,
  17. const wxString& label,
  18. const wxPoint& pos = wxDefaultPosition,
  19. const wxSize& size = wxDefaultSize,
  20. long style = 0,
  21. const wxString& name = wxStaticTextNameStr)
  22. {
  23. Create(parent, id, label, pos, size, style, name);
  24. }
  25. bool Create(wxWindow *parent, wxWindowID id,
  26. const wxString& label,
  27. const wxPoint& pos = wxDefaultPosition,
  28. const wxSize& size = wxDefaultSize,
  29. long style = 0,
  30. const wxString& name = wxStaticTextNameStr);
  31. // accessors
  32. void SetLabel( const wxString &str ) ;
  33. bool SetFont( const wxFont &font );
  34. virtual bool AcceptsFocus() const { return false; }
  35. protected :
  36. virtual wxString DoGetLabel() const;
  37. virtual void DoSetLabel(const wxString& str);
  38. virtual wxSize DoGetBestSize() const ;
  39. #if wxUSE_MARKUP && wxOSX_USE_COCOA
  40. virtual bool DoSetLabelMarkup(const wxString& markup);
  41. #endif // wxUSE_MARKUP && wxOSX_USE_COCOA
  42. DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText)
  43. };
  44. #endif
  45. // _WX_STATTEXT_H_