Lines Matching refs:menu
15 // Recursively find all the GtkMenus that are attached to menu item |child|
27 // Is the cursor over |menu| or one of its parent menus?
28 bool MotionIsOverMenu(GtkWidget* menu, GdkEventMotion* motion) {
30 motion->x < menu->allocation.width &&
31 motion->y < menu->allocation.height) {
35 while (menu) {
36 GtkWidget* menu_item = gtk_menu_get_attach_widget(GTK_MENU(menu));
43 menu = parent;
79 void MenuBarHelper::MenuStartedShowing(GtkWidget* button, GtkWidget* menu) {
80 DCHECK(GTK_IS_MENU(menu));
82 showing_menu_ = menu;
85 signal_handlers_->Connect(menu, "destroy",
87 signal_handlers_->Connect(menu, "hide",
89 signal_handlers_->Connect(menu, "motion-notify-event",
91 signal_handlers_->Connect(menu, "move-current",
93 gtk_container_foreach(GTK_CONTAINER(menu), PopulateSubmenus, &submenus_);
101 gboolean MenuBarHelper::OnMenuMotionNotify(GtkWidget* menu,
103 // Don't do anything if pointer is in the menu.
104 if (MotionIsOverMenu(menu, motion))
118 // We have to make this call because the menu is a popup window, so it
145 void MenuBarHelper::OnMenuHiddenOrDestroyed(GtkWidget* menu) {
146 DCHECK_EQ(showing_menu_, menu);
154 void MenuBarHelper::OnMenuMoveCurrent(GtkWidget* menu,
156 // The menu directions are triggered by the arrow keys as follows
166 GtkWidget* active_item = GTK_MENU_SHELL(menu)->active_menu_item;
182 g_signal_stop_emission_by_name(menu, "move-current");