PopupFrame

This is an override of Frame to simplify creating popups: if clicked outside of it, it will disappear from the node tree.

Constructors

this
this(Node[] nodes)
Undocumented in source.

Members

Aliases

isFocused
alias isFocused = typeof(super).isFocused
Undocumented in source.
opEquals
alias opEquals = typeof(super).opEquals
Undocumented in source.
toRemove
alias toRemove = typeof(super).toRemove
Undocumented in source.

Functions

actionImpl
bool actionImpl(IO io, int number, InputActionID actionID, bool isActive)
Undocumented in source.
anchor
deprecated inout(Vector2) anchor()
anchor
Rectangle anchor(Rectangle value)

Set a new rectangular anchor.

anchoredStartCorner
Vector2 anchoredStartCorner()

Get start (top-left) corner of the popup if drawAnchored is to be used.

currentFocus
inout(Focusable) currentFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
currentFocus
Focusable currentFocus(Focusable newValue)
Undocumented in source. Be warned that the author may not have intended to support it.
drawAnchored
void drawAnchored(Node parent)
drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
emitEvent
void emitEvent(InputEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
focus
void focus()
Undocumented in source. Be warned that the author may not have intended to support it.
focusImpl
bool focusImpl()
Undocumented in source. Be warned that the author may not have intended to support it.
getAnchor
Rectangle getAnchor()
getAnchor
Rectangle getAnchor(Rectangle )
Undocumented in source. Be warned that the author may not have intended to support it.
lastFocusBox
Optional!Rectangle lastFocusBox()
Undocumented in source. Be warned that the author may not have intended to support it.
mouseImpl
void mouseImpl()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object other)
Undocumented in source. Be warned that the author may not have intended to support it.
orderedFocusAction
inout(OrderedFocusAction) orderedFocusAction()
Undocumented in source. Be warned that the author may not have intended to support it.
positionalFocusAction
inout(PositionalFocusAction) positionalFocusAction()
Undocumented in source. Be warned that the author may not have intended to support it.
readText
char[] readText(char[] buffer, int offset)
Undocumented in source. Be warned that the author may not have intended to support it.
resizeImpl
void resizeImpl(Vector2 space)
Undocumented in source. Be warned that the author may not have intended to support it.
restorePreviousFocus
void restorePreviousFocus()

Give focus to whatever node had focus before this one.

toRemove
bool toRemove()

PopupFrame will automatically be marked for removal if not focused.

typeText
void typeText(char[] text)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin makeHoverable
Undocumented in source.
__anonymous
mixin enableInputActions
Undocumented in source.

Properties

isFocused
bool isFocused [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

childPopup
PopupFrame childPopup;

A child popup will keep this focus alive while focused. Typically, child popups are spawned as a result of actions within the popup itself, for example in context menus, an action can spawn a submenu. Use spawnChildPopup to spawn child popups.

previousFocus
FluidFocusable previousFocus;

Node that had focus before popupFrame took over. When the popup is closed using a keyboard shortcut, this node will take focus again.

previousFocusable
Focusable previousFocusable;

Node that was focused before the popup was opened. Using restorePreviousFocus, it can be given focus again, closing the popup. This is the default behavior for the escape key while a popup is open.

toTakeFocus
bool toTakeFocus;

If true, the frame will claim focus on the next *resize*. This is used to give the popup focus when it is spawned, respecting currently active FocusIO.

Inherited Members

From Overlayable

getAnchor
Rectangle getAnchor(Rectangle space)

An anchor the node is bound to, used for positioning the overlay.

opEquals
bool opEquals(Object other)

Memory safe and const object comparison.

From FocusIO

emitEvent
void emitEvent(InputEvent event)

Read an input event from an input device. Input devices will call this function every frame if an input event occurs.

typeText
void typeText(char[] text)

Write text received from the system. Input devices should call this function every frame to transmit text that the user wrote on the keyboard, which other nodes can then read through readText.

readText
char[] readText(char[] buffer, int offset)

Read text inserted by the user into a buffer.

From WithOrderedFocus

orderedFocusAction
inout(OrderedFocusAction) orderedFocusAction()
focusNext
FocusSearchAction focusNext(bool isReverse)
focusPrevious
FocusSearchAction focusPrevious()

focusNext focuses the next, and focusPrevious focuses the previous node, relative to the one that is currently focused.

focusFirst
FocusSearchAction focusFirst()
focusLast
FocusSearchAction focusLast()

Focus the first (focusFirst), or the last node (focusLast) that exists inside the focus space.

focusNext
bool focusNext(FluidInputAction )
Undocumented in source. Be warned that the author may not have intended to support it.
focusPrevious
bool focusPrevious(FluidInputAction )
Undocumented in source. Be warned that the author may not have intended to support it.

From WithPositionalFocus

lastFocusBox
Optional!Rectangle lastFocusBox()

To provide a reference for positional focus, the bounding box of the focused node.

positionalFocusAction
inout(PositionalFocusAction) positionalFocusAction()
focusAbove
FocusSearchAction focusAbove()
focusBelow
FocusSearchAction focusBelow()
focusToLeft
FocusSearchAction focusToLeft()
focusToRight
FocusSearchAction focusToRight()
focusDirection
FocusSearchAction focusDirection(Style.Side side)

Positional focus: Switch focus from the currently focused node to another based on screen position.

focusUp
bool focusUp()
Undocumented in source. Be warned that the author may not have intended to support it.
focusDown
bool focusDown()
Undocumented in source. Be warned that the author may not have intended to support it.
focusLeft
bool focusLeft()
Undocumented in source. Be warned that the author may not have intended to support it.
focusRight
bool focusRight()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta