1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-17 14:44:52 +00:00
|
|
|
// Name: wx/gtk/stattext.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2006-10-17 14:44:52 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-08-30 05:55:56 +00:00
|
|
|
#ifndef _WX_GTK_STATTEXT_H_
|
|
|
|
#define _WX_GTK_STATTEXT_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxStaticText
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-04-01 14:13:15 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-11-19 21:01:20 +00:00
|
|
|
public:
|
|
|
|
wxStaticText();
|
|
|
|
wxStaticText(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString &label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
2006-10-17 14:44:52 +00:00
|
|
|
const wxSize &size = wxDefaultSize,
|
1999-11-19 21:01:20 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxString &name = wxStaticTextNameStr );
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString &label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
2006-10-17 14:44:52 +00:00
|
|
|
const wxSize &size = wxDefaultSize,
|
1999-11-19 21:01:20 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxString &name = wxStaticTextNameStr );
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
void SetLabel( const wxString &label );
|
1999-11-19 21:01:20 +00:00
|
|
|
|
2004-06-21 22:58:13 +00:00
|
|
|
bool SetFont( const wxFont &font );
|
2004-05-06 17:26:25 +00:00
|
|
|
|
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
2006-10-17 14:44:52 +00:00
|
|
|
|
1999-11-19 21:01:20 +00:00
|
|
|
// implementation
|
2000-01-03 11:42:49 +00:00
|
|
|
// --------------
|
1999-11-19 21:01:20 +00:00
|
|
|
|
|
|
|
protected:
|
2006-03-12 14:21:19 +00:00
|
|
|
virtual bool GTKWidgetNeedsMnemonic() const;
|
|
|
|
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
|
|
|
|
2000-01-03 11:42:49 +00:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
2007-04-01 14:13:15 +00:00
|
|
|
virtual wxString DoGetLabel() const;
|
|
|
|
virtual void DoSetLabel(const wxString& str);
|
2011-02-27 12:48:07 +00:00
|
|
|
#if wxUSE_MARKUP
|
2011-02-27 12:47:26 +00:00
|
|
|
virtual bool DoSetLabelMarkup(const wxString& markup);
|
2011-02-27 12:48:07 +00:00
|
|
|
#endif // wxUSE_MARKUP
|
2011-02-27 12:47:26 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Common part of SetLabel() and DoSetLabelMarkup().
|
|
|
|
typedef void (wxStaticText::*GTKLabelSetter)(GtkLabel *, const wxString&);
|
|
|
|
|
|
|
|
void GTKDoSetLabel(GTKLabelSetter setter, const wxString& label);
|
|
|
|
|
2007-04-01 14:13:15 +00:00
|
|
|
|
1999-11-19 21:01:20 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2006-10-17 14:44:52 +00:00
|
|
|
#endif
|
|
|
|
// _WX_GTK_STATTEXT_H_
|