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