RaptorSuitePanelDescriptor
Immutable registration data for a Suite panel.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Creating a descriptor does not create its panel.
public sealed class RaptorSuitePanelDescriptorConstructors
RaptorSuitePanelDescriptor
public RaptorSuitePanelDescriptor(string id, string title, RaptorSuiteRegion region, Func<RaptorSuiteContext, RaptorSuitePanel> create, int order = 0, int stateVersion = 1, bool defaultVisible = true, bool defaultDrawer = false, RaptorSuiteRegion? dockRegion = null, float drawerWidth = 0f, bool defaultPinned = false, bool dockable = true, string icon = null)Creates a descriptor. Throws on a blank id or title, a null create or an invalid region.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | The panel's stable id. | |
title | string | The panel's title. | |
region | RaptorSuiteRegion | The window edge the panel belongs to. | |
create | Func<RaptorSuiteContext, RaptorSuitePanel> | Creates the panel. | |
order | int | 0 | The panel's position on its edge. |
stateVersion | int | 1 | The version passed to RestoreState. |
defaultVisible | bool | true | Whether the panel is shown the first time. |
defaultDrawer | bool | false | Whether the panel starts as a drawer tab. |
dockRegion | RaptorSuiteRegion? | null | Where Dock in layout puts it; null uses region. |
drawerWidth | float | 0f | The natural drawer width; 0 uses half the window. |
defaultPinned | bool | false | Whether the drawer starts pinned. |
dockable | bool | true | Whether Dock in layout is offered. |
icon | string | null | An icon name, or null. |
Properties
Create
public Func<RaptorSuiteContext, RaptorSuitePanel> Create { get; }Creates the panel.
DefaultDrawer
public bool DefaultDrawer { get; }Whether the panel starts as a drawer tab on its region's edge instead of docked in the layout.
DefaultPinned
public bool DefaultPinned { get; }Whether the drawer starts pinned. A pinned drawer stays open while you work in the views. The UV editor uses this.
DefaultVisible
public bool DefaultVisible { get; }Whether the panel is shown the first time.
Dockable
public bool Dockable { get; }Whether "Dock in layout" is offered. False for a drawer-only tool such as the UV editor.
DockRegion
public RaptorSuiteRegion DockRegion { get; }Where "Dock in layout" puts the panel. Defaults to its region. The panel's side tab stays on Region's edge.
DrawerWidth
public float DrawerWidth { get; }The panel's natural drawer width in points. 0 uses half the window, which suits large browsers.
Icon
public string Icon { get; }The panel's icon name, such as "tool-logic", used on its side tab, its header and in the Panels menu. When null, the Suite uses its built-in icon for the id, or else the generic panel icon.
Id
public string Id { get; }The panel's stable id.
Order
public int Order { get; }The panel's position on its edge. Lower comes first.
Region
public RaptorSuiteRegion Region { get; }The window edge the panel belongs to.
StateVersion
public int StateVersion { get; }The version passed to RestoreState.
Title
public string Title { get; }The panel's title.
Related types
- RaptorSuiteContext: Reads the current editor state without keeping references to the selection or scene objects.
- RaptorSuiteRegion: Which side of the Suite a panel opens on.
- RaptorSuitePanel: The base class for a panel in a Suite window.