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

			this.literal = literal;

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

            this.literal = literal;

            item.Submenu    = this;
            item.Activated += HandlePopulate;
        }
Beispiel #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;
            }
        }
		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;
			}
		}