1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-07-21 15:39:34 -04:00
|
|
|
// Name: wx/gtk/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
|
1998-12-09 12:30:17 -05:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKPENH__
|
|
|
|
#define __GTKPENH__
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1998-05-20 10:01:55 -04: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 04:27:41 -04:00
|
|
|
#if defined(__WXGTK127__) || defined(__WXGTK20__)
|
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
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxPen: public wxGDIObject
|
|
|
|
{
|
1999-11-22 14:44:25 -05:00
|
|
|
public:
|
2002-02-04 13:01:21 -05:00
|
|
|
wxPen() { }
|
|
|
|
|
2003-07-21 15:39:34 -04:00
|
|
|
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
|
1998-12-09 12:30:17 -05:00
|
|
|
~wxPen();
|
2002-02-04 13:01:21 -05:00
|
|
|
|
2002-05-07 17:58:27 -04:00
|
|
|
wxPen( const wxPen& pen )
|
|
|
|
: wxGDIObject()
|
|
|
|
{ Ref(pen); }
|
2002-02-04 13:01:21 -05:00
|
|
|
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
|
|
|
|
|
|
|
|
bool Ok() const { return m_refData != NULL; }
|
|
|
|
|
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 );
|
1998-07-04 11:17:59 -04:00
|
|
|
void SetColour( int red, int green, int 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 );
|
|
|
|
|
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
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
private:
|
2002-02-04 13:01:21 -05:00
|
|
|
// ref counting code
|
|
|
|
virtual wxObjectRefData *CreateRefData() const;
|
|
|
|
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKPENH__
|