2003-03-22 02:56:04 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-07-21 23:13:15 +00:00
|
|
|
// Name: wx/cocoa/pen.h
|
2003-03-22 02:56:04 +00:00
|
|
|
// Purpose: wxPen class
|
2003-07-21 23:13:15 +00:00
|
|
|
// Author: David Elliott
|
2003-03-22 02:56:04 +00:00
|
|
|
// Modified by:
|
2003-08-04 03:10:23 +00:00
|
|
|
// Created: 2003/08/02 (stubs from 22.03.2003)
|
2003-03-22 02:56:04 +00:00
|
|
|
// RCS-ID: $Id$
|
2003-07-21 23:13:15 +00:00
|
|
|
// Copyright: (c) 2003 David Elliott
|
2005-10-04 16:13:42 +00:00
|
|
|
// Licence: wxWindows licence
|
2003-03-22 02:56:04 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-08-04 03:10:23 +00:00
|
|
|
#ifndef __WX_COCOA_PEN_H__
|
|
|
|
#define __WX_COCOA_PEN_H__
|
2003-03-22 02:56:04 +00:00
|
|
|
|
|
|
|
#include "wx/gdiobj.h"
|
2003-08-04 03:10:23 +00:00
|
|
|
#include "wx/gdicmn.h"
|
2003-03-22 02:56:04 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
2003-03-22 02:56:04 +00:00
|
|
|
|
2003-08-04 03:10:23 +00:00
|
|
|
// ========================================================================
|
|
|
|
// wxPen
|
|
|
|
// ========================================================================
|
2003-03-22 02:56:04 +00:00
|
|
|
class WXDLLEXPORT wxPen: public wxGDIObject
|
|
|
|
{
|
|
|
|
public:
|
2003-08-04 03:10:23 +00:00
|
|
|
wxPen();
|
2008-03-16 21:11:12 +00:00
|
|
|
wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
|
|
|
|
#if WXWIN_COMPATIBILITY_2_8
|
|
|
|
wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
|
|
|
|
#endif
|
2003-08-04 03:10:23 +00:00
|
|
|
wxPen(const wxBitmap& stipple, int width);
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxPen();
|
2003-08-04 03:10:23 +00:00
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
// FIXME: operator==() is wrong
|
|
|
|
bool operator==(const wxPen& pen) const { return m_refData == pen.m_refData; }
|
|
|
|
bool operator!=(const wxPen& pen) const { return !(*this == pen); }
|
2003-08-04 03:10:23 +00:00
|
|
|
|
|
|
|
void SetColour(const wxColour& col) ;
|
2005-10-04 18:14:41 +00:00
|
|
|
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
2003-08-04 03:10:23 +00:00
|
|
|
|
|
|
|
void SetWidth(int width);
|
2008-03-16 21:11:12 +00:00
|
|
|
void SetStyle(wxPenStyle style);
|
2003-08-04 03:10:23 +00:00
|
|
|
void SetStipple(const wxBitmap& stipple);
|
|
|
|
void SetDashes(int nb_dashes, const wxDash *dash);
|
2008-03-16 21:11:12 +00:00
|
|
|
void SetJoin(wxPenJoin join);
|
|
|
|
void SetCap(wxPenCap cap);
|
2003-08-04 03:10:23 +00:00
|
|
|
|
|
|
|
wxColour& GetColour() const;
|
|
|
|
int GetWidth() const;
|
2008-03-16 21:11:12 +00:00
|
|
|
wxPenStyle GetStyle() const;
|
|
|
|
wxPenJoin GetJoin() const;
|
|
|
|
wxPenCap GetCap() const;
|
2003-08-04 03:10:23 +00:00
|
|
|
int GetDashes(wxDash **ptr) const;
|
|
|
|
wxBitmap *GetStipple() const;
|
|
|
|
|
|
|
|
WX_NSColor GetNSColor();
|
2007-07-06 00:18:28 +00:00
|
|
|
int GetCocoaLineDash(const CGFloat **pattern);
|
2007-12-15 17:54:20 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
2003-03-22 02:56:04 +00:00
|
|
|
};
|
|
|
|
|
2003-08-04 03:10:23 +00:00
|
|
|
#endif // __WX_COCOA_PEN_H__
|