]>
Commit | Line | Data |
---|---|---|
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 | ||
d7260478 | 23 | #if wxUSE_STATLINE |
c50f1fb9 VZ |
24 | // For compilers that support precompilation, includes "wx.h". |
25 | #include "wx/wxprec.h" | |
26 | ||
27 | #ifdef __BORLANDC__ | |
28 | #pragma hdrstop | |
29 | #endif | |
30 | ||
31 | #include "wx/statline.h" | |
32 | #include "wx/statbox.h" | |
33 | ||
34 | // ============================================================================ | |
35 | // implementation | |
36 | // ============================================================================ | |
37 | ||
38 | IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) | |
39 | ||
40 | // ---------------------------------------------------------------------------- | |
41 | // wxStaticLine | |
42 | // ---------------------------------------------------------------------------- | |
43 | ||
44 | bool wxStaticLine::Create( wxWindow *parent, | |
45 | wxWindowID id, | |
46 | const wxPoint &pos, | |
47 | const wxSize &size, | |
48 | long style, | |
49 | const wxString &name) | |
50 | { | |
7a4b8f27 | 51 | if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) ) |
c50f1fb9 VZ |
52 | return FALSE; |
53 | ||
54 | // ok, this is ugly but it's better than nothing: use a thin static box to | |
55 | // emulate static line | |
56 | ||
57 | wxSize sizeReal = AdjustSize(size); | |
58 | ||
223d09f6 | 59 | m_statbox = new wxStaticBox(parent, id, wxT(""), pos, sizeReal, style, name); |
c50f1fb9 VZ |
60 | |
61 | return TRUE; | |
62 | } | |
7183e38b MB |
63 | |
64 | ||
65 | WXWidget wxStaticLine::GetMainWidget() const | |
66 | { | |
67 | return m_statbox->GetMainWidget(); | |
68 | } | |
277f2e52 | 69 | |
99bdcd55 | 70 | void wxStaticLine::DoSetSize(int x, int y, int width, int height, int sizeFlags) |
277f2e52 MB |
71 | { |
72 | m_statbox->SetSize(x, y, width, height, sizeFlags); | |
73 | } | |
74 | ||
75 | void wxStaticLine::DoMoveWindow(int x, int y, int width, int height) | |
76 | { | |
77 | m_statbox->SetSize(x, y, width, height); | |
78 | } | |
d7260478 JS |
79 | |
80 | #endif | |
81 | // wxUSE_STATLINE |