1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-22 21:28:01 -05:00
|
|
|
// Name: wx/gtk1/pen.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 13:03:18 -05:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKPENH__
|
|
|
|
#define __GTKPENH__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/string.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPen;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2006-01-22 21:28:01 -05:00
|
|
|
#if defined(__WXGTK127__)
|
2000-03-12 06:49:19 -05:00
|
|
|
typedef gint8 wxGTKDash;
|
|
|
|
#else
|
|
|
|
typedef gchar wxGTKDash;
|
|
|
|
#endif
|
1999-07-19 10:41:30 -04:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPen
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-11-22 14:44:25 -05:00
|
|
|
public:
|
2002-02-04 13:01:21 -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 );
|
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
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
bool operator == ( const wxPen& pen ) const;
|
2002-02-04 13:01:21 -05:00
|
|
|
bool operator != (const wxPen& pen) const { return !(*this == pen); }
|
1998-12-09 12:30:17 -05:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
void SetColour( const wxColour &colour );
|
2005-10-04 14:14:41 -04:00
|
|
|
void SetColour( unsigned char red, unsigned char green, unsigned char blue );
|
1998-05-20 10:01:55 -04:00
|
|
|
void SetCap( int capStyle );
|
|
|
|
void SetJoin( int joinStyle );
|
|
|
|
void SetStyle( int style );
|
|
|
|
void SetWidth( int width );
|
1999-07-19 10:41:30 -04:00
|
|
|
void SetDashes( int number_of_dashes, const wxDash *dash );
|
2005-10-04 12:13:42 -04:00
|
|
|
|
1998-12-09 12:30:17 -05:00
|
|
|
wxColour &GetColour() const;
|
|
|
|
int GetCap() const;
|
|
|
|
int GetJoin() const;
|
|
|
|
int GetStyle() const;
|
|
|
|
int GetWidth() const;
|
1999-07-19 10:41:30 -04:00
|
|
|
int GetDashes(wxDash **ptr) const;
|
|
|
|
int GetDashCount() const;
|
|
|
|
wxDash* GetDash() const;
|
1998-12-09 12:30:17 -05:00
|
|
|
|
2005-10-04 12:13:42 -04:00
|
|
|
private:
|
2002-02-04 13:01:21 -05:00
|
|
|
// ref counting code
|
|
|
|
virtual wxObjectRefData *CreateRefData() const;
|
|
|
|
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
2005-10-04 12:13:42 -04:00
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKPENH__
|