1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/gtk/statbox.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
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-12-05 14:57:58 -05:00
|
|
|
#ifndef _WX_GTKSTATICBOX_H_
|
|
|
|
#define _WX_GTKSTATICBOX_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxStaticBox
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
2001-06-26 16:59:19 -04:00
|
|
|
public:
|
2017-12-18 12:28:53 -05:00
|
|
|
wxStaticBox()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
wxStaticBox( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString &label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = 0,
|
2017-12-18 12:28:53 -05:00
|
|
|
const wxString &name = wxStaticBoxNameStr )
|
|
|
|
{
|
2017-12-19 15:29:32 -05:00
|
|
|
Create( parent, id, label, pos, size, style, name );
|
|
|
|
}
|
|
|
|
|
|
|
|
wxStaticBox( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
wxWindow* label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString &name = wxStaticBoxNameStr )
|
|
|
|
{
|
2017-12-18 12:28:53 -05:00
|
|
|
Create( parent, id, label, pos, size, style, name );
|
|
|
|
}
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
bool Create( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString &label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = 0,
|
2017-12-19 15:29:32 -05:00
|
|
|
const wxString &name = wxStaticBoxNameStr )
|
|
|
|
{
|
|
|
|
return DoCreate( parent, id, &label, NULL, pos, size, style, name );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
wxWindow* label,
|
|
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
|
|
const wxSize &size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString &name = wxStaticBoxNameStr )
|
|
|
|
{
|
|
|
|
return DoCreate( parent, id, NULL, label, pos, size, style, name );
|
|
|
|
}
|
2001-06-26 16:59:19 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void SetLabel( const wxString &label ) wxOVERRIDE;
|
2001-06-26 16:59:19 -04:00
|
|
|
|
2004-05-06 13:26:25 -04:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
// implementation
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool GTKIsTransparentForMouse() const wxOVERRIDE { return true; }
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const wxOVERRIDE;
|
2006-05-22 22:04:01 -04:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void AddChild( wxWindowBase *child ) wxOVERRIDE;
|
2009-04-25 06:49:36 -04:00
|
|
|
|
2004-07-03 12:58:10 -04:00
|
|
|
protected:
|
2017-12-19 15:29:32 -05:00
|
|
|
// Common implementation of both Create() overloads: exactly one of
|
|
|
|
// labelStr and labelWin parameters must be non-null.
|
|
|
|
bool DoCreate(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString* labelStr,
|
|
|
|
wxWindow* labelWin,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
long style,
|
|
|
|
const wxString& name);
|
|
|
|
|
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
|
|
|
void DoApplyWidgetStyle(GtkRcStyle *style) wxOVERRIDE;
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxStaticBox);
|
2001-06-26 16:59:19 -04:00
|
|
|
};
|
1999-06-14 19:04:05 -04:00
|
|
|
|
2017-12-19 15:29:32 -05:00
|
|
|
// Indicate that we have the ctor overload taking wxWindow as label.
|
|
|
|
#define wxHAS_WINDOW_LABEL_IN_STATIC_BOX
|
|
|
|
|
2009-12-05 14:57:58 -05:00
|
|
|
#endif // _WX_GTKSTATICBOX_H_
|