menu vs. toolbar:
toolbar is a widget, menu - not.
menu: hold a plain ptr to an implement which use structures in a drawerbase::menu namespace.
The later includes a menu_type, menu_item_type, and the enum checks,
enum class checks
{
none,
option,
highlight
};
menu_item_type hold a plain pointer to a menu_type and all the state-data of the item which can be acceded with an item_proxy which hold a pointer to the menuand the position order of the item.
A new item can be added with menu::append or menu::insert.
enum class tools
{
separator,
button,
toggle,
dropdown
};
toolbar: the drawerhold a plain pointer to a drawer_impl_type that hold an item_container of toolbar_items. The later hold the state-data.
A new item can be added with toolbar::append or with item_proxy::dropdown_append.
[ ] Implement/use checks/tools
[ ] create command: a no-widget class, wich state-data useful to set and to share menu, toolbar, buttonand checkbox
[x] title/text, tooltip/status
[x] event handler
[ ] image (a shared type),
[ ] set/get image
[ ] checks style
[x] flags: enabled, checked
[ ] Make menu and toolbar API similar:
[ ] prefer item_proxy
In menu:
[ ] no struct arg_menu ?
[x] menu::append(shared_command)
[x] menu::insert(shared_command) .
[ ] in menu_type
[ ] in menu_item_type <---- real data here (generalize?)
[x] hold a shared_command
[x] add constructor that take a shared_command
[ ] set/get shared_command (to be used by other constructors)
[ ] really need 'linked'?
[ ] add to item_proxy
[ ] set/get shared_command (to be used by other constructors)
menu
vs.toolbar
: toolbar is a widget, menu - not.menu
: hold a plain ptr to animplement
which use structures in adrawerbase::menu
namespace. The later includes amenu_type
,menu_item_type
, and the enumchecks
,menu_item_type
hold a plain pointer to amenu_type
and all the state-data of the item which can be acceded with anitem_proxy
which hold a pointer to themenu
and the position order of the item. A new item can be added withmenu::append
ormenu::insert
.toolbar
: thedrawer
hold a plain pointer to adrawer_impl_type
that hold anitem_container
oftoolbar_item
s. The later hold the state-data. A new item can be added withtoolbar::append
or withitem_proxy::dropdown_append
.[ ] Implement/use
checks
/tools
[ ] create
command
: a no-widget class, wich state-data useful to set and to sharemenu
,toolbar
,button
andcheckbox
image
(a shared type),image
[ ] Make menu and toolbar API similar:
In
menu
:arg_menu
?menu_type
menu_item_type
<---- real data here (generalize?)shared_command
shared_command
(to be used by other constructors)shared_command
(to be used by other constructors)image
dropdown_item
construct take amenu
?