/// <summary> /// <see cref="ExpressionRuleCallWidget"/>'s constructor. /// </summary> /// <param name="container"> /// A <see cref="IExpressionItemContainer"/> /// </param> public ExpressionGroupWidget(IExpressionItemContainer container) : base(container) { // We load the glade widgets. Glade.XML gladeXml = new XML("mathtextrecognizer.glade", "expressionGroupWidgetBase"); gladeXml.Autoconnect(this); this.Add(expressionGroupWidgetBase); this.HeightRequest = expressionGroupWidgetBase.HeightRequest; // The menu is created. addItemMenu = new AddSubItemMenu(this); // We tell the widget to redraw itself when the size is changed, // fixs some graphical glitches. expGroupItemsScroller.Hadjustment.ValueChanged += delegate(object sender, EventArgs args) { expGroupItemsScroller.QueueDraw(); }; this.ShowAll(); }
/// <summary> /// Intilialize the widget's children widgets. /// </summary> private void InitializeWidgets() { addSubItemMenu = new AddSubItemMenu(this); expItemsScroller.Hadjustment.ValueChanged += delegate(object sender, EventArgs args) { expItemsScroller.QueueDraw(); }; }
/// <summary> /// <see cref="ExpressionItemOptionsDialog"/>'s constructor. /// </summary> public ExpressionItemOptionsDialog(Window parent, Type expressionType) { XML gladeXml = new XML("mathtextrecognizer.glade", "expressionItemOptionsDialog"); gladeXml.Autoconnect(this); addItemMenu = new AddSubItemMenu(this); this.expressionItemOptionsDialog.TransientFor = parent; InitializeWidgets(expressionType); }
/// <summary> /// Intilialize the widget's children widgets. /// </summary> private void InitializeWidgets() { addSubItemMenu = new AddSubItemMenu(this); expItemsScroller.Hadjustment.ValueChanged+= delegate(object sender, EventArgs args) { expItemsScroller.QueueDraw(); }; }