aswang  1.0
Public Member Functions | Protected Attributes
aswang::Brush Class Reference

Wraps a brush handle and automatically handles allocation/deallocation. More...

#include <Brush.h>

List of all members.

Public Member Functions

 Brush ()
 Brush (const COLORREF r)
 Creates a new brush with the given color.
 Brush (const HBRUSH b)
 Creates a similar brush.
 Brush (const Brush &b)
 Creates a similar brush.
virtual ~Brush ()
 Cleanup.
virtual void Delete ()
 Free the brush.
virtual COLORREF GetCRef () const
virtual void SetCRef (COLORREF r)
 Deletes the existing brush and creates a new one.
virtual HBRUSH GetBrush () const
virtual void SetBrush (HBRUSH b)
 Deletes the existing brush and creates a new one similar to the brush passed to it.
virtual LOGBRUSH GetObjectInfo () const
virtual unsigned int GetStyle () const
virtual COLORREF GetColor () const
virtual long GetHatch () const
virtual Brushoperator= (const Brush &b)
virtual Brushoperator= (const COLORREF r)
virtual Brushoperator= (const HBRUSH b)
virtual operator bool const ()
 Tests whether the brush handle is NULL.
virtual operator HBRUSH () const

Protected Attributes

COLORREF cref
HBRUSH hbr

Detailed Description

Wraps a brush handle and automatically handles allocation/deallocation.

Definition at line 26 of file Brush.h.


Constructor & Destructor Documentation

aswang::Brush::Brush ( ) [inline]

Definition at line 31 of file Brush.h.

aswang::Brush::Brush ( const COLORREF  r) [inline]

Creates a new brush with the given color.

Definition at line 33 of file Brush.h.

aswang::Brush::Brush ( const HBRUSH  b) [inline]

Creates a similar brush.

Definition at line 35 of file Brush.h.

aswang::Brush::Brush ( const Brush b) [inline]

Creates a similar brush.

Definition at line 37 of file Brush.h.

virtual aswang::Brush::~Brush ( ) [inline, virtual]

Cleanup.

Attention:
Will call Delete()

Definition at line 40 of file Brush.h.


Member Function Documentation

void Brush::Delete ( ) [virtual]

Free the brush.

Definition at line 24 of file Brush.cpp.

virtual HBRUSH aswang::Brush::GetBrush ( ) const [inline, virtual]

Definition at line 47 of file Brush.h.

COLORREF Brush::GetColor ( ) const [virtual]

Definition at line 78 of file Brush.cpp.

virtual COLORREF aswang::Brush::GetCRef ( ) const [inline, virtual]

Definition at line 44 of file Brush.h.

long Brush::GetHatch ( ) const [virtual]

Definition at line 83 of file Brush.cpp.

LOGBRUSH Brush::GetObjectInfo ( ) const [virtual]

Definition at line 65 of file Brush.cpp.

unsigned int Brush::GetStyle ( ) const [virtual]

Definition at line 73 of file Brush.cpp.

virtual aswang::Brush::operator bool const ( ) [inline, virtual]

Tests whether the brush handle is NULL.

Definition at line 59 of file Brush.h.

virtual aswang::Brush::operator HBRUSH ( ) const [inline, virtual]

Definition at line 60 of file Brush.h.

Brush & Brush::operator= ( const Brush b) [virtual]

Definition at line 48 of file Brush.cpp.

Brush & Brush::operator= ( const COLORREF  r) [virtual]

Definition at line 55 of file Brush.cpp.

Brush & Brush::operator= ( const HBRUSH  b) [virtual]

Definition at line 60 of file Brush.cpp.

void Brush::SetBrush ( HBRUSH  b) [virtual]

Deletes the existing brush and creates a new one similar to the brush passed to it.

Definition at line 37 of file Brush.cpp.

void Brush::SetCRef ( COLORREF  r) [virtual]

Deletes the existing brush and creates a new one.

Definition at line 31 of file Brush.cpp.


Member Data Documentation

COLORREF aswang::Brush::cref [protected]

Definition at line 28 of file Brush.h.

HBRUSH aswang::Brush::hbr [protected]

Definition at line 29 of file Brush.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines