forked from ares-emulator/ares
-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu-bar.cpp
49 lines (38 loc) · 918 Bytes
/
menu-bar.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#if defined(Hiro_MenuBar)
namespace hiro {
auto pMenuBar::construct() -> void {
}
auto pMenuBar::destruct() -> void {
}
auto pMenuBar::append(sMenu menu) -> void {
if(auto parent = _parent()) {
parent->_append(*menu);
if(menu->self()) {
menu->self()->setFont(menu->font(true));
menu->self()->setVisible(menu->visible());
}
}
}
auto pMenuBar::remove(sMenu menu) -> void {
}
auto pMenuBar::setEnabled(bool enabled) -> void {
if(auto parent = _parent()) {
parent->_setMenuEnabled(enabled);
}
}
auto pMenuBar::setFont(const Font& font) -> void {
if(auto parent = _parent()) {
parent->_setMenuFont(font);
}
}
auto pMenuBar::setVisible(bool visible) -> void {
if(auto parent = _parent()) {
parent->_setMenuVisible(visible);
}
}
auto pMenuBar::_parent() -> pWindow* {
if(auto parent = self().parentWindow()) return parent->self();
return nullptr;
}
}
#endif