public override void Dispose ()
		{
			this.editor = null;
			this.toolbar = null;
			this.groupDesign = null;
			base.Dispose ();
		}
 public override void Dispose()
 {
     this.editor      = null;
     this.toolbar     = null;
     this.groupDesign = null;
     base.Dispose();
 }
        internal ActionGroupDesignerBackend(WidgetDesignerBackend groupDesign, Editor.ActionGroupEditor editor, ActionGroupToolbar toolbar)
        {
            this.editor      = editor;
            this.toolbar     = toolbar;
            this.groupDesign = groupDesign;

            BorderWidth = 3;
            PackStart(toolbar, false, false, 0);
            PackStart(groupDesign, true, true, 3);
        }
Example #4
0
		public static ActionGroupDesignerBackend CreateActionGroupDesigner (ProjectBackend project, ActionGroupToolbar groupToolbar)
		{
			Editor.ActionGroupEditor agroupEditor = new Editor.ActionGroupEditor ();
			agroupEditor.Project = project;
			WidgetDesignerBackend groupDesign = new WidgetDesignerBackend (agroupEditor, -1, -1);
			
			groupToolbar.Bind (agroupEditor);
			
			return new ActionGroupDesignerBackend (groupDesign, agroupEditor, groupToolbar);
		}
		internal ActionGroupDesignerBackend (WidgetDesignerBackend groupDesign, Editor.ActionGroupEditor editor, ActionGroupToolbar toolbar)
		{
			this.editor = editor;
			this.toolbar = toolbar;
			this.groupDesign = groupDesign;
			
			BorderWidth = 3;
			PackStart (toolbar, false, false, 0);
			PackStart (groupDesign, true, true, 3);
		}
Example #6
0
        public ActionGroupEditSession(ActionGroupDesignerFrontend frontend, ProjectBackend project, string containerName, string groupToEdit, bool autoCommitChanges)
        {
            this.groupToEdit       = groupToEdit;
            this.containerName     = containerName;
            this.frontend          = frontend;
            this.project           = project;
            this.autoCommitChanges = autoCommitChanges;

            if (groupToEdit != null)
            {
                group = project.ActionGroups [groupToEdit];
                if (group == null)
                {
                    throw new InvalidOperationException("Unknown action group: " + groupToEdit);
                }
                Load(group);
                undoManager            = new UndoRedoManager();
                undoQueue              = new UndoQueue();
                undoManager.UndoQueue  = undoQueue;
                undoManager.RootObject = groupCopy;

                groupToolbar = new ActionGroupToolbar(frontend, groupCopy);
            }
            else
            {
                if (!autoCommitChanges)
                {
                    throw new System.NotSupportedException();
                }

                Stetic.Wrapper.Container container = project.GetTopLevelWrapper(containerName, true);
                groupToolbar = new ActionGroupToolbar(frontend, container.LocalActionGroups);
            }

            // Don't delay the creation of the designer because when used in combination with the
            // widget designer, change events are subscribed since the begining

            designer = UserInterface.CreateActionGroupDesigner(project, groupToolbar);
            designer.Editor.GroupModified      += OnModified;
            designer.Toolbar.AllowActionBinding = allowActionBinding;
            designer.Destroyed += delegate
            {
                designer = null;
                Dispose();
            };
        }
		public ActionGroupEditSession (ActionGroupDesignerFrontend frontend, ProjectBackend project, string containerName, string groupToEdit, bool autoCommitChanges)
		{
			this.groupToEdit = groupToEdit;
			this.containerName = containerName;
			this.frontend = frontend;
			this.project = project;
			this.autoCommitChanges = autoCommitChanges;
			
			if (groupToEdit != null) {
				group = project.ActionGroups [groupToEdit];
				if (group == null)
					throw new InvalidOperationException ("Unknown action group: " + groupToEdit);
				Load (group);
				undoManager = new UndoRedoManager ();
				undoQueue = new UndoQueue ();
				undoManager.UndoQueue = undoQueue;
				undoManager.RootObject = groupCopy;
				
				groupToolbar = new ActionGroupToolbar (frontend, groupCopy);
			}
			else {
				if (!autoCommitChanges)
					throw new System.NotSupportedException ();
				
				Stetic.Wrapper.Container container = project.GetTopLevelWrapper (containerName, true);
				groupToolbar = new ActionGroupToolbar (frontend, container.LocalActionGroups);
			}
			
			// Don't delay the creation of the designer because when used in combination with the
			// widget designer, change events are subscribed since the begining
			
			designer = UserInterface.CreateActionGroupDesigner (project, groupToolbar);
			designer.Editor.GroupModified += OnModified;
			designer.Toolbar.AllowActionBinding = allowActionBinding;
			designer.Destroyed += delegate { designer = null; Dispose (); };
		}
Example #8
0
        public static ActionGroupDesignerBackend CreateActionGroupDesigner(ProjectBackend project, ActionGroupToolbar groupToolbar)
        {
            Editor.ActionGroupEditor agroupEditor = new Editor.ActionGroupEditor();
            agroupEditor.Project = project;
            WidgetDesignerBackend groupDesign = new WidgetDesignerBackend(agroupEditor, -1, -1);

            groupToolbar.Bind(agroupEditor);

            return(new ActionGroupDesignerBackend(groupDesign, agroupEditor, groupToolbar));
        }