1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStaticBox base header
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_STATBOX_H_BASE_
12 #define _WX_STATBOX_H_BASE_
18 #include "wx/control.h"
19 #include "wx/containr.h"
21 extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr
[];
23 // ----------------------------------------------------------------------------
24 // wxStaticBox: a grouping box with a label
25 // ----------------------------------------------------------------------------
27 class WXDLLIMPEXP_CORE wxStaticBoxBase
: public wxNavigationEnabled
<wxControl
>
32 // overridden base class virtuals
33 virtual bool HasTransparentBackground() { return true; }
35 // implementation only: this is used by wxStaticBoxSizer to account for the
36 // need for extra space taken by the static box
38 // the top border is the margin at the top (where the title is),
39 // borderOther is the margin on all other sides
40 virtual void GetBordersForSizer(int *borderTop
, int *borderOther
) const
42 const int BORDER
= 5; // FIXME: hardcoded value
44 *borderTop
= GetLabel().empty() ? BORDER
: GetCharHeight();
45 *borderOther
= BORDER
;
49 // choose the default border for this window
50 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
52 wxDECLARE_NO_COPY_CLASS(wxStaticBoxBase
);
55 #if defined(__WXUNIVERSAL__)
56 #include "wx/univ/statbox.h"
57 #elif defined(__WXMSW__)
58 #include "wx/msw/statbox.h"
59 #elif defined(__WXMOTIF__)
60 #include "wx/motif/statbox.h"
61 #elif defined(__WXGTK20__)
62 #include "wx/gtk/statbox.h"
63 #elif defined(__WXGTK__)
64 #include "wx/gtk1/statbox.h"
65 #elif defined(__WXMAC__)
66 #include "wx/osx/statbox.h"
67 #elif defined(__WXCOCOA__)
68 #include "wx/cocoa/statbox.h"
69 #elif defined(__WXPM__)
70 #include "wx/os2/statbox.h"
73 #endif // wxUSE_STATBOX
76 // _WX_STATBOX_H_BASE_