Toolbar widget improvement.

This patch has 2 new features:

1- new option at constructor to enable creation of detached toolbar from
his parent, this enable the use of toolbar anywhere and the size can be
controlled by a layout manager.

2- add a new option in order to enable to place buttons at right part,
the widget has a new method go_right() after calling it, every new
button is right aligned.

Both changes don't break compatibility with old code.
This commit is contained in:
Karim Mribti
2016-01-24 13:52:14 +01:00
parent 7dbf0a5769
commit c20eb357af
2 changed files with 41 additions and 0 deletions

View File

@@ -92,6 +92,13 @@ namespace nana
bool enable(size_type index) const;
void enable(size_type index, bool enable_state);
void scale(unsigned s); ///< Sets the scale of control button.
void go_right();
bool detached() { return detached_; };
private:
bool detached_;
};
}//end namespace nana
#endif