]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/stattextg.h
Fix activation handling in generic wxDataViewCtrl renderers.
[wxWidgets.git] / include / wx / generic / stattextg.h
CommitLineData
916eabe6
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/stattextg.h
3// Purpose: wxGenericStaticText header
4// Author: Marcin Wojdyr
5// Created: 2008-06-26
bce49490 6// Id: $Id$
916eabe6
VZ
7// Copyright: Marcin Wojdyr
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GENERIC_STATTEXTG_H_
12#define _WX_GENERIC_STATTEXTG_H_
13
bce49490
VZ
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
916eabe6 19#include "wx/stattext.h"
bce49490 20#undef wxNO_PORT_STATTEXT_INCLUDE
916eabe6
VZ
21
22class WXDLLIMPEXP_CORE wxGenericStaticText : public wxStaticTextBase
23{
24public:
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
5851e640 47 // overridden base class virtual methods
916eabe6
VZ
48 virtual void SetLabel(const wxString& label);
49 virtual bool SetFont(const wxFont &font);
50
5851e640
VZ
51protected:
52 virtual wxSize DoGetBestClientSize() const;
53
916eabe6
VZ
54 virtual wxString DoGetLabel() const { return m_label; }
55 virtual void DoSetLabel(const wxString& label);
56
916eabe6
VZ
57 void DoSetSize(int x, int y, int width, int height, int sizeFlags);
58
59private:
f26c1c3e
VZ
60 void OnPaint(wxPaintEvent& event);
61
916eabe6
VZ
62 wxString m_label;
63 int m_mnemonic;
64
65 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText)
66};
67
68#endif // _WX_GENERIC_STATTEXTG_H_
69