#if defined(Hiro_MenuBar)
auto mMenuBar::allocate() -> pObject* {
return new pMenuBar(*this);
}
auto mMenuBar::destruct() -> void {
for(auto& menu : state.menus) menu->destruct();
mObject::destruct();
}
//
auto mMenuBar::append(sMenu menu) -> type& {
state.menus.append(menu);
menu->setParent(this, menuCount() - 1);
signal(append, menu);
return *this;
}
auto mMenuBar::menu(unsigned position) const -> Menu {
if(position < menuCount()) return state.menus[position];
return {};
}
auto mMenuBar::menuCount() const -> unsigned {
return state.menus.size();
}
auto mMenuBar::menus() const -> vector