]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/stattextg.h
no changes, just update the copyright in the header
[wxWidgets.git] / include / wx / generic / stattextg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/stattextg.h
3 // Purpose: wxGenericStaticText header
4 // Author: Marcin Wojdyr
5 // Created: 2008-06-26
6 // Id: $Id$
7 // Copyright: Marcin Wojdyr
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_GENERIC_STATTEXTG_H_
12 #define _WX_GENERIC_STATTEXTG_H_
13
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
17 // with other ports)
18 #define wxNO_PORT_STATTEXT_INCLUDE
19 #include "wx/stattext.h"
20 #undef wxNO_PORT_STATTEXT_INCLUDE
21
22 class WXDLLIMPEXP_CORE wxGenericStaticText : public wxStaticTextBase
23 {
24 public:
25 wxGenericStaticText() { }
26
27 wxGenericStaticText(wxWindow *parent,
28 wxWindowID id,
29 const wxString& label,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = 0,
33 const wxString& name = wxStaticTextNameStr)
34 {
35 Create(parent, id, label, pos, size, style, name);
36 }
37
38 bool Create(wxWindow *parent,
39 wxWindowID id,
40 const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = 0,
44 const wxString& name = wxStaticTextNameStr);
45
46
47 virtual wxSize DoGetBestClientSize() const;
48 virtual wxSize DoGetBestSize() const;
49
50 virtual void SetLabel(const wxString& label);
51 virtual bool SetFont(const wxFont &font);
52
53 virtual wxString DoGetLabel() const { return m_label; }
54 virtual void DoSetLabel(const wxString& label);
55
56 protected:
57 void OnPaint(wxPaintEvent& event);
58 void DoSetSize(int x, int y, int width, int height, int sizeFlags);
59
60 private:
61 wxString m_label;
62 int m_mnemonic;
63
64 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText)
65 };
66
67 #endif // _WX_GENERIC_STATTEXTG_H_
68