public MapManager(CellLayout layout, CellSwizzle swizzle, Vector3Int cellSize) { _baseGrid = new GameObject("Grid").AddComponent <Grid>(); Layout = layout; Swizzle = swizzle; CellSize = cellSize; }
void RuntimeRenderCell(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var runtime = (IRuntimeModel)model.GetValue(iter, 0); var renderer = (CellRendererText)cell; if (runtime == null || runtime.IsSeparator) { renderer.Xpad = (uint)0; return; } using (var mutableModel = runtime.GetMutableModel()) { renderer.Visible = mutableModel.Visible; renderer.Sensitive = mutableModel.Enabled; renderer.Xpad = (uint)(runtime.IsIndented ? 18 : 3); if (!runtimeCombo.PopupShown) { // no need to ident text when the combo dropdown is not showing if (Platform.IsWindows) { renderer.Xpad = 3; } renderer.Text = mutableModel.FullDisplayString; renderer.Attributes = normalAttributes; } else { renderer.Text = mutableModel.DisplayString; renderer.Attributes = runtime.Notable ? boldAttributes : normalAttributes; } } }
private void OnPixbufCellLayout(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererPixbuf pixbufCell = (cell as CellRendererPixbuf); IVirtualDevice device = (IVirtualDevice) model.GetValue (iter, 0); switch (device.DeviceType) { case VirtualDeviceType.HardDisk: pixbufCell.Pixbuf = hdPixbuf; break; case VirtualDeviceType.CdRom: pixbufCell.Pixbuf = cdromPixbuf; break; case VirtualDeviceType.Ethernet: pixbufCell.Pixbuf = ethernetPixbuf; break; case VirtualDeviceType.Floppy: pixbufCell.Pixbuf = floppyPixbuf; break; default: pixbufCell.Pixbuf = null; break; } }
private void PixbufDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var pixbufRenderer = (CellRendererPixbuf)cell; var schema = (ISchemaContainer)model.GetValue(iter, columnObj); string iconString = null; switch (schema.SchemaContainerType) { case SchemaContainerType.Table: iconString = "md-db-table"; break; case SchemaContainerType.View: iconString = "md-db-view"; break; case SchemaContainerType.Procedure: iconString = "md-db-procedure"; break; case SchemaContainerType.Query: //TODO: iconString = Stock.Execute; break; } if (iconString != null) { pixbufRenderer.Pixbuf = ImageService.GetPixbuf(iconString); } }
private void PropNameDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererText textRenderer = cell as CellRendererText; ColumnContainer container = model.GetValue(iter, columnObj) as ColumnContainer; textRenderer.Text = container.PropertyName; }
private void ClassNameDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererText textRenderer = cell as CellRendererText; TableContainer container = model.GetValue(iter, tableObj) as TableContainer; textRenderer.Text = container.ClassName; }
private void PixbufDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererPixbuf pixbufRenderer = cell as CellRendererPixbuf; ISchemaContainer schema = model.GetValue(iter, columnObj) as ISchemaContainer; string iconString = null; switch (schema.SchemaContainerType) { case SchemaContainerType.Table: iconString = "md-db-table"; break; case SchemaContainerType.View: iconString = "md-db-view"; break; case SchemaContainerType.Procedure: iconString = "md-db-procedure"; break; case SchemaContainerType.Query: //TODO: iconString = Stock.Execute; break; } if (iconString != null) { pixbufRenderer.Pixbuf = MonoDevelop.Core.Gui.Services.Resources.GetIcon(iconString); } }
private void NullableDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererToggle toggleRenderer = cell as CellRendererToggle; ColumnContainer container = model.GetValue(iter, columnObj) as ColumnContainer; toggleRenderer.Active = container.ColumnSchema.IsNullable; }
void RuntimeRenderCell(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var runtime = (IRuntimeModel)model.GetValue(iter, 0); var renderer = (CellRendererText)cell; if (runtime == null || runtime.IsSeparator) { renderer.Xpad = (uint)0; return; } renderer.Visible = runtime.Visible; renderer.Sensitive = runtime.Enabled; renderer.Xpad = (uint)(runtime.IsIndented ? 18 : 3); if (!runtimeCombo.PopupShown) { renderer.Text = runtime.FullDisplayString; renderer.Attributes = normalAttributes; } else { renderer.Text = runtime.DisplayString; renderer.Attributes = runtime.Notable ? boldAttributes : normalAttributes; } }
private void TextDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererText textRenderer = cell as CellRendererText; ISchemaContainer schema = model.GetValue(iter, columnObj) as ISchemaContainer; textRenderer.Text = schema.Schema.Name; }
private void TextDataFunc(CellLayout cell_layout, CellRenderer renderer, TreeModel model, TreeIter iter) { CellRendererText textRenderer = (CellRendererText)renderer; Tilegroup group = (Tilegroup)Model.GetValue(iter, 0); textRenderer.Text = group.Name; }
void RuntimeRenderCell(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var target = (ExecutionTarget)model.GetValue(iter, RuntimeExecutionTarget); var indent = (bool)model.GetValue(iter, RuntimeIsIndented); var renderer = (CellRendererText)cell; TreeIter parent; renderer.Sensitive = !(target is ExecutionTargetGroup); if (target == null) { renderer.Xpad = (uint)0; return; } if (!runtimeCombo.PopupShown) { renderer.Text = target.FullName; renderer.Xpad = 3; } else { renderer.Xpad = indent ? (uint)18 : (uint)3; if (!runtimeStore.IterParent(out parent, iter)) { renderer.Text = target.FullName; } else { renderer.Text = target.Name; } } }
private void RoomComboTextFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { object obj = model.GetValue(iter, 0); if (obj is ChatRoom) { (cell as CellRendererText).Text = ((ChatRoom)obj).Name; (cell as CellRendererText).Sensitive = true; } else if (obj is NotInAnyRooms) { (cell as CellRendererText).Text = "(You are not in any chat rooms)"; (cell as CellRendererText).Sensitive = false; } else if (obj is SelectRoom) { (cell as CellRendererText).Text = "(Select chat room)"; (cell as CellRendererText).Sensitive = false; } else { (cell as CellRendererText).Text = string.Empty; (cell as CellRendererText).Sensitive = false; } }
public static void CellDataHandler (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { SourceRowRenderer renderer = cell as SourceRowRenderer; if (renderer == null) { return; } var type = model.GetValue (iter, (int)SourceModel.Columns.Type); if (type == null || (SourceModel.EntryType) type != SourceModel.EntryType.Source) { renderer.Visible = false; return; } Source source = model.GetValue (iter, 0) as Source; renderer.Source = source; renderer.Iter = iter; if (source == null) { return; } renderer.Visible = true; renderer.Text = source.Name; renderer.Sensitive = source.CanActivate; }
private void SetterDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererToggle toggleRenderer = cell as CellRendererToggle; ColumnContainer container = model.GetValue(iter, columnObj) as ColumnContainer; toggleRenderer.Active = container.HasSetter; }
public WindManager(int rotation, CellLayout layout, World world) { m_rotation = rotation; m_cellLayout = layout; m_cells = layout.cellCount; m_world = world; }
private void TextDataFunc(CellLayout cell_layout, CellRenderer renderer, TreeModel model, TreeIter iter) { CellRendererText textRenderer = (CellRendererText) renderer; Tilegroup group = (Tilegroup) Model.GetValue(iter, 0); textRenderer.Text = group.Name; }
public MapManager(CellLayout layout) { _baseGrid = new GameObject("Grid").AddComponent <Grid>(); Layout = layout; Swizzle = CellSwizzle.XYZ; CellSize = new Vector3Int(1, 1, 1); }
public static void CellDataHandler(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { SourceRowRenderer renderer = cell as SourceRowRenderer; if (renderer == null) { return; } var type = model.GetValue(iter, (int)SourceModel.Columns.Type); if (type == null || (SourceModel.EntryType)type != SourceModel.EntryType.Source) { renderer.Visible = false; return; } Source source = model.GetValue(iter, 0) as Source; renderer.Source = source; renderer.Iter = iter; if (source == null) { return; } renderer.Visible = true; renderer.Text = source.Name; renderer.Sensitive = source.CanActivate; }
void ComboboxCellDataFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { object o = model.GetValue(iter, 0); if (o == null) { return; } if (o is IRoundEditCbItem) { IRoundEditCbItem item = o as IRoundEditCbItem; if (cell is CellRendererText) { (cell as CellRendererText).Text = item.CbText; } else if (cell is CellRendererPixbuf) { (cell as CellRendererPixbuf).IconName = item.ItemCompleted ? "gtk-yes" : "gtk-no"; } } }
private void ContentDataFunc (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { object dataObject = model.GetValue (iter, columnIndex); if (dataObject == null) nullRenderer.SetContent (cell as CellRendererText, dataObject); else contentRenderer.SetContent (cell as CellRendererText, dataObject); }
void OnCellLayoutDataFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { var houseNumber = (string)tree_model.GetValue(iter, 0); string pattern = String.Format("{0}", Regex.Escape(Text.ToLower())); houseNumber = Regex.Replace(houseNumber, pattern, (match) => String.Format("<b>{0}</b>", match.Value), RegexOptions.IgnoreCase); (cell as CellRendererText).Markup = houseNumber; }
void VersionNameCellFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { string name = (string)tree_model.GetValue(iter, 1); (cell as CellRendererText).Text = name; cell.Sensitive = (bool)tree_model.GetValue(iter, 2); }
void OnCellLayoutDataFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { var title = (string)tree_model.GetValue(iter, 0); string pattern = String.Format("{0}", Regex.Escape(entryObject.Text)); (cell as CellRendererText).Markup = Regex.Replace(title, pattern, (match) => String.Format("<b>{0}</b>", match.Value), RegexOptions.IgnoreCase); }
private void OnCellLayoutDataFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { var cityName = (string)tree_model.GetValue(iter, (int)Columns.Name); var typeName = (string)tree_model.GetValue(iter, (int)Columns.TypeName); var pattern = $"\\b{Regex.Escape(Text.ToLower())}"; cityName = Regex.Replace(cityName, pattern, match => $"<b>{ match.Value }</b>", RegexOptions.IgnoreCase); ((CellRendererText)cell).Markup = $"{typeName} {cityName}"; }
private void renderComboBoxCells(CellLayout cell_layout, CellRenderer cell, TreeModel model, TreeIter iter) { LoggingHandler logHandler = model.GetValue(iter, 0) as LoggingHandler; if (logHandler != null) { (cell as CellRendererText).Text = logHandler.Name; } }
private void PaternTitleRenderer(CellLayout cell_layout, CellRenderer cell, TreeModel model, TreeIter iter) { Pattern pattern = model.GetValue(iter, 0) as Pattern; if (pattern != null) { (cell as CellRendererText).Text = pattern.ToString(); } }
private void OnCellLayoutDataFunc(CellLayout cellLayout, CellRenderer cell, TreeModel treeModel, TreeIter iter) { var house = (HouseDTO)treeModel.GetValue(iter, 0); var pattern = Regex.Escape(Text.ToLower()); var houseFullName = house.ComplexNumber; houseFullName = Regex.Replace(houseFullName, pattern, match => $"<b>{ match.Value }</b>", RegexOptions.IgnoreCase); ((CellRendererText)cell).Markup = houseFullName; }
void ConstraintPixCellFunc (CellLayout cellLayout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { string stockname = (string)tree_model.GetValue (iter, 0); // FIXME, ICON //if (stockname != null) // (cell as CellRendererPixbuf).Pixbuf = GtkUtil.TryLoadIcon (Settings.Global.IconTheme, stockname, 16, (Gtk.IconLookupFlags)0); //else (cell as CellRendererPixbuf).Pixbuf = null; }
private void BlinkStickConnectedRenderer(CellLayout cell_layout, CellRenderer cell, TreeModel model, TreeIter iter) { BlinkStickDeviceSettings myclass = model.GetValue(iter, 0) as BlinkStickDeviceSettings; if (myclass != null) { (cell as CellRendererPixbuf).StockId = myclass.Led == null ? "" : "icon-dark-usb-small"; } }
void RuntimeRenderCell(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var target = (ExecutionTarget)model.GetValue(iter, RuntimeExecutionTarget); var indent = (bool)model.GetValue(iter, RuntimeIsIndented); var cmd = (ActionCommand)model.GetValue(iter, RuntimeCommand); var renderer = (CellRendererText)cell; TreeIter parent; if (cmd != null) { var ci = IdeApp.CommandService.GetCommandInfo(cmd.Id, new CommandTargetRoute(LastCommandTarget)); renderer.Text = RemoveUnderline(ci.Text); renderer.Visible = ci.Visible; renderer.Sensitive = ci.Enabled; renderer.Xpad = 3; // it seems that once we add the ExecutionTargetGroups to the drop down then the width // calculation for items needs some help in calculating the correct width // doing this helps. if (Platform.IsMac) { renderer.WidthChars = renderer.Text != null ? renderer.Text.Length : 0; } return; } renderer.Sensitive = !(target is ExecutionTargetGroup) && (target != null && target.Enabled); if (target == null) { renderer.Xpad = (uint)0; return; } if (!runtimeCombo.PopupShown) { renderer.Text = target.FullName; renderer.Xpad = 3; } else { renderer.Xpad = indent ? (uint)18 : (uint)3; if (!runtimeStore.IterParent(out parent, iter)) { renderer.Text = target.FullName; } else { renderer.Text = target.Name; } } if (Platform.IsMac) { renderer.WidthChars = renderer.Text != null ? (indent ? renderer.Text.Length + 6 : 0) : 0; } }
void OnCellLayoutDataFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { var party = (PartyData)tree_model.GetValue(iter, 0); string pattern = String.Format("\\b{0}", Regex.Escape(entryQuery.Text.ToLower())); var text = String.Format("{0}, {1}\n{2}", party.inn, party.name.short_with_opf, party.address.value); var displaytext = Regex.Replace(text, pattern, (match) => String.Format("<b>{0}</b>", match.Value), RegexOptions.IgnoreCase); displaytext = displaytext.Replace("&", "&"); (cell as CellRendererText).Markup = displaytext; }
private void RenderFont(CellLayout layout, CellRenderer renderer, TreeModel model, TreeIter iter) { string fontName = (string)model.GetValue(iter, 0); CellRendererText cell = renderer as CellRendererText; cell.Text = fontName; cell.Font = string.Format("{0} 10", fontName); cell.Family = fontName; }
private void BlinkStickDeviceSettingsClassRenderer(CellLayout cell_layout, CellRenderer cell, TreeModel model, TreeIter iter) { BlinkStickDeviceSettings myclass = model.GetValue(iter, 0) as BlinkStickDeviceSettings; if (myclass != null) { (cell as CellRendererText).Text = myclass.ToString(); cell.Xalign = 0; } }
private void RenderFont (CellLayout layout, CellRenderer renderer, TreeModel model, TreeIter iter) { string fontName = (string)model.GetValue (iter, 0); CellRendererText cell = renderer as CellRendererText; cell.Text = fontName; cell.Font = string.Format ("{0} 10", fontName); cell.Family = fontName; }
public static void ProfileNameDataFunc (CellLayout layout, CellRenderer renderer, TreeModel model, TreeIter iter) { if (model.GetValue (iter, 0) != null) { Cms.Profile profile = (Cms.Profile) model.GetValue (iter, 0); if (profile.ProductName.Length < NameLenth) (renderer as Gtk.CellRendererText).Text = profile.ProductName; else (renderer as Gtk.CellRendererText).Text = profile.ProductName.Substring(0, NameLenth) + "..."; } else (renderer as Gtk.CellRendererText).Text = ""; }
public static void CellDataHandler (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { SourceRowRenderer renderer = cell as SourceRowRenderer; Source source = model.GetValue (iter, 0) as Source; if (renderer == null) { return; } renderer.Source = source; renderer.Iter = iter; if (source == null) { return; } renderer.Text = source.Name; renderer.Sensitive = source.CanActivate; }
void VersionNameCellFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { string name = (string)tree_model.GetValue (iter, 1); (cell as CellRendererText).Text = name; cell.Sensitive = (bool)tree_model.GetValue (iter, 2); }
void CategoryDataFunc(CellLayout layout, CellRenderer renderer, TreeModel model, TreeIter iter) { string name = (string)model.GetValue (iter, 1); (renderer as CellRendererText).Text = name; }
private void OnCellTextLayout(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererText textCell = (cell as CellRendererText); VirtualMachine machine = (VirtualMachine) model.GetValue (iter, 0); textCell.Markup = String.Format ("<b><span size=\"large\">{0}</span></b>\nStatus: {1}, Operating System: {2}", machine.Name, GetStatusString (machine.Status), machine.OperatingSystem.DisplayName); }
private void OnCellPixbufLayout(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererPixbuf pixbufCell = (cell as CellRendererPixbuf); VirtualMachine machine = (VirtualMachine) model.GetValue (iter, 0); pixbufCell.Pixbuf = machine.PreviewIcon; }
void RuntimeRenderCell (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var runtime = (IRuntimeModel)model.GetValue (iter, 0); var renderer = (CellRendererText) cell; if (runtime == null || runtime.IsSeparator) { renderer.Xpad = (uint)0; return; } using (var mutableModel = runtime.GetMutableModel ()) { renderer.Visible = mutableModel.Visible; renderer.Sensitive = mutableModel.Enabled; renderer.Xpad = (uint)(runtime.IsIndented ? 18 : 3); if (!runtimeCombo.PopupShown) { // no need to ident text when the combo dropdown is not showing if (Platform.IsWindows) renderer.Xpad = 3; renderer.Text = mutableModel.FullDisplayString; renderer.Attributes = normalAttributes; } else { renderer.Text = mutableModel.DisplayString; renderer.Attributes = runtime.Notable ? boldAttributes : normalAttributes; } } }
void ConstraintPixCellFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { string stockname = (string)tree_model.GetValue (iter, 0); if (stockname != null) (cell as CellRendererPixbuf).Pixbuf = GtkUtil.TryLoadIcon (FSpot.Core.Global.IconTheme, stockname, 16, (Gtk.IconLookupFlags)0); else (cell as CellRendererPixbuf).Pixbuf = null; }
private void NetworkTextFunc(CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { Network network = (model.GetValue(iter, 0) as Network); if (network != null) { (cell as CellRendererText).Text = network.NetworkName; (cell as CellRendererText).Sensitive = true; } else { (cell as CellRendererText).Text = "(Select a network)"; (cell as CellRendererText).Sensitive = false; } }
private void ShowText(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { object currentRow = tree_model.GetValue(iter, 0); string address = (string)tree_model.GetValue(iter, 1); if (currentRow is TrustedNodeInfo) { TrustedNodeInfo node = (currentRow as TrustedNodeInfo); ((CellRendererText)cell).Markup = String.Format("{0}\n<span size=\"small\">({1})</span>", node.Identifier, address); cell.Sensitive = true; } else if (currentRow is NearbyNode) { NearbyNode node = (currentRow as NearbyNode); ((CellRendererText)cell).Markup = String.Format("{0}\n<span size=\"small\">({1})</span>", node.NickName, address); cell.Sensitive = true; } else { ((CellRendererText)cell).Markup = "<b>There are no friends to connect to.</b>"; cell.Sensitive = false; } }
private void RenderWorkspacePath(CellLayout column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { string text2 = (string) model.GetValue (iter, 1); int type = Convert.ToInt32(storeWorkspace.GetValue(iter, 2)); Pango.FontDescription fd = new Pango.FontDescription(); if(type == 2) fd.Weight = Pango.Weight.Bold; (cell as Gtk.CellRendererText).FontDesc = fd; (cell as Gtk.CellRendererText).Markup = "<small><i>"+text2+"</i></small>"; }
private void TextDataFunc (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererText textRenderer = cell as CellRendererText; ISchemaContainer schema = model.GetValue (iter, columnObj) as ISchemaContainer; textRenderer.Text = schema.Schema.Name; }
private void RenderWorkspaceName(CellLayout column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { int type = Convert.ToInt32(storeWorkspace.GetValue(iter, 2)); Pango.FontDescription fd = new Pango.FontDescription(); if(type == 2) fd.Weight = Pango.Weight.Bold; (cell as Gtk.CellRendererText).FontDesc = fd; }
private void RenderTypProject(CellLayout column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { string text = (string) model.GetValue (iter, 0); string text2 = (string) model.GetValue (iter, 1); Pango.FontDescription fd = new Pango.FontDescription(); (cell as Gtk.CellRendererText).FontDesc = fd; (cell as Gtk.CellRendererText).Markup = "<b >"+text + "</b>"+Environment.NewLine+"<small>" + text2+"</small>"; /*string pathTemplates = (string) model.GetValue (iter, 3); if(!string.IsNullOrEmpty(pathTemplates)){ string[] templates = System.IO.Directory.GetDirectories(pathTemplates); if(templates.Length<1) (cell as Gtk.CellRendererText).Sensitive = false; else (cell as Gtk.CellRendererText).Sensitive = true; }*/ }
private void PixbufDataFunc (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { CellRendererPixbuf pixbufRenderer = cell as CellRendererPixbuf; ISchemaContainer schema = model.GetValue (iter, columnObj) as ISchemaContainer; string iconString = null; switch (schema.SchemaContainerType) { case SchemaContainerType.Table: iconString = "md-db-table"; break; case SchemaContainerType.View: iconString = "md-db-view"; break; case SchemaContainerType.Procedure: iconString = "md-db-procedure"; break; case SchemaContainerType.Query: //TODO: iconString = Stock.Execute; break; } if (iconString != null) pixbufRenderer.Pixbuf = MonoDevelop.Core.Gui.Services.Resources.GetIcon (iconString); }
private void FieldComboDataFunc(CellLayout layout, CellRenderer cell, TreeModel m, TreeIter i) { cell.Sensitive = (m.GetValue(i, 1) != null); }
void RuntimeRenderCell (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var target = (ExecutionTarget) model.GetValue (iter, RuntimeExecutionTarget); var indent = (bool) model.GetValue (iter, RuntimeIsIndented); var cmd = (ActionCommand) model.GetValue (iter, RuntimeCommand); var renderer = (CellRendererText) cell; TreeIter parent; if (cmd != null) { var ci = IdeApp.CommandService.GetCommandInfo (cmd.Id, new CommandTargetRoute (LastCommandTarget)); renderer.Text = RemoveUnderline (ci.Text); renderer.Visible = ci.Visible; renderer.Sensitive = ci.Enabled; renderer.Xpad = 3; return; } renderer.Sensitive = !(target is ExecutionTargetGroup); if (target == null) { renderer.Xpad = (uint) 0; return; } if (!runtimeCombo.PopupShown) { renderer.Text = target.FullName; renderer.Xpad = 3; } else { renderer.Xpad = indent ? (uint) 18 : (uint) 3; if (!runtimeStore.IterParent (out parent, iter)) renderer.Text = target.FullName; else renderer.Text = target.Name; } }
private void ShowImage(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { object currentRow = tree_model.GetValue(iter, 0); if (currentRow != null) { if (currentRow is TrustedNodeInfo) { var pixbuf = Gui.AvatarManager.GetSmallAvatar(((TrustedNodeInfo)currentRow).NodeID); ((CellRendererPixbuf)cell).Pixbuf = pixbuf; } else if (currentRow is NearbyNode) ((CellRendererPixbuf)cell).Pixbuf = localImage; else ((CellRendererPixbuf)cell).Pixbuf = notImage; } }
void ProfileCellFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { string name = (string)tree_model.GetValue (iter, 0); (cell as CellRendererText).Text = name; }
static void StackFrameLayout (CellLayout layout, CellRenderer cr, TreeModel model, TreeIter iter) { var frame = (ExceptionStackFrame) model.GetValue (iter, (int) ModelColumn.StackFrame); var renderer = (StackFrameCellRenderer) cr; if (!(renderer.IsStackFrame = frame != null)) return; renderer.IsUserCode = (bool) model.GetValue (iter, (int) ModelColumn.IsUserCode); renderer.LineNumber = !string.IsNullOrEmpty (frame.File) ? frame.Line : -1; renderer.Markup = (string) model.GetValue (iter, (int) ModelColumn.Markup); }
public static void ComboBoxCellFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) { string name = (string)tree_model.GetValue (iter, 0); (cell as CellRendererText).Text = name; }
static void LineNumberLayout (CellLayout layout, CellRenderer cr, TreeModel model, TreeIter iter) { var frame = (ExceptionStackFrame) model.GetValue (iter, (int) ModelColumn.StackFrame); var renderer = (ExceptionCaughtLineNumberRenderer) cr; if (frame != null) renderer.IsUserCode = (bool) model.GetValue (iter, (int) ModelColumn.IsUserCode); else renderer.IsUserCode = false; renderer.LineNumber = frame != null && !string.IsNullOrEmpty (frame.File) ? frame.Line : -1; }
/// <summary> /// Returns class responsible for cell layout. /// </summary> /// <returns>Cell layout class.</returns> protected internal virtual CellLayout GetCellLayout() { if (m_CellLayout == null) m_CellLayout = new CellLayout(this.LayoutSettings); return m_CellLayout; }
void RuntimeRenderCell (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter) { var target = (ExecutionTarget) model.GetValue (iter, RuntimeExecutionTarget); var indent = (bool) model.GetValue (iter, RuntimeIsIndented); var renderer = (CellRendererText) cell; renderer.Sensitive = !(target is ExecutionTargetGroup); if (target == null) { renderer.Xpad = (uint) 0; return; } renderer.Xpad = indent ? (uint) 18 : (uint) 3; if (!runtimeCombo.PopupShown) renderer.Text = target.FullName; else renderer.Text = target.Name; }
static void StackFrameLayout (CellLayout layout, CellRenderer cr, TreeModel model, TreeIter iter) { var frame = (ExceptionStackFrame)model.GetValue (iter, (int)ModelColumn.StackFrame); var renderer = (StackFrameCellRenderer)cr; renderer.Markup = (string)model.GetValue (iter, (int)ModelColumn.Markup); renderer.Frame = frame; if (frame == null) { renderer.IsUserCode = false; return; } renderer.IsUserCode = (bool)model.GetValue (iter, (int)ModelColumn.IsUserCode); }