Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# painter_holder Struct Reference

Holds a painter. More...

Inheritance diagram for painter_holder:

List of all members.

## Public Types
typedef bg_wnd::general_exception< painter_holder, 0 > | no_painter
typedef bg_wnd::general_exception< painter_holder, 1 > | invalid_painter_cast
## Public Member Functions
| painter_holder (painter_base *pPainter=NULL)
| painter_holder (const painter_holder &holder)
const painter_holder & | operator= (const painter_holder &holder)
void | release_painter ()
void | set_painter (const painter_base &painter)
void | swap (painter_holder &holder)
painter_base & | get_painter () const
bool | painter_available () const
template<class Painter>
Painter & | get_painter () const
template<class Painter>
void | set_painter ()
template<class Painter>
void | set_painter (typename Painter::param0 param)
template<class Painter>
void | set_painter (typename Painter::param0 param0, typename Painter::param1 param1)

## Detailed Description

Holds a painter.

## Member Function Documentation

Painter& get_painter | ( |  | ) | const`[inline]`

| Returns the painter.

painter_base & get_painter | ( |  | ) | const

| Returns the painter.

bool painter_available | ( |  | ) | const

| Returns true if a painter is stored by the painter_holder.

void release_painter | ( |  | ) |

| Frees the painter stored by this holder.

void set_painter | ( | typename Painter::param0 | param0,
|  | typename Painter::param1 | param1
| ) | `[inline]`

| Sets the painter holded to pPainter. The old one is released.

void set_painter | ( | typename Painter::param0 | param | ) | `[inline]`

| Creates a new painter of type Painter (param is passed to the c'tor) and stores this painter. The old one is released.

void set_painter | ( |  | ) | `[inline]`

| Sets the painter holded to pPainter. The old one will be released.

void set_painter | ( | const painter_base & | painter | ) |

| Copies painter and sets the stored painter to this copy.

void swap | ( | painter_holder & | holder | ) |

| Swaps this painter_holder with holder.

| by Steven Weiss. You can contact me at steven11@gmx.de.