Пример #1
0
 void HandlePopulate(object obj, EventArgs args)
 {
     foreach (Widget child in Children)
     {
         Remove(child);
         child.Destroy();
     }
     popup.Activate(null, literal, this, false);
 }
Пример #2
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;
            }
        }
Пример #3
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;
            }
        }