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

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

Static Public Member Functions

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

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)
{
...
});
RectType< DefaultDim, detail::Compatible::normal > Rect
Helper type alias.
Definition: geometry.h:1016

Member Function Documentation

◆ draw() [1/2]

static void draw ( T &  widget,
Painter painter,
const Rect rect 
)
inlinestatic

Call the Drawable.

◆ draw() [2/2]

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

Set the default Drawable for all widgets of type T.