Nana ++ Library  
An open-source C++ framework project
The Website 
nana::gui::toolbar

Description

a toolbar is a control bar that contains the buttons for controlling.

Model of

Widget Window 

Public base classes

class widget_object<widget_tag, DrawerTrigger>: public widget

Typedefs

size_type A type that counts the number of elements.
ext_event_type The extended event.

Members

toolbar() Default constructor.
toolbar(window, bool visible) The constructor inits the toolbar in the specified window.
toolbar(window, const rectangle& r = rectangle(), bool visible = true) Ditto
void append() Adds a separator.
void append(const nana::string& text, const nana::paint::image& img) Adds a control button .
void append(const nana::string& text) Adds a control button.
bool enable(size_type n) Gets the enabled state of control button.
void enable(size_type n, bool eb) Sets the enabled state of control button.
ext_event_type& ext_event() const Retrieves the extended event object.
void scale(unsigned) Sets the scale of control button.

File

nana/gui/widgets/toolbar.hpp

Notes

1, Defintion of the extended event.

struct ext_event_type
{
    nana::functor_group<void(nana::gui::toolbar&, size_t)> selected; //
    nana::functor_group<void(nana::gui::toolbar&, size_t)> enter;
    nana::functor_group<void(nana::gui::toolbar&, size_t)> leave;
};

select: a mouse click on a control button.
enter: the mouse enters a control button.
leave: the mouse leaves a control button.

See also

None.


Move to The Nana Programmer's Guide Main Page