Inheritance: System.MarshalByRefObject
コード例 #1
0
ファイル: UIManager.cs プロジェクト: mono/stetic
        public UIManager(Project project)
        {
            ActionEntry[] entries = new ActionEntry[] {
                new ActionEntry ("FileMenu", null, Catalog.GetString ("_File"), null, null, null),
                new ActionEntry ("Open", Stock.Open, null, "<control>O", Catalog.GetString ("Open a file"), OpenFile),
                new ActionEntry ("RecentFiles", null, Catalog.GetString ("Recent files"), null, null, null),
                new ActionEntry ("Save", Stock.Save, null, "<control>S", Catalog.GetString ("Save"), SaveFile),
                new ActionEntry ("SaveAs", Stock.SaveAs, null, "<control><shift>S", Catalog.GetString ("Save As"), SaveFileAs),
                new ActionEntry ("ImportGlade", null, Catalog.GetString ("_Import from Glade File..."), null, Catalog.GetString ("Import UI from a Glade file"), ImportGlade),
                new ActionEntry ("ExportGlade", null, Catalog.GetString ("_Export to Glade File..."), null, Catalog.GetString ("Export UI to a Glade file"), ExportGlade),
                new ActionEntry ("Close", Stock.Close, null, "<control>W", Catalog.GetString ("Close"), Close),
                new ActionEntry ("Quit", Stock.Quit, null, "<control>Q", Catalog.GetString ("Quit"), Quit),

                new ActionEntry ("EditMenu", null, "_Edit", null, null, null),
                new ActionEntry ("Undo", Stock.Undo, null, "<control>Z", Catalog.GetString ("Undo previous action"), Undo),
                new ActionEntry ("Redo", Stock.Redo, null, "<control><shift>Z", Catalog.GetString ("Redo previously-undone action"), Redo),
                new ActionEntry ("Cut", Stock.Cut, null, "<control>X", Catalog.GetString ("Cut selection to clipboard"), Cut),
                new ActionEntry ("Copy", Stock.Copy, null, "<control>C", Catalog.GetString ("Copy selection to clipboard"), Copy),
                new ActionEntry ("Paste", Stock.Paste, null, "<control>V", Catalog.GetString ("Paste from clipboard"), Paste),
                new ActionEntry ("Delete", Stock.Delete, null, "Delete", Catalog.GetString ("Delete selection"), Delete),
                new ActionEntry ("LibraryManager", null, Catalog.GetString ("Widget libraries..."), null, null, ShowLibraryManager),

                new ActionEntry ("ProjectMenu", null, Catalog.GetString ("Project"), null, null, null),
                new ActionEntry ("EditProjectIcons", null, Catalog.GetString ("Project Icons..."), null, null, EditIcons),

                new ActionEntry ("HelpMenu", null, Catalog.GetString ("_Help"), null, null, null),
                new ActionEntry ("Contents", Stock.Help, Catalog.GetString ("_Contents"), "F1", Catalog.GetString ("Help"), Help),
                new ActionEntry ("About", Stock.About, null, null, Catalog.GetString ("About Stetic"), About),
            };

            ActionGroup actions = new ActionGroup ("group");
            actions.Add (entries);

            InsertActionGroup (actions, 0);
            AddUiFromString (menuXml);

            // Not yet implemented
            GetAction ("/menubar/HelpMenu/Contents").Sensitive = false;

            GetAction ("/menubar/FileMenu/Open").IsImportant = true;
            GetAction ("/menubar/FileMenu/Save").IsImportant = true;

            // Set up Edit menu sensitivity hackery
            Gtk.MenuItem editMenuItem = (Gtk.MenuItem) GetWidget ("/menubar/EditMenu");
            Gtk.Menu editMenu = (Gtk.Menu)editMenuItem.Submenu;
            editMenu.Shown += EditShown;
            editMenu.Hidden += EditHidden;

            Gtk.MenuItem recentMenuItem = (Gtk.MenuItem) GetWidget ("/menubar/FileMenu/RecentFiles");
            recentFilesMenu = new Gtk.Menu ();
            recentMenuItem.Submenu = recentFilesMenu;
            recentMenuItem.ShowAll ();

            ReadRecentFiles ();

            SteticMain.CurrentDesignerChanged += OnDesignerChanged;
            Project = project;
        }
コード例 #2
0
		internal ActionGroupDesigner (Project project, string componentName, string actionGroupName, WidgetDesigner relatedWidgetDesigner, bool autoCommitChanges): base (project.App)
		{
			this.componentName = componentName;
			this.relatedWidgetDesigner = relatedWidgetDesigner;
			
			if (actionGroupName != null)
				this.actionGroupName = actionGroupName;
			this.autoCommitChanges = autoCommitChanges;
			this.project = project;

			frontend = new ActionGroupDesignerFrontend (this);

			CreateSession ();
		}
コード例 #3
0
		internal WidgetDesigner (Project project, string componentName): base (project.App)
		{
			this.componentName = componentName;
			this.project = project;
			frontend = new WidgetDesignerFrontend (this);
			
			project.SignalAdded += OnSignalAdded;
			project.SignalRemoved += OnSignalRemoved;
			project.SignalChanged += OnSignalChanged;
			project.ComponentNameChanged += OnComponentNameChanged;
			project.ComponentTypesChanged += OnComponentTypesChanged;
			project.BackendChanged += OnProjectBackendChanged;
			
			CreateSession ();
		}
コード例 #4
0
ファイル: ProjectBackend.cs プロジェクト: Kalnor/monodevelop
		public void Dispose ()
		{
			// First of all, disconnect from the frontend,
			// to avoid sending notifications while disposing
			frontend = null;
			
			if (oldTopActionCollection != null)
				oldTopActionCollection.ActionGroupChanged -= OnComponentTypesChanged;

			Registry.RegistryChanging -= OnRegistryChanging;
			Registry.RegistryChanged -= OnRegistryChanged;
			Close ();
			iconFactory = null;
			ActionGroups = null;
			System.Runtime.Remoting.RemotingServices.Disconnect (this);
		}
コード例 #5
0
ファイル: WidgetDesigner.cs プロジェクト: Kalnor/monodevelop
		internal WidgetDesigner (Project project, string componentName, bool autoCommitChanges): base (project.App)
		{
			this.componentName = componentName;
			this.autoCommitChanges = autoCommitChanges;
			this.project = project;
			frontend = new WidgetDesignerFrontend (this);
			
			if (autoCommitChanges)
				editedProject = project;
			else
				editedProject = new Project (project.App);
			
			editedProject.SignalAdded += OnSignalAdded;
			editedProject.SignalRemoved += OnSignalRemoved;
			editedProject.SignalChanged += OnSignalChanged;
			editedProject.ComponentNameChanged += OnComponentNameChanged;
			editedProject.ComponentTypesChanged += OnComponentTypesChanged;
			
			project.BackendChanged += OnProjectBackendChanged;
			editedProject.BackendChanged += OnProjectBackendChanged;
			
			CreateSession ();
		}
コード例 #6
0
ファイル: Project.cs プロジェクト: FreeBSD-DotNet/monodevelop
		internal ActionGroupInfo (Project project, string name): base (project, name)
		{
		}
コード例 #7
0
ファイル: Project.cs プロジェクト: FreeBSD-DotNet/monodevelop
		internal ActionGroupInfo (Project project, string name, string widgetName): base (project, name)
		{
			this.widgetName = widgetName;
		}
コード例 #8
0
ファイル: Project.cs プロジェクト: FreeBSD-DotNet/monodevelop
		internal WidgetInfo (Project project, string name, string type): base (project, name)
		{
			this.type = type;
		}
コード例 #9
0
ファイル: Project.cs プロジェクト: FreeBSD-DotNet/monodevelop
		internal WidgetInfo (Project project, Component c): base (project, c.Name)
		{
			type = c.Type.Name;
		}
コード例 #10
0
		internal void SetActiveDesignSession (Project p, WidgetEditSession session)
		{
			activeProject = p;
			Backend.ActiveProject = p != null ? p.ProjectBackend : null;
			Backend.SetActiveDesignSession (session);
		}
コード例 #11
0
ファイル: Project.cs プロジェクト: FreeBSD-DotNet/monodevelop
		internal ProjectItemInfo (Project project, string name)
		{
			this.name = name;
			this.project = project;
		}
コード例 #12
0
ファイル: ProjectBackend.cs プロジェクト: Kalnor/monodevelop
		internal void SetFrontend (Project project)
		{
			frontend = project;
		}
コード例 #13
0
		internal ComponentEventArgs (Project p, Component c)
		{
			project = p;
			component = c;
		}
コード例 #14
0
ファイル: Stetic.cs プロジェクト: mono/stetic
        static int GenerateCode(string file, string[] args, int n, GenerationOptions ops)
        {
            foreach (string lib in libraries)
                SteticApp.AddWidgetLibrary (lib);

            SteticApp.UpdateWidgetLibraries (false);

            Project[] projects = new Project [args.Length - n];
            for (int i=n; i<args.Length; i++)
                projects [i - n] = SteticApp.LoadProject (args [i]);

            CodeDomProvider provider = GetProvider (language);
            CodeGenerationResult res = SteticApp.GenerateProjectCode (file, "Stetic", provider, ops, projects);
            foreach (SteticCompilationUnit f in res.Units)
                Console.WriteLine ("Generated file: " + f.Name);
            foreach (string s in res.Warnings)
                Console.WriteLine ("WARNING: " + s);
            return 0;
        }
コード例 #15
0
		public ComponentSignalEventArgs (Project p, Component c, Signal oldSignal, Signal signal): base (p, c)
		{
			this.oldSignal = oldSignal;
			this.signal = signal;
		}
コード例 #16
0
		internal ComponentNameEventArgs (Project p, Component c, string oldName): base (p, c)
		{
			this.oldName = oldName;
		}
コード例 #17
0
		internal ComponentRemovedEventArgs (Project p, string name)
		{
			project = p;
			componentName = name;
		}
コード例 #18
0
ファイル: Application.cs プロジェクト: Kalnor/monodevelop
//		public Project LoadProject (string path, IProjectDesignInfo info)
//		{
//			Project p = new Project (this, info);
//			p.Load (path);
//			projects.Add (p);
//			p.Disposed += ProjectDisposed;
//			return p;
//		}
		
		public Project CreateProject (IProjectDesignInfo info)
		{
			Project p = new Project (this, info);
			projects.Add (p);
			p.Disposed += ProjectDisposed;
			return p;
		}
コード例 #19
0
ファイル: WindowListWidget.cs プロジェクト: mono/stetic
 public void Fill(Project project)
 {
     store.Clear ();
     foreach (WidgetInfo wi in project.Widgets) {
         Gdk.Pixbuf pic = null;
         if (wi.IsWindow) {
             ClassDescriptor cd = Stetic.Registry.LookupClassByName ("Gtk.Window");
             if (cd != null)
                 pic = cd.Icon;
         } else {
             ClassDescriptor cd = Stetic.Registry.LookupClassByName ("Gtk.Bin");
             if (cd != null)
                 pic = cd.Icon;
         }
         store.AppendValues (wi, pic, wi.Name);
     }
 }
コード例 #20
0
		public Project LoadProject (string path)
		{
			Project p = new Project (this);
			p.Load (path);
			projects.Add (p);
			p.Disposed += ProjectDisposed;
			return p;
		}
コード例 #21
0
		public Project CreateProject ()
		{
			Project p = new Project (this);
			projects.Add (p);
			p.Disposed += ProjectDisposed;
			return p;
		}
コード例 #22
0
ファイル: ProjectBackend.cs プロジェクト: thild/monodevelop
 internal void SetFrontend(Project project)
 {
     frontend = project;
 }