1
/////////////////////////////////////////////////////////////////////////////
3
// Purpose: wxStaticLine class interface
4
// Author: Vadim Zeitlin
6
// Version: $Id: statline.h 67280 2011-03-22 14:17:38Z DS $
7
// Copyright: (c) 1999 Vadim Zeitlin
8
// Licence: wxWindows licence
9
/////////////////////////////////////////////////////////////////////////////
11
#ifndef _WX_STATLINE_H_BASE_
12
#define _WX_STATLINE_H_BASE_
14
// ----------------------------------------------------------------------------
16
// ----------------------------------------------------------------------------
18
// this defines wxUSE_STATLINE
23
// the base class declaration
24
#include "wx/control.h"
26
// ----------------------------------------------------------------------------
28
// ----------------------------------------------------------------------------
30
// the default name for objects of class wxStaticLine
31
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticLineNameStr[];
33
// ----------------------------------------------------------------------------
34
// wxStaticLine - a line in a dialog
35
// ----------------------------------------------------------------------------
37
class WXDLLIMPEXP_CORE wxStaticLineBase : public wxControl
41
wxStaticLineBase() { }
43
// is the line vertical?
44
bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL) != 0; }
46
// get the default size for the "lesser" dimension of the static line
47
static int GetDefaultSize() { return 2; }
49
// overridden base class virtuals
50
virtual bool AcceptsFocus() const { return false; }
53
// choose the default border for this window
54
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
56
// set the right size for the right dimension
57
wxSize AdjustSize(const wxSize& size) const
59
wxSize sizeReal(size);
62
if ( size.x == wxDefaultCoord )
63
sizeReal.x = GetDefaultSize();
67
if ( size.y == wxDefaultCoord )
68
sizeReal.y = GetDefaultSize();
74
virtual wxSize DoGetBestSize() const
76
return AdjustSize(wxDefaultSize);
79
wxDECLARE_NO_COPY_CLASS(wxStaticLineBase);
82
// ----------------------------------------------------------------------------
83
// now include the actual class declaration
84
// ----------------------------------------------------------------------------
86
#if defined(__WXUNIVERSAL__)
87
#include "wx/univ/statline.h"
88
#elif defined(__WXMSW__)
89
#include "wx/msw/statline.h"
90
#elif defined(__WXGTK20__)
91
#include "wx/gtk/statline.h"
92
#elif defined(__WXGTK__)
93
#include "wx/gtk1/statline.h"
94
#elif defined(__WXPM__)
95
#include "wx/os2/statline.h"
96
#elif defined(__WXMAC__)
97
#include "wx/osx/statline.h"
98
#elif defined(__WXCOCOA__)
99
#include "wx/cocoa/statline.h"
100
#else // use generic implementation for all other platforms
101
#include "wx/generic/statline.h"
104
#endif // wxUSE_STATLINE
106
#endif // _WX_STATLINE_H_BASE_