2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-04 12:13:42 -04:00
|
|
|
// Name: wx/mac/carbon/brush.h
|
2004-03-23 12:35:05 -05:00
|
|
|
// Purpose: wxBrush class
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Stefan Csomor
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BRUSH_H_
|
|
|
|
#define _WX_BRUSH_H_
|
|
|
|
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBrush;
|
|
|
|
|
2004-11-30 13:46:20 -05:00
|
|
|
typedef enum
|
2004-03-23 12:35:05 -05:00
|
|
|
{
|
2004-11-30 13:46:20 -05:00
|
|
|
kwxMacBrushColour ,
|
|
|
|
kwxMacBrushTheme ,
|
|
|
|
kwxMacBrushThemeBackground
|
2004-03-23 12:35:05 -05:00
|
|
|
} wxMacBrushKind ;
|
|
|
|
|
|
|
|
// Brush
|
2004-12-03 10:31:31 -05:00
|
|
|
class WXDLLEXPORT wxBrush: public wxBrushBase
|
2004-03-23 12:35:05 -05:00
|
|
|
{
|
2004-11-30 13:46:20 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxBrush)
|
2004-03-23 12:35:05 -05:00
|
|
|
|
|
|
|
public:
|
2004-11-30 13:46:20 -05:00
|
|
|
wxBrush();
|
|
|
|
wxBrush(short macThemeBrush ) ;
|
|
|
|
wxBrush(const wxColour& col, int style = wxSOLID);
|
|
|
|
wxBrush(const wxBitmap& stipple);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxBrush();
|
2004-11-30 13:46:20 -05:00
|
|
|
|
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) ;
|
2004-11-30 13:46:20 -05:00
|
|
|
virtual void SetStyle(int style) ;
|
|
|
|
virtual void SetStipple(const wxBitmap& stipple) ;
|
|
|
|
virtual void MacSetTheme(short macThemeBrush) ;
|
|
|
|
virtual void MacSetThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
|
|
|
|
|
2006-10-30 14:26:48 -05:00
|
|
|
bool operator == (const wxBrush& brush) const;
|
2005-09-24 17:43:15 -04:00
|
|
|
bool operator != (const wxBrush& brush) const
|
2006-10-30 14:26:48 -05:00
|
|
|
{ return !(*this == brush); }
|
2004-11-30 13:46:20 -05:00
|
|
|
|
|
|
|
wxMacBrushKind MacGetBrushKind() const ;
|
|
|
|
|
|
|
|
unsigned long MacGetThemeBackground(WXRECTPTR extent) const ;
|
|
|
|
short MacGetTheme() const ;
|
|
|
|
wxColour& GetColour() const ;
|
2004-12-03 10:31:31 -05:00
|
|
|
virtual int GetStyle() const ;
|
2004-11-30 13:46:20 -05:00
|
|
|
wxBitmap *GetStipple() const ;
|
|
|
|
|
2006-10-08 17:56:55 -04:00
|
|
|
virtual bool Ok() const { return IsOk(); }
|
|
|
|
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
2004-03-23 12:35:05 -05:00
|
|
|
|
|
|
|
// Implementation
|
|
|
|
|
2004-11-30 13:46:20 -05:00
|
|
|
// Useful helper: create the brush resource
|
|
|
|
bool RealizeResource();
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2007-03-21 00:29:57 -04:00
|
|
|
private:
|
|
|
|
void Unshare();
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BRUSH_H_
|