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