1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_STATBOX_H_BASE_
|
|
|
|
#define _WX_STATBOX_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#if wxUSE_STATBOX
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
2005-01-21 13:48:22 -05:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar*) wxStaticBoxNameStr;
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxStaticBox: a grouping box with a label
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxStaticBoxBase : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2003-07-21 20:24:07 -04:00
|
|
|
wxStaticBoxBase() { }
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
// overriden base class virtuals
|
2004-03-04 12:03:55 -05:00
|
|
|
virtual bool AcceptsFocus() const { return false; }
|
2005-01-07 11:54:09 -05:00
|
|
|
virtual bool HasTransparentBackground() { return true; }
|
2003-07-21 20:24:07 -04:00
|
|
|
|
2005-03-07 18:37:15 -05:00
|
|
|
// implementation only: this is used by wxStaticBoxSizer to account for the
|
|
|
|
// need for extra space taken by the static box
|
|
|
|
//
|
|
|
|
// the top border is the margin at the top (where the title is),
|
|
|
|
// borderOther is the margin on all other sides
|
|
|
|
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const
|
|
|
|
{
|
|
|
|
static const int BORDER = 5; // FIXME: hardcoded value
|
|
|
|
|
|
|
|
*borderTop = GetLabel().empty() ? BORDER : GetCharHeight();
|
|
|
|
*borderOther = BORDER;
|
|
|
|
}
|
|
|
|
|
2003-07-21 20:24:07 -04:00
|
|
|
private:
|
|
|
|
DECLARE_NO_COPY_CLASS(wxStaticBoxBase)
|
2001-06-26 16:59:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/univ/statbox.h"
|
2001-06-26 16:59:19 -04:00
|
|
|
#elif defined(__WXMSW__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/msw/statbox.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/motif/statbox.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXGTK__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/gtk/statbox.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/mac/statbox.h"
|
2003-03-22 01:18:36 -05:00
|
|
|
#elif defined(__WXCOCOA__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/cocoa/statbox.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
2005-01-07 11:54:09 -05:00
|
|
|
#include "wx/os2/statbox.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif // wxUSE_STATBOX
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_STATBOX_H_BASE_
|