1.10
Static Public Member Functions | List of all members
Drawer< T > Class Template Reference

Manager of the Drawable for each widget type. More...

#include <theme.h>

Static Public Member Functions

static void draw (T &widget, Painter &painter, const Rect &rect)
 Call the Drawable.
 
static void draw (typename Drawable< T >::DrawFunction d)
 Set the default Drawable for all widgets of type T.
 

Detailed Description

template<class T>
class egt::v1::Drawer< T >

Manager of the Drawable for each widget type.

The Button draw() method calls the drawable like:

Drawer<Button>::draw(*this, painter, rect);
static void draw(typename Drawable< T >::DrawFunction d)
Set the default Drawable for all widgets of type T.
Definition theme.h:110

Observing code can change the Button Drawable by calling:

Drawer<Button>::draw([](Button & widget, Painter & painter, const Rect & rect)
{
...
});
Basic button control.
Definition button.h:65
Drawing interface for 2D graphics.
Definition painter.h:45

Member Function Documentation

◆ draw() [1/2]

template<class T >
static void draw ( T &  widget,
Painter painter,
const Rect rect 
)
inlinestatic

Call the Drawable.

◆ draw() [2/2]

template<class T >
static void draw ( typename Drawable< T >::DrawFunction  d)
inlinestatic

Set the default Drawable for all widgets of type T.