public IViewContent CreateContent (MonoDevelop.Core.FilePath fileName, string mimeType, Project ownerProject) { var openFile = new AppDomainOpenedFile(); openFile.StartAppDomain = () => { AppDomain appDomain; ProtobuildIDEEditorDomainBehaviour domainBehaviour; editor.CreateAppDomainAndBehaviour (openedFileList, out appDomain, out domainBehaviour); openFile.AppDomain = appDomain; openFile.Behaviour = domainBehaviour; }; openFile.FileReference = fileName; openFile.StartAppDomain (); openedFileList.OpenedFiles.Add(openFile); var viewSocket = new AppDomainViewContent(editor, openFile); return viewSocket; }
public AppDomainViewContent(AppDomainBasedProtobuildEditorHost editor, AppDomainOpenedFile openFile) { this.editor = editor; this.openFile = openFile; this.graphicsProxy = new ProxiedGraphicsContext (null); this.windowProxy = new ProxiedWindowInfo (null); GLib.Timeout.Add(16, this.OpenWhenStabilized); area = new DrawingArea(); area.ExposeEvent += (o, args) => { if (!canInit) { canInit = true; } }; area.ConfigureEvent += (o, args) => { if (!IsSuspended) { try { openFile.Behaviour.Resize( area.Allocation.Width, area.Allocation.Height); } catch { } } }; area.ShowAll (); this.IsDirty = true; }