]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
1b88201f | 2 | // Name: wx/gtk/stattext.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
58614078 | 5 | // Copyright: (c) 1998 Robert Roebling |
1b88201f | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
0416c418 PC |
9 | #ifndef _WX_GTK_STATTEXT_H_ |
10 | #define _WX_GTK_STATTEXT_H_ | |
c801d85f | 11 | |
c801d85f KB |
12 | //----------------------------------------------------------------------------- |
13 | // wxStaticText | |
14 | //----------------------------------------------------------------------------- | |
15 | ||
39bc0347 | 16 | class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase |
c801d85f | 17 | { |
f68586e5 | 18 | public: |
f68586e5 VZ |
19 | wxStaticText(); |
20 | wxStaticText(wxWindow *parent, | |
21 | wxWindowID id, | |
22 | const wxString &label, | |
23 | const wxPoint &pos = wxDefaultPosition, | |
1b88201f | 24 | const wxSize &size = wxDefaultSize, |
f68586e5 VZ |
25 | long style = 0, |
26 | const wxString &name = wxStaticTextNameStr ); | |
27 | ||
28 | bool Create(wxWindow *parent, | |
29 | wxWindowID id, | |
30 | const wxString &label, | |
31 | const wxPoint &pos = wxDefaultPosition, | |
1b88201f | 32 | const wxSize &size = wxDefaultSize, |
f68586e5 VZ |
33 | long style = 0, |
34 | const wxString &name = wxStaticTextNameStr ); | |
35 | ||
c801d85f | 36 | void SetLabel( const wxString &label ); |
f68586e5 | 37 | |
c0e6c051 | 38 | bool SetFont( const wxFont &font ); |
9d522606 RD |
39 | |
40 | static wxVisualAttributes | |
41 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
1b88201f | 42 | |
f68586e5 | 43 | // implementation |
33720b2d | 44 | // -------------- |
f68586e5 VZ |
45 | |
46 | protected: | |
2e1f5012 VZ |
47 | virtual bool GTKWidgetNeedsMnemonic() const; |
48 | virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); | |
49 | ||
33720b2d RR |
50 | virtual wxSize DoGetBestSize() const; |
51 | ||
39bc0347 VZ |
52 | virtual wxString DoGetLabel() const; |
53 | virtual void DoSetLabel(const wxString& str); | |
f5bdfc69 | 54 | #if wxUSE_MARKUP |
3da9cffc | 55 | virtual bool DoSetLabelMarkup(const wxString& markup); |
f5bdfc69 | 56 | #endif // wxUSE_MARKUP |
3da9cffc VZ |
57 | |
58 | private: | |
59 | // Common part of SetLabel() and DoSetLabelMarkup(). | |
60 | typedef void (wxStaticText::*GTKLabelSetter)(GtkLabel *, const wxString&); | |
61 | ||
62 | void GTKDoSetLabel(GTKLabelSetter setter, const wxString& label); | |
63 | ||
39bc0347 | 64 | |
f68586e5 | 65 | DECLARE_DYNAMIC_CLASS(wxStaticText) |
c801d85f KB |
66 | }; |
67 | ||
1b88201f WS |
68 | #endif |
69 | // _WX_GTK_STATTEXT_H_ |