protected override void OnDeactivated (BaseTool newTool) { base.OnDeactivated (newTool); PintaCore.PaintBrushes.BrushAdded -= HandleBrushAddedOrRemoved; PintaCore.PaintBrushes.BrushRemoved -= HandleBrushAddedOrRemoved; }
public bool Handle(BaseTool tool, Cairo.PointD point) { if (IsInside (point.X, point.Y)) { tool.MouseMoved += action; tool.MouseReleased += (x, y, s) => {tool.MouseMoved -= action;}; //TODO unregister mouse release return true; } return false; }
public ToolEventArgs (BaseTool tool) { Tool = tool; }
protected override void OnDeactivated(BaseTool newTool) { base.OnDeactivated (newTool); // Stop listening for color change events PintaCore.Palette.PrimaryColorChanged -= HandlePintaCorePalettePrimaryColorChanged; PintaCore.Palette.SecondaryColorChanged -= HandlePintaCorePalettePrimaryColorChanged; PintaCore.Layers.LayerAdded -= HandleSelectedLayerChanged; PintaCore.Layers.LayerRemoved -= HandleSelectedLayerChanged; PintaCore.Layers.SelectedLayerChanged -= HandleSelectedLayerChanged; StopEditing(false); }
protected override void OnDeactivated(BaseTool newTool) { base.OnDeactivated (newTool); if (PintaCore.Workspace.HasOpenDocuments) { Document doc = PintaCore.Workspace.ActiveDocument; doc.ToolLayer.Clear (); } }
protected override void OnDeactivated(BaseTool newTool) { base.OnDeactivated (newTool); if (PintaCore.Workspace.HasOpenDocuments) { PintaCore.Workspace.ActiveDocument.FinishSelection (); } }
public CommandMapToolButton(BaseTool tool) : base("Tools") { Tool = tool; TooltipText = tool.ToolTip; var icon = new Gtk.Image (PintaCore.Resources.GetIcon (tool.Icon)); VBox box = new VBox (); box.Add (icon); Label label = new Label(tool.Name); label.Justify = Justification.Center; label.WidthChars = 11; label.Wrap = true; label.LineWrap = true; label.LineWrapMode = Pango.WrapMode.Word; box.Add (label); Add (box); ButtonReleaseEvent += Tool_HandleButtonReleaseEvent; }
public virtual void HandleDeactivated(BaseTool newTool) { SelectedPointIndex = -1; SelectedShapeIndex = -1; StorePreviousSettings(); //Determine if the tool being switched to will be another editable tool. if (PintaCore.Workspace.HasOpenDocuments && !newTool.IsEditableShapeTool) { //The tool being switched to is not editable. Finalize every editable shape not yet finalized. FinalizeAllShapes(); } PintaCore.Palette.PrimaryColorChanged -= Palette_PrimaryColorChanged; PintaCore.Palette.SecondaryColorChanged -= Palette_SecondaryColorChanged; }
public CommandMapToolButton(BaseTool tool) : base("Tools") { Tool = tool; TooltipText = tool.ToolTip; var icon = new Gtk.Image (PintaCore.Resources.GetIcon (tool.Icon)); VBox box = new VBox (); box.Add (icon); box.Add (new Label (tool.Name)); Add (box); ButtonReleaseEvent += Tool_HandleButtonReleaseEvent; }
protected override void OnDeactivated(BaseTool newTool) { origin = new Point (int.MinValue, int.MinValue); }
protected override void OnDeactivated(BaseTool newTool) { EditEngine.HandleDeactivated(newTool); base.OnDeactivated(newTool); }
public ToolEventArgs(BaseTool tool) { Tool = tool; }
protected virtual void OnDeactivated(BaseTool newTool) { PintaCore.Workspace.CanvasSizeChanged -= new EventHandler(Workspace_CanvasSizeChanged); SetCursor(null); }
public void DoDeactivated(BaseTool newTool) { OnDeactivated(newTool); }
protected virtual void OnDeactivated(BaseTool newTool) { SetCursor (null); }
public void DoDeactivated (BaseTool newTool) { OnDeactivated(newTool); }