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
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPen;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2006-01-23 02:28:01 +00:00
|
|
|
#if defined(__WXGTK127__)
|
2011-09-07 16:56:50 +00:00
|
|
|
typedef signed char wxGTKDash;
|
2000-03-12 11:49:19 +00:00
|
|
|
#else
|
2011-09-07 16:56:50 +00:00
|
|
|
typedef char wxGTKDash;
|
2000-03-12 11:49:19 +00:00
|
|
|
#endif
|
1999-07-19 14:41:30 +00:00
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPen
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2008-03-16 21:11:12 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxPen: public wxPenBase
|
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
|
|
|
|
2008-03-16 21:11:12 +00:00
|
|
|
wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
|
2008-03-20 15:08:51 +00:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
|
2008-03-16 21:11:12 +00:00
|
|
|
#endif
|
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
bool operator==(const wxPen& pen) const;
|
|
|
|
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 );
|
2008-03-16 21:11:12 +00:00
|
|
|
void SetCap( wxPenCap capStyle );
|
|
|
|
void SetJoin( wxPenJoin joinStyle );
|
|
|
|
void SetStyle( wxPenStyle style );
|
1998-05-20 14:01:55 +00:00
|
|
|
void SetWidth( int width );
|
1999-07-19 14:41:30 +00:00
|
|
|
void SetDashes( int number_of_dashes, const wxDash *dash );
|
2008-03-22 02:58:41 +00:00
|
|
|
void SetStipple(const wxBitmap& stipple);
|
2005-10-04 16:13:42 +00:00
|
|
|
|
2008-03-28 16:47:58 +00:00
|
|
|
wxColour GetColour() const;
|
2008-03-16 21:11:12 +00:00
|
|
|
wxPenCap GetCap() const;
|
|
|
|
wxPenJoin GetJoin() const;
|
|
|
|
wxPenStyle GetStyle() const;
|
1998-12-09 17:30:17 +00:00
|
|
|
int GetWidth() const;
|
1999-07-19 14:41:30 +00:00
|
|
|
int GetDashes(wxDash **ptr) const;
|
|
|
|
int GetDashCount() const;
|
|
|
|
wxDash* GetDash() const;
|
2008-03-22 02:58:41 +00:00
|
|
|
wxBitmap *GetStipple() const;
|
1998-12-09 17:30:17 +00:00
|
|
|
|
2008-06-17 17:28:26 +00:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
|
|
|
{ SetStyle((wxPenStyle)style); }
|
|
|
|
#endif
|
|
|
|
|
2005-10-04 16:13:42 +00:00
|
|
|
private:
|
2007-12-15 17:54:20 +00:00
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *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__
|