Pango.Layout CreateTabLayout(IDockNotebookTab tab) { Pango.Layout la = CreateSizedLayout(); if (!string.IsNullOrEmpty(tab.Markup)) { la.SetMarkup(tab.Markup); } else if (!string.IsNullOrEmpty(tab.Text)) { la.SetText(tab.Text); } return(la); }
public SdiWorkspaceWindow(DefaultWorkbench workbench, IViewContent content, DockNotebook tabControl, IDockNotebookTab tabLabel) : base() { this.workbench = workbench; this.tabControl = tabControl; this.content = content; this.tab = tabLabel; this.tabPage = content.Control; fileTypeCondition.SetFileName(content.ContentName ?? content.UntitledName); extensionContext = AddinManager.CreateExtensionContext(); extensionContext.RegisterCondition("FileType", fileTypeCondition); box = new VBox(); viewContents.Add(content); //this fires an event that the content uses to access this object's ExtensionContext content.WorkbenchWindow = this; // The previous WorkbenchWindow property assignement may end with a call to AttachViewContent, // which will add the content control to the subview notebook. In that case, we don't need to add it to box if (subViewNotebook == null) { box.PackStart(content.Control); } content.ContentNameChanged += new EventHandler(SetTitleEvent); content.DirtyChanged += HandleDirtyChanged; content.BeforeSave += new EventHandler(BeforeSave); content.ContentChanged += new EventHandler(OnContentChanged); box.Show(); Add(box); SetTitleEvent(null, null); commandHandler = new ViewCommandHandlers(this); }
Pango.Layout CreateTabLayout (IDockNotebookTab tab) { Pango.Layout la = CreateSizedLayout (); if (!string.IsNullOrEmpty (tab.Markup)) la.SetMarkup (tab.Markup); else if (!string.IsNullOrEmpty (tab.Text)) la.SetText (tab.Text); return la; }