]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statbox.h
Applied patch [ 1166587 ] [wxMSW] Removes all flicker from wxStaticBox
[wxWidgets.git] / include / wx / statbox.h
CommitLineData
2ecf902b
WS
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbox.h
3// Purpose: wxStaticBox base header
4// Author: wxWidgets Team
5// Modified by:
6// Created:
7// Copyright: (c) wxWidgets Team
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"
20
16cba29d 21extern WXDLLEXPORT_DATA(const wxChar*) wxStaticBoxNameStr;
1e6feb95
VZ
22
23// ----------------------------------------------------------------------------
24// wxStaticBox: a grouping box with a label
25// ----------------------------------------------------------------------------
26
27class WXDLLEXPORT wxStaticBoxBase : public wxControl
28{
29public:
fc7a2a60
VZ
30 wxStaticBoxBase() { }
31
1e6feb95 32 // overriden base class virtuals
bd507486 33 virtual bool AcceptsFocus() const { return false; }
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 {
43 static const int BORDER = 5; // FIXME: hardcoded value
44
45 *borderTop = GetLabel().empty() ? BORDER : GetCharHeight();
46 *borderOther = BORDER;
47 }
48
fc7a2a60
VZ
49private:
50 DECLARE_NO_COPY_CLASS(wxStaticBoxBase)
1e6feb95
VZ
51};
52
53#if defined(__WXUNIVERSAL__)
7c7a653b 54 #include "wx/univ/statbox.h"
1e6feb95 55#elif defined(__WXMSW__)
7c7a653b 56 #include "wx/msw/statbox.h"
2049ba38 57#elif defined(__WXMOTIF__)
7c7a653b 58 #include "wx/motif/statbox.h"
2049ba38 59#elif defined(__WXGTK__)
7c7a653b 60 #include "wx/gtk/statbox.h"
34138703 61#elif defined(__WXMAC__)
7c7a653b 62 #include "wx/mac/statbox.h"
e64df9bc 63#elif defined(__WXCOCOA__)
7c7a653b 64 #include "wx/cocoa/statbox.h"
1777b9bb 65#elif defined(__WXPM__)
7c7a653b 66 #include "wx/os2/statbox.h"
c801d85f
KB
67#endif
68
1e6feb95
VZ
69#endif // wxUSE_STATBOX
70
c801d85f 71#endif
34138703 72 // _WX_STATBOX_H_BASE_