]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/stattext.h
support getting device resolution on all osx ports
[wxWidgets.git] / include / wx / gtk / stattext.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/stattext.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_STATTEXT_H_
11 #define _WX_GTK_STATTEXT_H_
12
13 //-----------------------------------------------------------------------------
14 // wxStaticText
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase
18 {
19 public:
20 wxStaticText();
21 wxStaticText(wxWindow *parent,
22 wxWindowID id,
23 const wxString &label,
24 const wxPoint &pos = wxDefaultPosition,
25 const wxSize &size = wxDefaultSize,
26 long style = 0,
27 const wxString &name = wxStaticTextNameStr );
28
29 bool Create(wxWindow *parent,
30 wxWindowID id,
31 const wxString &label,
32 const wxPoint &pos = wxDefaultPosition,
33 const wxSize &size = wxDefaultSize,
34 long style = 0,
35 const wxString &name = wxStaticTextNameStr );
36
37 void SetLabel( const wxString &label );
38
39 bool SetFont( const wxFont &font );
40
41 static wxVisualAttributes
42 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
43
44 // implementation
45 // --------------
46
47 protected:
48 virtual bool GTKWidgetNeedsMnemonic() const;
49 virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
50
51 virtual wxSize DoGetBestSize() const;
52
53 virtual wxString DoGetLabel() const;
54 virtual void DoSetLabel(const wxString& str);
55 #if wxUSE_MARKUP
56 virtual bool DoSetLabelMarkup(const wxString& markup);
57 #endif // wxUSE_MARKUP
58
59 private:
60 // Common part of SetLabel() and DoSetLabelMarkup().
61 typedef void (wxStaticText::*GTKLabelSetter)(GtkLabel *, const wxString&);
62
63 void GTKDoSetLabel(GTKLabelSetter setter, const wxString& label);
64
65
66 DECLARE_DYNAMIC_CLASS(wxStaticText)
67 };
68
69 #endif
70 // _WX_GTK_STATTEXT_H_