2001-06-26 20:59:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/univ/stattext.h
|
|
|
|
// Purpose: wxStaticText
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 14.08.00
|
|
|
|
// RCS-ID: $Id$
|
2001-07-02 19:42:27 +00:00
|
|
|
// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 20:59:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_UNIV_STATTEXT_H_
|
|
|
|
#define _WX_UNIV_STATTEXT_H_
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxStaticText : public wxStaticTextBase
|
|
|
|
{
|
|
|
|
public:
|
2002-02-10 19:07:40 +00:00
|
|
|
wxStaticText() { }
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
// usual ctor
|
|
|
|
wxStaticText(wxWindow *parent,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize)
|
|
|
|
{
|
2004-08-10 13:08:43 +00:00
|
|
|
Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr);
|
2001-06-26 20:59:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// full form
|
|
|
|
wxStaticText(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2001-07-03 19:38:19 +00:00
|
|
|
const wxSize& size = wxDefaultSize,
|
2001-06-26 20:59:19 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxString &name = wxStaticTextNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
// function ctor
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString &label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
2001-07-03 19:38:19 +00:00
|
|
|
const wxSize &size = wxDefaultSize,
|
2001-06-26 20:59:19 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxString &name = wxStaticTextNameStr);
|
|
|
|
|
|
|
|
// implementation only from now on
|
|
|
|
|
|
|
|
virtual void SetLabel(const wxString& label);
|
|
|
|
|
2004-08-10 13:08:43 +00:00
|
|
|
virtual bool IsFocused() const { return false; }
|
2003-02-18 09:40:30 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
protected:
|
|
|
|
// calculate the optimal size for the label
|
|
|
|
virtual wxSize DoGetBestClientSize() const;
|
|
|
|
|
|
|
|
// draw the control
|
|
|
|
virtual void DoDraw(wxControlRenderer *renderer);
|
2001-07-03 19:38:19 +00:00
|
|
|
|
2007-04-01 14:13:15 +00:00
|
|
|
virtual void DoSetLabel(const wxString& str);
|
|
|
|
virtual wxString DoGetLabel() const;
|
|
|
|
|
2001-07-03 19:38:19 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS(wxStaticText)
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_UNIV_STATTEXT_H_
|