]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/statline.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/statline.cpp
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
12 #include "wx/statline.h"
17 #include "wx/gtk/private/gtk2-compat.h"
19 //-----------------------------------------------------------------------------
21 //-----------------------------------------------------------------------------
23 wxStaticLine::wxStaticLine()
27 wxStaticLine::wxStaticLine( wxWindow
*parent
, wxWindowID id
,
28 const wxPoint
&pos
, const wxSize
&size
,
29 long style
, const wxString
&name
)
31 Create( parent
, id
, pos
, size
, style
, name
);
34 bool wxStaticLine::Create( wxWindow
*parent
, wxWindowID id
,
35 const wxPoint
&pos
, const wxSize
&size
,
36 long style
, const wxString
&name
)
38 if (!PreCreation( parent
, pos
, size
) ||
39 !CreateBase( parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
))
41 wxFAIL_MSG( wxT("wxStaticLine creation failed") );
45 const bool isVertical
= IsVertical();
46 m_widget
= gtk_separator_new(GtkOrientation(isVertical
));
47 g_object_ref(m_widget
);
52 wxSize
new_size( size
);
61 wxSize
new_size( size
);
67 m_parent
->DoAddChild( this );
76 wxStaticLine::GetClassDefaultAttributes(wxWindowVariant
WXUNUSED(variant
))
78 return GetDefaultAttributesFromGTKWidget(gtk_separator_new(GTK_ORIENTATION_VERTICAL
));