2001-06-26 20:59:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/statline.h
|
|
|
|
// Purpose: wxStaticLine class interface
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Created: 28.06.99
|
|
|
|
// Copyright: (c) 1999 Vadim Zeitlin
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 20:59:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-05-05 21:42:48 +00:00
|
|
|
#ifndef _WX_STATLINE_H_BASE_
|
|
|
|
#define _WX_STATLINE_H_BASE_
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// this defines wxUSE_STATLINE
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_STATLINE
|
|
|
|
|
|
|
|
// the base class declaration
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// global variables
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// the default name for objects of class wxStaticLine
|
2008-03-26 15:06:00 +00:00
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticLineNameStr[];
|
1999-06-28 21:39:49 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxStaticLine - a line in a dialog
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticLineBase : public wxControl
|
1999-06-28 21:39:49 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// constructor
|
|
|
|
wxStaticLineBase() { }
|
|
|
|
|
|
|
|
// is the line vertical?
|
|
|
|
bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL) != 0; }
|
|
|
|
|
|
|
|
// get the default size for the "lesser" dimension of the static line
|
|
|
|
static int GetDefaultSize() { return 2; }
|
|
|
|
|
2011-03-22 14:17:38 +00:00
|
|
|
// overridden base class virtuals
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual bool AcceptsFocus() const wxOVERRIDE { return false; }
|
2001-06-26 20:59:19 +00:00
|
|
|
|
1999-06-28 21:39:49 +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
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
// set the right size for the right dimension
|
2001-06-26 20:59:19 +00:00
|
|
|
wxSize AdjustSize(const wxSize& size) const
|
1999-06-28 21:39:49 +00:00
|
|
|
{
|
|
|
|
wxSize sizeReal(size);
|
|
|
|
if ( IsVertical() )
|
|
|
|
{
|
2004-09-22 14:38:52 +00:00
|
|
|
if ( size.x == wxDefaultCoord )
|
1999-06-28 21:39:49 +00:00
|
|
|
sizeReal.x = GetDefaultSize();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-09-22 14:38:52 +00:00
|
|
|
if ( size.y == wxDefaultCoord )
|
1999-06-28 21:39:49 +00:00
|
|
|
sizeReal.y = GetDefaultSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
return sizeReal;
|
|
|
|
}
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxSize DoGetBestSize() const wxOVERRIDE
|
2001-06-26 20:59:19 +00:00
|
|
|
{
|
|
|
|
return AdjustSize(wxDefaultSize);
|
|
|
|
}
|
2003-07-22 00:24:07 +00:00
|
|
|
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxStaticLineBase);
|
1999-06-28 21:39:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// now include the actual class declaration
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/statline.h"
|
|
|
|
#elif defined(__WXMSW__)
|
1999-06-28 21:39:49 +00:00
|
|
|
#include "wx/msw/statline.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK20__)
|
1999-06-28 21:39:49 +00:00
|
|
|
#include "wx/gtk/statline.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/statline.h"
|
1999-11-10 11:32:00 +00:00
|
|
|
#elif defined(__WXMAC__)
|
2008-06-11 19:17:41 +00:00
|
|
|
#include "wx/osx/statline.h"
|
2014-08-24 01:50:11 +00:00
|
|
|
#elif defined(__WXQT__)
|
|
|
|
#include "wx/qt/statline.h"
|
1999-06-28 21:39:49 +00:00
|
|
|
#else // use generic implementation for all other platforms
|
|
|
|
#include "wx/generic/statline.h"
|
1999-05-05 21:42:48 +00:00
|
|
|
#endif
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
#endif // wxUSE_STATLINE
|
|
|
|
|
2006-12-09 14:52:59 +00:00
|
|
|
#endif // _WX_STATLINE_H_BASE_
|