]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/statline.cpp
Rework IE virtual file system support to use new syntax. Remove now unused code for...
[wxWidgets.git] / src / gtk1 / statline.cpp
CommitLineData
b0351fc9 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: src/gtk1/statline.cpp
b0351fc9
RR
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
b0351fc9
RR
8/////////////////////////////////////////////////////////////////////////////
9
14f355c2
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
b0351fc9
RR
13#include "wx/statline.h"
14
dcf924a3
RR
15#if wxUSE_STATLINE
16
b0351fc9
RR
17#include "gdk/gdk.h"
18#include "gtk/gtk.h"
19
20//-----------------------------------------------------------------------------
21// wxStaticLine
22//-----------------------------------------------------------------------------
23
c50f1fb9 24wxStaticLine::wxStaticLine()
b0351fc9
RR
25{
26}
27
28wxStaticLine::wxStaticLine( wxWindow *parent, wxWindowID id,
c50f1fb9
VZ
29 const wxPoint &pos, const wxSize &size,
30 long style, const wxString &name )
b0351fc9
RR
31{
32 Create( parent, id, pos, size, style, name );
33}
34
c50f1fb9
VZ
35bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
36 const wxPoint &pos, const wxSize &size,
37 long style, const wxString &name )
b0351fc9
RR
38{
39 m_needParent = TRUE;
c50f1fb9 40
4dcaf11a
RR
41 if (!PreCreation( parent, pos, size ) ||
42 !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
43 {
223d09f6 44 wxFAIL_MSG( wxT("wxStaticLine creation failed") );
3ca6a5f0 45 return FALSE;
4dcaf11a 46 }
b0351fc9 47
c50f1fb9 48 if ( IsVertical() )
073478b3 49 {
b0351fc9 50 m_widget = gtk_vseparator_new();
3ca6a5f0
BP
51 if (size.x == -1)
52 {
53 wxSize new_size( size );
54 new_size.x = 4;
55 SetSize( new_size );
56 }
073478b3 57 }
b0351fc9 58 else
073478b3 59 {
b0351fc9 60 m_widget = gtk_hseparator_new();
3ca6a5f0
BP
61 if (size.y == -1)
62 {
63 wxSize new_size( size );
64 new_size.y = 4;
65 SetSize( new_size );
66 }
073478b3 67 }
c50f1fb9 68
f03fc89f 69 m_parent->DoAddChild( this );
c50f1fb9 70
abdeb9e7 71 PostCreation(size);
c50f1fb9 72
b0351fc9
RR
73 return TRUE;
74}
75
9d522606
RD
76// static
77wxVisualAttributes
78wxStaticLine::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
79{
80 return GetDefaultAttributesFromGTKWidget(gtk_vseparator_new);
81}
82
c50f1fb9 83#endif