2002-02-05 16:34:33 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-04 16:13:42 +00:00
|
|
|
// Name: wx/x11/pen.h
|
2002-02-05 16:34:33 +00:00
|
|
|
// Purpose: wxPen class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2005-10-04 16:13:42 +00:00
|
|
|
// Licence: wxWindows licence
|
2002-02-05 16:34:33 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_PEN_H_
|
|
|
|
#define _WX_PEN_H_
|
|
|
|
|
2003-02-20 18:20:47 +00:00
|
|
|
#include "wx/gdicmn.h"
|
2002-02-05 16:34:33 +00:00
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
|
2002-02-10 17:24:14 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPen;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2002-02-10 17:24:14 +00:00
|
|
|
typedef char wxX11Dash;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2002-02-10 17:24:14 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPen
|
|
|
|
//-----------------------------------------------------------------------------
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2008-03-16 21:11:12 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxPen: public wxPenBase
|
2002-02-05 16:34:33 +00:00
|
|
|
{
|
|
|
|
public:
|
2002-02-10 17:24:14 +00:00
|
|
|
wxPen() { }
|
2005-10-04 16:13:42 +00:00
|
|
|
|
2008-03-16 21:11:12 +00:00
|
|
|
wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
|
2008-03-20 15:08:51 +00:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
|
2008-03-16 21:11:12 +00:00
|
|
|
#endif
|
|
|
|
|
2003-02-20 18:20:47 +00:00
|
|
|
wxPen( const wxBitmap &stipple, int width );
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxPen();
|
2005-10-04 16:13:42 +00:00
|
|
|
|
2002-02-10 17:24:14 +00:00
|
|
|
bool operator == ( const wxPen& pen ) const;
|
|
|
|
bool operator != (const wxPen& pen) const { return !(*this == pen); }
|
|
|
|
|
|
|
|
void SetColour( const wxColour &colour );
|
2005-10-04 18:14:41 +00:00
|
|
|
void SetColour( unsigned char red, unsigned char green, unsigned char blue );
|
2008-03-16 21:11:12 +00:00
|
|
|
void SetCap( wxPenCap capStyle );
|
|
|
|
void SetJoin( wxPenJoin joinStyle );
|
|
|
|
void SetStyle( wxPenStyle style );
|
2002-02-10 17:24:14 +00:00
|
|
|
void SetWidth( int width );
|
|
|
|
void SetDashes( int number_of_dashes, const wxDash *dash );
|
2008-03-21 23:39:11 +00:00
|
|
|
void SetStipple( const wxBitmap& stipple );
|
2003-02-20 18:20:47 +00:00
|
|
|
|
2008-03-28 16:47:58 +00:00
|
|
|
wxColour GetColour() const;
|
2008-03-16 21:11:12 +00:00
|
|
|
wxPenCap GetCap() const;
|
|
|
|
wxPenJoin GetJoin() const;
|
|
|
|
wxPenStyle GetStyle() const;
|
2002-02-10 17:24:14 +00:00
|
|
|
int GetWidth() const;
|
|
|
|
int GetDashes(wxDash **ptr) const;
|
|
|
|
int GetDashCount() const;
|
|
|
|
wxDash* GetDash() const;
|
2003-02-20 18:20:47 +00:00
|
|
|
wxBitmap* GetStipple() const;
|
2002-02-10 17:24:14 +00:00
|
|
|
|
2008-06-17 17:28:26 +00:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
|
|
|
{ SetStyle((wxPenStyle)style); }
|
|
|
|
#endif
|
|
|
|
|
2006-02-08 21:47:09 +00:00
|
|
|
protected:
|
2007-12-15 17:54:20 +00:00
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
2005-10-04 16:13:42 +00:00
|
|
|
|
2002-02-10 17:24:14 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
2002-02-05 16:34:33 +00:00
|
|
|
};
|
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
#endif // _WX_PEN_H_
|