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