]> git.saurik.com Git - wxWidgets.git/blame - src/generic/statline.cpp
Don't crash in wxGridCellAutoWrapStringRenderer when the column is hidden.
[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
c50f1fb9 6// Copyright: (c) 1998 Vadim Zeitlin
65571936 7// Licence: wxWindows licence
c50f1fb9
VZ
8/////////////////////////////////////////////////////////////////////////////
9
10// ============================================================================
11// declarations
12// ============================================================================
13
14// ----------------------------------------------------------------------------
15// headers
16// ----------------------------------------------------------------------------
17
dc3b0532 18#include "wx/wxprec.h"
876cd6f7 19
c50f1fb9 20// For compilers that support precompilation, includes "wx.h".
c50f1fb9
VZ
21
22#ifdef __BORLANDC__
23 #pragma hdrstop
24#endif
25
876cd6f7
WS
26#if wxUSE_STATLINE
27
c50f1fb9 28#include "wx/statline.h"
876cd6f7
WS
29
30#ifndef WX_PRECOMP
31 #include "wx/statbox.h"
32#endif
c50f1fb9
VZ
33
34// ============================================================================
35// implementation
36// ============================================================================
37
c50f1fb9
VZ
38// ----------------------------------------------------------------------------
39// wxStaticLine
40// ----------------------------------------------------------------------------
41
42bool wxStaticLine::Create( wxWindow *parent,
43 wxWindowID id,
44 const wxPoint &pos,
45 const wxSize &size,
46 long style,
47 const wxString &name)
48{
d7c40406
MB
49 m_statbox = NULL;
50
7a4b8f27 51 if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
ca65c044 52 return false;
c50f1fb9
VZ
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
ca65c044 59 m_statbox = new wxStaticBox(parent, id, wxEmptyString, pos, sizeReal, style, name);
c50f1fb9 60
ca65c044 61 return true;
c50f1fb9 62}
7183e38b 63
d7c40406
MB
64wxStaticLine::~wxStaticLine()
65{
66 delete m_statbox;
67}
7183e38b
MB
68
69WXWidget wxStaticLine::GetMainWidget() const
70{
71 return m_statbox->GetMainWidget();
72}
277f2e52 73
99bdcd55 74void wxStaticLine::DoSetSize(int x, int y, int width, int height, int sizeFlags)
277f2e52
MB
75{
76 m_statbox->SetSize(x, y, width, height, sizeFlags);
77}
78
79void wxStaticLine::DoMoveWindow(int x, int y, int width, int height)
80{
81 m_statbox->SetSize(x, y, width, height);
82}
d7260478
JS
83
84#endif
85 // wxUSE_STATLINE