RaptorSuiteShortcutRows
Rows a module adds to Settings → Hotkeys.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Each owner registers its rows once, after an anchor row id (a Suite row, a Mesh row or another owner's row) or at EndOfMesh. Compose merges them into the Suite's rows. Registering the same owner id again replaces its rows. Anchors are resolved when the table is composed, so module load order does not matter.
Owners on the same anchor are sorted by order, then registration order. An owner whose anchor row does not exist falls back to EndOfMesh. A row whose id is already in the table is dropped.
public static class RaptorSuiteShortcutRowsFields
EndOfMesh
public const string EndOfMesh;The anchor after every Suite and Mesh row, at the end of the Suite's table.
Properties
Owners
public static IReadOnlyList<string> Owners { get; }Gets the registered owner ids in registration order.
Methods
Compose
public static RaptorSuiteShortcutRow[] Compose(IReadOnlyList<(string id, string title, string help)> suiteRows)Returns the full Settings → Hotkeys table: suiteRows (the Suite's rows, Mesh rows last) with each owner's rows merged in at their anchors. Hidden rows are included with Hidden set; the page does not draw them.
| Parameter | Type | Description |
|---|---|---|
suiteRows | IReadOnlyList<(string id, string title, string help)> | The Suite's rows. |
Returns: The table.
ComposeIds
public static string[] ComposeIds(IReadOnlyList<(string id, string title, string help)> suiteRows)Returns the ids from Compose, including hidden rows, for the id table.
| Parameter | Type | Description |
|---|---|---|
suiteRows | IReadOnlyList<(string id, string title, string help)> | The Suite's rows. |
Returns: The ids.
Register
public static void Register(string ownerId, IEnumerable<(string id, string title, string help)> rows, string after = EndOfMesh, IEnumerable<string> hiddenIds = null, int order = 0)Adds or replaces an owner's rows, placed after the row after. hiddenIds names this owner's rows that stay in the id table but are not shown. Rows with an empty id are skipped. A null or empty owner id, or null rows, is ignored.
| Parameter | Type | Default | Description |
|---|---|---|---|
ownerId | string | The owner's stable id. | |
rows | IEnumerable<(string id, string title, string help)> | The rows: shortcut id, title and help. | |
after | string | EndOfMesh | The row id to go after. |
hiddenIds | IEnumerable<string> | null | Shortcut ids the table hides, or null. |
order | int | 0 | Lower comes first; ties keep registration order. |
Call from an [InitializeOnLoad] static constructor on the main thread.
SetIcon
public static void SetIcon(string shortcutId, string icon)Sets the icon a Settings → Hotkeys row draws for shortcutId (a RAPTOR icon name such as "lx-cut"). Null or empty clears it. A module row with none draws the module mark.
| Parameter | Type | Description |
|---|---|---|
shortcutId | string | The Shortcut Manager id. |
icon | string | The icon name, or null. |
Call from an [InitializeOnLoad] static constructor on the main thread. Calling it again with the same values changes nothing.
Unregister
public static bool Unregister(string ownerId)Removes the rows of ownerId.
| Parameter | Type | Description |
|---|---|---|
ownerId | string | The owner's stable id. |
Returns: False when the owner had no rows.
Events
Changed
public static event Action Changed;Raised after Register or Unregister. A listener that throws is logged.
Related types
- RaptorSuiteShortcutRow: A Settings → Hotkeys row with its Shortcut Manager id, title, help line and owner.