protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; double x = point.X; double y = point.Y; doc.ToolLayer.Hidden = true; if (mouseDown == 1 || mouseDown == 3) //left or right { if (args.Event.Button == 1) //left { if (Math.Abs(shape_origin.X - x) <= tolerance && Math.Abs(shape_origin.Y - y) <= tolerance) { doc.Workspace.ZoomIn(); doc.Workspace.RecenterView(x, y); } else { doc.Workspace.ZoomToRectangle(PointsToRectangle(shape_origin, point)); } } else { doc.Workspace.ZoomOut(); doc.Workspace.RecenterView(x, y); } } mouseDown = 0; is_drawing = false; SetCursor(cursorZoom); //restore regular cursor }
protected virtual void OnUserTreeviewButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { Gtk.TreePath[] path_array = userTreeview.Selection.GetSelectedRows(); //Console.WriteLine(path_array.Length); if (path_array.Length == 1) { editButton.Sensitive = true; } else { editButton.Sensitive = false; } if (path_array.Length > 0) { deleteUsersButton.Sensitive = true; promoteButton.Sensitive = true; demoteButton.Sensitive = true; } else { deleteUsersButton.Sensitive = false; promoteButton.Sensitive = false; demoteButton.Sensitive = false; } }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { is_dragging = false; is_rotating = false; OnFinishTransform(); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; double x = point.X; double y = point.Y; current_point = point; doc.ToolLayer.Hidden = true; DrawShape(Utility.PointsToRectangle(shape_origin, new PointD(x, y), args.Event.IsShiftPressed()), doc.CurrentLayer, args.Event.IsShiftPressed()); Gdk.Rectangle r = GetRectangleFromPoints(shape_origin, new PointD(x, y)); doc.Workspace.Invalidate(last_dirty.ToGdkRectangle()); is_drawing = false; if (surface_modified) { doc.History.PushNewItem(CreateHistoryItem()); } else if (undo_surface != null) { (undo_surface as IDisposable).Dispose(); } surface_modified = false; }
private void OnButtonReleased(object o, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button == 3) { ShowPopup(); } }
private void GtkControlObject_ButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { Point p = new Point(Convert.ToInt32(args.Event.X), Convert.ToInt32(args.Event.Y)); Key modifiers = GetKeyModifiers(args.Event.State); MouseButtons buttons = GetButtons(args.Event); Widget.OnMouseUp(new MouseEventArgs(buttons, modifiers, p)); }
public void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var p = new PointF((float)args.Event.X, (float)args.Event.Y); Key modifiers = args.Event.State.ToEtoKey(); MouseButtons buttons = args.Event.ToEtoMouseButtons(); Handler.Widget.OnMouseUp(new MouseEventArgs(buttons, modifiers, p)); }
private void GtkControlObject_ButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var p = new PointF((float)args.Event.X, (float)args.Event.Y); Key modifiers = args.Event.State.ToEtoKey(); MouseButtons buttons = args.Event.ToEtoMouseButtons(); Widget.OnMouseUp(new MouseEventArgs(buttons, modifiers, p)); }
void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button == 1) { isMouseSelection = false; HandleSelectionChanged(); } }
void on_ClosableTabLabel_button_release_event(object sender, Gtk.ButtonReleaseEventArgs args) { // click middle mouse button to close if (args.Event.Button == 2) { this.closeTab(); } }
protected virtual void OnGroupListTreeviewButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { Gtk.TreeIter iter; groupListTreeview.Selection.GetSelected(out iter); //bool original_state=(bool)group_store.GetValue(iter,0); group_store.SetValue(iter, 0, !(bool)group_store.GetValue(iter, 0)); }
void HandleWidgetButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var a = new ButtonEventArgs(); a.X = args.Event.X; a.Y = args.Event.Y; a.Button = (int)args.Event.Button; EventSink.OnButtonReleased(a); }
void HandleValueTreeButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { if (mousePressed) { // Gdk.Pointer.Ungrab (Gtk.Global.CurrentEventTime); // Gtk.Grab.Remove (this); mousePressed = false; } }
private void OnTableClick(object o, Gtk.ButtonReleaseEventArgs args) { this.UpdateCard(); if (args.Event.Button == 3) { this.popup.Popup(); } }
protected virtual ButtonEventArgs GetButtonReleaseEventArgs(Gtk.ButtonReleaseEventArgs args) { var a = new ButtonEventArgs(); a.X = args.Event.X; a.Y = args.Event.Y; a.Button = (PointerButton)args.Event.Button; return(a); }
void GMapWidget_ButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button == 1) { addressMoving = false; var newPoint = gMapWidget.FromLocalToLatLng((int)args.Event.X, (int)args.Event.Y); UpdateAddressOnMap(); Entity.SetСoordinates((decimal)newPoint.Lat, (decimal)newPoint.Lng); } }
public void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var p = new PointF((float)args.Event.X, (float)args.Event.Y); Keys modifiers = args.Event.State.ToEtoKey(); MouseButtons buttons = args.Event.ToEtoMouseButtons(); var mouseArgs = new MouseEventArgs(buttons, modifiers, p); Handler.Callback.OnMouseUp(Handler.Widget, mouseArgs); args.RetVal = mouseArgs.Handled; }
void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var a = new ButtonEventArgs(); a.X = args.Event.X; a.Y = args.Event.Y; a.Button = (PointerButton)args.Event.Button; Toolkit.Invoke(delegate { EventSink.OnButtonReleased(a); }); }
protected void OnAddHostTargetsButtonPress(object o, Gtk.ButtonReleaseEventArgs args) { List <string> hostTargets = new List <string>(); foreach (WidgetHostTargetEntry hostTargetWidget in _hostTargets) { hostTargets.Add(hostTargetWidget.GetHostTarget()); } MainApp.GetInstance().OnAddHostTargetsButtonPress(hostTargets); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { is_dragging = false; if (hist != null) { PintaCore.History.PushNewItem(hist); } hist = null; }
void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { int cx, cy; Gtk.TreeIter iter; bool captured = false; if (rendererTarget.PressedCell != null) { if (rendererTarget.PressedCell == this) { iter = rendererTarget.PressedIter; cx = pressCX + (int)args.Event.X - pressX; cy = pressCY + (int)args.Event.Y - pressY; captured = true; } else { return; } } else if (!rendererTarget.GetCellPosition(CellRenderer, (int)args.Event.X, (int)args.Event.Y, out cx, out cy, out iter)) { return; } rendererTarget.PressedCell = null; rendererTarget.PressedIter = Gtk.TreeIter.Zero; if (!buttonReleaseSubscribed) { rendererTarget.EventRootWidget.ButtonReleaseEvent -= HandleButtonReleaseEvent; } var rect = rendererTarget.GetCellBounds(target, CellRenderer, iter); if (captured || rect.Contains(cx, cy)) { ApplicationContext.InvokeUserCode(delegate { LoadData(rendererTarget.Model, iter); var a = new ButtonEventArgs { X = args.Event.X, Y = args.Event.Y, Button = (PointerButton)args.Event.Button }; EventSink.OnButtonReleased(a); if (a.Handled) { args.RetVal = true; } }); } }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; if (!tracking || args.Event.Button != button) { return; } tracking = false; doc.History.PushNewItem(new SimpleHistoryItem(Icon, Name, undo_surface, doc.CurrentUserLayerIndex)); }
private void HandleHandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { if (tracking) { //left if (args.Event.Button == 1) { Position = MousePtToPosition(new Cairo.PointD(args.Event.X, args.Event.Y)); } tracking = false; } }
protected virtual ButtonEventArgs GetButtonReleaseEventArgs(Gtk.ButtonReleaseEventArgs args) { var a = new ButtonEventArgs(); var pointer_coords = EventsRootWidget.CheckPointerCoordinates(args.Event.Window, args.Event.X, args.Event.Y); a.X = pointer_coords.X; a.Y = pointer_coords.Y; a.Button = (PointerButton)args.Event.Button; return(a); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, PointD point) { button_down = 0; if ((int)tool_select.SelectedItem.Tag == 1) { PintaCore.Tools.SetCurrentTool(PintaCore.Tools.PreviousTool); } else if ((int)tool_select.SelectedItem.Tag == 2) { PintaCore.Tools.SetCurrentTool(Catalog.GetString("Pencil")); } }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { if (!is_dragging && !is_rotating && !is_scaling) { return; } is_dragging = false; is_rotating = false; is_scaling = false; OnFinishTransform(transform); }
void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var li = FindLink(args.Event.X, args.Event.Y); if (li != null) { ApplicationContext.InvokeUserCode(delegate { EventSink.OnLinkClicked(li.Target); }); args.RetVal = true; } ; }
private void _OnUserListButtonReleaseEvent(object sender, Gtk.ButtonReleaseEventArgs e) { Trace.Call(sender, e); if (e.Event.Button == 3 && _PersonTreeView.Selection.CountSelectedRows() > 0) { // HACK: don't pass the real mouse button that was used to // initiate the menu, as sub-menus will only respond to that // button for some reason! As workaround we always pass // 0 == left mouse button here //_PersonMenu.Popup(null, null, null, e.Event.Button, e.Event.Time); _PersonMenu.Popup(null, null, null, 0, e.Event.Time); } }
private void OnButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button != 1) { return; } entry.HasFocus = true; if (o == filter_button) { ShowMenu(args.Event.Time); } }
protected void OnButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { var evnt = args.Event; var e = new RawMouseEventArgs( GtkMouseDevice.Instance, evnt.Time, _inputRoot, evnt.Button == 1 ? RawMouseEventType.LeftButtonUp : evnt.Button == 3 ? RawMouseEventType.RightButtonUp : RawMouseEventType.MiddleButtonUp, new Point(evnt.X, evnt.Y), GetModifierKeys(evnt.State)); Input(e); }