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
|
2002-02-03 20:35:30 -05: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
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
2002-02-03 20:35:30 -05:00
|
|
|
#pragma interface "brush.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBrush;
|
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxBrush
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxBrush : public wxGDIObject
|
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);
|
|
|
|
wxBrush(const wxBrush& brush) { Ref(brush); }
|
|
|
|
virtual ~wxBrush();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
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);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2002-02-03 20:35:30 -05:00
|
|
|
wxBrush& operator=(const wxBrush& brush);
|
|
|
|
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;
|
|
|
|
int GetStyle() const;
|
|
|
|
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_
|