]> git.saurik.com Git - wxWidgets.git/blob - src/gtk/statbox.cpp
no message
[wxWidgets.git] / src / gtk / statbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbox.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifdef __GNUG__
12 #pragma implementation "statbox.h"
13 #endif
14
15 #include "wx/statbox.h"
16
17 //-----------------------------------------------------------------------------
18 // wxStaticBox
19 //-----------------------------------------------------------------------------
20
21 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox,wxControl)
22
23 wxStaticBox::wxStaticBox(void)
24 {
25 }
26
27 wxStaticBox::wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label,
28 const wxPoint &pos, const wxSize &size,
29 long style, const wxString &name )
30 {
31 Create( parent, id, label, pos, size, style, name );
32 }
33
34 bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label,
35 const wxPoint &pos, const wxSize &size,
36 long style, const wxString &name )
37 {
38 m_needParent = TRUE;
39
40 PreCreation( parent, id, pos, size, style, name );
41
42 m_widget = gtk_frame_new(m_label);
43
44 PostCreation();
45
46 SetLabel(label);
47
48 Show( TRUE );
49
50 return TRUE;
51 }
52
53 void wxStaticBox::SetLabel( const wxString &label )
54 {
55 wxControl::SetLabel( label );
56 GtkFrame *frame = GTK_FRAME( m_widget );
57 gtk_frame_set_label( frame, GetLabel() );
58 }