build Constructors 1

data_object Properties 63

AcceptDrops
bool
Accept drag and dropping shit on us
Children
IEnumerable`1
Child widgets of this widget.
ContentMargins
Margin
ContentRect
Rect
ContextMenuEnabled
bool
Enables or disables the context menu on this widget.
Cursor
CursorShape
Cursor override for this widget.
DebugModeEnabled
bool
Enable debug mode on this widget.
DeleteOnClose
bool
Delete this widget when close is pressed
DpiScale
float
The scale this widget is using (multiplying Size by this value gives the actual native size)
Enabled
bool
Makes the widget not interactable. This is also usually be reflected visually by the widget. The widget will not process any keyboard or mouse inputs. Applies retroactively to all children.
FixedHeight
float
Sets the fixed height for this widget
FixedSize
Vector2
FixedWidth
float
Sets the fixed width for this widget
FocusMode
FocusMode
Sets the focus mode for this widget. This determines both how it will get focus and whether it will receive keyboard input.
FocusProxy
Widget
HasMaximizeButton
bool
Height
float
Utility to interact with a widget's width - use Size where possible
Hidden
bool
Whether this widget is hidden. This differs from Visible because this will return the state for this particular widget, where as Visible returns false if a parent is hidden etc.
HorizontalSizeMode
SizeMode
IsActiveWindow
bool
IsBeingDroppedOn
bool
Whether something is being dragged over this widget.
IsDraggable
bool
Whether this widget can be drag and dropped onto other widgets.
IsFocused
bool
Whether this widget has keyboard focus.
IsFramelessWindow
bool
IsMaximized
bool
IsMinimized
bool
IsPopup
bool
IsPressed
bool
Whether this widget is currently being pressed down or not.
IsTooltip
bool
IsUnderMouse
bool
IsWindow
bool
Layout
Layout
The widget's internal layout, if any
LocalRect
Rect
This panel's rect at 0,0
MaximumHeight
float
This widgets height should never be larger than the given value.
MaximumSize
Vector2
Sets Editor.Widget.MaximumWidth and Editor.Widget.MaximumHeight simultaneously.
MaximumWidth
float
This widgets width should never be larger than the given value.
MinimumHeight
float
This widgets height should never be smaller than the given value.
MinimumSize
Vector2
Sets Editor.Widget.MinimumWidth and Editor.Widget.MinimumHeight simultaneously.
MinimumWidth
float
This widgets width should never be smaller than the given value.
MouseTracking
bool
Name
string
Name of the widget, usually for debugging purposes.
NoSystemBackground
bool
Parent
Widget
Parent widget. If non null, position of this widget will be relative to the parent widget. Certain events will also propagate to the parent widget if unhandled.
PixmapCursor
Pixmap
Custom cursor override for this widget. Will override Editor.Widget.Cursor with Editor.CursorShape.CustomCursor.
Position
Vector2
Position of this widget, relative to its parent if it has one.
ProvidesDebugMode
bool
If true then this widget has a debug mode that can be activated
ReadOnly
bool
Makes the widget read only. I.e. You can copy text of a text entry, but can't edit it. Applies retroactively to all children.
ScreenGeometry
Rect
Returns the geometry of the screen this widget is currently on.
ScreenPosition
Vector2
Position of the widget relative to the monitor's top left corner.
ScreenRect
Rect
This panel's rect in screen coordinates
ShowWithoutActivating
bool
Size
Vector2
Size of this widget.
StatusTip
string
If set, hovering over this widget will set the text of a Editor.StatusBar of the window the widget belongs to.
ToolTip
string
If set, this text will be displayed after a certain delay of hovering this widget with the mouse cursor.
TranslucentBackground
bool
TransparentForMouseEvents
bool
UpdatesEnabled
bool
If true, Update will call
VerticalSizeMode
SizeMode
Visible
bool
Whether this widget is visible or not, in the tree. This will return false if a parent is hidden. You might want to set Hidden if you're looking to check local visible status on a widget.
Width
float
Utility to interact with a widget's width - use Size where possible
WindowFlags
WindowFlags
WindowOpacity
float
WindowTitle
string

functions Methods 75

AdjustSize ()
Adjusts the size of the widget to fit its contents.
AlignToParent (alignment, offset)
Align this widget to its parents edge, with an offset.
Blur ()
Clear keyboard focus from this widget.
ChildValuesChanged (source)
ClearContext (key)
Remove a context on this widget. This will NOT remove contexts set from parent objects.
Close ()
If a window - will close
ConstrainTo (parentRect)
Reposition this widget to ensure it is within the given rectangle.
ConstrainToScreen ()
Constrain this widget to the screen it's currently on.
DestroyChildren ()
Destroys all child widgets of this widget.
DisableWindowActivation ()
Calling this will set the WS_EX_NOACTIVATE flag on the window internally, which will stop it taking focus away from other windows.
DoLayout ()
Called to make sure all child panels are in correct positions and have correct sizes. This is typically called when the size of this widget changes, but there are other cases as well.
Focus (activateWindow)
FocusNext ()
bool
Called when Tab is pressed to find the next widget to focus. Return true to prevent focusing.
FocusPrevious ()
bool
Called when Shift + Tab is pressed to find the next widget to focus. Return true to prevent focusing.
FromScreen (p)
Vector2
Transform coordinates relative to the monitors's top left corner, to coordinates relative to panel's top left corner.
GetAncestor ()
T
Find the closest ancestor widget of type
GetContext (key, defaultIfMissing)
T
Find a context on this widget. If not found, look at the parent. If not found, look at the parent. This is useful for passing information down to child widgets without any effort.
GetDescendants ()
IEnumerable`1
Get all descendants of type T
GetWindow ()
Widget
Get the top level window widget
Hide ()
Make this widget not visible.
IsAncestorOf (child)
bool
Returns whether or not the specified Widget is an ancestor of this Widget.
IsDescendantOf (parent)
bool
Returns whether or not the specified Widget is a descendent of this Widget.
IsModal ()
bool
Returns true if this is a modal window. This means it will appear on top of everything and block input to everything else.
Lower ()
Lowers the widget to the bottom of the parent widget's stack. After this call the widget will be visually behind (and therefore obscured by) any overlapping sibling widgets.
MakeMaximized ()
MakeMinimized ()
MakeSignal (name)
MakeWindowed ()
MinimumSizeHint ()
Vector2
Return the minimum size this widget wants to be
OnBlur (reason)
Called when the widget loses keyboard focus.
OnClose ()
bool
Called when a window is about to be closed.
OnClosed ()
Called when a window is closed.
OnContextMenu (e)
Called after Editor.Widget.OnMouseRightClick(Editor.MouseEvent), for the purposes of opening a context menu.
OnDoubleClick (e)
Called when the widget was double clicked with any mouse button.
OnDragDrop (ev)
Something was dragged and dropped on this widget. Apply the data here, if its valid. Requires Editor.Widget.AcceptDrops to function.
OnDragHover (ev)
Cursor with drag and drop data moved on this widget. Requires Editor.Widget.AcceptDrops to function.
OnDragLeave ()
Cursor with drag and drop data left the bounds of this widget. Requires Editor.Widget.AcceptDrops to function.
OnDragStart ()
Called when dragging. Editor.Widget.IsDraggable should be true.
OnFocus (reason)
Called when the widget gains keyboard focus.
OnKeyPress (e)
A key has been pressed. Your widget needs keyboard focus for this to be called - see FocusMode.
OnKeyRelease (e)
A key has been released.
OnMouseClick (e)
Called when this widget is left clicked (on mouse release).
OnMouseEnter ()
Mouse cursor entered the bounds of this widget.
OnMouseLeave ()
Mouse cursor exited the bounds of this widget.
OnMouseMove (e)
Called when the mouse cursor is moved while being over this widget.
OnMousePress (e)
Called when mouse is pressed over this widget.
OnMouseReleased (e)
Called when mouse is released over this widget.
OnMouseRightClick (e)
Called when this widget is right clicked (on mouse release).
OnMouseWheel (e)
Mouse wheel was scrolled while the mouse cursor was over this widget.
OnMoved ()
Called when the widget was moved to a new position relative to it's parent.
OnPaint ()
Override to custom paint your widget, for example using Editor.Paint. Can be overwritten by Editor.Widget.OnPaintOverride.
OnResize ()
Called when the widgets' size was changed.
OnShortcutPressed (e)
A shortcut has been activated. This is called on the focused control so they can override it.
OnVisibilityChanged (visible)
Called when the visibility of this widget changes.
OnWheel (e)
obsolete
Mouse wheel was scrolled while the mouse cursor was over this widget.
PostKeyEvent (key)
Raise ()
Raises this widget to the top of the parent widget's stack. After this call the widget will be visually in front of any overlapping sibling widgets.
RestoreGeometry (state)
bool
Restore position and size previously stored via Editor.Widget.SaveGeometry. Returns false if the state is empty or no longer valid, e.g. after monitor or DPI changes.
SaveGeometry ()
string
Serialize position and size of this widget to a string, which can then be passed to Editor.Widget.RestoreGeometry(System.String).
SetContentHash (hash, secondsDebounce)
bool
Call every frame/tick to redraw this Widget on content change
SetContext (key, value)
Set a context value on this widget. This context will be available to its children via FindContext.
SetEffectOpacity (f)
SetMaximized (maximized)
Set the maximized window state without showing the window, unlike Editor.Widget.MakeMaximized.
SetModal (on, application)
Set this window to be modal. This means it will appear on top of everything and block input to everything else.
SetSizeMode (horizontal, vertical)
SetStyles (sheet)
Directly set CSS style sheet(s) for this widget. Same format as a .css file.
SetStylesheetFile (filename)
Set a file to load CSS for this widget from.
SetWindowIcon (name)
Show ()
Make this widget visible.
Signal (signal)
SignalValuesChanged ()
When a value on this widget changed due to user input (ie, checking a box, editing a form) this is called, which sends a signal up the parent widgets.
SizeHint ()
Vector2
Should return the size this widget really wants to be if it can its way. The default is that you don't care - and just to return whatever the base value is.
ToScreen (p)
Vector2
Transform coordinates relative to the panel's top left corner, to coordinates relative to monitors's top left corner.
Update ()
Tell this widget that shit changed and it needs to redraw
UpdateGeometry ()
Tell everything that the geometry of this has changed

Inheritance

people
Log in to reply
You can't reply if you're not logged in. That would be crazy.