Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.Container Class Reference

Groups child widgets arranged by a layout instance. More...

Inheritance diagram for Dragengine.Gui.Container:
Dragengine.Gui.Widget Dragengine.Gui.Button Dragengine.Gui.ComboBox Dragengine.Gui.Desktop Dragengine.Gui.ListBox Dragengine.Gui.MenuBarItem Dragengine.Gui.MenuItem Dragengine.Gui.Panel Dragengine.Gui.ScrollBar Dragengine.Gui.Slider Dragengine.Gui.SpinButton Dragengine.Gui.Window

Public Member Functions

void addWidget (Widget widget)
void addWidget (Widget widget, Object settings)
bool allowsChildGrabFocus ()
void collectClosestFocusWidget (ClosestDirectionFocusFinder finder, Point origin)
 Find closest focus widget for directional navigation.
void doLayout ()
Widget findFocusableWidget ()
Widget findLastFocusableWidget ()
Widget findWidget (Block ablock)
 Find widget using block or null if not found.
int getContainerHeight ()
Point getContainerSize ()
int getContainerWidth ()
bool getHasBlockedDoLayout ()
 doLayout calls happened during runWhileBlockingLayout.
Layout getLayout ()
Point getMinimumSize ()
Point getMinimumSizeForHeight (int height)
 Minimum size of widget using reference widget height and variable width.
Point getMinimumSizeForWidth (int width)
 Minimum size of widget using reference widget width and variable height.
bool getStateChangeNotifyChildren ()
 Notify children if state changed.
Widget getWidget (int index)
Widget getWidgetAt (Point position)
 Widget at coordinates or null if not found.
int getWidgetCount ()
void giveUpFocus ()
bool hasFocusWidget ()
 Focus widget is inside container somewhere.
bool hasWidget (Widget widget)
int indexOfWidget (Widget widget)
Object injectWidget (Object injectValue, Block ablock)
 Process value visiting widgets using block.
bool isChildVisible (Widget child)
 Child widget is visible.
bool isChildVisibleOnDesktop (Widget child)
 Child widget is visible on desktop.
bool isMouseInside ()
 Mouse is hovering over this widget.
void layoutParent ()
void moveWidget (Widget widget, int newPosition)
Container new ()
Container new (int x, int y, int width, int height)
Container new (Layout layout)
 Create container with layout.
Container new (Layout layout, Block blockAddContent)
 Create container with layout calling block to add content.
Container new (Point position, Point size)
Widget nextFocusWidgetAfter (Widget widget)
 Find next widget in the focus cycle that can grab the focus.
void onGuiThemeChanged ()
void onPaddingChanged ()
 Padding changed.
void onStateChanged (StateChangeEvent event)
 State changed.
Widget prevFocusWidgetAfter (Widget widget)
 Find previous widget in the focus cycle that can grab the focus.
void removeAllWidgets ()
 Remove and dispose all widgets.
void removeWidget (Widget widget)
 Remove widget without disposing.
bool requestCaptureDirectional (Widget widget)
 Request to capture directional navigation for the specified widget.
bool requestCaptureMouse (Widget widget)
bool requestReleaseDirectional (Widget widget)
 Request to release directional navigation capture.
bool requestReleaseMouse (Widget widget)
void runWhileBlockingLayout (Block ablock)
 Run block while layouting is blocked.
void setEnabled (bool enabled)
void setHasBlockedDoLayout (bool hasBlockedDoLayout)
 Set if doLayout calls happened during runWhileBlockingLayout.
void setLayout (Layout layout)
void setMousePointer (MousePointerFactory mousePointer)
 Set mouse pointer to use.
void setStateChangeNotifyChildren (bool notify)
 Set to notify children if state changed.
Public Member Functions inherited from Dragengine.Gui.Widget
void addDragListener (DragListener listener)
void addFocusListener (FocusListener listener)
 Add focus listener.
void addGamepadListener (GamepadListener listener)
 Add gamepad listener.
void addKeyListener (KeyListener listener)
void addMouseListener (MouseListener listener)
void addStateChangeListener (StateChangeListener listener)
 Add state change listener.
void addWidgetListener (WidgetListener listener)
 Add widget listener.
bool canGrabFullFocus ()
void captureDirectional ()
 Captures directional navigation if not already captured by another widget.
void design ()
 Design widget using WidgetDesigner.
void desktopWarpMouseFocusHere ()
 Warp mouse to focus location on this widget.
void desktopWarpMouseFocusLocation ()
 Warp mouse to focus location on desktop focus widget.
void dispose ()
void ensureVisible ()
 Ensure widget is fully visible on desktop if possible.
void ensureVisible (RectArea boundary)
 Ensure boundary is visible on desktop if possible.
void focusDirectional (int direction)
 Focus widget in direction that can grab the focus.
CanvasCreator getBackgroundCanvasCreator ()
 Background canvas creator or null to use background color.
bool getBlockLayoutParent ()
 Block layoutParent calls.
Border getBorder ()
BorderSize getBorderSize ()
RectArea getBoundary ()
 Rectangular boundary of the widget.
RectArea getBoundaryWithBorder ()
 Rectangular boundary of the widget including border.
bool getCanFocus ()
bool getCanFocusDirectional ()
 Widget can get focus using directional navigation.
CanvasView getCanvasBackground ()
CanvasView getCanvasContent ()
CanvasView getCanvasWidget ()
Clipboard getClipboard ()
 Clipboard or null to use parent clipboard.
ColorMatrix getColorTransformation ()
 Color transformation.
WidgetDesigner getDesigner ()
 Designer.
String getDesignerSelector ()
 Designer selector.
Desktop getDesktop ()
RectArea getDesktopBoundary ()
 Rectangular boundary of widget relative to desktop.
RectArea getDesktopBoundaryWithBorder ()
 Rectangular boundary of widget including border relative to parent.
Point getDesktopPosition ()
 Widget position in desktop coordinates.
Widget getDirectionalCaptureWidget ()
 Widget having captured directional navigation.
bool getEnabled ()
MousePointerFactory getFirstMousePointer ()
 First assigned mouse pointer.
Point getFocusMouseLocation ()
 Focus mouse location in widget coordinates.
Font getFont ()
bool getHasBlockedLayoutParent ()
 layoutParent calls happened during runWhileBlockingLayoutParent.
bool getHasFocus ()
int getHeight ()
 Height of widget.
RangeModel getHorizontalRangeModel ()
 Horizontal range model for viewports to synchronize the horizontal scrollbar.
Widget getHoverWidget ()
 Widget the mouse hovers above or null.
Point getLocalMouseLocation ()
 Parent desktop mouse location in widget coordinates.
Point getMinimumSizeWithBorder ()
Point getMinimumSizeWithBorderForHeight (int height)
 Minimum size of widget with border using reference height.
Point getMinimumSizeWithBorderForWidth (int width)
 Minimum size of widget with border for reference width.
Widget getMouseCaptureWidget ()
 Widget having captured the mouse.
MousePointerFactory getMousePointer ()
 Mouse pointer to use.
BorderSize getPadding ()
 Padding.
Container getParent ()
Point getPosition ()
 Position of the widget.
bool getProtectBackgroundCanvasCreator ()
 Protect custom set background canvas creator.
bool getProtectBorder ()
 Protect custom set border.
bool getProtectFont ()
 Protect custom set font.
bool getProtectMinimumSize ()
 Protect custom set minimumsize.
bool getProtectMousePointer ()
 Protect custom set mouse pointer.
bool getProtectPadding ()
 Protect custom set padding.
bool getProtectTextColor ()
 Protect custom set text color.
RectArea getRelativeBoundary (Container parent)
 Rectangular boundary of widget relative to parent.
RectArea getRelativeBoundaryWithBorder (Container parent)
 Rectangular boundary of widget including border relative to parent.
Point getRelativePosition (Container parent)
 Widget position in parent widget coordinates.
Point getScreenPosition ()
 Widget position in screen coordinates.
RectArea getScreenRectArea ()
Point getSetMinimumSize ()
Point getSize ()
 Size of the widget.
Color getTextBorderColor ()
 Text border color.
float getTextBorderThickness ()
 Text border thickness in percentage of the font size or null.
Color getTextColor ()
 Text color.
float getTextDilation ()
 Text dilation in percentage of the font size.
String getTitle ()
 Widget title.
Object getToolTip ()
 Tooltip or null.
float getTotalTransparency ()
TexMatrix2 getTransformation ()
float getTransparency ()
RangeModel getVerticalRangeModel ()
 Vertical range model for viewports to synchronize the vertical scrollbar.
bool getVisible ()
RectArea getVisibleDesktopBoundary ()
 Visible widget boundary in desktop coordinates.
RectArea getVisibleRelativeBoundary (Container parent)
 Visible widget boundary relative to parent coordinate system.
int getWidth ()
 Width of widget.
Window getWindow ()
Point getWindowPosition ()
 Widget position in window coordinates.
int getX ()
 X position of widget.
int getY ()
 Y position of widget.
void grabFocus ()
bool hasParent (Container container)
bool isCapturingDirectional ()
 Widget is capturing directional navigation.
bool isCapturingMouse ()
 Widget is capturing mouse.
bool isDesignerSet ()
 Custom designer is set.
bool isFullEnabled ()
 Widget and all parent widgets are enabled.
bool isMinimumSizeSet ()
bool isPointInside (Point position)
bool isTransformationSet ()
void layoutParentIfBlocked ()
 Calls layoutParent if getHasBlockedLayoutParent() is true.
Widget nextFocusWidget ()
 Find next widget in the focus cycle that can grab the focus.
void notifyBorderParametersChanged ()
void onDesignerChanged ()
 Designer changed.
void onDesignerSelectorChanged ()
 Designer selector changed.
void onDispose (WidgetEvent event)
 Window is disposing.
void onFocusLost (FocusEvent event)
 Widget lost focus.
void onFocusReceived (FocusEvent event)
 Widget received focus.
void onFrameUpdate (float elapsed)
 Do frame update.
void onGamepadButtonPressed (GamepadEvent event)
 Gamepad button has been pressed.
void onGamepadButtonReleased (GamepadEvent event)
 Gamepad button has been released.
void onHidden (WidgetEvent event)
 Widget has been hidden.
void onParentStateChanged ()
 Parent state changed.
void onParentStateChanged (bool force)
 Parent state changed.
void onReposition (WidgetEvent event)
 Position changed.
void onResize (WidgetEvent event)
 Size changed.
void onSetFont ()
void onSetTextColor ()
 Text parameters changed.
void onSetTextDilation ()
 Text parameters changed that affect text dilation.
void onShown (WidgetEvent event)
 Widget has been shown.
void onTranslationChanged ()
 Translation manager or active language pack changed.
void popdownVirtualKeyboard ()
 Popdown virtual keyboard if Desktop has one assigned.
void popdownVirtualKeyboardDirectional ()
 Popdown virtual keyboard if Desktop has one assigned and direction focus widget.
void popupVirtualKeyboard ()
 Popup virtual keyboard if Desktop has one assigned.
Widget prevFocusWidget ()
 Find previous widget in the focus cycle that can grab the focus.
void processEvent (Event event)
 Process an event.
void releaseDirectional ()
 Release directional navigation capture.
void releaseMouse ()
void removeDragListener (DragListener listener)
void removeFocusListener (FocusListener listener)
 Remove focus listener.
void removeGamepadListener (GamepadListener listener)
 Remove gamepad listener.
void removeKeyListener (KeyListener listener)
void removeMouseListener (MouseListener listener)
void removeStateChangeListener (StateChangeListener listener)
 Remove state change listener.
void removeWidgetListener (WidgetListener listener)
 Remove widget listener.
void requestGrabFocus (Widget widget)
void runWhileBlockingLayoutParent (Block ablock)
 Run block while layouting is blocked.
void safeDispose ()
 Safely dispose of widget.
void sendEvent (Event event)
void sendEventToListeners (Event event, bool sendToParent)
 Send event to all appropriate listeners for events of its kind.
void setBackgroundCanvasCreator (CanvasCreator creator)
 Set background canvas creator or null to use background color.
void setBlockLayoutParent (bool blockLayoutParent)
 Set block layoutParent calls.
void setBorder (Border border)
void setCanFocus (bool canFocus)
void setCanFocusDirectional (bool canFocus)
 Set if widget can get focus using directional navigation.
void setClipboard (Clipboard clipboard)
 Set clipboard or null to use parent clipboard.
void setColorTransformation (ColorMatrix transformation)
 Set color transformation.
void setDesigner (WidgetDesigner designer)
 Set designer.
void setDesignerSelector (String selector)
 Set designer selector.
void setFont (Font font)
void setHasBlockedLayoutParent (bool hasBlockedLayoutParent)
 Set if layoutParent calls happened during runWhileBlockingLayoutParent.
void setHasFocus (bool hasFocus)
void setHeight (int height)
 Set height of widget.
void setMinimumSize (Point size)
void setPadding (BorderSize padding)
 Set padding.
void setParent (Container parent)
void setPosition (Point position)
 Set position of widget.
void setProtectBackgroundCanvasCreator (bool protect)
 Set protect custom set background canvas creator.
void setProtectBorder (bool protect)
 Set protect custom set border.
void setProtectFont (bool protect)
 Set protect custom set font.
void setProtectMinimumSize (bool protect)
 Set protect custom set minimumsize.
void setProtectMousePointer (bool protect)
 Set protect custom set mouse pointer.
void setProtectPadding (bool protect)
 Set protect custom set padding.
void setProtectTextColor (bool protect)
 Set protect custom set text color.
void setSize (Point size)
 Set size of widget.
void setTextBorderColor (Color color)
 Set text border color.
void setTextBorderThickness (float thickness)
 Set text border thickness in percentage of the font size or null.
void setTextColor (Color color)
 Set text color.
void setTextDilation (float dilation)
 Set text dilation in percentage of the font size.
void setTitle (String title)
 Set widget title.
void setToolTip (Object toolTip)
 Set tooltip or null.
void setTransformation (TexMatrix2 transformation)
void setTransparency (float transparency)
void setVisible (bool visible)
void setWidth (int width)
 Set width of widget.
void setX (int x)
 Set X position of widget.
void setY (int y)
 Set Y Position of widget.
void simulateKeyPress (int keyCode, int keyChar)
 Simulate keyboard press event.
void simulateKeyPressRelease (int keyCode, int keyChar)
 Simulate keyboard press and release event.
void simulateKeyRelease (int keyCode, int keyChar)
 Simulate keyboard release event.
void startFrameUpdater ()
 Start frame updater if not running.
void stopFrameUpdater ()
 Stop frame updater if running.

Public Attributes

bool pBlockLayout
Point pCachedMinSize
int pCachedMinSizeForHeightHeight
Point pCachedMinSizeForHeightSize
Point pCachedMinSizeForWidthSize
int pCachedMinSizeForWidthWidth
Array pChildren
bool pHasBlockedDoLayout
Layout pLayout
bool pStateChangeNotifyChildren
Public Attributes inherited from Dragengine.Gui.Widget
CanvasCreator pBackgroundCanvasCreator
bool pBlockLayoutParent
Border pBorder
CanvasView pCanvasWidget
Clipboard pClipboard
WidgetDesigner pDesigner
String pDesignerSelector
Font pFont
FrameUpdater pFrameUpdater
bool pIsDesignerSet
Array pKeyListeners
MousePointerFactory pMousePointer
BorderSize pPadding
Container pParent
Point pPosition
bool pProtectBackgroundCanvasCreator
RepeatKeyEventTimer pRepeatEventTimer
float pTextBorderThickness
Color pTextColor
GuiTheme pTheme
String pThemeSelector
String pTitle
Object pToolTip
TexMatrix2 pTransformation
TranslationManager pTranslationManager
float pTransparency
bool pVisible

Additional Inherited Members

Protected Member Functions inherited from Dragengine.Gui.Widget
WidgetDesigner getDesignerFromTheme ()
 Get designer from gui theme.
void updateCanvasBackground ()
 Update background canvas content.
void updateCanvasGeometry ()
 Update canvas position and size.

Detailed Description

Groups child widgets arranged by a layout instance.

Member Function Documentation

◆ addWidget() [1/2]

void Dragengine.Gui.Container.addWidget ( Widget widget)

Adds a widget to this container using default settings.

Reimplemented in Dragengine.Gui.Desktop, Dragengine.Gui.MenuPopup, and Dragengine.Gui.SwitchPanel.

Referenced by Dragengine.Gui.PanelFPSRates.addFPSWidgets(), Dragengine.Gui.WindowSettings.addSheetButton(), Dragengine.Gui.EMPSystem.ParameterValueEditor.applyChanges(), Dragengine.Gui.ModManagement.MMWindowModManagement.createButton(), Dragengine.Gui.ModManagement.MMDialogReportMod.createContent(), Dragengine.Gui.ModManagement.MMPanelModInfo.createContent(), Dragengine.Gui.RatingUpDown.createContent(), Dragengine.Services.User.DialogServiceUserAcceptTos.createContent(), Dragengine.Gui.ModManagement.MMWindowModInfo.createModInfoPanel(), Dragengine.Gui.WindowVirtualKeyboard.createVirtualKeyHide(), Dragengine.Gui.MenuItem.dispose(), Dragengine.Gui.ScrollBar.ActionScroll.enableDirectionButtons(), Dragengine.Gui.PanelPlayerChoice.endChoosing(), Dragengine.Gui.ModManagement.MMPanelModUserAccount.findLoadAvatarImage(), Dragengine.Gui.WindowConsole.getConsoleCommands(), Dragengine.Gui.ModManagement.MMModificationListRenderer.ModWidget.getDefaultSize(), Dragengine.Gui.ModManagement.MMTransferListRenderer.ModWidget.getDefaultSize(), Dragengine.Gui.MainMenus.Interactive.IMMTextDisplay.getFadeTime(), Dragengine.Gui.CheckBox.getFocusMouseLocation(), Dragengine.Gui.OptionBox.getFocusMouseLocation(), Dragengine.Gui.ListBox.getHorizontalRangeModel(), Dragengine.Gui.BgButton.getImage(), Dragengine.Gui.MainMenus.Interactive.InteractiveMainMenu.getMenuFadeInTime(), Dragengine.Gui.Slider.ActionSlide.getSmallTickCountRatio(), Dragengine.Gui.BgButton.getText(), Dragengine.Gui.BgButton.getTextPadding(), Dragengine.Gui.Viewport.layoutParent(), Dragengine.Gui.MenuItem.new(), Dragengine.Gui.MenuItemCommand.new(), Dragengine.Gui.ModManagement.MMImageGallery.new(), Dragengine.Gui.ModManagement.MMPanelModManagement.SearchCategoryCheckBox.ServiceModsSelectionChanged.new(), Dragengine.Gui.MenuItemToggle.onDesignerChanged(), Dragengine.Gui.PanelHud.onDesignerSelectorChanged(), Dragengine.Gui.ComboBox.onFocusLost(), Dragengine.Gui.ComboBox.onFocusReceived(), Dragengine.Gui.ComboBox.onGamepadButtonPressed(), Dragengine.Gui.MenuItemSubMenu.onMouseMove(), Dragengine.Gui.PanelPlayerChoice.removeAllChoices(), Dragengine.Gui.SubTitleBox.removeAllSubTitleText(), Dragengine.Gui.ComboBox.requestReleaseMouse(), Dragengine.Gui.EditBindingsPanel.resetChanges(), Dragengine.Gui.EditModuleParametersPanel.setAdvanced(), Dragengine.Gui.WindowConsole.setConsole(), Dragengine.Gui.BgButton.setImage(), Dragengine.Gui.ModManagement.MMPanelModManagement.SearchCategoryCheckBox.ServiceModsSelectionChanged.updateActiveMods(), Dragengine.Gui.ModManagement.MMPanelModManagement.SearchCategoryCheckBox.ServiceModsSelectionChanged.updateModelTransfers(), Dragengine.Gui.ScrollPanel.updateScrollBarHiding(), and Dragengine.Gui.Button.updateWidgetImage().

◆ addWidget() [2/2]

void Dragengine.Gui.Container.addWidget ( Widget widget,
Object settings )

Adds a widget to this container using the specified settings.

Reimplemented in Dragengine.Gui.Desktop, Dragengine.Gui.MenuPopup, and Dragengine.Gui.SwitchPanel.

◆ allowsChildGrabFocus()

bool Dragengine.Gui.Container.allowsChildGrabFocus ( )

Determines if the container allows child widgets to grab the focus.

Reimplemented in Dragengine.Gui.Desktop, and Dragengine.Gui.ListBox.

Referenced by onGuiThemeChanged().

◆ collectClosestFocusWidget()

void Dragengine.Gui.Container.collectClosestFocusWidget ( ClosestDirectionFocusFinder finder,
Point origin )

Find closest focus widget for directional navigation.

Version
1.29
Parameters
finderFinder to add candidate widgets.
originOrigin in widget coordinates.

Reimplemented from Dragengine.Gui.Widget.

Referenced by onGuiThemeChanged().

◆ doLayout()

◆ findFocusableWidget()

Widget Dragengine.Gui.Container.findFocusableWidget ( )

Find first widget that can grab the focus or null if none exists.

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.ListBox, and Dragengine.Gui.WindowVirtualKeyboard.

Referenced by Dragengine.Gui.Window.becomeBackgroundWindow(), Dragengine.Gui.WindowPlayerChoice.hoverOverFirstOption(), and onGuiThemeChanged().

◆ findLastFocusableWidget()

Widget Dragengine.Gui.Container.findLastFocusableWidget ( )

Find last widget that can grab the focus or null if none exists.

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.ListBox.

Referenced by Dragengine.Gui.Window.becomeBackgroundWindow(), and onGuiThemeChanged().

◆ findWidget()

Widget Dragengine.Gui.Container.findWidget ( Block ablock)

Find widget using block or null if not found.

Block is called with single parameter of type Widget and has to return true to stop visiting and return widget or false to continue visiting.

Referenced by Dragengine.Gui.MenuPopup.addItemCommand(), and onGuiThemeChanged().

◆ getContainerHeight()

int Dragengine.Gui.Container.getContainerHeight ( )

Retrieve height of area for child widgets excluding the padding. This calculates the the height remaining after subtracting the padding.

References Dragengine.Gui.Widget.dispose().

Referenced by Dragengine.Gui.ScrollBar.ActionScroll.enableDirectionButtons().

◆ getContainerSize()

Point Dragengine.Gui.Container.getContainerSize ( )

Size of area for child widgets excluding the padding. This calculates the size remaining after subtracting the padding.

Referenced by Dragengine.Gui.Viewport.layoutParent().

◆ getContainerWidth()

int Dragengine.Gui.Container.getContainerWidth ( )

Retrieve width of area for child widgets excluding the padding. This calculates the the width remaining after subtracting the padding.

References new(), runWhileBlockingLayout(), and setLayout().

Referenced by Dragengine.Gui.ScrollBar.ActionScroll.enableDirectionButtons().

◆ getHasBlockedDoLayout()

bool Dragengine.Gui.Container.getHasBlockedDoLayout ( )

doLayout calls happened during runWhileBlockingLayout.

◆ getLayout()

Layout Dragengine.Gui.Container.getLayout ( )

Retrieve the layout of the container.

Referenced by Dragengine.Gui.WindowSubTitle.createSubTitleBox(), and Dragengine.Gui.SwitchPanel.valueChanged().

◆ getMinimumSize()

◆ getMinimumSizeForHeight()

Point Dragengine.Gui.Container.getMinimumSizeForHeight ( int height)

Minimum size of widget using reference widget height and variable width.

Default implementation uses getMinimumSize().

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.ListBox.

Referenced by Dragengine.Gui.Slider.ActionSlide.onButtonPress(), and onGuiThemeChanged().

◆ getMinimumSizeForWidth()

Point Dragengine.Gui.Container.getMinimumSizeForWidth ( int width)

Minimum size of widget using reference widget width and variable height.

Default implementation uses getMinimumSize().

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.ListBox.

Referenced by onGuiThemeChanged(), and Dragengine.Gui.Slider.ActionSlide.onResize().

◆ getStateChangeNotifyChildren()

bool Dragengine.Gui.Container.getStateChangeNotifyChildren ( )

Notify children if state changed.

Version
1.5

◆ getWidget()

◆ getWidgetAt()

◆ getWidgetCount()

◆ giveUpFocus()

void Dragengine.Gui.Container.giveUpFocus ( )

Notifies that the current focus widget can no longer hold the focus.

Reimplemented in Dragengine.Gui.Desktop.

Referenced by onGuiThemeChanged().

◆ hasFocusWidget()

bool Dragengine.Gui.Container.hasFocusWidget ( )

Focus widget is inside container somewhere.

Reimplemented in Dragengine.Gui.ListBox.

◆ hasWidget()

bool Dragengine.Gui.Container.hasWidget ( Widget widget)

Determines if the widget is part of the container.

Referenced by Dragengine.Gui.GameRoot.removeWidget().

◆ indexOfWidget()

int Dragengine.Gui.Container.indexOfWidget ( Widget widget)

Retrieves the index of the widget or -1 if not found.

Referenced by Dragengine.Gui.Window.becomeBackgroundWindow().

◆ injectWidget()

Object Dragengine.Gui.Container.injectWidget ( Object injectValue,
Block ablock )

Process value visiting widgets using block.

Works like Array.inject(). Block receives as first argument the Object injected value and as second argument Widget widget.

Referenced by onGuiThemeChanged(), Dragengine.Gui.MenuPopup.popdown(), and Dragengine.Gui.MenuPopup.sendEvent().

◆ isChildVisible()

bool Dragengine.Gui.Container.isChildVisible ( Widget child)

Child widget is visible.

Checks if the widget is visible and that the widget boundaries lie inside the viewable area of the container.

Referenced by onGuiThemeChanged().

◆ isChildVisibleOnDesktop()

bool Dragengine.Gui.Container.isChildVisibleOnDesktop ( Widget child)

Child widget is visible on desktop.

Version
1.29

Checks if the desktop visible widget boundary is visible on the desktop.

◆ isMouseInside()

bool Dragengine.Gui.Container.isMouseInside ( )

Mouse is hovering over this widget.

Tests if the hover widget is this widget.

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.MenuBarItem.

◆ layoutParent()

void Dragengine.Gui.Container.layoutParent ( )

Layout parent if existing. Modified version to respect layout blocking.

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.Desktop, and Dragengine.Gui.Viewport.

Referenced by onGuiThemeChanged().

◆ moveWidget()

void Dragengine.Gui.Container.moveWidget ( Widget widget,
int newPosition )

◆ new() [1/5]

◆ new() [2/5]

Container Dragengine.Gui.Container.new ( int x,
int y,
int width,
int height )

◆ new() [3/5]

Container Dragengine.Gui.Container.new ( Layout layout)

Create container with layout.

Reimplemented in Dragengine.Gui.Panel.

References new(), pChildren, and pLayout.

◆ new() [4/5]

Container Dragengine.Gui.Container.new ( Layout layout,
Block blockAddContent )

Create container with layout calling block to add content.

Block receives container as argument. Block call is wrapped inside runWhileBlockingLayout() for efficiency. doLayout() will be called after leaving the block.

Reimplemented in Dragengine.Gui.Panel.

References new(), pChildren, and pLayout.

◆ new() [5/5]

Container Dragengine.Gui.Container.new ( Point position,
Point size )

Creates a new container located at (x,y) with the given size.

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.Window.

References new().

◆ nextFocusWidgetAfter()

Widget Dragengine.Gui.Container.nextFocusWidgetAfter ( Widget widget)

Find next widget in the focus cycle that can grab the focus.

Reimplemented in Dragengine.Gui.ListBox, and Dragengine.Gui.Window.

Referenced by onGuiThemeChanged().

◆ onGuiThemeChanged()

void Dragengine.Gui.Container.onGuiThemeChanged ( )

Notification that the gui theme changed.

Reimplemented from Dragengine.Gui.Widget.

Reimplemented in Dragengine.Gui.Button, Dragengine.Gui.ComboBox, Dragengine.Gui.ListBox, Dragengine.Gui.ModManagement.MMPanelModInfo, Dragengine.Gui.SpinButton, Dragengine.Gui.Window, and Dragengine.Gui.WindowConsole.

References allowsChildGrabFocus(), collectClosestFocusWidget(), Dragengine.Gui.Widget.desktopWarpMouseFocusHere(), doLayout(), Dragengine.Gui.Widget.ensureVisible(), findFocusableWidget(), findLastFocusableWidget(), findWidget(), Dragengine.Gui.Widget.getCanFocusDirectional(), Dragengine.Gui.Widget.getCanvasContent(), Dragengine.Gui.Widget.getEnabled(), Dragengine.Gui.Widget.getHoverWidget(), Dragengine.Gui.Widget.getLocalMouseLocation(), getMinimumSize(), getMinimumSizeForHeight(), getMinimumSizeForWidth(), Dragengine.Gui.Widget.getParent(), Dragengine.Gui.Widget.getPosition(), Dragengine.Gui.Widget.getRelativePosition(), Dragengine.Gui.Widget.getSize(), Dragengine.Gui.Widget.getVisible(), giveUpFocus(), Dragengine.Gui.Widget.grabFocus(), Dragengine.Gui.Widget.hasParent(), injectWidget(), isChildVisible(), Dragengine.Gui.Widget.isMinimumSizeSet(), layoutParent(), moveWidget(), new(), Dragengine.Gui.Widget.nextFocusWidget(), nextFocusWidgetAfter(), pBlockLayout, pCachedMinSize, pCachedMinSizeForHeightHeight, pCachedMinSizeForHeightSize, pCachedMinSizeForWidthSize, pCachedMinSizeForWidthWidth, pChildren, pHasBlockedDoLayout, pLayout, Dragengine.Gui.Widget.prevFocusWidget(), prevFocusWidgetAfter(), requestCaptureDirectional(), requestCaptureMouse(), requestReleaseDirectional(), requestReleaseMouse(), and runWhileBlockingLayout().

◆ onPaddingChanged()

void Dragengine.Gui.Container.onPaddingChanged ( )

Padding changed.

Reimplemented from Dragengine.Gui.Widget.

◆ onStateChanged()

void Dragengine.Gui.Container.onStateChanged ( StateChangeEvent event)

◆ prevFocusWidgetAfter()

Widget Dragengine.Gui.Container.prevFocusWidgetAfter ( Widget widget)

Find previous widget in the focus cycle that can grab the focus.

Reimplemented in Dragengine.Gui.ListBox, and Dragengine.Gui.Window.

Referenced by onGuiThemeChanged().

◆ removeAllWidgets()

◆ removeWidget()

void Dragengine.Gui.Container.removeWidget ( Widget widget)

◆ requestCaptureDirectional()

bool Dragengine.Gui.Container.requestCaptureDirectional ( Widget widget)

Request to capture directional navigation for the specified widget.

Returns
true if the request has been accepted.

Reimplemented in Dragengine.Gui.Desktop.

Referenced by onGuiThemeChanged().

◆ requestCaptureMouse()

bool Dragengine.Gui.Container.requestCaptureMouse ( Widget widget)

Request to capture the mouse for the specified widget. Returns true if the request has been accepted.

Reimplemented in Dragengine.Gui.Desktop.

Referenced by onGuiThemeChanged().

◆ requestReleaseDirectional()

bool Dragengine.Gui.Container.requestReleaseDirectional ( Widget widget)

Request to release directional navigation capture.

Returns
true if the request has been accepted.

Reimplemented in Dragengine.Gui.Desktop.

Referenced by onGuiThemeChanged().

◆ requestReleaseMouse()

bool Dragengine.Gui.Container.requestReleaseMouse ( Widget widget)

Request to release mouse capture. Returns true if the request has been accepted.

Reimplemented in Dragengine.Gui.ComboBox, Dragengine.Gui.Desktop, and Dragengine.Gui.WindowPopup.

Referenced by onGuiThemeChanged().

◆ runWhileBlockingLayout()

void Dragengine.Gui.Container.runWhileBlockingLayout ( Block ablock)

Run block while layouting is blocked.

This method is useful when you have to add or remove multiple widgets avoiding layout calls to be done for each modification except once to avoid performance loss. The method ensures the blocking state is restored to the value present before even in case of exceptions. You still have to call doLayout() to trigger an update after returning from the method call. This method call can be nested safely.

Referenced by Dragengine.Gui.PanelFPSRates.addFPSWidgets(), Dragengine.Gui.MenuPopup.addItemCommand(), Dragengine.Gui.WindowSettings.addSheetButton(), Dragengine.Gui.EMPSystem.ParameterValueEditor.applyChanges(), Dragengine.Gui.ModManagement.MMDialogReportMod.createContent(), Dragengine.Gui.ModManagement.MMPanelModInfo.createContent(), Dragengine.Gui.PanelInteractPromptController.createContent(), Dragengine.Gui.RatingUpDown.createContent(), Dragengine.Gui.WindowGameWorld.createContent(), Dragengine.Gui.WindowVirtualKeyboard.createVirtualKeyHide(), Dragengine.Gui.WindowLoading.createWindowContent(), Dragengine.Gui.MenuBarItem.dispose(), Dragengine.Gui.Slider.ActionSlide.doLayout(), Dragengine.Gui.SpinButton.enableDirectionButtons(), Dragengine.Gui.ModManagement.MMPanelModUserAccount.findLoadAvatarImage(), Dragengine.Gui.MenuItem.fireActionListeners(), Dragengine.Gui.PanelPlayerChoiceEntry.getAction(), getContainerWidth(), Dragengine.Gui.ModManagement.MMModificationListRenderer.ModWidget.getDefaultMinimumSize(), Dragengine.Gui.ModManagement.MMModificationListRenderer.ModWidget.getDefaultSize(), Dragengine.Gui.ModManagement.MMTransferListRenderer.ModWidget.getDefaultSize(), Dragengine.Gui.ModManagement.MMAuthProviderListRenderer.ProviderWidget.getDesignerSelectorBase(), Dragengine.Gui.Viewport.getHorizontalRangeModel(), Dragengine.Gui.EditBindingsPanel.getListBox(), Dragengine.Gui.DisplayInteractPromptEntry.getPanelBindings(), Dragengine.Gui.RatingUpDown.getPanelUp(), Dragengine.Gui.RatingUpDown.getReadOnly(), Dragengine.Gui.WindowSettings.getSheetWithIdentifier(), Dragengine.Gui.PanelHud.getTopRight(), Dragengine.Gui.WindowDialog.message(), Dragengine.Gui.Button.new(), Dragengine.Gui.MenuItemSubMenu.new(), Dragengine.Gui.ModManagement.MMImageGallery.new(), Dragengine.Gui.ModManagement.MMTransferListRenderer.ModWidget.new(), Dragengine.Gui.ModManagement.MMWindowModInfo.new(), Dragengine.Gui.ModManagement.MMWindowModManagement.new(), Dragengine.Gui.PanelHud.new(), Dragengine.Gui.ScrollPanel.new(), Dragengine.Gui.WindowPlayerChoice.new(), Dragengine.Gui.WindowPopup.new(), Dragengine.Gui.WindowSubTitle.new(), Dragengine.Gui.WindowToolTip.new(), Dragengine.Services.User.DialogServiceUserAcceptTos.new(), Dragengine.Gui.ListBox.nextFocusWidgetAfter(), Dragengine.Gui.ListBox.onButtonPress(), Dragengine.Gui.PanelHud.onDesignerSelectorChanged(), Dragengine.Gui.PanelPlayerChoiceEntry.onDesignerSelectorChanged(), Dragengine.Gui.WindowCaptureBinding.onGamepadButtonPressed(), Dragengine.Gui.WindowPopup.onGamepadButtonPressed(), onGuiThemeChanged(), Dragengine.Gui.ModManagement.MMPanelModInfo.onReportMod(), Dragengine.Gui.PanelInteractPrompt.selectionChanged(), Dragengine.Gui.WindowVirtualKeyboard.sendKeyPressed(), Dragengine.Gui.EditModuleParametersPanel.setAdvanced(), Dragengine.Gui.Viewport.setContent(), Dragengine.Gui.MenuItemToggle.setToggled(), Dragengine.Gui.SubTitleBoxTextBorder.subtitleWidget(), Dragengine.Gui.ToggleButton.toggledChanged(), Dragengine.Gui.DisplayInteractPromptEntry.updateBindingWidgets(), Dragengine.Gui.ModManagement.MMPanelModManagement.SearchCategoryCheckBox.ServiceModsSelectionChanged.updateModelTransfers(), Dragengine.Gui.ListBox.updateRenderWidgets(), Dragengine.Gui.Button.updateWidgetImage(), and Dragengine.Gui.Desktop.warpCenterMouseIn().

◆ setEnabled()

◆ setHasBlockedDoLayout()

void Dragengine.Gui.Container.setHasBlockedDoLayout ( bool hasBlockedDoLayout)

Set if doLayout calls happened during runWhileBlockingLayout.

◆ setLayout()

void Dragengine.Gui.Container.setLayout ( Layout layout)

Set layout.

References pChildren, and Dragengine.Gui.Widget.setParent().

Referenced by Dragengine.Gui.PanelFPSRates.addFPSWidgets(), Dragengine.Gui.WindowSettings.addSheetButton(), Dragengine.Gui.EMPSystem.ParameterValueEditor.applyChanges(), Dragengine.Gui.ModManagement.MMWindowModManagement.createButton(), Dragengine.Gui.ModManagement.MMDialogReportMod.createContent(), Dragengine.Gui.ModManagement.MMPanelModInfo.createContent(), Dragengine.Gui.RatingUpDown.createContent(), Dragengine.Services.User.DialogServiceUserAcceptTos.createContent(), Dragengine.Gui.ModManagement.MMWindowModInfo.createModInfoPanel(), Dragengine.Gui.BgButton.dispose(), Dragengine.Gui.PanelPlayerChoice.dispose(), Dragengine.Gui.ScrollBar.ActionScroll.enableDirectionButtons(), Dragengine.Gui.Desktop.getActiveWindow(), Dragengine.Gui.WindowModal.getBlockWindow(), getContainerWidth(), Dragengine.Gui.CheckBox.getFocusMouseLocation(), Dragengine.Gui.OptionBox.getFocusMouseLocation(), Dragengine.Gui.ListBox.getHorizontalRangeModel(), Dragengine.Gui.MainMenus.Interactive.IMMTextDisplay.getText(), Dragengine.Gui.ListBox.getVerticalRangeModel(), Dragengine.Gui.GameRoot.new(), Dragengine.Gui.MenuBar.new(), Dragengine.Gui.MenuItem.new(), Dragengine.Gui.ModManagement.MMImageGallery.new(), Dragengine.Gui.PanelPlayerChoice.new(), Dragengine.Gui.SubTitleBox.new(), Dragengine.Gui.WindowConsole.new(), Dragengine.Gui.WindowModal.new(), Dragengine.Gui.PanelHud.onDesignerSelectorChanged(), Dragengine.Gui.ComboBox.onFocusLost(), Dragengine.Gui.EditBindingsPanel.resetChanges(), Dragengine.Gui.MainMenus.Interactive.InteractiveMainMenu.setInteract(), Dragengine.Gui.BgButton.setText(), Dragengine.Gui.MainMenus.Interactive.IMMTextDisplay.setText(), Dragengine.Gui.ModManagement.MMPanelModManagement.SearchCategoryCheckBox.ServiceModsSelectionChanged.updateModelTransfers(), Dragengine.Gui.Button.updateWidgetImage(), and Dragengine.Gui.PanelInteractPrompt.updateWidgets().

◆ setMousePointer()

void Dragengine.Gui.Container.setMousePointer ( MousePointerFactory mousePointer)

Set mouse pointer to use.

If widget has no mouse pointer the parent mouse pointer is used.

Reimplemented from Dragengine.Gui.Widget.

References Dragengine.Gui.Widget.dispose(), and pBlockLayout.

◆ setStateChangeNotifyChildren()

void Dragengine.Gui.Container.setStateChangeNotifyChildren ( bool notify)

Set to notify children if state changed.

Version
1.5

Referenced by Dragengine.Gui.MenuItem.new().

Member Data Documentation

◆ pBlockLayout

bool Dragengine.Gui.Container.pBlockLayout

◆ pCachedMinSize

Point Dragengine.Gui.Container.pCachedMinSize

Referenced by onGuiThemeChanged().

◆ pCachedMinSizeForHeightHeight

int Dragengine.Gui.Container.pCachedMinSizeForHeightHeight

Referenced by onGuiThemeChanged().

◆ pCachedMinSizeForHeightSize

Point Dragengine.Gui.Container.pCachedMinSizeForHeightSize

Referenced by onGuiThemeChanged().

◆ pCachedMinSizeForWidthSize

Point Dragengine.Gui.Container.pCachedMinSizeForWidthSize

Referenced by onGuiThemeChanged().

◆ pCachedMinSizeForWidthWidth

int Dragengine.Gui.Container.pCachedMinSizeForWidthWidth

Referenced by onGuiThemeChanged().

◆ pChildren

Array Dragengine.Gui.Container.pChildren

Referenced by new(), new(), onGuiThemeChanged(), and setLayout().

◆ pHasBlockedDoLayout

bool Dragengine.Gui.Container.pHasBlockedDoLayout

Referenced by onGuiThemeChanged().

◆ pLayout

Layout Dragengine.Gui.Container.pLayout

Referenced by new(), new(), and onGuiThemeChanged().

◆ pStateChangeNotifyChildren

bool Dragengine.Gui.Container.pStateChangeNotifyChildren

The documentation for this class was generated from the following file: