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