Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::drawing Class Reference

Draw pictures on a widget by specifying a drawing method that will be employed every time the widget refreshes. More...

Inheritance diagram for nana::drawing:
nana::noncopyable

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...
 

Detailed Description

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() .

Examples:
a_group_impl.cpp, background-effects.cpp, draw.cpp, and stretch_image.cpp.

Member Typedef Documentation

using nana::drawing::diehard_t = draw_fn_handle *

A handle to a drawing method.

A function to draw.

Constructor & Destructor Documentation

nana::drawing::drawing ( window  w)

Create a drawing object for a widget w.

nana::drawing::~drawing ( )
virtual

Just for polymorphism.

Member Function Documentation

void nana::drawing::clear ( )

Erases all.

void nana::drawing::draw ( const draw_fn_t f)

Draws things that are defined by draw_fn_t.

Examples:
a_group_impl.cpp, background-effects.cpp, and draw.cpp.
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