コード例 #1
0
ファイル: LayersPad.cs プロジェクト: msiyer/Pinta
		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 (); };
		}
コード例 #2
0
ファイル: ToolBoxPad.cs プロジェクト: jobernolte/Pinta
        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 = 65;

            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;
        }
コード例 #3
0
ファイル: ColorPalettePad.cs プロジェクト: msiyer/Pinta
		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;
		}
コード例 #4
0
ファイル: HistoryPad.cs プロジェクト: jobernolte/Pinta
        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_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;
        }
コード例 #5
0
ファイル: OpenImagesPad.cs プロジェクト: rini18/Pinta
        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");

            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;
            };

            show_open_images.Active = open_images_item.Visible;
        }
コード例 #6
0
ファイル: OpenImagesPad.cs プロジェクト: rolandixor/Pinta
        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            const string pad_name = "Open Images";

            DockItem open_images_item = workspace.AddItem (pad_name);
            open_images_item.Label = Catalog.GetString (pad_name);
            open_images_item.Content = new OpenImagesListWidget ();

            ToggleAction show_open_images = padMenu.AppendToggleAction (pad_name, Catalog.GetString (pad_name), 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;
            };

            show_open_images.Active = open_images_item.Visible;
        }