1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStaticLine class interface
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 1999 Vadim Zeitlin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_STATLINE_H_BASE_
11 #define _WX_STATLINE_H_BASE_
13 // ----------------------------------------------------------------------------
15 // ----------------------------------------------------------------------------
17 // this defines wxUSE_STATLINE
22 // the base class declaration
23 #include "wx/control.h"
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 // the default name for objects of class wxStaticLine
30 extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticLineNameStr
[];
32 // ----------------------------------------------------------------------------
33 // wxStaticLine - a line in a dialog
34 // ----------------------------------------------------------------------------
36 class WXDLLIMPEXP_CORE wxStaticLineBase
: public wxControl
40 wxStaticLineBase() { }
42 // is the line vertical?
43 bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL
) != 0; }
45 // get the default size for the "lesser" dimension of the static line
46 static int GetDefaultSize() { return 2; }
48 // overridden base class virtuals
49 virtual bool AcceptsFocus() const { return false; }
52 // choose the default border for this window
53 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
55 // set the right size for the right dimension
56 wxSize
AdjustSize(const wxSize
& size
) const
58 wxSize
sizeReal(size
);
61 if ( size
.x
== wxDefaultCoord
)
62 sizeReal
.x
= GetDefaultSize();
66 if ( size
.y
== wxDefaultCoord
)
67 sizeReal
.y
= GetDefaultSize();
73 virtual wxSize
DoGetBestSize() const
75 return AdjustSize(wxDefaultSize
);
78 wxDECLARE_NO_COPY_CLASS(wxStaticLineBase
);
81 // ----------------------------------------------------------------------------
82 // now include the actual class declaration
83 // ----------------------------------------------------------------------------
85 #if defined(__WXUNIVERSAL__)
86 #include "wx/univ/statline.h"
87 #elif defined(__WXMSW__)
88 #include "wx/msw/statline.h"
89 #elif defined(__WXGTK20__)
90 #include "wx/gtk/statline.h"
91 #elif defined(__WXGTK__)
92 #include "wx/gtk1/statline.h"
93 #elif defined(__WXPM__)
94 #include "wx/os2/statline.h"
95 #elif defined(__WXMAC__)
96 #include "wx/osx/statline.h"
97 #elif defined(__WXCOCOA__)
98 #include "wx/cocoa/statline.h"
99 #else // use generic implementation for all other platforms
100 #include "wx/generic/statline.h"
103 #endif // wxUSE_STATLINE
105 #endif // _WX_STATLINE_H_BASE_