1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: msw/statline.h
|
|
|
|
// Purpose: MSW version of wxStaticLine class
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Created: 28.06.99
|
|
|
|
// Version: $Id$
|
|
|
|
// Copyright: (c) 1998 Vadim Zeitlin
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-24 15:57:35 +00:00
|
|
|
#ifndef _WX_OS2_STATLINE_H_
|
|
|
|
#define _WX_OS2_STATLINE_H_
|
1999-07-29 05:11:30 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxStaticLine
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
// constructors and pseudo-constructors
|
|
|
|
wxStaticLine() { }
|
2001-12-17 22:56:41 +00:00
|
|
|
wxStaticLine( wxWindow* pParent
|
2005-03-11 02:13:30 +00:00
|
|
|
,wxWindowID vId = wxID_ANY
|
2001-12-17 22:56:41 +00:00
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = wxLI_HORIZONTAL
|
2006-12-09 14:52:59 +00:00
|
|
|
,const wxString& rsName = wxStaticLineNameStr
|
2001-12-17 22:56:41 +00:00
|
|
|
)
|
|
|
|
{
|
|
|
|
Create(pParent, vId, rPos, rSize, lStyle, rsName);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create( wxWindow* pParent
|
2005-03-11 02:13:30 +00:00
|
|
|
,wxWindowID vId = wxID_ANY
|
2001-12-17 22:56:41 +00:00
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = wxLI_HORIZONTAL
|
2006-12-09 14:52:59 +00:00
|
|
|
,const wxString& rsName = wxStaticLineNameStr
|
2001-12-17 22:56:41 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
inline bool IsVertical(void) const { return((GetWindowStyleFlag() & wxLI_VERTICAL) != 0); }
|
|
|
|
inline static int GetDefaultSize(void) { return 2; }
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-12-17 22:56:41 +00:00
|
|
|
//
|
|
|
|
// Overriden base class virtuals
|
|
|
|
//
|
|
|
|
inline virtual bool AcceptsFocus(void) const {return FALSE;}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
inline wxSize AdjustSize(const wxSize& rSize) const
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
2001-12-17 22:56:41 +00:00
|
|
|
wxSize vSizeReal( rSize.x
|
|
|
|
,rSize.y
|
|
|
|
);
|
|
|
|
|
|
|
|
if (IsVertical())
|
|
|
|
{
|
|
|
|
if (rSize.x == -1 )
|
|
|
|
vSizeReal.x = GetDefaultSize();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (rSize.y == -1)
|
|
|
|
vSizeReal.y = GetDefaultSize();
|
|
|
|
}
|
|
|
|
return vSizeReal;
|
1999-07-29 05:11:30 +00:00
|
|
|
}
|
|
|
|
|
2001-12-17 22:56:41 +00:00
|
|
|
inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); }
|
|
|
|
|
2002-02-22 23:30:31 +00:00
|
|
|
//
|
|
|
|
// Usually overridden base class virtuals
|
|
|
|
//
|
|
|
|
virtual WXDWORD OS2GetStyle( long lStyle
|
|
|
|
,WXDWORD* pdwExstyle
|
|
|
|
) const;
|
|
|
|
|
2001-12-17 22:56:41 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticLine)
|
|
|
|
}; // end of CLASS wxStaticLine
|
1999-07-29 05:11:30 +00:00
|
|
|
|
1999-10-24 15:57:35 +00:00
|
|
|
#endif // _WX_OS2_STATLINE_H_
|
1999-07-29 05:11:30 +00:00
|
|
|
|
|
|
|
|