Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ryzhpolsos/redeye/llms.txt
Use this file to discover all available pages before exploring further.
IShellWidget is the contract that every widget in RedEye must satisfy. Whether you are using a built-in widget or writing a custom one in a plugin, the shell interacts with it exclusively through this interface. It covers the full widget lifecycle: post-initialization, config reads and writes, control creation, thread-safe updates, and event registration.
IShellWidget interface
IShellWidget lives in RedEye.UI and extends IComponent. The BaseShellWidget abstract class in RedEye.UI provides a complete default implementation that you can subclass in plugin widgets.
PostInitialize
Called by the shell after all widgets in the window have been initialized and their controls added to the layout. Use it to perform tasks that depend on other widgets existing, such as reparenting a control or attaching event handlers to sibling widgets.GetNode / SetNode
Provides access to theConfigNode that this widget was constructed from. The node is the live XML element in the config tree, so reading attributes from it reflects any runtime variable changes.
The config node associated with this widget instance.
GetConfig / SetConfig
Returns or replaces the currentShellWidgetConfig for this widget. SetConfig is called by the shell during widget construction; you can call GetConfig at any time to inspect the current state.
The new configuration to apply. If
Id is empty, SetConfig assigns a new GUID automatically.UpdateConfig
Re-reads all standardShellWidgetConfig fields from the backing ConfigNode, evaluating any expressions in attribute values. The base class implementation handles all fields declared in ShellWidgetConfig. Override this method in a subclass to read additional widget-specific attributes.
GetContainer / SetContainer
Gets or sets theIContainerWidget that owns this widget. Container widgets such as panels or stack layouts call SetContainer on their children during initialization.
GetWindow / SetWindow
Gets or sets theIShellWindow that hosts this widget. The shell sets this before calling Initialize().
GetControl
Returns the underlyingSystem.Windows.Forms.Control. When update is true (the default), UpdateControl() is called first to apply any pending config changes.
When
true, UpdateControl() is called before the control is returned. Pass false if you need the control reference without triggering a redraw.Control: the WinForms control that backs this widget.
UpdateControl
Applies the currentShellWidgetConfig values to the underlying WinForms control — position, size, colors, font, dock, anchor, padding, margin, and any on* event attributes declared in the config node. This method is thread-safe: it marshals to the UI thread when called from a background thread.
Update
CallsUpdateConfig() followed by UpdateControl() in a single thread-safe operation. Use this when you want to pull fresh values from the config node and immediately reflect them in the control.
Modify
Runs a callback withthis as the argument, then calls UpdateConfig() and UpdateControl(). The entire operation is marshaled to the UI thread. Use this for atomic config mutations that must stay consistent with the visible control state.
An action that receives the widget instance and may modify its config or internal state.
UpdateConfig() and UpdateControl() are called automatically after the callback returns.RegisterEventHandler
Registers a callback for a named widget event. The event name corresponds to a WinForms event on the underlying control, such as"Click", "MouseEnter", or "MouseLeave". The handler receives a ShellWidgetEvent with coordinate and key information.
The WinForms event name to subscribe to, without the
on prefix. For example, "Click" not "onClick".The callback invoked when the event fires.
ShellWidgetConfig class
ShellWidgetConfig is the data class that holds the resolved values for all standard widget attributes. It is populated by UpdateConfig() from the widget’s backing ConfigNode.
Unique identifier for the widget. Used by container widgets to look up children. If empty, a GUID is assigned automatically by
SetConfig.Left position of the control relative to its parent container, in pixels.
Top position of the control relative to its parent container, in pixels.
Width of the control in pixels. Ignored when
AutoSize is true.Height of the control in pixels. Ignored when
AutoSize is true.When
true, the control sizes itself to fit its content.Dock style as a string, e.g.
"Top", "Bottom", "Fill". Maps to System.Windows.Forms.DockStyle.Anchor style as a string, e.g.
"Top,Left". Maps to System.Windows.Forms.AnchorStyles.Foreground text color as an HTML color string, e.g.
"#ffffff".Background color as an HTML color string, e.g.
"#1a1a1a".Inner padding in the format
"all" or "left,top,right,bottom", e.g. "4" or "0,4,0,4".Outer margin in the same format as
Padding.Font specification string parsed by
ParseHelper.ParseFont, e.g. "Segoe UI, 10, Bold".When greater than
0, UpdateConfig() and UpdateControl() are called on a background timer at this interval in milliseconds. Useful for widgets that display live data.Tooltip text shown on mouse hover. Empty string disables the tooltip.
Z-order layer for this widget within its container. Higher values appear on top.
When
true, the control’s background color is set to Color.Transparent.The color used as the transparency key when
IsTransparent is true. Defaults to magenta (#ff00ff).ID of another widget to reparent this control to during
PostInitialize. When set, the control is nested inside the named widget’s control.ShellWidgetEvent class
ShellWidgetEvent is passed to handlers registered via RegisterEventHandler.
X coordinate of the event (e.g. mouse position within the control), in pixels.
Y coordinate of the event.
Name of the event that fired.
Name of the key involved in key events, or an empty string for pointer events.
Implementing a custom widget
SubclassBaseShellWidget and override the methods relevant to your widget. At minimum you need to create a WinForms control in Initialize() and assign it to Control.
Main() in your Plugin subclass:
Using Update() vs UpdateControl()
Registering a click handler from PostInitialize
Related
IShellWindow
The window interface that hosts widget instances.
Exporting widgets
How to register a custom IShellWidget implementation as a plugin export.