protected void OnGraphEventsButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { try { GCurves.GCurve tmp; AllCurves.Curves.TryGetValue(CurveSelectBox.ActiveText, out tmp); double x = args.Event.X; double y = args.Event.Y; if (MovePoint.Value == true) { ProjectSaved = false; if (y < 0 || GraphArea.Allocation.Height - y < GrBor || x < GrBor || x > GraphArea.Allocation.Width) { if (MovePoint.Key != 0 && MovePoint.Key != tmp.Points.Count - 1) { tmp.RemovePoint(MovePoint.Key); } RefreshGraph(false); } } MovePoint = new KeyValuePair<int, bool>(MovePoint.Key, false); //Fill the Valueboxes with the current value XValBox.Text = (tmp.Points[tmp.SelectedPoint].Value.X + 1).ToString(); YValBox.Text = tmp.Points[tmp.SelectedPoint].Value.Y.ToString(); } catch (Exception ex) { ReportError("Graph Mouse Up", ex); } }
protected void onDAButtonRelease(object o, ButtonReleaseEventArgs args) { if (circuit == null) return; linkingCells = false; circuit.stopLinking(); }
public void ProcessReleaseEvent(ButtonReleaseEventArgs args) { if (swiping) { swiping = false; swipeTest = new Point((int) args.Event.X, (int) args.Event.Y); if (((swipeTest.X - swipeStart.X) < maxError) && ((swipeTest.X - swipeStart.X) > -maxError)) { if (swipeTest.Y - swipeStart.Y > minSwipeLength) { // swipe down if (SwipeDetected != null) { SwipeDetected(this, SwipeDirection.Down); } } else if (swipeTest.Y - swipeStart.Y < -minSwipeLength) { // swipe up if (SwipeDetected != null) { SwipeDetected(this, SwipeDirection.Up); } } } else if (((swipeTest.Y - swipeStart.Y) < maxError) && ((swipeTest.Y - swipeStart.Y) > -maxError)) { if (swipeTest.X - swipeStart.X > minSwipeLength) { // swipe right if (SwipeDetected != null) { SwipeDetected(this, SwipeDirection.Right); } } else if (swipeTest.X - swipeStart.X < -minSwipeLength) { // swipe left if (SwipeDetected != null) { SwipeDetected(this, SwipeDirection.Left); } } } } }
public static void ButtonReleaseHandler(object o, ButtonReleaseEventArgs args) { upx = args.Event.X; upy = args.Event.Y; completecrop(configpath + finalString); args.RetVal = true; }
protected void OnMouseReleased(object o, ButtonReleaseEventArgs args) { if (!this._allowRightClick && (int)args.Event.Button == 3) { return; } if (this.IsMouseIn && this.IsInWhenPressed) { this.CurrentState = ButtonState.Hover; if (args.Event.State.HasFlag((Enum)ModifierType.Button1Mask)) { if (this.LeftClicked != null) { this.LeftClicked((object)this, new LabelClickedEventArgs(this.LabelContent)); } } else if (args.Event.State.HasFlag((Enum)ModifierType.Button3Mask) && this.RightClicked != null) { this.RightClicked((object)this, new LabelClickedEventArgs(this.LabelContent)); } } else { this.CurrentState = ButtonState.Normal; } this.IsInWhenPressed = false; }
void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args) { var document = IdeApp.Workbench.ActiveDocument; if (IdeApp.Workspace == null) return; if (document == null) return; if (document.ParsedDocument == null) return; if (args.Event.Button == LEFT_BUTTON) { if ((args.Event.State & ModifierType.ControlMask) == ModifierType.ControlMask) { if ((args.Event.State & ModifierType.ShiftMask) == ModifierType.ShiftMask) { RemoveMarker (document.Editor.Document); JumpToImplementation (); } else { RemoveMarker (document.Editor.Document); JumpToDefinition (document); } } } }
private void button_Release(object o, ButtonReleaseEventArgs args) { if (this.ButtonReleaseEvent == null) { return; } this.ButtonReleaseEvent((object)this, args); }
protected void OnBtnReleaseEvent(object sender, ButtonReleaseEventArgs e) { Gdk.EventButton evnt = e.Event; //right click if (evnt.Button == 3) { menu.ShowAll(); menu.Popup (null, null, null, 3, Gtk.Global.CurrentEventTime); } }
protected void on_tvAlbums_button_release_event(object o, Gtk.ButtonReleaseEventArgs args) { if (this.IsConnected()) { if (args.Event.Button == 1) { oAlbumBrowser.GetAlbumSongs(); } else if (args.Event.Button == 3) { oAlbumBrowser.ShowContextMenu(); } } }
void HeaderButtonRelease(object ob, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button == 1) { frame.DockInPlaceholder(item); frame.HidePlaceholder(); if (header.GdkWindow != null) { header.GdkWindow.Cursor = handCursor; } frame.Toplevel.KeyPressEvent -= HeaderKeyPress; frame.Toplevel.KeyReleaseEvent -= HeaderKeyRelease; } }
protected void on_tvShares_button_release_event(object o, Gtk.ButtonReleaseEventArgs args) { if (this.IsConnected()) { if (args.Event.Button == 1) { oShareBrowser.ExpandSelectedDirectory(); } else if (args.Event.Button == 3) { oShareBrowser.ShowContextMenu(); } } }
protected void on_tvArtists_button_release_event(object o, Gtk.ButtonReleaseEventArgs args) { if (this.IsConnected()) { if (args.Event.Button == 1) { oArtistBrowser.ExpandeSelectedItem(); } else if (args.Event.Button == 3) { oArtistBrowser.ShowContextMenu(); } } }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; if (surface_modified) { doc.History.PushNewItem(new SimpleHistoryItem(Icon, Name, undo_surface, doc.CurrentLayerIndex)); } else if (undo_surface != null) { (undo_surface as IDisposable).Dispose(); } surface_modified = false; }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { // If we were dragging the text around, finish that up if (tracking) { Cairo.PointD delta = new Cairo.PointD(point.X - startMouseXY.X, point.Y - startMouseXY.Y); clickPoint = new Point((int)(startClickPoint.X + delta.X), (int)(startClickPoint.Y + delta.Y)); CurrentTextEngine.Origin = clickPoint; RedrawText(false, true); tracking = false; SetCursor(null); } }
//when we have let go of our mouse button void DragEnd(object sender, Gtk.ButtonReleaseEventArgs args) { mouseEnd = new Gdk.Point((int)Math.Floor(args.Event.X), (int)Math.Floor(args.Event.Y)); topRightCoords = new Gdk.Point(mouseEnd.X, mouseStart.Y); bottomLeftCoords = new Gdk.Point(mouseStart.X, mouseEnd.Y); Console.WriteLine("-------------------------------------"); Console.WriteLine("Mouse Released"); Console.WriteLine("Mouse End Point: ({0}, {1})", mouseEnd.X, mouseEnd.Y); Console.WriteLine("Top Right Point: ({0}, {1})", topRightCoords.X, topRightCoords.Y); Console.WriteLine("Bottom Left Point: ({0}, {1})", bottomLeftCoords.X, bottomLeftCoords.Y); Console.WriteLine("-------------------------------------"); //all about dat crop DisplayCroppedImage(); }
protected override void BindedWidget_ButtonReleaseEvent(object sender, ButtonReleaseEventArgs evnt) { base.BindedWidget_ButtonReleaseEvent (sender, evnt); if(Value) { int x, y; ParentWindow.GetOrigin (out x, out y); x += Allocation.X; y += Allocation.Bottom; ShowAt (x, y); } else { KillMenu (true); } }
void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { var doc = IdeApp.Workbench.ActiveDocument; if (args.Event.Button != 1 || !IsCtrlPush(args.Event.State) || doc == null) return; ResolveResult resolveResult; var item = CurrentRefactoryOperationsHandler.GetItem(doc, out resolveResult); if (item == null) return; if (item is INamedElement) IdeApp.ProjectOperations.JumpToDeclaration((INamedElement)item); else if (item is IVariable) IdeApp.ProjectOperations.JumpToDeclaration((IVariable)item); }
protected void OnButtonRelease(object o, ButtonReleaseEventArgs args) { if (this.isMouseIn) { if (this.isInWhenPressed) { this.SetButtonStyle(CcsColorButton.BtnState.Normal); this.ColorClick(); } else { this.SetButtonStyle(CcsColorButton.BtnState.Hover); } } else { this.SetButtonStyle(CcsColorButton.BtnState.Normal); } this.isInWhenPressed = false; }
void HandleTimescaleButtonRelease(object o, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button == 1) { args.Event.SetButton(2); } else { args.Event.SetButton(1); } if (seeking) { seeking = false; Player.IgnoreTicks = false; if (IsPlayingPrevState) { Player.Play(); } } }
protected override void OnMouseUp(DrawingArea canvas, ButtonReleaseEventArgs args, Cairo.PointD point) { double x = point.X; double y = point.Y; // If the user didn't move the mouse, they want to deselect int tolerance = 2; if (Math.Abs (shape_origin.X - x) <= tolerance && Math.Abs (shape_origin.Y - y) <= tolerance) { PintaCore.Actions.Edit.Deselect.Activate (); hist.Dispose (); hist = null; } else { if (hist != null) PintaCore.History.PushNewItem (hist); hist = null; } is_drawing = false; }
//a track was selected private void track_clicked(object o, ButtonReleaseEventArgs args) { LinkLabel label = (LinkLabel)o; QueryInfo query = new QueryInfo (Key.Artist(main.Artist), Key.Title(label.Link)); main.LoadContent (query, typeof (SimilarTracks)); }
void tree_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { string formToOpen=""; TreeSelection selection = (o as TreeView).Selection; TreeModel model; if(selection.GetSelected(out model, out iter)) { formToOpen=model.GetValue(iter,1).ToString(); //Console.WriteLine(formToOpen); } }
protected override void BindedWidget_ButtonReleaseEvent(object sender, ButtonReleaseEventArgs evnt) { ProcessEvent (evnt.Event); Click (); }
private void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { Sheet.Controller.HandleEvent(args.Event); }
void OnButtonRelease(object obj, ButtonReleaseEventArgs args) { }
protected override ButtonEventArgs GetButtonReleaseEventArgs(ButtonReleaseEventArgs args) { int x, y; Widget.ConvertBinWindowToWidgetCoords ((int)args.Event.X, (int)args.Event.Y, out x, out y); var xwt_args = base.GetButtonReleaseEventArgs (args); xwt_args.X = x; xwt_args.Y = y; return xwt_args; }
private void OnButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if(args.Event.Button != 1) { return; } entry.HasFocus = true; if(o == filter_button) { ShowMenu(args.Event.Time); } }
protected virtual void OnWidgetClick(object o, Gtk.ButtonReleaseEventArgs args) { System.Diagnostics.Debug.WriteLine("Widget clicked"); glwidget1.GrabFocus(); glwidget1.HasFocus = true; }
protected virtual void OnMouseUp(DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; doc.ToolLayer.Hidden = true; if (surface_modified) { PintaCore.History.PushNewItem(new SimpleHistoryItem(Icon, Name, undo_surface, doc.CurrentUserLayerIndex)); } else if (undo_surface != null) { (undo_surface as IDisposable).Dispose(); } surface_modified = false; ImageSurface surf = doc.CurrentUserLayer.Surface; using (Context g = new Context(surf)) { g.AppendPath(doc.Selection.SelectionPath); g.FillRule = FillRule.EvenOdd; g.Clip(); g.Antialias = UseAntialiasing ? Antialias.Subpixel : Antialias.None; g.SetDash(DashPatternBox.GenerateDashArray(dashPattern, BrushWidth), 0.0); if (path != null) { g.AppendPath(path); (path as IDisposable).Dispose(); path = null; } g.ClosePath(); g.LineWidth = BrushWidth; g.FillRule = FillRule.EvenOdd; if (FillShape && StrokeShape) { g.SetSourceColor(fill_color); g.FillPreserve(); g.SetSourceColor(outline_color); g.Stroke(); } else if (FillShape) { g.SetSourceColor(outline_color); g.FillPreserve(); g.SetSourceColor(outline_color); g.Stroke(); } else { g.SetSourceColor(outline_color); g.Stroke(); } } doc.Workspace.Invalidate(); }
void HeaderButtonRelease(object ob, Gtk.ButtonReleaseEventArgs args) { //Console.WriteLine("HeaderButtonRelease"); if (args.Event.Button == 1) { Frame.HidePlaceholder(); if (header.Window != null) { header.Window.Cursor = handCursor; } if (Frame.TargetContainer != null) { //check if we are in notebook mode // if ((CurrentContainer != null) && (CurrentContainer.FrameNotebook.Visible == true)) // { // //notebok mode // if ((frame.TargetContainer == CurrentContainer) && (frame.TargetAlign != ItemAlignment.Center)) // { // //switch to paned mode // CurrentContainer.hideNotebook(frame.TargetAlign); // } else // { // CurrentContainer.removePage(this); // } // // // // } else // { // //panedbox mode // // PanedBox.removeItem(this); // // // } //check if we have to remove something if ((CurrentContainer != null) && (Frame.TargetContainer != CurrentContainer)) { if (CurrentContainer.FrameNotebook.Visible == true) { CurrentContainer.removePage(this); //remove Page } else { PanedBox.removeItem(this); //remove Item } } //Console.WriteLine("alg:" + frame.TargetAlign); //add the new item if (Frame.TargetContainer.FrameNotebook.Visible == true) { this.Reparent(null); this.Parent = null; //Console.WriteLine("add1 " + this.Name + " to " + Frame.TargetContainer.Name); frame.TargetContainer.addPage(this, Frame.TargetAlign); this.Visible = true; } else { this.Reparent(null); //Console.WriteLine("add2 " + this.Name + " to " + Frame.TargetContainer.Name); Frame.TargetContainer.addItem(this, Frame.TargetAlign); this.Visible = true; } } } }
void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { ValueIndex = -1; }
private void HandleButtonReleaseEvent(object sender, ButtonReleaseEventArgs args) { if (!this.CanApplyMarker()) return; if (args.Event.Button == LeftMouseButton && ((args.Event.State & ModifierType.Mod1Mask) == ModifierType.Mod1Mask)) { var document = IdeApp.Workbench.ActiveDocument; var location = document.Editor.Caret.Location; int offset = document.Editor.LocationToOffset(location); int start = document.Editor.FindCurrentWordStart(offset); int end = document.Editor.FindCurrentWordEnd(offset); if (end - start <= 0) return; var element = this.GetCurrentElement(document, offset); if (element != null) { NavigationTools.DropMarkerAtCaret(); this.RemoveMarker(); IdeApp.ProjectOperations.JumpToDeclaration(element, true); } else { var variable = this.GetCurrentVariable(document, offset); if (variable != null) { NavigationTools.DropMarkerAtCaret(); this.RemoveMarker(); IdeApp.ProjectOperations.JumpToDeclaration(variable); } } } }
void DrawButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { switch (args.Event.Button) { case 1: _button = (_button | MouseButton.Left) ^ MouseButton.Left; break; case 2: _button = (_button | MouseButton.Middle) ^ MouseButton.Middle; break; case 3: _button = (_button | MouseButton.Right) ^ MouseButton.Right; break; default: break; } }
public void CustomImageView_Release(object o, ButtonReleaseEventArgs args) { this.IsShowCustomStyle = new bool?(false); }
void ButtonReleaseEventHandler (object o, ButtonReleaseEventArgs a) { if (a.Event.Button == 1) is_dragging = false; old_selected = Selected; }
protected void OnDaButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { if (args.Event.Button != 1) { return; } dragging = false; GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Arrow); mousePosition = new Point((int)args.Event.X, (int)args.Event.Y); if (rOutColumnTop.Contains(mousePosition) && table.Player1.OutedPieces != 0) { table.MoveOutedPiece(table.Player1.MovesLeft[0]); } else if (rOutColumnBottom.Contains(mousePosition) && table.Player2.OutedPieces != 0) { table.MoveOutedPiece(table.Player2.MovesLeft[0]); } else { for (int i = 0; i < 24; i++) { if (rTable[i].Contains(mousePosition)) { Console.WriteLine(dragBeginCol + " " + i); try { if (table.TableValues[dragBeginCol] > 0) { if (dragBeginCol == i) { table.MovePiece(dragBeginCol, table.Player1.MovesLeft[0]); } else { table.MovePiece(dragBeginCol, i - dragBeginCol); } Console.WriteLine(i - dragBeginCol); } else { if (dragBeginCol == i) { table.MovePiece(dragBeginCol, table.Player2.MovesLeft[0]); } else { table.MovePiece(dragBeginCol, dragBeginCol - i); } Console.WriteLine(dragBeginCol - i); } } catch (PieceMoveException pme) { MessageBox.Show(pme.Message, "Invalid move", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } DrawTable(da.GdkWindow); }
private void base_ButtonReleaseEvent(object sender, Gtk.ButtonReleaseEventArgs args) { ResetDrag(); }
private void OnPlusMinusButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if(click_id != 0) { GLib.Source.Remove(click_id); click_id = 0; } }
// user clicked on the window void mouse_clicked(object o, ButtonReleaseEventArgs args) { Hide (); }
private void OnButtonReleased(object o, ButtonReleaseEventArgs args) { if(popup != null) { Grab.Remove(popup); Gdk.Pointer.Ungrab(0); Gdk.Keyboard.Ungrab(0); popup.Hide (); popup.Destroy(); popup = null; } }
public void DoMouseUp(DrawingArea canvas, ButtonReleaseEventArgs args, Cairo.PointD point) { if (MouseReleased != null) MouseReleased (point.X, point.Y, args.Event.State); OnMouseUp (canvas, args, point); }
protected virtual void OnWidgetClick(object o, Gtk.ButtonReleaseEventArgs args) { Console.WriteLine("Widget clicked"); glwidget1.GrabFocus(); glwidget1.HasFocus = true; }
private void on_treeview_load_button_release_event(object o, ButtonReleaseEventArgs args) { Gdk.EventButton e = args.Event; if (e.Button == 3) { Menu myMenu = new Menu (); Gtk.MenuItem myItem; myItem = new MenuItem (Catalog.GetString("Delete selected")); myItem.Activated += on_delete_selected_row_clicked; myMenu.Attach( myItem, 0, 1, 0, 1 ); myMenu.Popup(); myMenu.ShowAll(); } }
private void OnButtonUp(object sender, ButtonReleaseEventArgs e) { if (e.Event.Button == 3) Popup.Popup(); }
void OnButtonRelease (object obj, ButtonReleaseEventArgs args) { LeaveDragMode (args.Event.Time); }
protected virtual void OnDrawingareaButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args) { drawingarea.QueueDraw(); lastx = -1; lasty = -1; }
private void HandleGradientButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { button_down = false; if (skip_counter != 0) UpdateLevels (); }
protected override void OnMouseUp(DrawingArea canvas, ButtonReleaseEventArgs args, PointD point) { base.OnMouseUp (canvas, args, point); active_brush.DoMouseUp (); }
private void OnButtonReleaseEvent(object sender, ButtonReleaseEventArgs a) { if (a.Event.Button == 1) { button1Pressed = false; } }
public void DoMouseUp(DrawingArea canvas, ButtonReleaseEventArgs args, Cairo.PointD point) { OnMouseUp (canvas, args, point); }
// user right clicked on the video widget private void video_button_release(object o, ButtonReleaseEventArgs args) { if (args.Event.Button != 3) return; VideoContextMenu menu = new VideoContextMenu (); menu.ShowAll (); menu.Popup (); }
void OnSizeButtonRelease(object ob, Gtk.ButtonReleaseEventArgs args) { resizing = false; }