]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statbox.h
wxDialogBase only has one ctor, so just do initialization in ctor instead of Init()
[wxWidgets.git] / include / wx / statbox.h
CommitLineData
2ecf902b 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/statbox.h
2ecf902b 3// Purpose: wxStaticBox base header
99d80019 4// Author: Julian Smart
2ecf902b
WS
5// Modified by:
6// Created:
99d80019 7// Copyright: (c) Julian Smart
2ecf902b
WS
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
34138703
JS
11#ifndef _WX_STATBOX_H_BASE_
12#define _WX_STATBOX_H_BASE_
c801d85f 13
2ecf902b
WS
14#include "wx/defs.h"
15
1e6feb95
VZ
16#if wxUSE_STATBOX
17
18#include "wx/control.h"
9b14c706 19#include "wx/containr.h"
1e6feb95 20
53a2db12 21extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
1e6feb95
VZ
22
23// ----------------------------------------------------------------------------
24// wxStaticBox: a grouping box with a label
25// ----------------------------------------------------------------------------
26
9b14c706 27class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
1e6feb95
VZ
28{
29public:
4ae5ada0 30 wxStaticBoxBase();
fc7a2a60 31
4c51a665 32 // overridden base class virtuals
7c7a653b 33 virtual bool HasTransparentBackground() { return true; }
fc7a2a60 34
5dd070c2
VZ
35 // implementation only: this is used by wxStaticBoxSizer to account for the
36 // need for extra space taken by the static box
37 //
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
41 {
b03896f1 42 const int BORDER = 5; // FIXME: hardcoded value
5dd070c2
VZ
43
44 *borderTop = GetLabel().empty() ? BORDER : GetCharHeight();
45 *borderOther = BORDER;
46 }
47
901a462f 48protected:
dc797d8e
JS
49 // choose the default border for this window
50 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
51
c0c133e1 52 wxDECLARE_NO_COPY_CLASS(wxStaticBoxBase);
1e6feb95
VZ
53};
54
55#if defined(__WXUNIVERSAL__)
7c7a653b 56 #include "wx/univ/statbox.h"
1e6feb95 57#elif defined(__WXMSW__)
7c7a653b 58 #include "wx/msw/statbox.h"
2049ba38 59#elif defined(__WXMOTIF__)
7c7a653b 60 #include "wx/motif/statbox.h"
1be7a35c 61#elif defined(__WXGTK20__)
7c7a653b 62 #include "wx/gtk/statbox.h"
1be7a35c
MR
63#elif defined(__WXGTK__)
64 #include "wx/gtk1/statbox.h"
34138703 65#elif defined(__WXMAC__)
ef0e9220 66 #include "wx/osx/statbox.h"
e64df9bc 67#elif defined(__WXCOCOA__)
7c7a653b 68 #include "wx/cocoa/statbox.h"
1777b9bb 69#elif defined(__WXPM__)
7c7a653b 70 #include "wx/os2/statbox.h"
c801d85f
KB
71#endif
72
1e6feb95
VZ
73#endif // wxUSE_STATBOX
74
c801d85f 75#endif
34138703 76 // _WX_STATBOX_H_BASE_