/// <summary> /// Moves the item towards the expression's end. /// </summary> /// <param name="widget"> /// A <see cref="ExpressionItemWidget"/> /// </param> public void MoveItemFordwards(ExpressionItemWidget widget) { int position = (expItemsBox[widget] as Gtk.Box.BoxChild).Position; expItemsBox.ReorderChild(widget, position + 1); widget.CheckPosition(); (expItemsBox.Children[position] as ExpressionItemWidget).CheckPosition(); }
private void Reparent(Widget widget, HBox box, int index) { if (widget.Parent == box) { return; } if (widget.Parent == null) { box.PackStart(widget, false, false, 0); } else { widget.Reparent(box); box.SetChildPacking(widget, false, false, 0, PackType.Start); } box.ReorderChild(widget, index); widget.Show(); }
void UpdateImage() { if (string.IsNullOrEmpty (icon)) { if (image != null) { box.Remove (image); image.Destroy (); image = null; } return; } if (image == null) { image = new Gtk.Image (); int w, h; Gtk.Icon.SizeLookup (iconSize, out w, out h); image.IconSize = w; box.PackStart (image, false, false, 0); box.ReorderChild (image, 0); } image.Pixbuf = ImageService.GetPixbuf (icon, iconSize); }
void UpdateImage() { if (string.IsNullOrEmpty(icon)) { if (image != null) { box.Remove(image); image.Destroy(); image = null; } return; } if (image == null) { image = new ImageView(); box.PackStart(image, false, false, 0); box.ReorderChild(image, 0); } image.Image = ImageService.GetIcon(icon, iconSize); }
public void ShowMessage(Image image, string message, bool isMarkup) { if (message == lastText) { return; } sourcePad = null; lastText = message; DispatchService.AssertGuiThread(); if (currentStatusImage != image) { if (currentStatusImage != null) { messageBox.Remove(currentStatusImage); } currentStatusImage = image; if (image != null) { image.SetPadding(0, 0); messageBox.PackStart(image, false, false, 3); messageBox.ReorderChild(image, 1); image.Show(); } } string txt = !String.IsNullOrEmpty(message) ? " " + message.Replace("\n", " ") : ""; if (isMarkup) { statusLabel.Markup = txt; } else { statusLabel.Text = txt; } }