2005-03-16 16:18:31 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-20 00:14:35 +00:00
|
|
|
// Name: wx/statbox.h
|
2005-03-16 16:18:31 +00:00
|
|
|
// Purpose: wxStaticBox base header
|
2005-05-04 18:57:50 +00:00
|
|
|
// Author: Julian Smart
|
2005-03-16 16:18:31 +00:00
|
|
|
// Modified by:
|
|
|
|
// Created:
|
2005-05-04 18:57:50 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2005-03-16 16:18:31 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_STATBOX_H_BASE_
|
|
|
|
#define _WX_STATBOX_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2005-03-16 16:18:31 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_STATBOX
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
2012-09-20 16:00:07 +00:00
|
|
|
#include "wx/containr.h"
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxStaticBox: a grouping box with a label
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2012-09-20 16:00:07 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
|
2001-06-26 20:59:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-07-31 16:03:51 +00:00
|
|
|
wxStaticBoxBase();
|
2003-07-22 00:24:07 +00:00
|
|
|
|
2011-03-22 14:17:38 +00:00
|
|
|
// overridden base class virtuals
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
|
2003-07-22 00:24:07 +00:00
|
|
|
|
2005-03-07 23:37:15 +00: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
|
|
|
|
{
|
2005-04-03 20:22:21 +00:00
|
|
|
const int BORDER = 5; // FIXME: hardcoded value
|
2005-03-07 23:37:15 +00:00
|
|
|
|
|
|
|
*borderTop = GetLabel().empty() ? BORDER : GetCharHeight();
|
|
|
|
*borderOther = BORDER;
|
|
|
|
}
|
|
|
|
|
2007-12-20 06:08:00 +00:00
|
|
|
protected:
|
2007-11-13 12:10:34 +00:00
|
|
|
// choose the default border for this window
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxBORDER_NONE; }
|
2007-11-13 12:10:34 +00:00
|
|
|
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxStaticBoxBase);
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/univ/statbox.h"
|
2001-06-26 20:59:19 +00:00
|
|
|
#elif defined(__WXMSW__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/msw/statbox.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXMOTIF__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/motif/statbox.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK20__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/gtk/statbox.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/statbox.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXMAC__)
|
2008-06-11 19:17:41 +00:00
|
|
|
#include "wx/osx/statbox.h"
|
2014-08-24 01:50:11 +00:00
|
|
|
#elif defined(__WXQT__)
|
|
|
|
#include "wx/qt/statbox.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_STATBOX
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_STATBOX_H_BASE_
|