]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statline.h
Make wxComboCtrlBase::Set*groundColour() methods public.
[wxWidgets.git] / include / wx / statline.h
CommitLineData
1e6feb95
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/statline.h
3// Purpose: wxStaticLine class interface
4// Author: Vadim Zeitlin
5// Created: 28.06.99
1e6feb95 6// Copyright: (c) 1999 Vadim Zeitlin
65571936 7// Licence: wxWindows licence
1e6feb95
VZ
8/////////////////////////////////////////////////////////////////////////////
9
b0351fc9
RR
10#ifndef _WX_STATLINE_H_BASE_
11#define _WX_STATLINE_H_BASE_
12
c50f1fb9
VZ
13// ----------------------------------------------------------------------------
14// headers
15// ----------------------------------------------------------------------------
16
17// this defines wxUSE_STATLINE
18#include "wx/defs.h"
19
20#if wxUSE_STATLINE
21
22// the base class declaration
23#include "wx/control.h"
24
25// ----------------------------------------------------------------------------
26// global variables
27// ----------------------------------------------------------------------------
28
29// the default name for objects of class wxStaticLine
53a2db12 30extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticLineNameStr[];
c50f1fb9
VZ
31
32// ----------------------------------------------------------------------------
33// wxStaticLine - a line in a dialog
34// ----------------------------------------------------------------------------
35
53a2db12 36class WXDLLIMPEXP_CORE wxStaticLineBase : public wxControl
c50f1fb9
VZ
37{
38public:
39 // constructor
40 wxStaticLineBase() { }
41
42 // is the line vertical?
43 bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL) != 0; }
44
45 // get the default size for the "lesser" dimension of the static line
46 static int GetDefaultSize() { return 2; }
47
4c51a665 48 // overridden base class virtuals
bd507486 49 virtual bool AcceptsFocus() const { return false; }
1e6feb95 50
c50f1fb9 51protected:
dc797d8e
JS
52 // choose the default border for this window
53 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
54
c50f1fb9 55 // set the right size for the right dimension
1e6feb95 56 wxSize AdjustSize(const wxSize& size) const
c50f1fb9
VZ
57 {
58 wxSize sizeReal(size);
59 if ( IsVertical() )
60 {
d775fa82 61 if ( size.x == wxDefaultCoord )
c50f1fb9
VZ
62 sizeReal.x = GetDefaultSize();
63 }
64 else
65 {
d775fa82 66 if ( size.y == wxDefaultCoord )
c50f1fb9
VZ
67 sizeReal.y = GetDefaultSize();
68 }
69
70 return sizeReal;
71 }
1e6feb95
VZ
72
73 virtual wxSize DoGetBestSize() const
74 {
75 return AdjustSize(wxDefaultSize);
76 }
fc7a2a60 77
c0c133e1 78 wxDECLARE_NO_COPY_CLASS(wxStaticLineBase);
c50f1fb9
VZ
79};
80
81// ----------------------------------------------------------------------------
82// now include the actual class declaration
83// ----------------------------------------------------------------------------
84
1e6feb95
VZ
85#if defined(__WXUNIVERSAL__)
86 #include "wx/univ/statline.h"
87#elif defined(__WXMSW__)
c50f1fb9 88 #include "wx/msw/statline.h"
1be7a35c 89#elif defined(__WXGTK20__)
c50f1fb9 90 #include "wx/gtk/statline.h"
1be7a35c
MR
91#elif defined(__WXGTK__)
92 #include "wx/gtk1/statline.h"
1777b9bb
DW
93#elif defined(__WXPM__)
94 #include "wx/os2/statline.h"
51abe921 95#elif defined(__WXMAC__)
ef0e9220 96 #include "wx/osx/statline.h"
e64df9bc
DE
97#elif defined(__WXCOCOA__)
98 #include "wx/cocoa/statline.h"
c50f1fb9
VZ
99#else // use generic implementation for all other platforms
100 #include "wx/generic/statline.h"
b0351fc9
RR
101#endif
102
c50f1fb9
VZ
103#endif // wxUSE_STATLINE
104
73b30256 105#endif // _WX_STATLINE_H_BASE_