]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statline.h
Corrected some more docs,
[wxWidgets.git] / include / wx / statline.h
CommitLineData
b0351fc9
RR
1#ifndef _WX_STATLINE_H_BASE_
2#define _WX_STATLINE_H_BASE_
3
c50f1fb9
VZ
4// ----------------------------------------------------------------------------
5// headers
6// ----------------------------------------------------------------------------
7
8// this defines wxUSE_STATLINE
9#include "wx/defs.h"
10
11#if wxUSE_STATLINE
12
13// the base class declaration
14#include "wx/control.h"
15
16// ----------------------------------------------------------------------------
17// global variables
18// ----------------------------------------------------------------------------
19
20// the default name for objects of class wxStaticLine
21WXDLLEXPORT_DATA(extern const wxChar*) wxStaticTextNameStr;
22
23// ----------------------------------------------------------------------------
24// wxStaticLine - a line in a dialog
25// ----------------------------------------------------------------------------
26
27class WXDLLEXPORT wxStaticLineBase : public wxControl
28{
29public:
30 // constructor
31 wxStaticLineBase() { }
32
33 // is the line vertical?
34 bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL) != 0; }
35
36 // get the default size for the "lesser" dimension of the static line
37 static int GetDefaultSize() { return 2; }
38
39protected:
40 // set the right size for the right dimension
41 wxSize AdjustSize(const wxSize& size)
42 {
43 wxSize sizeReal(size);
44 if ( IsVertical() )
45 {
46 if ( size.x == -1 )
47 sizeReal.x = GetDefaultSize();
48 }
49 else
50 {
51 if ( size.y == -1 )
52 sizeReal.y = GetDefaultSize();
53 }
54
55 return sizeReal;
56 }
57};
58
59// ----------------------------------------------------------------------------
60// now include the actual class declaration
61// ----------------------------------------------------------------------------
62
b0351fc9 63#if defined(__WXMSW__)
c50f1fb9 64 #include "wx/msw/statline.h"
b0351fc9 65#elif defined(__WXGTK__)
c50f1fb9
VZ
66 #include "wx/gtk/statline.h"
67#else // use generic implementation for all other platforms
68 #include "wx/generic/statline.h"
b0351fc9
RR
69#endif
70
c50f1fb9
VZ
71#endif // wxUSE_STATLINE
72
b0351fc9
RR
73#endif
74 // _WX_STATLINE_H_BASE_