Inheritance: Gtk.MenuItem
Ejemplo n.º 1
0
        void AddItem(ActionMenuItem aitem, int pos)
        {
            Gtk.Table t = new Gtk.Table (1, 3, false);
            aitem.Attach (t, 0, 0);
            aitem.KeyPressEvent += OnItemKeyPress;
            t.ShowAll ();

            CustomMenuBarItem it = new CustomMenuBarItem ();
            it.ActionMenuItem = aitem;
            aitem.Bind (it);
            it.Child = t;
            it.ShowAll ();
            Insert (it, pos);
        }
Ejemplo n.º 2
0
		internal void Bind (CustomMenuBarItem item)
		{
			// When embedding the action menu in a MenuBar,
			// the parent menu item intercepts the mouse events,
			// so those events must be manually bound here
			menuBarItem = item;
			item.ButtonPressEvent += OnMenuItemPress;
			item.ButtonReleaseEvent += OnMemuItemRelease;
			item.MotionNotifyEvent += OnMotionNotify;
		}