]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/stattext.h
The rounded corners look really dumb at this size.
[wxWidgets.git] / include / wx / gtk / stattext.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/stattext.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_GTK_STATTEXT_H_
10 #define _WX_GTK_STATTEXT_H_
11
12 //-----------------------------------------------------------------------------
13 // wxStaticText
14 //-----------------------------------------------------------------------------
15
16 class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase
17 {
18 public:
19 wxStaticText();
20 wxStaticText(wxWindow *parent,
21 wxWindowID id,
22 const wxString &label,
23 const wxPoint &pos = wxDefaultPosition,
24 const wxSize &size = wxDefaultSize,
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,
32 const wxSize &size = wxDefaultSize,
33 long style = 0,
34 const wxString &name = wxStaticTextNameStr );
35
36 void SetLabel( const wxString &label );
37
38 bool SetFont( const wxFont &font );
39
40 static wxVisualAttributes
41 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
42
43 // implementation
44 // --------------
45
46 protected:
47 virtual bool GTKWidgetNeedsMnemonic() const;
48 virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
49
50 virtual wxSize DoGetBestSize() const;
51
52 virtual wxString DoGetLabel() const;
53 virtual void DoSetLabel(const wxString& str);
54 #if wxUSE_MARKUP
55 virtual bool DoSetLabelMarkup(const wxString& markup);
56 #endif // wxUSE_MARKUP
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
64
65 DECLARE_DYNAMIC_CLASS(wxStaticText)
66 };
67
68 #endif
69 // _WX_GTK_STATTEXT_H_