1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-07-21 19:39:34 +00:00
|
|
|
// Name: wx/gtk/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
|
1998-12-09 17:30:17 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKPENH__
|
|
|
|
#define __GTKPENH__
|
|
|
|
|
2002-09-07 12:28:46 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1998-05-20 14:01:55 +00:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/string.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxPen;
|
|
|
|
|
2000-07-19 08:27:41 +00:00
|
|
|
#if defined(__WXGTK127__) || defined(__WXGTK20__)
|
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
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxPen: public wxGDIObject
|
|
|
|
{
|
1999-11-22 19:44:25 +00:00
|
|
|
public:
|
2002-02-04 18:01:21 +00:00
|
|
|
wxPen() { }
|
|
|
|
|
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();
|
2002-02-04 18:01:21 +00:00
|
|
|
|
2002-05-07 21:58:27 +00:00
|
|
|
wxPen( const wxPen& pen )
|
|
|
|
: wxGDIObject()
|
|
|
|
{ Ref(pen); }
|
2002-02-04 18:01:21 +00:00
|
|
|
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
|
|
|
|
|
|
|
|
bool Ok() const { return m_refData != NULL; }
|
|
|
|
|
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 );
|
1998-07-04 15:17:59 +00:00
|
|
|
void SetColour( int red, int green, int 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 );
|
|
|
|
|
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
|
|
|
|
1999-11-22 19:44:25 +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;
|
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKPENH__
|