1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2002-02-03 20:35:30 -05:00
|
|
|
// Name: wx/msw/brush.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxBrush class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_BRUSH_H_
|
|
|
|
#define _WX_BRUSH_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBrush;
|
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxBrush
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2004-12-03 10:31:31 -05:00
|
|
|
class WXDLLEXPORT wxBrush : public wxBrushBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
|
|
|
public:
|
2002-02-03 20:35:30 -05:00
|
|
|
wxBrush();
|
2003-07-21 16:41:48 -04:00
|
|
|
wxBrush(const wxColour& col, int style = wxSOLID);
|
2002-02-03 20:35:30 -05:00
|
|
|
wxBrush(const wxBitmap& stipple);
|
|
|
|
virtual ~wxBrush();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05: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);
|
2002-02-03 20:35:30 -05:00
|
|
|
virtual void SetStyle(int style);
|
|
|
|
virtual void SetStipple(const wxBitmap& stipple);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
bool operator==(const wxBrush& brush) const;
|
|
|
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
wxColour GetColour() const;
|
2004-12-03 10:31:31 -05:00
|
|
|
virtual int GetStyle() const;
|
2002-02-03 20:35:30 -05:00
|
|
|
wxBitmap *GetStipple() const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
bool Ok() const { return m_refData != NULL; }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
// return the HBRUSH for this brush
|
|
|
|
virtual WXHANDLE GetResourceHandle() const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
protected:
|
|
|
|
virtual wxObjectRefData *CreateRefData() const;
|
|
|
|
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxBrush)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_BRUSH_H_
|