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