1 ///////////////////////////////////////////////////////////////////////////// 2 // Name: wx/univ/stattext.h 3 // Purpose: wxStaticText 4 // Author: Vadim Zeitlin 5 // Modified by: 6 // Created: 14.08.00 7 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) 8 // Licence: wxWindows licence 9 ///////////////////////////////////////////////////////////////////////////// 10 11 #ifndef _WX_UNIV_STATTEXT_H_ 12 #define _WX_UNIV_STATTEXT_H_ 13 14 #include "wx/generic/stattextg.h" 15 16 class WXDLLIMPEXP_CORE wxStaticText : public wxGenericStaticText 17 { 18 public: wxStaticText()19 wxStaticText() { } 20 21 // usual ctor 22 wxStaticText(wxWindow *parent, 23 const wxString& label, 24 const wxPoint& pos = wxDefaultPosition, 25 const wxSize& size = wxDefaultSize) 26 { 27 Create(parent, wxID_ANY, label, pos, size, 0, wxASCII_STR(wxStaticTextNameStr)); 28 } 29 30 // full form 31 wxStaticText(wxWindow *parent, 32 wxWindowID id, 33 const wxString& label, 34 const wxPoint& pos = wxDefaultPosition, 35 const wxSize& size = wxDefaultSize, 36 long style = 0, 37 const wxString &name = wxASCII_STR(wxStaticTextNameStr)) 38 { 39 Create(parent, id, label, pos, size, style, name); 40 } 41 42 // function ctor 43 bool Create(wxWindow *parent, 44 wxWindowID id, 45 const wxString &label, 46 const wxPoint &pos = wxDefaultPosition, 47 const wxSize &size = wxDefaultSize, 48 long style = 0, 49 const wxString &name = wxASCII_STR(wxStaticTextNameStr)); 50 51 // implementation only from now on 52 53 virtual void SetLabel(const wxString& label) wxOVERRIDE; 54 IsFocused()55 virtual bool IsFocused() const wxOVERRIDE { return false; } 56 57 protected: 58 // draw the control 59 virtual void DoDraw(wxControlRenderer *renderer) wxOVERRIDE; 60 61 virtual void WXSetVisibleLabel(const wxString& str) wxOVERRIDE; 62 virtual wxString WXGetVisibleLabel() const wxOVERRIDE; 63 64 wxDECLARE_DYNAMIC_CLASS(wxStaticText); 65 }; 66 67 #endif // _WX_UNIV_STATTEXT_H_ 68