X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f26c1c3e4a1b76ac1ae03bc0bc1ec2393494e144..38ececd4c399ade4c47ca424eb72dbbd5dda528e:/include/wx/generic/stattextg.h diff --git a/include/wx/generic/stattextg.h b/include/wx/generic/stattextg.h index 02860ea951..918a4f4eb3 100644 --- a/include/wx/generic/stattextg.h +++ b/include/wx/generic/stattextg.h @@ -3,7 +3,6 @@ // Purpose: wxGenericStaticText header // Author: Marcin Wojdyr // Created: 2008-06-26 -// Id: $Id$ // Copyright: Marcin Wojdyr // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,7 +21,7 @@ class WXDLLIMPEXP_CORE wxGenericStaticText : public wxStaticTextBase { public: - wxGenericStaticText() { } + wxGenericStaticText() { Init(); } wxGenericStaticText(wxWindow *parent, wxWindowID id, @@ -32,6 +31,8 @@ public: long style = 0, const wxString& name = wxStaticTextNameStr) { + Init(); + Create(parent, id, label, pos, size, style, name); } @@ -43,24 +44,45 @@ public: long style = 0, const wxString& name = wxStaticTextNameStr); + virtual ~wxGenericStaticText(); -protected: - virtual wxSize DoGetBestClientSize() const; + // overridden base class virtual methods virtual void SetLabel(const wxString& label); virtual bool SetFont(const wxFont &font); +protected: + virtual wxSize DoGetBestClientSize() const; + virtual wxString DoGetLabel() const { return m_label; } virtual void DoSetLabel(const wxString& label); void DoSetSize(int x, int y, int width, int height, int sizeFlags); +#if wxUSE_MARKUP + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + private: + void Init() + { +#if wxUSE_MARKUP + m_markupText = NULL; +#endif // wxUSE_MARKUP + } + void OnPaint(wxPaintEvent& event); + void DoDrawLabel(wxDC& dc, const wxRect& rect); + + // These fields are only used if m_markupText == NULL. wxString m_label; int m_mnemonic; +#if wxUSE_MARKUP + class wxMarkupText *m_markupText; +#endif // wxUSE_MARKUP + DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText) };