Inheritance: System.MarshalByRefObject, IDisposable
Example #1
0
		public ApplicationBackend (Application app)
		{
			appFrontend = app;
			coreLibrary = Path.GetFullPath (typeof(Registry).Assembly.Location);
			Registry.Initialize (new AssemblyWidgetLibrary (coreLibrary, typeof(Registry).Assembly));
			WidgetDesignerBackend.DefaultObjectViewer = this;
		}
Example #2
0
		internal Component (Application app, object backend, string name, ComponentType type)
		{
			this.app = app;
			this.backend = backend;
			this.name = name;
			this.type = type;
		}
		internal ComponentType (Application app, ActionComponent action)
		{
			this.action = action;
			this.app = app;
			this.name = action.Name;
			this.description = action.Label != null ? action.Label.Replace ("_", "") : action.Name;
			this.icon = action.Icon;
			this.className = "Gtk.Action";
			this.category = "Actions / " + action.ActionGroup.Name;
			this.targetGtkVersion = "2.4"; // Not version-specific
		}
		internal ComponentType (Application app, string name, string desc, string className, string category, string targetGtkVersion, string library, Gdk.Pixbuf icon)
		{
			this.app = app;
			this.name = name;
			this.description = desc;
			this.icon = icon;
			this.className = className;
			this.category = category;
			this.targetGtkVersion = targetGtkVersion;
			this.library = library;
		}
Example #5
0
        public PluggableWidget(Application app)
        {
            book = new Gtk.Notebook ();
            book.ShowTabs = false;
            book.ShowBorder = false;
            book.Show ();
            Add (book);

            this.app = app;
            if (app is IsolatedApplication) {
                (app as IsolatedApplication).BackendChanged += OnBackendChanged;
                (app as IsolatedApplication).BackendChanging += OnBackendChanging;
            }
        }
		internal Project (Application app, ProjectBackend backend)
		{
			this.app = app;
			if (backend != null) {
				this.backend = backend;
				backend.SetFrontend (this);
			}

			if (app is IsolatedApplication) {
				IsolatedApplication iapp = app as IsolatedApplication;
				iapp.BackendChanging += OnBackendChanging;
				iapp.BackendChanged += OnBackendChanged;
			}
		}
Example #7
0
 public ActionComponent(Application owner, object backend, string name)
     : base(owner, backend, name, owner.GetComponentType ("Gtk.Action"))
 {
 }
Example #8
0
		public ProjectViewFrontend (Application app)
		{
			this.app = app;
		}
Example #9
0
		internal Project (Application app, IProjectDesignInfo info): this (app, null, info)
		{
		}
		public static List<ComponentType> GetComponentTypes (Application app, string filename)
		{
			List<ComponentType> list = new List<ComponentType> ();

			LibraryCache.LibraryInfo info = cache.Refresh (new AssemblyResolver (app.Backend), filename);
			if (info.ObjectsDocument == null)
				return list;

			string defTargetGtkVersion = info.ObjectsDocument.DocumentElement.GetAttribute ("gtk-version");
			if (defTargetGtkVersion.Length == 0)
				defTargetGtkVersion = "2.4";
			
			AssemblyDefinition adef = AssemblyFactory.GetAssembly (filename);
			
			foreach (XmlElement elem in info.ObjectsDocument.SelectNodes ("objects/object")) {
				if (elem.GetAttribute ("internal") == "true" || elem.HasAttribute ("deprecated") || !elem.HasAttribute ("palette-category"))
					continue;
					
				string iconname = elem.GetAttribute ("icon");
				Gdk.Pixbuf icon = GetEmbeddedIcon (adef, iconname);
				
				string targetGtkVersion = elem.GetAttribute ("gtk-version");
				if (targetGtkVersion.Length == 0)
					targetGtkVersion = defTargetGtkVersion;
				
				ComponentType ct = new ComponentType (app,
					elem.GetAttribute ("type"),
					elem.GetAttribute ("label"), 
					elem.GetAttribute ("type"),
					elem.GetAttribute ("palette-category"), 
					targetGtkVersion,
					filename,
					icon);
					
				list.Add (ct);
			}
			
			return list;
		}
Example #11
0
		protected Designer (Application app): base (app)
		{
		}
		public ActionGroupComponent (Application app, object backend, string name): base (app, backend, name, app.GetComponentType ("Gtk.ActionGroup"))
		{
		}
Example #13
0
		public WidgetComponent (Application app, object backend, string name, ComponentType type): base (app, backend, name, type)
		{
		}
		internal SignalsEditor (Application app): base (app)
		{
			frontend = new SignalsEditorFrontend (this);
		}
Example #15
0
		internal WidgetTree (Application app): base (app)
		{
			frontend = new ProjectViewFrontend (app);
		}
		internal Project (Application app): this (app, null)
		{
		}
Example #17
0
 public ApplicationBackend(Application app)
 {
     appFrontend = app;
     Registry.Initialize (new AssemblyWidgetLibrary (typeof(Registry).Assembly.FullName, typeof(Registry).Assembly));
     WidgetDesignerBackend.DefaultObjectViewer = this;
 }