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