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

			this.literal = literal;

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

            this.literal = literal;

            item.Submenu    = this;
            item.Activated += HandlePopulate;
        }
Esempio 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;
            }
        }
Esempio n. 4
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;
			}
		}