]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/stattext.h
use wxTextEntry in wxTextValidator (modified patch 1821743)
[wxWidgets.git] / include / wx / univ / stattext.h
CommitLineData
1e6feb95
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/stattext.h
3// Purpose: wxStaticText
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 14.08.00
7// RCS-ID: $Id$
442b35b5 8// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
65571936 9// Licence: wxWindows licence
1e6feb95
VZ
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_UNIV_STATTEXT_H_
13#define _WX_UNIV_STATTEXT_H_
14
1e6feb95
VZ
15class WXDLLEXPORT wxStaticText : public wxStaticTextBase
16{
17public:
55e0770e
VS
18 wxStaticText() { }
19
1e6feb95
VZ
20 // usual ctor
21 wxStaticText(wxWindow *parent,
22 const wxString& label,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize)
25 {
a290fa5a 26 Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr);
1e6feb95
VZ
27 }
28
29 // full form
30 wxStaticText(wxWindow *parent,
31 wxWindowID id,
32 const wxString& label,
33 const wxPoint& pos = wxDefaultPosition,
3379ed37 34 const wxSize& size = wxDefaultSize,
1e6feb95
VZ
35 long style = 0,
36 const wxString &name = wxStaticTextNameStr)
37 {
38 Create(parent, id, label, pos, size, style, name);
39 }
40
41 // function ctor
42 bool Create(wxWindow *parent,
43 wxWindowID id,
44 const wxString &label,
45 const wxPoint &pos = wxDefaultPosition,
3379ed37 46 const wxSize &size = wxDefaultSize,
1e6feb95
VZ
47 long style = 0,
48 const wxString &name = wxStaticTextNameStr);
49
50 // implementation only from now on
51
52 virtual void SetLabel(const wxString& label);
53
a290fa5a 54 virtual bool IsFocused() const { return false; }
2cdd094b 55
1e6feb95
VZ
56protected:
57 // calculate the optimal size for the label
58 virtual wxSize DoGetBestClientSize() const;
59
60 // draw the control
61 virtual void DoDraw(wxControlRenderer *renderer);
3379ed37 62
39bc0347
VZ
63 virtual void DoSetLabel(const wxString& str);
64 virtual wxString DoGetLabel() const;
65
3379ed37 66 DECLARE_ABSTRACT_CLASS(wxStaticText)
1e6feb95
VZ
67};
68
69#endif // _WX_UNIV_STATTEXT_H_