public LiteralMenu (MenuItem item, Literal literal)
		{
			popup = new LiteralPopup ();

			this.literal = literal;

			item.Submenu = this;
			item.Activated += HandlePopulate;
		}
        public LiteralMenu(MenuItem item, Literal literal)
        {
            popup = new LiteralPopup();

            this.literal = literal;

            item.Submenu    = this;
            item.Activated += HandlePopulate;
        }
Ejemplo n.º 3
0
        private void HandleButtonPress(object o, ButtonPressEventArgs args)
        {
            args.RetVal = true;

            switch (args.Event.Type)
            {
            case EventType.TwoButtonPress:
                if (args.Event.Button == 1)
                {
                    IsNegated = !IsNegated;
                }
                else
                {
                    args.RetVal = false;
                }
                return;

            case EventType.ButtonPress:
                Widget.GrabFocus();

                if (args.Event.Button == 1)
                {
                    // TODO allow multiple selection of literals so they can be deleted, modified all at once
                    //if ((args.Event.State & ModifierType.ControlMask) != 0) {
                    //}
                }
                else if (args.Event.Button == 3)
                {
                    LiteralPopup popup = new LiteralPopup();
                    popup.Activate(args.Event, this);
                }

                return;

            default:
                args.RetVal = false;
                return;
            }
        }
Ejemplo n.º 4
0
        void HandleButtonPress(object o, ButtonPressEventArgs args)
        {
            args.RetVal = true;

            switch (args.Event.Type) {
            case EventType.TwoButtonPress:
                if (args.Event.Button == 1)
                    IsNegated = !IsNegated;
                else
                    args.RetVal = false;
                return;

            case EventType.ButtonPress:
                Widget.GrabFocus ();

                if (args.Event.Button == 1) {
                    // TODO allow multiple selection of literals so they can be deleted, modified all at once
                    //if ((args.Event.State & ModifierType.ControlMask) != 0) {
                    //}

                } else if (args.Event.Button == 3) {
                    var popup = new LiteralPopup ();
                    popup.Activate (args.Event, this);
                }

                return;

            default:
                args.RetVal = false;
                return;
            }
        }