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
|
|
|
|
// ========================================================================
|
2004-12-03 10:31:31 -05:00
|
|
|
class WXDLLEXPORT 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();
|
2003-07-21 19:13:15 -04:00
|
|
|
wxBrush(const wxColour& col, int style = wxSOLID);
|
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) ;
|
2005-10-04 12:13:42 -04:00
|
|
|
virtual void SetStyle(int style) ;
|
|
|
|
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;
|
2004-12-03 10:31:31 -05:00
|
|
|
virtual int GetStyle() const;
|
2003-07-07 14:53:00 -04:00
|
|
|
wxBitmap *GetStipple() const;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2006-10-08 17:56:55 -04:00
|
|
|
virtual bool Ok() const { return IsOk(); }
|
|
|
|
virtual bool IsOk() const
|
2003-07-07 14:53:00 -04:00
|
|
|
{ return (m_refData != NULL); }
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// wxObjectRefData
|
|
|
|
wxObjectRefData *CreateRefData() const;
|
|
|
|
wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// wxCocoa
|
|
|
|
WX_NSColor GetNSColor();
|
2003-03-21 21:56:04 -05:00
|
|
|
};
|
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
#endif // __WX_COCOA_BRUSH_H__
|