Exemple #1
0
		public void Initialize (DockFrame workspace, Menu padMenu)
		{
			var layers = new LayersListWidget ();
			DockItem layers_item = workspace.AddItem ("Layers");
			DockItemToolbar layers_tb = layers_item.GetToolbar (PositionType.Bottom);

			layers_item.Label = Catalog.GetString ("Layers");
			layers_item.Content = layers;
			layers_item.Icon = PintaCore.Resources.GetIcon ("Menu.Layers.MergeLayerDown.png");
            layers_item.DefaultWidth = 100;

			layers_tb.Add (PintaCore.Actions.Layers.AddNewLayer.CreateDockToolBarItem ());
			layers_tb.Add (PintaCore.Actions.Layers.DeleteLayer.CreateDockToolBarItem ());
			layers_tb.Add (PintaCore.Actions.Layers.DuplicateLayer.CreateDockToolBarItem ());
			layers_tb.Add (PintaCore.Actions.Layers.MergeLayerDown.CreateDockToolBarItem ());
			layers_tb.Add (PintaCore.Actions.Layers.MoveLayerUp.CreateDockToolBarItem ());
			layers_tb.Add (PintaCore.Actions.Layers.MoveLayerDown.CreateDockToolBarItem ());

			Gtk.ToggleAction show_layers = padMenu.AppendToggleAction ("Layers", Catalog.GetString ("Layers"), null, "Menu.Layers.MergeLayerDown.png");
			show_layers.Activated += delegate { layers_item.Visible = show_layers.Active; };
			layers_item.VisibleChanged += delegate { show_layers.Active = layers_item.Visible; };

			show_layers.Active = layers_item.Visible;

			PintaCore.Workspace.ActiveDocumentChanged += delegate { layers.Reset (); };
		}
Exemple #2
0
		public void Initialize (DockFrame workspace, Menu padMenu)
		{
			DockItem toolbox_item = workspace.AddItem ("Toolbox");
			ToolBoxWidget toolbox = new ToolBoxWidget () { Name = "toolbox" };

			toolbox_item.Label = Catalog.GetString ("Tools");
			toolbox_item.Content = toolbox;
			toolbox_item.Icon = PintaCore.Resources.GetIcon ("Tools.Pencil.png");
			toolbox_item.Behavior |= DockItemBehavior.CantClose;
			toolbox_item.DefaultWidth = 35;
            

			Gtk.ToggleAction show_toolbox = padMenu.AppendToggleAction ("Tools", Catalog.GetString ("Tools"), null, "Tools.Pencil.png");
			show_toolbox.Activated += delegate { toolbox_item.Visible = show_toolbox.Active; };
			toolbox_item.VisibleChanged += delegate { show_toolbox.Active = toolbox_item.Visible; };

			show_toolbox.Active = toolbox_item.Visible;
		}
Exemple #3
0
		public void Initialize (DockFrame workspace, Menu padMenu)
		{
            var tab = new DockNotebook () {
                NavigationButtonsVisible = false
            };

            NotebookContainer = new DockNotebookContainer (tab, true);

            tab.InitSize ();

            var canvas_dock = workspace.AddItem ("Canvas");
            canvas_dock.Behavior = DockItemBehavior.Locked;
            canvas_dock.Expand = true;

            canvas_dock.DrawFrame = false;
            canvas_dock.Label = Catalog.GetString ("Canvas");
            canvas_dock.Content = NotebookContainer;
        }
Exemple #4
0
		public void Initialize (DockFrame workspace, Menu padMenu)
		{
			DockItem palette_item = workspace.AddItem ("Palette");
			ColorPaletteWidget palette = new ColorPaletteWidget () { Name = "palette" };

			palette_item.Label = Catalog.GetString ("Palette");
			palette_item.Content = palette;
			palette_item.Icon = PintaCore.Resources.GetIcon ("Pinta.png");
			palette_item.DefaultLocation = "Toolbox/Bottom";
			palette_item.Behavior |= DockItemBehavior.CantClose;
			palette_item.DefaultWidth = 35;

			Gtk.ToggleAction show_palette = padMenu.AppendToggleAction ("Palette", Catalog.GetString ("Palette"), null, "Pinta.png");
			show_palette.Activated += delegate { palette_item.Visible = show_palette.Active; };
			palette_item.VisibleChanged += delegate { show_palette.Active = palette_item.Visible; };

			palette.Initialize ();
			show_palette.Active = palette_item.Visible;
		}
Exemple #5
0
		public void Initialize (DockFrame workspace, Menu padMenu)
		{
			var history = new HistoryTreeView ();
			DockItem history_item = workspace.AddItem ("History");
			DockItemToolbar history_tb = history_item.GetToolbar (PositionType.Bottom);

			history_item.Label = Catalog.GetString ("History");
			history_item.DefaultLocation = "Images/Bottom";
			history_item.Content = history;
			history_item.Icon = PintaCore.Resources.GetIcon ("Menu.Layers.DuplicateLayer.png");
            history_item.DefaultWidth = 100;

			history_tb.Add (PintaCore.Actions.Edit.Undo.CreateDockToolBarItem ());
			history_tb.Add (PintaCore.Actions.Edit.Redo.CreateDockToolBarItem ());
			Gtk.ToggleAction show_history = padMenu.AppendToggleAction ("History", Catalog.GetString ("History"), null, "Menu.Layers.DuplicateLayer.png");
			show_history.Activated += delegate { history_item.Visible = show_history.Active; };
			history_item.VisibleChanged += delegate { show_history.Active = history_item.Visible; };

			show_history.Active = history_item.Visible;
		}
Exemple #6
0
		public void Initialize (DockFrame workspace, Menu padMenu)
		{
			DockItem open_images_item = workspace.AddItem ("Images");
			open_images_item.DefaultLocation = "Layers/Bottom";
			open_images_item.Label = Catalog.GetString ("Images");
			open_images_item.Content = new OpenImagesListWidget ();
			open_images_item.Icon = PintaCore.Resources.GetIcon ("Menu.Effects.Default.png");
            open_images_item.DefaultVisible = false;
            open_images_item.DefaultWidth = 100;

			ToggleAction show_open_images = padMenu.AppendToggleAction ("Images", Catalog.GetString ("Images"), null, null);

			show_open_images.Activated += delegate {
				open_images_item.Visible = show_open_images.Active;
			};

			open_images_item.VisibleChanged += delegate {
				show_open_images.Active = open_images_item.Visible;
			};
		}