public void ClearAttributes() { if (attributes != null) { attributes.Dispose(); attributes = new FastPangoAttrList(); hasUnassignedAttributes = true; } }
protected override void OnLoadData() { var view = (ITextCellViewFrontend)Frontend; if (view.Markup != null) { FormattedText tx = FormattedText.FromMarkup(view.Markup); cellRenderer.Text = tx.Text; var atts = new FastPangoAttrList(); atts.AddAttributes(new TextIndexer(tx.Text), tx.Attributes); cellRenderer.Attributes = new Pango.AttrList(atts.Handle); atts.Dispose(); mixedMarkupText = true; } else { cellRenderer.Text = view.Text; if (mixedMarkupText) { cellRenderer.Attributes = new Pango.AttrList(); } } cellRenderer.Editable = view.Editable; cellRenderer.Ellipsize = view.Ellipsize.ToGtkValue(); }
protected override void OnLoadData () { var view = (ITextCellViewFrontend) Frontend; if (view.Markup != null) { FormattedText tx = FormattedText.FromMarkup (view.Markup); cellRenderer.Text = tx.Text; var atts = new FastPangoAttrList (); atts.AddAttributes (new TextIndexer (tx.Text), tx.Attributes); cellRenderer.Attributes = new Pango.AttrList (atts.Handle); atts.Dispose (); } else { cellRenderer.Text = view.Text; } cellRenderer.Editable = view.Editable; cellRenderer.Ellipsize = view.Ellipsize.ToGtkValue (); }
public void LoadData(TreeModel treeModel, TreeIter iter) { this.treeModel = treeModel; this.iter = iter; view.Initialize (this); if (view.Markup != null) { FormattedText tx = FormattedText.FromMarkup (view.Markup); Text = tx.Text; var atts = new FastPangoAttrList (); atts.AddAttributes (new TextIndexer (tx.Text), tx.Attributes); Attributes = new Pango.AttrList (atts.Handle); atts.Dispose (); } else { Text = view.Text; } Editable = view.Editable; }
public void LoadData(TreeModel treeModel, TreeIter iter) { this.treeModel = treeModel; this.iter = iter; view.Initialize(this); if (view.Markup != null) { FormattedText tx = FormattedText.FromMarkup(view.Markup); Text = tx.Text; var atts = new FastPangoAttrList(); atts.AddAttributes(new TextIndexer(tx.Text), tx.Attributes); Attributes = new Pango.AttrList(atts.Handle); atts.Dispose(); } else { Text = view.Text; } Editable = view.Editable; }