Nana C++ Library. Reference for users.
What we need to use nana
|
Draw pictures on a widget by specifying a drawing method that will be employed every time the widget refreshes. More...
Public Types | |
using | diehard_t = draw_fn_handle * |
A handle to a drawing method. More... | |
using | draw_fn_t = std::function< void(paint::graphics &)> |
A function to draw. More... | |
Public Member Functions | |
drawing (window w) | |
Create a drawing object for a widget w. More... | |
virtual | ~drawing () |
Just for polymorphism. More... | |
bool | empty () const |
Returns true if the drawing object is invalid. More... | |
void | update () const |
void | draw (const draw_fn_t &) |
Draws things that are defined by draw_fn_t. More... | |
void | draw (draw_fn_t &&) |
Draws things that are defined by draw_fn_t. More... | |
diehard_t | draw_diehard (const draw_fn_t &) |
Draws things that are defined by draw_fn_t but will not be deleted when clear() is called. More... | |
diehard_t | draw_diehard (draw_fn_t &&) |
Draws things that are defined by draw_fn_t but will not be deleted when clear() is called. More... | |
void | erase (diehard_t) |
Erases a diehard drawing method. More... | |
void | clear () |
Erases all. More... | |
Draw pictures on a widget by specifying a drawing method that will be employed every time the widget refreshes.
By the end of drawing, the picture may not be displayed immediately. If a picture need to be displayed immediately call nana::gui::API::refresh_window() .
using nana::drawing::diehard_t = draw_fn_handle * |
A handle to a drawing method.
using nana::drawing::draw_fn_t = std::function<void(paint::graphics&)> |
A function to draw.
nana::drawing::drawing | ( | window | w | ) |
Create a drawing object for a widget w.
|
virtual |
Just for polymorphism.
void nana::drawing::clear | ( | ) |
Erases all.
void nana::drawing::draw | ( | const draw_fn_t & | f | ) |
Draws things that are defined by draw_fn_t.
void nana::drawing::draw | ( | draw_fn_t && | f | ) |
Draws things that are defined by draw_fn_t.
drawing::diehard_t nana::drawing::draw_diehard | ( | const draw_fn_t & | f | ) |
Draws things that are defined by draw_fn_t but will not be deleted when clear() is called.
drawing::diehard_t nana::drawing::draw_diehard | ( | draw_fn_t && | f | ) |
Draws things that are defined by draw_fn_t but will not be deleted when clear() is called.
bool nana::drawing::empty | ( | ) | const |
Returns true if the drawing object is invalid.
void nana::drawing::erase | ( | diehard_t | d | ) |
Erases a diehard drawing method.
void nana::drawing::update | ( | ) | const |