]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/statbox.h
Use wxGetTranslation() instead of _() in the public headers.
[wxWidgets.git] / include / wx / statbox.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/statbox.h
3// Purpose: wxStaticBox base header
4// Author: Julian Smart
5// Modified by:
6// Created:
7// Copyright: (c) Julian Smart
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_STATBOX_H_BASE_
12#define _WX_STATBOX_H_BASE_
13
14#include "wx/defs.h"
15
16#if wxUSE_STATBOX
17
18#include "wx/control.h"
19#include "wx/containr.h"
20
21extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
22
23// ----------------------------------------------------------------------------
24// wxStaticBox: a grouping box with a label
25// ----------------------------------------------------------------------------
26
27class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
28{
29public:
30 wxStaticBoxBase();
31
32 // overridden base class virtuals
33 virtual bool HasTransparentBackground() { return true; }
34
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 {
42 const int BORDER = 5; // FIXME: hardcoded value
43
44 *borderTop = GetLabel().empty() ? BORDER : GetCharHeight();
45 *borderOther = BORDER;
46 }
47
48protected:
49 // choose the default border for this window
50 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
51
52 wxDECLARE_NO_COPY_CLASS(wxStaticBoxBase);
53};
54
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"
71#endif
72
73#endif // wxUSE_STATBOX
74
75#endif
76 // _WX_STATBOX_H_BASE_