# Editor.PanelWindow

An OS window whose entire contents are panel UI. It owns the window, its swap chain and the UI
inside it. Its input comes straight from SDL and never touches the engine's input system -
there's no widget toolkit involved anywhere.

Editor only. A game has one window and draws its UI into that.

- Kind: class
- Namespace: `Editor`
- Assembly: `Sandbox.Tools`
- Modifiers: sealed

## Constructors

- [`PanelWindow`](/api/Editor.PanelWindow/.ctor): Open a window and start running UI in it.

## Properties

- [`All`](/api/Editor.PanelWindow/All): Every window that's currently open.
- [`AllowNestedFrame`](/api/Editor.PanelWindow/AllowNestedFrame): Let frames run inside a frame that's already running - see IPanelWindow.
- [`AlwaysFullFrameRate`](/api/Editor.PanelWindow/AlwaysFullFrameRate): Keep drawing at the display's frame rate even when nobody is looking at this window. Idle windows are paced right down - set this for one with something moving in it that has to keep moving, like a video or a live preview.
- [`BackgroundColor`](/api/Editor.PanelWindow/BackgroundColor): What the window clears to before the UI is drawn.
- [`Borderless`](/api/Editor.PanelWindow/Borderless): True if we're drawing the title bar and borders ourselves.
- [`CanMaximize`](/api/Editor.PanelWindow/CanMaximize): Whether the OS is allowed to maximize the window - the caption button, double clicking the title bar, Win+Up, snap. Windows drawing their own chrome check this for their maximize button too.
- [`Focused`](/api/Editor.PanelWindow/Focused): The window the OS is giving keyboard input to, if it's one of ours.
- [`IsFocused`](/api/Editor.PanelWindow/IsFocused): Does this window have keyboard focus?
- [`IsMaximized`](/api/Editor.PanelWindow/IsMaximized): Is the window maximized?
- [`IsOpen`](/api/Editor.PanelWindow/IsOpen): Is this window still open?
- [`MaxSize`](/api/Editor.PanelWindow/MaxSize): The largest the user can resize the window to. Zero means no limit.
- [`MinSize`](/api/Editor.PanelWindow/MinSize): The smallest the user can resize the window to. Zero means no limit.
- [`MousePosition`](/api/Editor.PanelWindow/MousePosition): Where the cursor is, in this window's pixels.
- [`OnCloseRequested`](/api/Editor.PanelWindow/OnCloseRequested): Called when the user clicks the window's close button. The window closes if this is null.
- [`Position`](/api/Editor.PanelWindow/Position): Position of the window on the desktop, in pixels.
- [`ResizeBorder`](/api/Editor.PanelWindow/ResizeBorder): How far from the edge of a borderless window counts as a resize handle, in pixels.
- [`Root`](/api/Editor.PanelWindow/Root): The panel everything in this window hangs off.
- [`Size`](/api/Editor.PanelWindow/Size): Size of the window's client area, in pixels.
- [`SizeToContents`](/api/Editor.PanelWindow/SizeToContents): Resize the window to fit the first thing on the surface. Popups use this so a menu is exactly as big as its contents, however far outside the parent window that ends up.
- [`Title`](/api/Editor.PanelWindow/Title): The window's title bar text.
- [`VSync`](/api/Editor.PanelWindow/VSync): Does this window's present wait for the display?

## Methods

- [`Dispose`](/api/Editor.PanelWindow/Dispose): Close the window and delete its panels.
- [`Focus`](/api/Editor.PanelWindow/Focus): Bring the window to the front.
- [`FromPanel`](/api/Editor.PanelWindow/FromPanel): The window a panel is being shown in, if it's one of ours.
- [`Minimize`](/api/Editor.PanelWindow/Minimize): Minimize the window.
- [`PickFolder`](/api/Editor.PanelWindow/PickFolder): Ask the OS to pick a folder, starting at `defaultPath`. Null when the user cancels. One dialog at a time - asking again while one is open joins the first.
- [`PickOpenFile`](/api/Editor.PanelWindow/PickOpenFile): Ask the OS for a file to open. The filter is name and extension list pairs, like "Scene files|scene;prefab|All files|*". Null when the user cancels.
- [`PickSaveFile`](/api/Editor.PanelWindow/PickSaveFile): Ask the OS where to save a file. `defaultPath` can end in a suggested file name. Filters as in [Editor.PanelWindow.PickOpenFile](/api/Editor.PanelWindow/PickOpenFile). Null when the user cancels.
- [`Popup`](/api/Editor.PanelWindow/Popup): Open a popup - a borderless window that sits above its parent and can hang outside it, the way an OS menu does. The position is in the parent's client pixels.
- [`RequestClose`](/api/Editor.PanelWindow/RequestClose): The user clicked the window's close button.
- [`ToggleMaximized`](/api/Editor.PanelWindow/ToggleMaximized): Maximize the window, or put it back if it already is.
