2002-02-05 11:34:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: brush.h
|
|
|
|
// Purpose: wxBrush class
|
2002-02-10 12:24:14 -05:00
|
|
|
// Author: Julian Smart, Robert Roebling
|
2002-02-05 11:34:33 -05:00
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
2002-02-10 12:24:14 -05:00
|
|
|
// Copyright: (c) Julian Smart, Robert Roebling
|
2002-02-05 11:34:33 -05:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BRUSH_H_
|
|
|
|
#define _WX_BRUSH_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "brush.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
class wxBrush;
|
2003-02-20 13:20:47 -05:00
|
|
|
class wxColour;
|
|
|
|
class wxBitmap;
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxBrush
|
|
|
|
//-----------------------------------------------------------------------------
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
class wxBrush: public wxGDIObject
|
2002-02-05 11:34:33 -05:00
|
|
|
{
|
|
|
|
public:
|
2002-02-10 12:24:14 -05:00
|
|
|
wxBrush() { }
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
wxBrush( const wxColour &colour, int style );
|
|
|
|
wxBrush( const wxBitmap &stippleBitmap );
|
|
|
|
~wxBrush();
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
wxBrush( const wxBrush &brush ) { Ref(brush); }
|
|
|
|
wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
bool Ok() const { return m_refData != NULL; }
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
bool operator == ( const wxBrush& brush ) const;
|
|
|
|
bool operator != (const wxBrush& brush) const { return !(*this == brush); }
|
|
|
|
|
|
|
|
int GetStyle() const;
|
|
|
|
wxColour &GetColour() const;
|
|
|
|
wxBitmap *GetStipple() const;
|
|
|
|
|
|
|
|
void SetColour( const wxColour& col );
|
|
|
|
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
|
|
|
void SetStyle( int style );
|
|
|
|
void SetStipple( const wxBitmap& stipple );
|
|
|
|
|
|
|
|
private:
|
|
|
|
// ref counting code
|
|
|
|
virtual wxObjectRefData *CreateRefData() const;
|
|
|
|
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-10 12:24:14 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxBrush)
|
2002-02-05 11:34:33 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BRUSH_H_
|