]>
git.saurik.com Git - wxWidgets.git/blob - src/generic/statline.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: generic/statline.cpp
3 // Purpose: a generic wxStaticLine class
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 1998 Vadim Zeitlin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
20 #pragma implementation "statline.h"
23 #include "wx/wxprec.h"
25 // For compilers that support precompilation, includes "wx.h".
31 #include "wx/statline.h"
32 #include "wx/statbox.h"
34 // ============================================================================
36 // ============================================================================
38 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine
, wxControl
)
40 // ----------------------------------------------------------------------------
42 // ----------------------------------------------------------------------------
44 bool wxStaticLine::Create( wxWindow
*parent
,
53 if ( !CreateBase(parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
56 // ok, this is ugly but it's better than nothing: use a thin static box to
57 // emulate static line
59 wxSize sizeReal
= AdjustSize(size
);
61 m_statbox
= new wxStaticBox(parent
, id
, wxT(""), pos
, sizeReal
, style
, name
);
66 wxStaticLine::~wxStaticLine()
71 WXWidget
wxStaticLine::GetMainWidget() const
73 return m_statbox
->GetMainWidget();
76 void wxStaticLine::DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
78 m_statbox
->SetSize(x
, y
, width
, height
, sizeFlags
);
81 void wxStaticLine::DoMoveWindow(int x
, int y
, int width
, int height
)
83 m_statbox
->SetSize(x
, y
, width
, height
);