2005-03-16 16:18:31 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbox.h
|
|
|
|
// 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
|
|
|
// RCS-ID: $Id$
|
|
|
|
// 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"
|
|
|
|
|
2006-01-16 14:59:55 +00:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar) wxStaticBoxNameStr[];
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxStaticBox: a grouping box with a label
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxStaticBoxBase : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2003-07-22 00:24:07 +00:00
|
|
|
wxStaticBoxBase() { }
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
// overriden base class virtuals
|
2004-03-04 17:03:55 +00:00
|
|
|
virtual bool AcceptsFocus() const { return false; }
|
2005-01-07 16:54:09 +00:00
|
|
|
virtual bool HasTransparentBackground() { 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;
|
|
|
|
}
|
|
|
|
|
2003-07-22 00:24:07 +00:00
|
|
|
private:
|
|
|
|
DECLARE_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__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/mac/statbox.h"
|
2003-03-22 06:18:36 +00:00
|
|
|
#elif defined(__WXCOCOA__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/cocoa/statbox.h"
|
1999-07-28 03:38:12 +00:00
|
|
|
#elif defined(__WXPM__)
|
2005-01-07 16:54:09 +00:00
|
|
|
#include "wx/os2/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_
|