/// <summary> /// Initializes an instance of the widget class /// </summary> /// <param name="control">The .NET Control that represents this widget</param> public Widget(Control control) { UIControl = control; _children = new List<Widget>(); Value = String.Empty; SubClass = String.Empty; Panel = String.Empty; Colors = null; graphicsPath = null; LayoutXmlNode = null; _layout = null; Parent = null; AddForAnimation = true; IsHighlightOn = false; DrawBorder = false; IsSelectedHighlightOn = false; _enabled = true; EnabledState = EnabledStates.Enabled; _contextualWidgets = new List<Widget>(); _finder = new WidgetFinder(this); if (control != null) { widgetName = UIControl.Name; if (this is IButtonWidget) { control.MouseClick += control_MouseClick; } control.Resize += control_Resize; } else { widgetName = string.Empty; } }
/// <summary> /// Sets the layout that this widget is a part of /// </summary> /// <param name="layout"></param> internal void SetLayout(Layout layout) { _layout = layout; }
/// <summary> /// Initializes a new instance of WidgetManager /// </summary> public WidgetManager(Control control) { if (_widgetTypeCollection == null) { _widgetTypeCollection = loadWidgetTypeCollection(); } _widgetAttributes = new WidgetAttributes(); _layout = new Layout(); _rootWidget = new Widget(control); Log.Debug("control name is : " + control.Name); Log.Debug("_rootWidget.name is : " + _rootWidget.Name); }
/// <summary> /// Initializes a new instance of WidgetManager /// </summary> public WidgetManager(Control control) { _widgetAttributes = new WidgetAttributes(); _layout = new Layout(); _rootWidget = new Widget(control); Log.Debug("control name is : " + control.Name); Log.Debug("_rootWidget.name is : " + _rootWidget.Name); }