summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/simple_menu_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/menu/simple_menu_model.cc')
-rw-r--r--views/controls/menu/simple_menu_model.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/views/controls/menu/simple_menu_model.cc b/views/controls/menu/simple_menu_model.cc
index 243b144..1ddc092 100644
--- a/views/controls/menu/simple_menu_model.cc
+++ b/views/controls/menu/simple_menu_model.cc
@@ -122,6 +122,16 @@ bool SimpleMenuModel::IsEnabledAt(int index) const {
return delegate_->IsCommandIdEnabled(command_id);
}
+void SimpleMenuModel::HighlightChangedTo(int index) {
+ if (delegate_)
+ delegate_->CommandIdHighlighted(GetCommandIdAt(index));
+}
+
+void SimpleMenuModel::ActivatedAt(int index) {
+ if (delegate_)
+ delegate_->ExecuteCommand(GetCommandIdAt(index));
+}
+
Menu2Model* SimpleMenuModel::GetSubmenuModelAt(int index) const {
return items_.at(FlipIndex(index)).submenu;
}