1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/stattextg.h
3 // Purpose: wxGenericStaticText header
4 // Author: Marcin Wojdyr
7 // Copyright: Marcin Wojdyr
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GENERIC_STATTEXTG_H_
12 #define _WX_GENERIC_STATTEXTG_H_
14 // prevent it from including the platform-specific wxStaticText declaration as
15 // this is not going to compile if it derives from wxGenericStaticText defined
16 // below (currently this is only the case in wxUniv but it could also happen
18 #define wxNO_PORT_STATTEXT_INCLUDE
19 #include "wx/stattext.h"
20 #undef wxNO_PORT_STATTEXT_INCLUDE
22 class WXDLLIMPEXP_CORE wxGenericStaticText
: public wxStaticTextBase
25 wxGenericStaticText() { Init(); }
27 wxGenericStaticText(wxWindow
*parent
,
29 const wxString
& label
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxString
& name
= wxStaticTextNameStr
)
37 Create(parent
, id
, label
, pos
, size
, style
, name
);
40 bool Create(wxWindow
*parent
,
42 const wxString
& label
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
46 const wxString
& name
= wxStaticTextNameStr
);
48 virtual ~wxGenericStaticText();
51 // overridden base class virtual methods
52 virtual void SetLabel(const wxString
& label
);
53 virtual bool SetFont(const wxFont
&font
);
56 virtual wxSize
DoGetBestClientSize() const;
58 virtual wxString
DoGetLabel() const { return m_label
; }
59 virtual void DoSetLabel(const wxString
& label
);
61 void DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
);
64 virtual bool DoSetLabelMarkup(const wxString
& markup
);
65 #endif // wxUSE_MARKUP
72 #endif // wxUSE_MARKUP
75 void OnPaint(wxPaintEvent
& event
);
77 void DoDrawLabel(wxDC
& dc
, const wxRect
& rect
);
79 // These fields are only used if m_markupText == NULL.
84 class wxMarkupText
*m_markupText
;
85 #endif // wxUSE_MARKUP
87 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText
)
90 #endif // _WX_GENERIC_STATTEXTG_H_