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
|
|
|
|
2005-08-02 14:16:51 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
|
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
|
|
|
|
2003-07-21 15:39:34 -04:00
|
|
|
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
|
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
|
|
|
|
2006-10-08 17:56:55 -04:00
|
|
|
bool Ok() const { return IsOk(); }
|
|
|
|
bool IsOk() const { return m_refData != NULL; }
|
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 );
|
2002-02-10 12:24:14 -05:00
|
|
|
void SetCap( int capStyle );
|
|
|
|
void SetJoin( int joinStyle );
|
|
|
|
void SetStyle( int style );
|
|
|
|
void SetWidth( int width );
|
|
|
|
void SetDashes( int number_of_dashes, const wxDash *dash );
|
2003-02-20 13:20:47 -05:00
|
|
|
void SetStipple( wxBitmap *stipple );
|
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
wxColour &GetColour() const;
|
|
|
|
int GetCap() const;
|
|
|
|
int GetJoin() const;
|
|
|
|
int GetStyle() const;
|
|
|
|
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:
|
2002-02-10 12:24:14 -05:00
|
|
|
// ref counting code
|
|
|
|
virtual wxObjectRefData *CreateRefData() const;
|
|
|
|
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *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
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_PEN_H_
|