2001-06-26 16:59:19 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/statline.h
|
|
|
|
// Purpose: wxStaticLine class interface
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Created: 28.06.99
|
|
|
|
// Version: $Id$
|
|
|
|
// Copyright: (c) 1999 Vadim Zeitlin
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 16:59:19 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-05-05 17:42:48 -04:00
|
|
|
#ifndef _WX_STATLINE_H_BASE_
|
|
|
|
#define _WX_STATLINE_H_BASE_
|
|
|
|
|
1999-06-28 17:39:49 -04: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 11:06:00 -04:00
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticLineNameStr[];
|
1999-06-28 17:39:49 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxStaticLine - a line in a dialog
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticLineBase : public wxControl
|
1999-06-28 17:39:49 -04: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 10:17:38 -04:00
|
|
|
// overridden base class virtuals
|
2004-03-04 12:03:55 -05:00
|
|
|
virtual bool AcceptsFocus() const { return false; }
|
2001-06-26 16:59:19 -04:00
|
|
|
|
1999-06-28 17:39:49 -04:00
|
|
|
protected:
|
2007-11-13 07:10:34 -05:00
|
|
|
// choose the default border for this window
|
|
|
|
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
|
|
|
|
1999-06-28 17:39:49 -04:00
|
|
|
// set the right size for the right dimension
|
2001-06-26 16:59:19 -04:00
|
|
|
wxSize AdjustSize(const wxSize& size) const
|
1999-06-28 17:39:49 -04:00
|
|
|
{
|
|
|
|
wxSize sizeReal(size);
|
|
|
|
if ( IsVertical() )
|
|
|
|
{
|
2004-09-22 10:38:52 -04:00
|
|
|
if ( size.x == wxDefaultCoord )
|
1999-06-28 17:39:49 -04:00
|
|
|
sizeReal.x = GetDefaultSize();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-09-22 10:38:52 -04:00
|
|
|
if ( size.y == wxDefaultCoord )
|
1999-06-28 17:39:49 -04:00
|
|
|
sizeReal.y = GetDefaultSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
return sizeReal;
|
|
|
|
}
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
virtual wxSize DoGetBestSize() const
|
|
|
|
{
|
|
|
|
return AdjustSize(wxDefaultSize);
|
|
|
|
}
|
2003-07-21 20:24:07 -04:00
|
|
|
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxStaticLineBase);
|
1999-06-28 17:39:49 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// now include the actual class declaration
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/statline.h"
|
|
|
|
#elif defined(__WXMSW__)
|
1999-06-28 17:39:49 -04:00
|
|
|
#include "wx/msw/statline.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK20__)
|
1999-06-28 17:39:49 -04:00
|
|
|
#include "wx/gtk/statline.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/statline.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
|
|
|
#include "wx/os2/statline.h"
|
1999-11-10 06:32:00 -05:00
|
|
|
#elif defined(__WXMAC__)
|
2008-06-11 15:17:41 -04:00
|
|
|
#include "wx/osx/statline.h"
|
2003-03-22 01:18:36 -05:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/statline.h"
|
1999-06-28 17:39:49 -04:00
|
|
|
#else // use generic implementation for all other platforms
|
|
|
|
#include "wx/generic/statline.h"
|
1999-05-05 17:42:48 -04:00
|
|
|
#endif
|
|
|
|
|
1999-06-28 17:39:49 -04:00
|
|
|
#endif // wxUSE_STATLINE
|
|
|
|
|
2006-12-09 09:52:59 -05:00
|
|
|
#endif // _WX_STATLINE_H_BASE_
|