Inheritance: System.MarshalByRefObject, IDisposable
Ejemplo n.º 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;
		}
Ejemplo n.º 2
0
		internal Component (Application app, object backend, string name, ComponentType type)
		{
			this.app = app;
			this.backend = backend;
			this.name = name;
			this.type = type;
		}
Ejemplo n.º 3
0
		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
		}
Ejemplo n.º 4
0
		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;
		}
Ejemplo n.º 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;
			}
		}
Ejemplo n.º 7
0
 public ActionComponent(Application owner, object backend, string name)
     : base(owner, backend, name, owner.GetComponentType ("Gtk.Action"))
 {
 }
Ejemplo n.º 8
0
		public ProjectViewFrontend (Application app)
		{
			this.app = app;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 11
0
		protected Designer (Application app): base (app)
		{
		}
Ejemplo n.º 12
0
		public ActionGroupComponent (Application app, object backend, string name): base (app, backend, name, app.GetComponentType ("Gtk.ActionGroup"))
		{
		}
Ejemplo n.º 13
0
		public WidgetComponent (Application app, object backend, string name, ComponentType type): base (app, backend, name, type)
		{
		}
Ejemplo n.º 14
0
		internal SignalsEditor (Application app): base (app)
		{
			frontend = new SignalsEditorFrontend (this);
		}
Ejemplo n.º 15
0
		internal WidgetTree (Application app): base (app)
		{
			frontend = new ProjectViewFrontend (app);
		}
		internal Project (Application app): this (app, null)
		{
		}
Ejemplo n.º 17
0
 public ApplicationBackend(Application app)
 {
     appFrontend = app;
     Registry.Initialize (new AssemblyWidgetLibrary (typeof(Registry).Assembly.FullName, typeof(Registry).Assembly));
     WidgetDesignerBackend.DefaultObjectViewer = this;
 }