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