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.
IConfig is the central interface for reading and working with RedEye’s XML configuration. It loads config.xml on startup, exposes the parsed node tree, and provides utilities for constructing new nodes at runtime. Every plugin receives a pre-initialized IConfig instance through the Config property on the Plugin base class.
IConfig interface
IConfig lives in the RedEye.Core namespace and extends IComponent. Use it to load config files, resolve file-system paths relative to the RedEye installation directory, and obtain the root or layout node tree.
LoadConfig
Parsesconfig.xml from the application directory, processes all child nodes, and registers hotkeys, windows, and layout nodes. Returns this to allow chaining.
LoadConfig() is called once by the shell on startup. Plugins do not need to call it. Use GetRootNode() or GetLayoutNode() to access the already-loaded tree.GetAppDirectory
Returns the absolute path to the directory containing the RedEye executable.string: absolute path, e.g. C:\RedEye\.
GetPath
Resolves one or more relative path segments against the application directory. If the combined path is already rooted, it is returned as-is.One or more path segments to combine and resolve. Equivalent to calling
Path.Combine and then prepending the app directory when the result is not already rooted.string: the resolved absolute path.
GetRootNode
Returns theConfigNode for the document root (<root>). All configuration data is accessible by traversing its children.
ConfigNode: the root node of the loaded config tree.
GetLayoutNode
Returns theConfigNode for the <layout> element inside <config>. This is the starting point for all window and widget definitions.
ConfigNode: the layout node (config → layout).
LoadFile
Parses an XML file and appends the resulting nodes as children ofparentNode. The file path is resolved relative to the application directory.
Path to the XML file relative to the RedEye application directory.
The node that will receive the parsed XML as child nodes.
LoadString
Parses a raw XML string and appends the resulting nodes as children ofparentNode.
A valid XML string to parse. Must have a single root element.
The node that will receive the parsed XML as child nodes.
CreateNode
Creates a new empty virtualConfigNode with the given name. Virtual nodes are not backed by an XML document and cannot be saved to disk.
Element name for the new node.
ConfigNode: a new empty node.
CreateNodeFromString
Parses a snippet of XML and returns the first element as aConfigNode.
XML string. The outermost element becomes the returned node.
ConfigNode: the parsed node.
ConfigNode
ConfigNode is the core tree type used throughout RedEye. Every element in config.xml is represented as a ConfigNode. Attributes are evaluated through the expression parser before being returned, so they support variables and built-in functions.
Properties
The XML element name of this node, e.g.
"window" or "label".The text content of the element. Evaluated through the expression parser via
GetValue(). Use GetRawValue() to skip evaluation.true when the node was created with a non-null text value.true when this node represents an attribute node rather than an element.The direct parent node, or
null for the root.Walks up the parent chain and returns the topmost ancestor. Returns
this if there is no parent.true for nodes created with CreateNode() or CreateNodeFromString(). Virtual nodes cannot be saved to disk.GetAttribute
Returns the value of the named attribute, evaluated through the expression parser. ReturnsdefaultValue (default: empty string) when the attribute is absent.
Attribute name to look up.
Value to return when the attribute is absent. Defaults to an empty string.
GetRawAttribute
Returns the raw, unevaluated value of the named attribute, bypassing the expression parser.GetAttributes
Returns the names of all attributes set on this node.SetAttribute
Sets or updates the named attribute. Triggers any registered event watchers with aSetAttribute event.
Attribute name to set.
New attribute value.
GetNodes
Returns all child nodes after processing special directives (<if>, <import>, <variables>, etc.). Overloads allow filtering by name or predicate.
When provided, returns only child nodes whose
Name equals this value.GetNode
Returns the first child node with the given name, ornull if none exists.
TryGetNode
Attempts to find the first child node by name. Returnstrue and sets node on success.
AddNode
Appends a child node and firesAddNode event watchers.
Variables
ConfigNode implements IVariableStorage<string>, providing scoped variables that propagate up the parent chain when read.
Event watchers
You can subscribe to mutations on a node usingAddEventWatcher. The isRecursive flag propagates the watcher to all child nodes added in the future.
ConfigNodeEvent includes:
EventType— one ofAddNode,RemoveNode,SetAttribute,SetVariableNode— the node that owns the watcherAddedNode/RemovedNode— the affected child nodeOldAttributeValue/NewAttributeValue— for attribute changesOldVariableValue/NewVariableValue— for variable changes
Usage examples
Reading config values from a plugin
Creating and populating a virtual node
Loading a config fragment from a string
Resolving a path to a plugin asset
Related
Plugin API reference
Overview of all services available to plugins, including the Config property.
Configuration overview
How config.xml is structured and how the node tree is loaded at startup.