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