2003-03-21 21:56:04 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-04 12:13:42 -04:00
|
|
|
// Name: wx/cocoa/brush.h
|
2003-03-21 21:56:04 -05:00
|
|
|
// Purpose: wxBrush class
|
2003-07-07 14:53:00 -04:00
|
|
|
// Author: David Elliott <dfe@cox.net>
|
2003-03-21 21:56:04 -05:00
|
|
|
// Modified by:
|
2003-07-07 14:53:00 -04:00
|
|
|
// Created: 2003/07/03
|
2003-03-21 21:56:04 -05:00
|
|
|
// RCS-ID: $Id$
|
2003-07-07 14:53:00 -04:00
|
|
|
// Copyright: (c) 2003 David Elliott
|
2004-11-30 13:46:20 -05:00
|
|
|
// Licence: wxWindows licence
|
2003-03-21 21:56:04 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
#ifndef __WX_COCOA_BRUSH_H__
|
|
|
|
#define __WX_COCOA_BRUSH_H__
|
2003-03-21 21:56:04 -05:00
|
|
|
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBrush;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// ========================================================================
|
|
|
|
// wxBrush
|
|
|
|
// ========================================================================
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
|
2003-03-21 21:56:04 -05:00
|
|
|
{
|
2003-07-07 14:53:00 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxBrush)
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// initialization
|
|
|
|
// ------------------------------------------------------------------------
|
2003-03-21 21:56:04 -05:00
|
|
|
public:
|
2003-07-07 14:53:00 -04:00
|
|
|
wxBrush();
|
2008-03-16 12:47:57 -04:00
|
|
|
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
2008-03-20 11:08:51 -04:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
|
|
|
|
#endif
|
2003-07-07 14:53:00 -04:00
|
|
|
wxBrush(const wxBitmap& stipple);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxBrush();
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Implementation
|
|
|
|
// ------------------------------------------------------------------------
|
2005-10-04 12:13:42 -04:00
|
|
|
virtual void SetColour(const wxColour& col) ;
|
2005-10-04 14:14:41 -04:00
|
|
|
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
2008-03-16 12:47:57 -04:00
|
|
|
virtual void SetStyle(wxBrushStyle style) ;
|
2005-10-04 12:13:42 -04:00
|
|
|
virtual void SetStipple(const wxBitmap& stipple) ;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// comparison
|
2005-09-24 17:43:15 -04:00
|
|
|
bool operator == (const wxBrush& brush) const
|
2003-07-07 14:53:00 -04:00
|
|
|
{ return m_refData == brush.m_refData; }
|
2005-09-24 17:43:15 -04:00
|
|
|
bool operator != (const wxBrush& brush) const
|
2003-07-07 14:53:00 -04:00
|
|
|
{ return m_refData != brush.m_refData; }
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// accessors
|
|
|
|
wxColour GetColour() const;
|
2008-03-16 12:47:57 -04:00
|
|
|
virtual wxBrushStyle GetStyle() const;
|
2003-07-07 14:53:00 -04:00
|
|
|
wxBitmap *GetStipple() const;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2008-06-17 13:28:26 -04:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
|
|
|
{ SetStyle((wxBrushStyle)style); }
|
|
|
|
#endif
|
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// wxCocoa
|
|
|
|
WX_NSColor GetNSColor();
|
2007-12-15 12:54:20 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
2003-03-21 21:56:04 -05:00
|
|
|
};
|
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
#endif // __WX_COCOA_BRUSH_H__
|