]> git.saurik.com Git - wxWidgets.git/blame - src/generic/statline.cpp
supporting full style mask
[wxWidgets.git] / src / generic / statline.cpp
CommitLineData
c50f1fb9 1/////////////////////////////////////////////////////////////////////////////
876cd6f7 2// Name: src/generic/statline.cpp
c50f1fb9
VZ
3// Purpose: a generic wxStaticLine class
4// Author: Vadim Zeitlin
5// Created: 28.06.99
6// Version: $Id$
7// Copyright: (c) 1998 Vadim Zeitlin
65571936 8// Licence: wxWindows licence
c50f1fb9
VZ
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
dc3b0532 19#include "wx/wxprec.h"
876cd6f7 20
c50f1fb9 21// For compilers that support precompilation, includes "wx.h".
c50f1fb9
VZ
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
876cd6f7
WS
27#if wxUSE_STATLINE
28
c50f1fb9 29#include "wx/statline.h"
876cd6f7
WS
30
31#ifndef WX_PRECOMP
32 #include "wx/statbox.h"
33#endif
c50f1fb9
VZ
34
35// ============================================================================
36// implementation
37// ============================================================================
38
c50f1fb9
VZ
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{
d7c40406
MB
50 m_statbox = NULL;
51
7a4b8f27 52 if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
ca65c044 53 return false;
c50f1fb9
VZ
54
55 // ok, this is ugly but it's better than nothing: use a thin static box to
56 // emulate static line
57
58 wxSize sizeReal = AdjustSize(size);
59
ca65c044 60 m_statbox = new wxStaticBox(parent, id, wxEmptyString, pos, sizeReal, style, name);
c50f1fb9 61
ca65c044 62 return true;
c50f1fb9 63}
7183e38b 64
d7c40406
MB
65wxStaticLine::~wxStaticLine()
66{
67 delete m_statbox;
68}
7183e38b
MB
69
70WXWidget wxStaticLine::GetMainWidget() const
71{
72 return m_statbox->GetMainWidget();
73}
277f2e52 74
99bdcd55 75void wxStaticLine::DoSetSize(int x, int y, int width, int height, int sizeFlags)
277f2e52
MB
76{
77 m_statbox->SetSize(x, y, width, height, sizeFlags);
78}
79
80void wxStaticLine::DoMoveWindow(int x, int y, int width, int height)
81{
82 m_statbox->SetSize(x, y, width, height);
83}
d7260478
JS
84
85#endif
86 // wxUSE_STATLINE