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
|
2004-05-23 16:53:33 -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
|
|
|
|
2003-08-03 23:10:23 -04:00
|
|
|
class WXDLLEXPORT wxColour;
|
|
|
|
class WXDLLEXPORT wxBitmap;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-08-03 23:10:23 -04:00
|
|
|
// ========================================================================
|
|
|
|
// wxPen
|
|
|
|
// ========================================================================
|
2003-03-21 21:56:04 -05:00
|
|
|
class WXDLLEXPORT wxPen: public wxGDIObject
|
|
|
|
{
|
2003-08-03 23:10:23 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
2003-03-21 21:56:04 -05:00
|
|
|
public:
|
2003-08-03 23:10:23 -04:00
|
|
|
wxPen();
|
|
|
|
wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
|
|
|
|
wxPen(const wxBitmap& stipple, int width);
|
|
|
|
wxPen(const wxPen& pen)
|
|
|
|
: wxGDIObject()
|
|
|
|
{ Ref(pen); }
|
|
|
|
~wxPen();
|
|
|
|
|
|
|
|
// wxObjectRefData
|
|
|
|
wxObjectRefData *CreateRefData() const;
|
|
|
|
wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
|
|
|
|
|
|
|
inline wxPen& operator = (const wxPen& pen)
|
|
|
|
{ if (*this == pen) return (*this); Ref(pen); return *this; }
|
|
|
|
inline bool operator == (const wxPen& pen)
|
|
|
|
{ return m_refData == pen.m_refData; }
|
|
|
|
inline bool operator != (const wxPen& pen)
|
|
|
|
{ return m_refData != pen.m_refData; }
|
|
|
|
|
|
|
|
virtual bool Ok() const { return (m_refData != NULL) ; }
|
|
|
|
|
|
|
|
void SetColour(const wxColour& col) ;
|
|
|
|
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
|
|
|
|
|
|
|
void SetWidth(int width);
|
|
|
|
void SetStyle(int style);
|
|
|
|
void SetStipple(const wxBitmap& stipple);
|
|
|
|
void SetDashes(int nb_dashes, const wxDash *dash);
|
|
|
|
void SetJoin(int join);
|
|
|
|
void SetCap(int cap);
|
|
|
|
|
|
|
|
wxColour& GetColour() const;
|
|
|
|
int GetWidth() const;
|
|
|
|
int GetStyle() const;
|
|
|
|
int GetJoin() const;
|
|
|
|
int GetCap() const;
|
|
|
|
int GetDashes(wxDash **ptr) const;
|
|
|
|
wxBitmap *GetStipple() const;
|
|
|
|
|
|
|
|
WX_NSColor GetNSColor();
|
2003-08-04 02:16:15 -04:00
|
|
|
int GetCocoaLineDash(const float **pattern);
|
2003-03-21 21:56:04 -05:00
|
|
|
};
|
|
|
|
|
2003-08-03 23:10:23 -04:00
|
|
|
#endif // __WX_COCOA_PEN_H__
|