data_object Properties 49

AllowNestedFrame
bool
Let frames run inside a frame that's already running - see IPanelWindow.
AlwaysFullFrameRate
bool
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.
AspectRatioLock
Nullable`1
Hold the window at this width to height ratio while the user resizes it - 16f / 9 keeps a video window the shape of its video. Null lets it be any shape.
BackgroundColor
Color
What the window clears to before the UI is drawn.
Borderless
bool
True if we're drawing the title bar and borders ourselves. Popups always are.
CanClose
bool
Whether the user can close the window: the caption button greys out and Alt+F4 does nothing. Code can still close it. Windows drawing their own chrome check this for their close button too.
CanMaximize
bool
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.
DisplayBounds
Rect
The whole of the display the window is on, in the same desktop coordinates as Editor.PanelWindow.Position.
DisplayWorkArea
Rect
The part of the window's display that isn't under the taskbar or a dock, in desktop coordinates.
DropShadow
bool
Whether the compositor draws its shadow around the window. A decorated window has one from its frame; a borderless window or a popup has to ask, and both do by default.
ExclusiveFullscreen
bool
Whether Editor.PanelWindow.Fullscreen takes the display over with a real display mode, the way a game does, instead of a borderless window over the desktop. Off by default: borderless switches instantly and plays well with other windows and displays.
Fullscreen
bool
Fill the window's display. Borderless over the desktop unless Editor.PanelWindow.ExclusiveFullscreen is set. Turning it off puts the window back where it was.
HideOnClose
bool
When the user closes the window, hide it instead of disposing it, so it can be shown again with everything still in it. Off by default: closing disposes.
IgnoresInput
bool
A window that never takes the keyboard or the mouse.
IsFocused
bool
Does this window have keyboard focus?
IsFullscreen
bool
Is the window fullscreen right now, either way?
IsMaximized
bool
Is the window maximized?
IsMinimized
bool
Is the window minimized to the taskbar?
IsOpen
bool
Is this window still open?
IsPopup
bool
A popup - a transient window like a menu, dismissed by a click anywhere else.
IsShown
bool
Whether the OS window is on screen. A window is born hidden and appears once it has drawn its contents, so this is false for its first frame or two.
IsVisible
bool
Is the window on screen at all, as opposed to hidden with Editor.PanelWindow.Hide or minimized?
KeepOnTop
bool
Keep the window above every window that isn't. Palettes, overlays, a video you want to keep watching while working in something else.
MaxSize
Vector2
The largest the user can resize the window to. Zero means no limit.
MinSize
Vector2
The smallest the user can resize the window to. Zero means no limit.
Modal
bool
Block the Editor.PanelWindow.Owner from taking input while this window is open, the way a dialog does. Does nothing without an owner. Cleared on close, so the owner isn't left dead.
MousePosition
Vector2
Where the cursor is, in this window's pixels.
OnActivated
Action
The window became the active one - it has the keyboard, its title bar lit up.
OnCloseRequested
Func`1
The user asked to close the window. Return false to keep it open - an unsaved changes prompt, say. Otherwise it's disposed, or hidden when Editor.PanelWindow.HideOnClose is set.
OnDeactivated
Action
The window stopped being the active one: the user went to another window, ours or someone else's.
OnDisplayChanged
Action
The window is on a different display than it was. Its scale may have changed with it.
OnMaximized
Action
The window was maximized.
OnMinimized
Action
The window was minimized to the taskbar.
OnMoved
Action
The window moved, whether the user dragged it or code set Editor.PanelWindow.Position.
OnResized
Action
The window's client size changed, whether the user dragged an edge or code set Editor.PanelWindow.Size.
OnRestored
Action
The window came back from being minimized or maximized.
Opacity
float
How see-through the whole window is, contents included. 1 is opaque, 0 is invisible.
Owner
PanelWindow
The window this one belongs to. An owned window stays above its owner, minimizes with it, and is closed with it - a tool palette, a dialog. Null makes it a top level window again.
Position
Vector2
Position of the window on the desktop, in the OS's own coordinates - desktop pixels on Windows. Deliberately not the units Editor.PanelWindow.Size is in: a desktop spanning displays that scale differently has no single UI unit to measure it in.
Resizable
bool
Whether the user can resize the window by its edges. Off makes the size whatever code says.
ResizeBorder
float
How far from the edge of a borderless window counts as a resize handle, in the same units the UI is authored in - it grows with the display scale so the grab stays the same size.
Root
RootPanel
The panel everything in this window hangs off.
RoundedCorners
bool
Whether the compositor rounds the window's corners, the way it rounds the OS's own menus. Popups ask for it. Windows 10 and earlier stay square.
ShowInTaskbar
bool
Whether the window gets a button in the taskbar. On by default; a palette or a floating panel that belongs to another window usually turns it off.
Size
Vector2
Size of the window's client area, in the units the UI inside it is authored in. The window on the desktop is this much again bigger on a display that scales.
SizeToContents
bool
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
string
The window's title bar text.
TooltipWindow
PanelWindow
The tooltip window open over this one, if there is one.
VSync
bool
Does this window's present wait for the display?

functions Methods 19

BringToFront ()
Raise the window above the others without taking focus. Editor.PanelWindow.Focus is the one that focuses it too.
Dispose ()
Close the window and delete its panels.
FlashTaskbar (untilFocused)
Flash the taskbar button to get the user's attention. Briefly by default; until focused keeps going until they click the window.
Focus ()
Bring the window to the front.
Hide ()
Take the window off screen without closing it. Everything in it stays; Editor.PanelWindow.Show brings it back where it was.
Maximize ()
Fill the display.
Minimize ()
Minimize the window.
MoveToCenter ()
Centre the window on its Editor.PanelWindow.Owner, or on the usable part of its display when it has none. Either way it ends up on screen.
PickFolder (defaultPath)
Task`1
Ask the OS to pick a folder, starting at . Null when the user cancels. One dialog at a time - asking again while one is open joins the first.
PickOpenFile (defaultPath, filters)
Task`1
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 (defaultPath, filters)
Task`1
Ask the OS where to save a file. can end in a suggested file name. Filters as in Editor.PanelWindow.PickOpenFile(System.String,System.String). Null when the user cancels.
RequestClose ()
The user clicked the window's close button.
SendToBack ()
Put the window behind every other window. Focus stays where it is.
SetIcon (icon)
The icon in the title bar and on the taskbar button. The OS scales it, so 32 or 64 pixels square is plenty; it's copied, so the bitmap can go afterwards.
SetOverlayIcon (icon, description)
A small icon over the corner of the window's taskbar button - a badge for a count, a status. 16 pixels square is what the taskbar shows. Null clears it. The description is what a screen reader says for it.
Show ()
Put a hidden window back on screen.
SnapToDisplay ()
Move the window the least distance that puts all of it on the usable part of its display. A window taller or wider than the display keeps its top left on screen.
StopFlashing ()
Stop a Editor.PanelWindow.FlashTaskbar(System.Boolean) that's still going.
ToggleMaximized ()
Maximize the window, or put it back if it already is.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.