]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/statbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "statbox.h"
14 #include "wx/statbox.h"
19 //-----------------------------------------------------------------------------
21 //-----------------------------------------------------------------------------
23 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
,wxControl
)
25 wxStaticBox::wxStaticBox(void)
29 wxStaticBox::wxStaticBox( wxWindow
*parent
, wxWindowID id
, const wxString
&label
,
30 const wxPoint
&pos
, const wxSize
&size
,
31 long style
, const wxString
&name
)
33 Create( parent
, id
, label
, pos
, size
, style
, name
);
36 bool wxStaticBox::Create( wxWindow
*parent
, wxWindowID id
, const wxString
&label
,
37 const wxPoint
&pos
, const wxSize
&size
,
38 long style
, const wxString
&name
)
42 PreCreation( parent
, id
, pos
, size
, style
, name
);
46 m_widget
= gtk_frame_new(m_label
.mbc_str());
48 m_parent
->DoAddChild( this );
54 SetBackgroundColour( parent
->GetBackgroundColour() );
55 SetForegroundColour( parent
->GetForegroundColour() );
56 SetFont( parent
->GetFont() );
63 void wxStaticBox::SetLabel( const wxString
&label
)
65 wxControl::SetLabel( label
);
66 GtkFrame
*frame
= GTK_FRAME( m_widget
);
67 gtk_frame_set_label( frame
, GetLabel().mbc_str() );
70 void wxStaticBox::ApplyWidgetStyle()
73 gtk_widget_set_style( m_widget
, m_widgetStyle
);