]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/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"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
,wxControl
)
22 wxStaticBox::wxStaticBox(void)
26 wxStaticBox::wxStaticBox( wxWindow
*parent
, wxWindowID id
, const wxString
&label
,
27 const wxPoint
&pos
, const wxSize
&size
,
28 long style
, const wxString
&name
)
30 Create( parent
, id
, label
, pos
, size
, style
, name
);
33 bool wxStaticBox::Create( wxWindow
*parent
, wxWindowID id
, const wxString
&label
,
34 const wxPoint
&pos
, const wxSize
&size
,
35 long style
, const wxString
&name
)
39 PreCreation( parent
, id
, pos
, size
, style
, name
);
43 m_widget
= gtk_frame_new(m_label
);
45 m_parent
->AddChild( this );
47 (m_parent
->m_insertCallback
)( m_parent
, this );
53 SetBackgroundColour( parent
->GetBackgroundColour() );
54 SetForegroundColour( parent
->GetForegroundColour() );
61 void wxStaticBox::SetLabel( const wxString
&label
)
63 wxControl::SetLabel( label
);
64 GtkFrame
*frame
= GTK_FRAME( m_widget
);
65 gtk_frame_set_label( frame
, GetLabel() );
68 void wxStaticBox::ApplyWidgetStyle()
71 gtk_widget_set_style( m_widget
, m_widgetStyle
);