Skip to main content

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.

RedEye ships with twelve built-in widgets that cover the most common desktop UI needs: text, buttons, images, layout containers, live window and application lists, a text input, an embedded browser, a context menu, and an external process host. Each widget is declared as an XML element inside a <window> in your RWML layout files. All widgets also accept the common attributes defined by BaseShellWidgetx, y, width, height, dock, margin, padding, color, backgroundColor, font, id, toolTip, and event handlers.
Renders a read-only text label using a Windows Forms Label control. Use it for window titles, clock readouts, status text, or any content that is driven by an expression.

Widget-specific attributes

text
string
The text to display. Supports RWML expressions, so you can interpolate variables: text="${window.title}".
align
string
default:"topLeft"
Text alignment within the control bounds. Accepts any System.Drawing.ContentAlignment value: topLeft, topCenter, topRight, middleLeft, middleCenter, middleRight, bottomLeft, bottomCenter, bottomRight.

Example

<label
  text="${app.name}"
  x="${startMenu.item.size}"
  y="0"
  width="calc('${startMenu.width} - ${startMenu.item.size}')"
  height="${startMenu.item.size}"
  align="middleLeft" />
Renders a standard Windows Forms Button control. Supports a borderless flat style with custom hover and pressed colors.

Widget-specific attributes

text
string
Label text displayed on the button face.
border
string
Set to none to render the button in flat style with no border. When none, the hoverColor and pressedColor attributes become active.
hoverColor
string
Background color when the mouse is over the button. Only applies when border="none". Accepts an HTML color string.
pressedColor
string
Background color while the button is held down. Only applies when border="none". Accepts an HTML color string.

Example

<button
  dock="fill"
  table.position="0,6"
  text="Lock"
  margin="${theme.paddingMiddle},${theme.paddingMiddle},${theme.paddingSmall},${theme.paddingSmall}"
  attrList="flatButton"
  onClick="shellExecuteHidden('rundll32.exe', 'user32,LockWorkStation')" />
Renders a Windows Forms PictureBox control. Images are loaded through the resource manager using res.loadImage or res.loadIcon expression functions, or provided as resource IDs stored in variables (for example, ${window.icon} set by <windowList>).

Widget-specific attributes

src
string
required
Resource ID of the image to display. Typically the result of res.loadImage(path), res.loadIcon(path), or a variable holding a dynamically loaded bitmap such as ${window.icon}.
sizeMode
string
default:"stretchImage"
How the image fills the control bounds. Accepts any System.Windows.Forms.PictureBoxSizeMode value: normal, stretchImage, autoSize, centerImage, zoom.
imageWidth
number
Resize the loaded image to this width before assigning it to the control. Useful when the source image is larger than needed.
imageHeight
number
Resize the loaded image to this height. Pair with imageWidth to constrain both dimensions.

Example

<image
  id="icon"
  src="${window.icon}"
  dock="fill"
  onClick="wapi.toggleWindow(${window.handle})"
  toolTip="${window.title}" />
A general-purpose container widget backed by a Windows Forms Panel. Child widgets are declared as nested XML elements. The panel propagates UpdateConfig and UpdateControl to all children.<panel> accepts no widget-specific attributes beyond the common set. Its primary purpose is grouping, background color, padding, and click-target areas.

Example

<panel
  width="${taskbar.item.size}"
  height="${taskbar.item.size}"
  margin="${theme.paddingMiddle},${theme.paddingMiddle},0,${theme.paddingMiddle}"
  padding="${theme.paddingMiddle}"
  backgroundColor="if(${window.isActive}, ${theme.color.backgroundActive}, ${theme.color.backgroundChild})">

  <image
    id="icon"
    src="${window.icon}"
    dock="fill"
    onClick="wapi.toggleWindow(${window.handle})"
    toolTip="${window.title}" />

</panel>
A container backed by a Windows Forms FlowLayoutPanel. Child widgets are arranged automatically in a single flow direction, optionally wrapping to the next line when space runs out.

Widget-specific attributes

direction
string
default:"leftToRight"
Flow direction for child widgets. Accepts any System.Windows.Forms.FlowDirection value: leftToRight, rightToLeft, topDown, bottomUp.
wrap
boolean
default:"false"
When true, child widgets wrap to the next row or column when the panel edge is reached.

Example

<flowPanel
  dock="fill"
  direction="leftToRight"
  wrap="false"
  backgroundColor="${theme.color.background}">

  <button text="One" width="80" height="30" />
  <button text="Two" width="80" height="30" />

</flowPanel>
A container backed by a Windows Forms TableLayoutPanel. Child widgets are placed into cells by providing a table.position attribute on each child. Rows and columns each receive an equal percentage of the panel’s size.

Widget-specific attributes

rowCount
number
Total number of rows in the grid. Row heights are divided equally.
columnCount
number
Total number of columns in the grid. Column widths are divided equally.
growStyle
string
Controls how the table grows when content overflows. Accepts any System.Windows.Forms.TableLayoutPanelGrowStyle value: fixedSize, addRows, addColumns.

Child widget placement attributes

These attributes are placed on child widgets, not on <tablePanel> itself.
table.position
string
Comma-separated column,row index (zero-based) of the cell to place the child widget into. Example: table.position="1,2" places the widget in column 1, row 2.
table.rowSpan
number
Number of rows the child widget spans.
table.columnSpan
number
Number of columns the child widget spans.
Cell placement is finalized during PostInitialize, after all widgets in the window have been created. Adding children at runtime is not supported.

Example

<tablePanel dock="fill" rowCount="10" columnCount="2" font="${theme.font.main}" color="${theme.font.color}">

  <appList dock="fill" table.position="0,0" table.rowSpan="8" table.columnSpan="2">
    <!-- item template -->
  </appList>

  <button dock="fill" table.position="0,6" text="Lock"
    onClick="shellExecuteHidden('rundll32.exe', 'user32,LockWorkStation')" />

  <button dock="fill" table.position="1,6" text="Log off"
    onClick="shellExecuteHidden('shutdown.exe', '/l')" />

</tablePanel>
A single-line or multi-line text input backed by a Windows Forms TextBox. As the user types, the current value is written into a named RWML variable so other widgets can read it via expressions.

Widget-specific attributes

text
string
Initial text content of the input field.
output
string
required
Name of the RWML variable that receives the current input value on every TextChanged event. Other widgets can reference this variable as ${variableName}.
multiLine
boolean
default:"false"
When true, the text box accepts multiple lines of input.

Example

<textBox
  output="search.query"
  width="200"
  height="30"
  text="Search..." />
Embeds a Windows Forms WebBrowser control (Internet Explorer engine). Useful for displaying HTML-based widgets such as clocks, charts, or custom UI rendered from local HTML files.

Widget-specific attributes

url
string
URL to navigate to. Mutually exclusive with fileName and content.
fileName
string
Path to a local HTML file whose contents are loaded as the document. Mutually exclusive with url and content.
content
string
Inline HTML string to use as the document. Mutually exclusive with url and fileName.
allowScroll
boolean
default:"false"
When true, vertical and horizontal scroll bars are shown when content overflows.
You can also provide HTML content as the inner text of the <webView> element instead of using the content attribute.
<webView> uses the legacy Internet Explorer rendering engine bundled with Windows. Modern JavaScript frameworks may not work correctly. For advanced web content, consider using a Chromium-based approach via a plugin.

Example

<webView
  dock="fill"
  fileName="config/ui/widgets/clock.html"
  allowScroll="false" />
Displays the list of currently open desktop windows as a flow of repeated item widgets. Each item is built from a child template node. When windows open, close, activate, or change state, the list updates automatically by listening to the shell event stream.

Widget-specific attributes

direction
string
default:"horizontal"
Layout direction for item widgets. horizontal flows items left-to-right; vertical flows them top-to-bottom.

Template node

The single direct child element of <windowList> is the item template. It is instantiated once per open window. Inside the template you can reference the following variables:
VariableTypeDescription
${window.handle}stringWin32 HWND as a decimal integer
${window.title}stringWindow title bar text
${window.icon}stringResource ID of the window’s icon bitmap
${window.isActive}boolean stringtrue when the window has focus
${window.isMinimized}boolean stringtrue when the window is minimized
${window.showCmd}stringShowCmd value from WINDOWPLACEMENT

Example

<windowList
  x="${taskbar.item.size}"
  y="0"
  width="calc('${taskbar.width} - ${taskbar.tray.width} - ${taskbar.item.size}')"
  height="${taskbar.height}">

  <!-- Item template — one instance per open window -->
  <panel
    width="${taskbar.item.size}"
    height="${taskbar.item.size}"
    margin="${theme.paddingMiddle},${theme.paddingMiddle},0,${theme.paddingMiddle}"
    padding="${theme.paddingMiddle}"
    backgroundColor="if(${window.isActive}, ${theme.color.backgroundActive}, ${theme.color.backgroundChild})">

    <image
      id="icon"
      src="${window.icon}"
      dock="fill"
      onClick="wapi.toggleWindow(${window.handle})"
      toolTip="${window.title}" />

    <contextMenu for="icon">
      <item action="wapi.closeWindow(${window.handle})">Close window</item>
      <item action="killProcess(${window.handle})">Kill process</item>
    </contextMenu>

  </panel>
</windowList>
Displays the list of installed applications sourced from the system’s Start Menu special folder. Each application is rendered from a single child template node. The list is built once at initialization.

Widget-specific attributes

<appList> has no widget-specific attributes. Place it inside a scrollable container (such as a <tablePanel> with autoScroll) to handle long lists.

Template node

The single direct child of <appList> is the item template. Inside the template you can reference the following variables:
VariableTypeDescription
${app.name}stringDisplay name of the application
${app.command}stringLaunch command or path
${app.icon}stringResource ID of the application’s icon bitmap

Example

<appList dock="fill" table.position="0,0" table.rowSpan="8" table.columnSpan="2">

  <!-- Item template — one instance per installed application -->
  <panel dock="fill" height="${startMenu.item.size}" onClick="shellExecute(${app.command})">
    <image
      src="${app.icon}"
      x="0" y="0"
      width="${startMenu.item.size}"
      height="${startMenu.item.size}" />
    <label
      text="${app.name}"
      x="${startMenu.item.size}" y="0"
      width="calc('${startMenu.width} - ${startMenu.item.size}')"
      height="${startMenu.item.size}"
      align="middleLeft" />
  </panel>

</appList>
Attaches a ContextMenuStrip to another widget in the same container or window. Menu items are defined as <item> child elements. When the user right-clicks the target widget, the menu appears.

Widget-specific attributes

for
string
required
id of the widget to attach the context menu to. The target widget must be in the same container or window.

Item child elements

Each direct child <item> element defines one menu entry. The inner text is the label shown in the menu. The action attribute holds an RWML expression that is evaluated when the item is clicked.
<item action="expression">Menu item label</item>

Example

<image id="icon" src="${window.icon}" dock="fill" />

<contextMenu for="icon">
  <item action="wapi.closeWindow(${window.handle})">Close window</item>
  <item action="killProcess(${window.handle})">Kill process</item>
</contextMenu>
<contextMenu> does not render a visible control. It exists only to wire up the menu strip to its target widget during PostInitialize.
Launches an external process and reparents its main window into a panel inside your shell layout. Useful for embedding system tray applets, media player controls, or other Windows applications directly in your desktop surfaces.The process is started during PostInitialize. RedEye finds the target window by class name, class regex, title regex, or main window handle, then calls SetParent to embed it.

Widget-specific attributes

fileName
string
required
Executable path to launch.
arguments
string
Command-line arguments passed to the process.
class
string
Exact Win32 window class name of the target window. Checked first; takes priority over classMatch and titleMatch.
classMatch
string
Regular expression matched against the Win32 class name of each visible window. Used when class is not specified.
titleMatch
string
Regular expression matched against the window title of each visible window. Used as a fallback when neither class nor classMatch finds a match.
Reparenting a window that was not designed to be embedded can cause visual glitches, input focus issues, or crashes. Test thoroughly before shipping a layout that uses <externalProcess>.

Example

<externalProcess
  x="0" y="0"
  width="200" height="30"
  fileName="C:\Windows\System32\notepad.exe"
  titleMatch="Notepad" />

Build docs developers (and LLMs) love