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() { }
27 wxGenericStaticText(wxWindow
*parent
,
29 const wxString
& label
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxString
& name
= wxStaticTextNameStr
)
35 Create(parent
, id
, label
, pos
, size
, style
, name
);
38 bool Create(wxWindow
*parent
,
40 const wxString
& label
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
44 const wxString
& name
= wxStaticTextNameStr
);
47 // overridden base class virtual methods
48 virtual void SetLabel(const wxString
& label
);
49 virtual bool SetFont(const wxFont
&font
);
52 virtual wxSize
DoGetBestClientSize() const;
54 virtual wxString
DoGetLabel() const { return m_label
; }
55 virtual void DoSetLabel(const wxString
& label
);
57 void DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
);
60 void OnPaint(wxPaintEvent
& event
);
65 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText
)
68 #endif // _WX_GENERIC_STATTEXTG_H_