]> git.saurik.com Git - wxWidgets.git/blame - src/generic/statline.cpp
tiny fixes
[wxWidgets.git] / src / generic / statline.cpp
CommitLineData
c50f1fb9
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: generic/statline.cpp
3// Purpose: a generic wxStaticLine class
4// Author: Vadim Zeitlin
5// Created: 28.06.99
6// Version: $Id$
7// Copyright: (c) 1998 Vadim Zeitlin
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#ifdef __GNUG__
20 #pragma implementation "statline.h"
21#endif
22
23// For compilers that support precompilation, includes "wx.h".
24#include "wx/wxprec.h"
25
26#ifdef __BORLANDC__
27 #pragma hdrstop
28#endif
29
30#include "wx/statline.h"
31#include "wx/statbox.h"
32
33// ============================================================================
34// implementation
35// ============================================================================
36
37IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
38
39// ----------------------------------------------------------------------------
40// wxStaticLine
41// ----------------------------------------------------------------------------
42
43bool wxStaticLine::Create( wxWindow *parent,
44 wxWindowID id,
45 const wxPoint &pos,
46 const wxSize &size,
47 long style,
48 const wxString &name)
49{
7a4b8f27 50 if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
c50f1fb9
VZ
51 return FALSE;
52
53 // ok, this is ugly but it's better than nothing: use a thin static box to
54 // emulate static line
55
56 wxSize sizeReal = AdjustSize(size);
57
e90c1d2a 58 m_statbox = new wxStaticBox(parent, id, T(""), pos, sizeReal, style, name);
c50f1fb9
VZ
59
60 return TRUE;
61}
7183e38b
MB
62
63
64WXWidget wxStaticLine::GetMainWidget() const
65{
66 return m_statbox->GetMainWidget();
67}