2003-03-21 21:56:04 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-07-07 14:53:00 -04:00
|
|
|
// Name: include/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-05-23 16:53:33 -04: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"
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBrush;
|
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// ========================================================================
|
|
|
|
// wxBrush
|
|
|
|
// ========================================================================
|
2003-03-21 21:56:04 -05:00
|
|
|
class WXDLLEXPORT wxBrush: public wxGDIObject
|
|
|
|
{
|
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);
|
|
|
|
wxBrush(const wxBrush& brush)
|
|
|
|
: wxGDIObject()
|
|
|
|
{ Ref(brush); }
|
|
|
|
~wxBrush();
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Implementation
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
virtual void SetColour(const wxColour& col) ;
|
|
|
|
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
|
|
|
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
|
|
|
// assignment
|
|
|
|
wxBrush& operator = (const wxBrush& brush)
|
|
|
|
{ if (*this == brush) return (*this); Ref(brush); return *this; }
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
// comparison
|
|
|
|
bool operator == (const wxBrush& brush)
|
|
|
|
{ return m_refData == brush.m_refData; }
|
|
|
|
bool operator != (const wxBrush& brush)
|
|
|
|
{ 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;
|
|
|
|
int GetStyle() const;
|
|
|
|
wxBitmap *GetStipple() const;
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-07-07 14:53:00 -04:00
|
|
|
virtual bool Ok() const
|
|
|
|
{ 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__
|