1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStaticBox base header
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_STATBOX_H_BASE_
13 #define _WX_STATBOX_H_BASE_
19 #include "wx/control.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 wxControl
32 // overriden base class virtuals
33 virtual bool AcceptsFocus() const { return false; }
34 virtual bool HasTransparentBackground() { return true; }
36 // implementation only: this is used by wxStaticBoxSizer to account for the
37 // need for extra space taken by the static box
39 // the top border is the margin at the top (where the title is),
40 // borderOther is the margin on all other sides
41 virtual void GetBordersForSizer(int *borderTop
, int *borderOther
) const
43 const int BORDER
= 5; // FIXME: hardcoded value
45 *borderTop
= GetLabel().empty() ? BORDER
: GetCharHeight();
46 *borderOther
= BORDER
;
50 // choose the default border for this window
51 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
53 DECLARE_NO_COPY_CLASS(wxStaticBoxBase
)
56 #if defined(__WXUNIVERSAL__)
57 #include "wx/univ/statbox.h"
58 #elif defined(__WXMSW__)
59 #include "wx/msw/statbox.h"
60 #elif defined(__WXMOTIF__)
61 #include "wx/motif/statbox.h"
62 #elif defined(__WXGTK20__)
63 #include "wx/gtk/statbox.h"
64 #elif defined(__WXGTK__)
65 #include "wx/gtk1/statbox.h"
66 #elif defined(__WXMAC__)
67 #include "wx/mac/statbox.h"
68 #elif defined(__WXCOCOA__)
69 #include "wx/cocoa/statbox.h"
70 #elif defined(__WXPM__)
71 #include "wx/os2/statbox.h"
74 #endif // wxUSE_STATBOX
77 // _WX_STATBOX_H_BASE_