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
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2002-02-05 11:34:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BRUSH_H_
|
|
|
|
#define _WX_BRUSH_H_
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
2002-02-05 11:34:33 -05:00
|
|
|
#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
|
|
|
|
2003-07-21 16:41:48 -04:00
|
|
|
wxBrush( const wxColour &colour, int style = wxSOLID );
|
2002-02-10 12:24:14 -05:00
|
|
|
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_
|