Exemple #1
0
		protected override void OnDeactivated (BaseTool newTool)
		{
			base.OnDeactivated (newTool);

			PintaCore.PaintBrushes.BrushAdded -= HandleBrushAddedOrRemoved;
			PintaCore.PaintBrushes.BrushRemoved -= HandleBrushAddedOrRemoved;
		}
Exemple #2
0
 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;
 }
Exemple #3
0
		public ToolEventArgs (BaseTool tool)
		{
			Tool = tool;
		}
Exemple #4
0
        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);
        }
Exemple #5
0
 protected override void OnDeactivated(BaseTool newTool)
 {
     base.OnDeactivated (newTool);
     if (PintaCore.Workspace.HasOpenDocuments) {
         Document doc = PintaCore.Workspace.ActiveDocument;
         doc.ToolLayer.Clear ();
     }
 }
Exemple #6
0
		protected override void OnDeactivated(BaseTool newTool)
		{
			base.OnDeactivated (newTool);

			if (PintaCore.Workspace.HasOpenDocuments) {
				PintaCore.Workspace.ActiveDocument.FinishSelection ();
			}
		}
Exemple #7
0
            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;
            }
Exemple #8
0
		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;
        }
Exemple #9
0
            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;
            }
Exemple #10
0
		protected override void OnDeactivated(BaseTool newTool)
		{
			origin = new Point (int.MinValue, int.MinValue);
		}
Exemple #11
0
		protected override void OnDeactivated(BaseTool newTool)
        {
            EditEngine.HandleDeactivated(newTool);

            base.OnDeactivated(newTool);
        }
Exemple #12
0
 public ToolEventArgs(BaseTool tool)
 {
     Tool = tool;
 }
Exemple #13
0
        protected virtual void OnDeactivated(BaseTool newTool)
        {
            PintaCore.Workspace.CanvasSizeChanged -= new EventHandler(Workspace_CanvasSizeChanged);

            SetCursor(null);
        }
Exemple #14
0
 public void DoDeactivated(BaseTool newTool)
 {
     OnDeactivated(newTool);
 }
Exemple #15
0
		protected virtual void OnDeactivated(BaseTool newTool)
		{
			SetCursor (null);
		}
Exemple #16
0
		public void DoDeactivated (BaseTool newTool)
		{
			OnDeactivated(newTool);
		}