RaptorSuitePanel
The base class for a panel in a Suite window.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Each instance belongs to one Suite window. Hiding a panel does not dispose it.
public abstract class RaptorSuitePanel : IDisposableProperties
HasUnsavedWork
public virtual bool HasUnsavedWork { get; }Whether the panel has work that Cancel would lose. When true, the panel's side tab shows a mark and the host does not discard the work silently.
Methods
Dispose
public virtual void Dispose()Called when the panel is destroyed. Release anything it holds.
OnGUI
public abstract void OnGUI(Rect rect)Draws the panel.
| Parameter | Type | Description |
|---|---|---|
rect | Rect | The panel's rect. |
OnHide
public virtual void OnHide()Called when the panel is hidden.
OnShow
public virtual void OnShow()Called when the panel is shown.
RestoreState
public virtual void RestoreState(string state, int version)Restores the state that SaveState returned.
| Parameter | Type | Description |
|---|---|---|
state | string | The saved state. |
version | int | The descriptor's state version when it was saved. |
SaveState
public virtual string SaveState()Gets the panel's state for the window to keep.
Returns: The state as a string, or null.