Drag[en]gine Script Module DragonScript
1.23
|
Classes | |
class | RepeatKeyEventTimer |
Repeat key event timer. More... | |
Public Member Functions | |
void | addDragListener (DragListener listener) |
void | addFocusListener (FocusListener listener) |
Add focus listener. More... | |
void | addGamepadListener (GamepadListener listener) |
Add gamepad listener. More... | |
void | addKeyListener (KeyListener listener) |
void | addMouseListener (MouseListener listener) |
void | addStateChangeListener (StateChangeListener listener) |
Add state change listener. More... | |
void | addWidgetListener (WidgetListener listener) |
Add widget listener. More... | |
bool | canGrabFullFocus () |
void | captureMouse () |
void | design () |
Design widget using WidgetDesigner. More... | |
void | dispose () |
Widget | findFocusableWidget () |
Widget | findLastFocusableWidget () |
CanvasCreator | getBackgroundCanvasCreator () |
Background canvas creator or null to use background color. More... | |
bool | getBlockLayoutParent () |
Block layoutParent calls. More... | |
Border | getBorder () |
BorderSize | getBorderSize () |
RectArea | getBoundary () |
Rectangulare boundary of the widget. More... | |
RectArea | getBoundaryWithBorder () |
Rectangulare boundary of the widget including border. More... | |
bool | getCanFocus () |
CanvasView | getCanvasBackground () |
CanvasView | getCanvasContent () |
CanvasView | getCanvasWidget () |
Clipboard | getClipboard () |
Clipboard or null to use parent clipboard. More... | |
ColorMatrix | getColorTransformation () |
Color transformation. More... | |
WidgetDesigner | getDesigner () |
Designer. More... | |
String | getDesignerSelector () |
Designer selector. More... | |
Desktop | getDesktop () |
Point | getDesktopPosition () |
Widget position in desktop coordinates. More... | |
bool | getEnabled () |
MousePointerFactory | getFirstMousePointer () |
First assigned mouse pointer. More... | |
Font | getFont () |
bool | getHasBlockedLayoutParent () |
layoutParent calls happened during runWhileBlockingLayoutParent. More... | |
bool | getHasFocus () |
int | getHeight () |
Height of widget. More... | |
RangeModel | getHorizontalRangeModel () |
Horizontal range model for viewports to synchronize the horizontal scrollbar. More... | |
Widget | getHoverWidget () |
Widget the mouse hovers above or null. More... | |
Point | getLocalMouseLocation () |
Parent desktop mouse location in widget coordinates. More... | |
Point | getMinimumSize () |
Point | getMinimumSizeForHeight (int height) |
Minimum size of widget using reference widget height and variable width. More... | |
Point | getMinimumSizeForWidth (int width) |
Minimum size of widget using reference widget width and variable height. More... | |
Point | getMinimumSizeWithBorder () |
Point | getMinimumSizeWithBorderForHeight (int height) |
Minimum size of widget with border using reference height. More... | |
Point | getMinimumSizeWithBorderForWidth (int width) |
Minimum size of widget with border for reference width. More... | |
MousePointerFactory | getMousePointer () |
Mouse pointer to use. More... | |
BorderSize | getPadding () |
Padding. More... | |
Container | getParent () |
Point | getPosition () |
Position of the widget. More... | |
bool | getProtectBackgroundCanvasCreator () |
Protect custom set background canvas creator. More... | |
bool | getProtectBorder () |
Protect custom set border. More... | |
bool | getProtectFont () |
Protect custom set font. More... | |
bool | getProtectMinimumSize () |
Protect custom set minimumsize. More... | |
bool | getProtectMousePointer () |
Protect custom set mouse pointer. More... | |
bool | getProtectPadding () |
Protect custom set padding. More... | |
bool | getProtectTextColor () |
Protect custom set text color. More... | |
Point | getRelativePosition (Container parent) |
Widget position in parent widget coordinates. More... | |
Point | getScreenPosition () |
Widget position in screen coordinates. More... | |
RectArea | getScreenRectArea () |
Point | getSetMinimumSize () |
Point | getSize () |
Size of the widget. More... | |
Color | getTextColor () |
Text color. More... | |
String | getTitle () |
Widget title. More... | |
Object | getToolTip () |
Tooltip or null. More... | |
float | getTotalTransparency () |
TexMatrix2 | getTransformation () |
float | getTransparency () |
RangeModel | getVerticalRangeModel () |
Vertical range model for viewports to synchronize the vertical scrollbar. More... | |
bool | getVisible () |
Widget | getWidgetAt (Point position) |
Widget at coordinates or null if not found. More... | |
int | getWidth () |
Width of widget. More... | |
Window | getWindow () |
Point | getWindowPosition () |
Widget position in window coordinates. More... | |
int | getX () |
X position of widget. More... | |
int | getY () |
Y position of widget. More... | |
void | grabFocus () |
bool | hasParent (Container container) |
bool | isDesignerSet () |
Custom designer is set. More... | |
bool | isFullEnabled () |
Widget and all parent widgets are enabled. More... | |
bool | isMinimumSizeSet () |
bool | isMouseInside () |
Mouse is hovering over this widget. More... | |
bool | isPointInside (Point position) |
bool | isTransformationSet () |
void | layoutParent () |
void | layoutParentIfBlocked () |
Calls layoutParent if getHasBlockedLayoutParent() is true. More... | |
Widget | new () |
Create widget. More... | |
Widget | new (int x, int y, int width, int height) |
Create widget with initial location and size. More... | |
Widget | new (Point position, Point size) |
Create widget with initial location and size. More... | |
Widget | nextFocusWidget () |
Find next widget in the focus cycle that can grab the focus. More... | |
void | notifyBorderParametersChanged () |
void | onDesignerChanged () |
Designer changed. More... | |
void | onDesignerSelectorChanged () |
Designer selector changed. More... | |
void | onDispose (WidgetEvent event) |
Window is disposing. More... | |
void | onFocusLost (FocusEvent event) |
Widget lost focus. More... | |
void | onFocusReceived (FocusEvent event) |
Widget received focus. More... | |
void | onFrameUpdate (float elapsed) |
Do frame update. More... | |
void | onGamepadButtonPressed (GamepadEvent event) |
Gamepad button has been pressed. More... | |
void | onGamepadButtonReleased (GamepadEvent event) |
Gamepad button has been released. More... | |
void | onGuiThemeChanged () |
void | onHidden (WidgetEvent event) |
Widget has been hidden. More... | |
void | onPaddingChanged () |
Padding changed. More... | |
void | onParentStateChanged () |
Parent state changed. More... | |
void | onParentStateChanged (bool force) |
Parent state changed. More... | |
void | onReposition (WidgetEvent event) |
Position changed. More... | |
void | onResize (WidgetEvent event) |
Size changed. More... | |
void | onSetFont () |
void | onSetTextColor () |
Text color changed. More... | |
void | onShown (WidgetEvent event) |
Widget has been shown. More... | |
void | onStateChanged (StateChangeEvent event) |
State changed. More... | |
void | onTranslationChanged () |
Translation manager or active language pack changed. More... | |
void | popdownVirtualKeyboard () |
Popdown virtual keyboard if Desktop has one assigned. More... | |
void | popupVirtualKeyboard () |
Popup virtual keyboard if Desktop has one assigned. More... | |
Widget | prevFocusWidget () |
Find previous widget in the focus cycle that can grab the focus. More... | |
void | processEvent (Event event) |
void | releaseMouse () |
void | removeDragListener (DragListener listener) |
void | removeFocusListener (FocusListener listener) |
Remove focus listener. More... | |
void | removeGamepadListener (GamepadListener listener) |
Remove gamepad listener. More... | |
void | removeKeyListener (KeyListener listener) |
void | removeMouseListener (MouseListener listener) |
void | removeStateChangeListener (StateChangeListener listener) |
Remove state change listener. More... | |
void | removeWidgetListener (WidgetListener listener) |
Remove widget listener. More... | |
void | requestGrabFocus (Widget widget) |
void | runWhileBlockingLayoutParent (Block ablock) |
Run block while layouting is blocked. More... | |
void | safeDispose () |
Safely dispose of widget. More... | |
void | sendEvent (Event event) |
void | sendEventToListeners (Event event, bool sendToParent) |
Send event to all appropriate listeners for events of its kind. More... | |
void | setBackgroundCanvasCreator (CanvasCreator creator) |
Set background canvas creator or null to use background color. More... | |
void | setBlockLayoutParent (bool blockLayoutParent) |
Set block layoutParent calls. More... | |
void | setBorder (Border border) |
void | setCanFocus (bool canFocus) |
void | setClipboard (Clipboard clipboard) |
Set clipboard or null to use parent clipboard. More... | |
void | setColorTransformation (ColorMatrix transformation) |
Set color transformation. More... | |
void | setDesigner (WidgetDesigner designer) |
Set designer. More... | |
void | setDesignerSelector (String selector) |
Set designer selector. More... | |
void | setEnabled (bool enabled) |
void | setFont (Font font) |
void | setHasBlockedLayoutParent (bool hasBlockedLayoutParent) |
Set if layoutParent calls happened during runWhileBlockingLayoutParent. More... | |
void | setHasFocus (bool hasFocus) |
void | setHeight (int height) |
Set height of widget. More... | |
void | setMinimumSize (Point size) |
void | setMousePointer (MousePointerFactory mousePointer) |
Set mouse pointer to use. More... | |
void | setPadding (BorderSize padding) |
Set padding. More... | |
void | setParent (Container parent) |
void | setPosition (Point position) |
Set position of widget. More... | |
void | setProtectBackgroundCanvasCreator (bool protect) |
Set protect custom set background canvas creator. More... | |
void | setProtectBorder (bool protect) |
Set protect custom set border. More... | |
void | setProtectFont (bool protect) |
Set protect custom set font. More... | |
void | setProtectMinimumSize (bool protect) |
Set protect custom set minimumsize. More... | |
void | setProtectMousePointer (bool protect) |
Set protect custom set mouse pointer. More... | |
void | setProtectPadding (bool protect) |
Set protect custom set padding. More... | |
void | setProtectTextColor (bool protect) |
Set protect custom set text color. More... | |
void | setSize (Point size) |
Set size of widget. More... | |
void | setTextColor (Color color) |
Set text color. More... | |
void | setTitle (String title) |
Set widget title. More... | |
void | setToolTip (Object toolTip) |
Set tooltip or null. More... | |
void | setTransformation (TexMatrix2 transformation) |
void | setTransparency (float transparency) |
void | setVisible (bool visible) |
void | setWidth (int width) |
Set width of widget. More... | |
void | setX (int x) |
Set X position of widget. More... | |
void | setY (int y) |
Set Y Position of widget. More... | |
void | startFrameUpdater () |
Start frame updater if not running. More... | |
void | stopFrameUpdater () |
Stop frame updater if running. More... | |
Protected Member Functions | |
WidgetDesigner | getDesignerFromTheme () |
Get designer from gui theme. More... | |
void | updateCanvasBackground () |
Update background canvas content. More... | |
void | updateCanvasGeometry () |
Update canvas position and size. More... | |
Widget base class. Represents a graphical screen component.
void Dragengine.Gui.Widget.addDragListener | ( | DragListener | listener | ) |
Add drag listener.
void Dragengine.Gui.Widget.addFocusListener | ( | FocusListener | listener | ) |
Add focus listener.
void Dragengine.Gui.Widget.addGamepadListener | ( | GamepadListener | listener | ) |
Add gamepad listener.
void Dragengine.Gui.Widget.addKeyListener | ( | KeyListener | listener | ) |
Add key listener.
void Dragengine.Gui.Widget.addMouseListener | ( | MouseListener | listener | ) |
Add mouse listener.
void Dragengine.Gui.Widget.addStateChangeListener | ( | StateChangeListener | listener | ) |
Add state change listener.
void Dragengine.Gui.Widget.addWidgetListener | ( | WidgetListener | listener | ) |
Add widget listener.
bool Dragengine.Gui.Widget.canGrabFullFocus | ( | ) |
Determines if a widget can grab the full focus. Full focus means that all parents above the widget are visible and enabled
void Dragengine.Gui.Widget.captureMouse | ( | ) |
Captures the mouse if not already captured by another widget.
Reimplemented in Dragengine.Gui.MenuPopup.
void Dragengine.Gui.Widget.design | ( | ) |
Design widget using WidgetDesigner.
void Dragengine.Gui.Widget.dispose | ( | ) |
Disposes of the widget cleaning references.
Reimplemented in Dragengine.Gui.MainMenus.Interactive.InteractiveMainMenu, Dragengine.Gui.MainMenus.Interactive.IMMTextDisplay, Dragengine.Gui.WindowModal, Dragengine.Gui.WindowLogo, Dragengine.Gui.WindowLoading, Dragengine.Gui.WindowGameWorld, Dragengine.Gui.WindowDialog, Dragengine.Gui.WindowConsole, Dragengine.Gui.Window, Dragengine.Gui.ToggleButton, Dragengine.Gui.TextWidget, Dragengine.Gui.TextArea, Dragengine.Gui.SwitchPanel, Dragengine.Gui.SubTitleBoxTextBorder, Dragengine.Gui.SpinButton, Dragengine.Gui.ShoutConsole, Dragengine.Gui.ScrollPanel, Dragengine.Gui.ProgressBar, Dragengine.Gui.PanelPlayerChoice, Dragengine.Gui.OptionBox, Dragengine.Gui.ModManagement.MMImageGalleryPreviewImage, Dragengine.Gui.MenuPopup, Dragengine.Gui.MenuItemSubMenu, Dragengine.Gui.MenuItemCommand, Dragengine.Gui.MenuItem, Dragengine.Gui.MenuBarItem, Dragengine.Gui.MenuBar, Dragengine.Gui.ListBox, Dragengine.Gui.Label, Dragengine.Gui.PanelInteractPromptController, Dragengine.Gui.PanelInteractPrompt, Dragengine.Gui.GameRoot, Dragengine.Gui.EditModuleParametersPanel, Dragengine.Gui.WindowCaptureBinding, Dragengine.Gui.DisplayVideo, Dragengine.Gui.DisplayFPSRate, Dragengine.Gui.Desktop, Dragengine.Gui.DefaultComboBoxEditor, Dragengine.Gui.ConsoleInputField, Dragengine.Gui.ComboBox, Dragengine.Gui.ComboBox.ComboPopup, Dragengine.Gui.CheckBox, Dragengine.Gui.Button, and Dragengine.Gui.BgButton.
Widget Dragengine.Gui.Widget.findFocusableWidget | ( | ) |
Find first widget that can grab the focus or null if none exists.
Reimplemented in Dragengine.Gui.ListBox, and Dragengine.Gui.Container.
Widget Dragengine.Gui.Widget.findLastFocusableWidget | ( | ) |
Find last widget that can grab the focus or null if none exists.
Reimplemented in Dragengine.Gui.ListBox, and Dragengine.Gui.Container.
CanvasCreator Dragengine.Gui.Widget.getBackgroundCanvasCreator | ( | ) |
Background canvas creator or null to use background color.
bool Dragengine.Gui.Widget.getBlockLayoutParent | ( | ) |
Block layoutParent calls.
Used to prevent deadloops and performance problems with layoutParent/doLayout calls. Be careful to disable blocking even in case of exceptions. Also make sure to restore the block layout call in place before changing it by yourself to not break chains.
Border Dragengine.Gui.Widget.getBorder | ( | ) |
Retrieves the border or null if not set.
BorderSize Dragengine.Gui.Widget.getBorderSize | ( | ) |
Get border size. If no border is set an empty border size is returned.
RectArea Dragengine.Gui.Widget.getBoundary | ( | ) |
Rectangulare boundary of the widget.
RectArea Dragengine.Gui.Widget.getBoundaryWithBorder | ( | ) |
Rectangulare boundary of the widget including border.
bool Dragengine.Gui.Widget.getCanFocus | ( | ) |
Retrieve if widget can get the focus.
CanvasView Dragengine.Gui.Widget.getCanvasBackground | ( | ) |
Canvas view for the widget background.
CanvasView Dragengine.Gui.Widget.getCanvasContent | ( | ) |
Canvas view for the widget content.
CanvasView Dragengine.Gui.Widget.getCanvasWidget | ( | ) |
Canvas view for the entire widget.
Clipboard Dragengine.Gui.Widget.getClipboard | ( | ) |
Clipboard or null to use parent clipboard.
ColorMatrix Dragengine.Gui.Widget.getColorTransformation | ( | ) |
Color transformation.
WidgetDesigner Dragengine.Gui.Widget.getDesigner | ( | ) |
Designer.
|
protected |
Get designer from gui theme.
Reimplemented in Dragengine.Gui.SpinButton.
String Dragengine.Gui.Widget.getDesignerSelector | ( | ) |
Designer selector.
Selects designer from gui theme. Selector composes of alphanumeric identifier. A chain of identifiers can be specified separated by periods. If a chain is defined the full chain is first checked to find the designer. If not found the right most identifier is stripped and the remaining chain checked for a match. The first match is used. This allows to add optional quallifier identifers at the end of the chain for future use while still matching broader designers in the mean time.
If null no designer is used from gui theme. Otherwise use class name (for example Widget) with optional qualifiers appended if necessary.
Reimplemented in Dragengine.Gui.ModManagement.MMTransferListRenderer.ModWidget.
Desktop Dragengine.Gui.Widget.getDesktop | ( | ) |
Retrieves the desktop or null if this widget is not part of a desktop. The default implementation forwards the request to the parent with the Desktop or a subclass thereof intercepting.
Reimplemented in Dragengine.Gui.Desktop.
Point Dragengine.Gui.Widget.getDesktopPosition | ( | ) |
Widget position in desktop coordinates.
Reimplemented in Dragengine.Gui.Desktop.
bool Dragengine.Gui.Widget.getEnabled | ( | ) |
Retrieve if widget is enabled.
MousePointerFactory Dragengine.Gui.Widget.getFirstMousePointer | ( | ) |
First assigned mouse pointer.
If the Widget has a mouse pointer this one is returned otherwise the one of the parent. Can be null if no widget up to top most one has an assigned mouse pointer.
Font Dragengine.Gui.Widget.getFont | ( | ) |
Retrieve font of widget.
bool Dragengine.Gui.Widget.getHasBlockedLayoutParent | ( | ) |
layoutParent calls happened during runWhileBlockingLayoutParent.
bool Dragengine.Gui.Widget.getHasFocus | ( | ) |
Retrieve if widget has the focus.
int Dragengine.Gui.Widget.getHeight | ( | ) |
Height of widget.
RangeModel Dragengine.Gui.Widget.getHorizontalRangeModel | ( | ) |
Horizontal range model for viewports to synchronize the horizontal scrollbar.
If this widget has no reasonable horizontal range model it should return null.
Reimplemented in Dragengine.Gui.Viewport, Dragengine.Gui.TextArea, and Dragengine.Gui.ListBox.
Widget Dragengine.Gui.Widget.getHoverWidget | ( | ) |
Widget the mouse hovers above or null.
Asks parent for hover widget otherwise returns null.
Reimplemented in Dragengine.Gui.WindowPopup, and Dragengine.Gui.Desktop.
Point Dragengine.Gui.Widget.getLocalMouseLocation | ( | ) |
Parent desktop mouse location in widget coordinates.
If no parent desktop is found zero point is returned.
Point Dragengine.Gui.Widget.getMinimumSize | ( | ) |
Retrieve the minimal size of widget.
Reimplemented in Dragengine.Gui.WorldRenderer, Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.ProgressBar, Dragengine.Gui.ListBox, Dragengine.Gui.Label, Dragengine.Gui.DisplayVideo, Dragengine.Gui.DisplayStyledText, Dragengine.Gui.DisplayImage, Dragengine.Gui.DisplayCanvas, and Dragengine.Gui.Container.
Point Dragengine.Gui.Widget.getMinimumSizeForHeight | ( | int | height | ) |
Minimum size of widget using reference widget height and variable width.
Default implementation uses getMinimumSize().
Reimplemented in Dragengine.Gui.ListBox, and Dragengine.Gui.Container.
Point Dragengine.Gui.Widget.getMinimumSizeForWidth | ( | int | width | ) |
Minimum size of widget using reference widget width and variable height.
Default implementation uses getMinimumSize().
Reimplemented in Dragengine.Gui.TextArea, Dragengine.Gui.ListBox, Dragengine.Gui.Label, Dragengine.Gui.DisplayStyledText, and Dragengine.Gui.Container.
Point Dragengine.Gui.Widget.getMinimumSizeWithBorder | ( | ) |
Retrieve the minimal size of widget including the border size if one is set.
Point Dragengine.Gui.Widget.getMinimumSizeWithBorderForHeight | ( | int | height | ) |
Minimum size of widget with border using reference height.
Convenience method for Layout implementations to get the minimum size of a widget using getMinimumSizeForHeight() including border. Calls getMinimumSizeForHeight() with the border height (if present) subtracted from height. The border size is then added to the result.
Point Dragengine.Gui.Widget.getMinimumSizeWithBorderForWidth | ( | int | width | ) |
Minimum size of widget with border for reference width.
Convenience method for Layout implementations to get the minimum size of a widget using getMinimumSizeForWidth() including border. Calls getMinimumSizeForWidth() with the border width (if present) subtracted from width. The border size is then added to the result.
MousePointerFactory Dragengine.Gui.Widget.getMousePointer | ( | ) |
Mouse pointer to use.
If widget has no mouse pointer the parent mouse pointer is used.
BorderSize Dragengine.Gui.Widget.getPadding | ( | ) |
Padding.
Container Dragengine.Gui.Widget.getParent | ( | ) |
Retrieves the parent of widget or null if there is none.
Point Dragengine.Gui.Widget.getPosition | ( | ) |
Position of the widget.
bool Dragengine.Gui.Widget.getProtectBackgroundCanvasCreator | ( | ) |
Protect custom set background canvas creator.
bool Dragengine.Gui.Widget.getProtectBorder | ( | ) |
Protect custom set border.
bool Dragengine.Gui.Widget.getProtectFont | ( | ) |
Protect custom set font.
bool Dragengine.Gui.Widget.getProtectMinimumSize | ( | ) |
Protect custom set minimumsize.
bool Dragengine.Gui.Widget.getProtectMousePointer | ( | ) |
Protect custom set mouse pointer.
bool Dragengine.Gui.Widget.getProtectPadding | ( | ) |
Protect custom set padding.
bool Dragengine.Gui.Widget.getProtectTextColor | ( | ) |
Protect custom set text color.
Widget position in parent widget coordinates.
RectArea Dragengine.Gui.Widget.getScreenRectArea | ( | ) |
Retrieves the rect area on the screen of the widget.
Point Dragengine.Gui.Widget.getSetMinimumSize | ( | ) |
Retrieve the set minimal size of widget or null.
Point Dragengine.Gui.Widget.getSize | ( | ) |
Size of the widget.
Color Dragengine.Gui.Widget.getTextColor | ( | ) |
Text color.
String Dragengine.Gui.Widget.getTitle | ( | ) |
Object Dragengine.Gui.Widget.getToolTip | ( | ) |
Tooltip or null.
Object is typically of type String or StyledTextDocument. Other object types are possible if the tool tip providing object supports it.
float Dragengine.Gui.Widget.getTotalTransparency | ( | ) |
Retrieve total transparency of widget. This is the transparency of this widget multiplied by the total transparency of the parent.
TexMatrix2 Dragengine.Gui.Widget.getTransformation | ( | ) |
Transformation or null if not set.
float Dragengine.Gui.Widget.getTransparency | ( | ) |
Retrieve transparency of widget.
RangeModel Dragengine.Gui.Widget.getVerticalRangeModel | ( | ) |
Vertical range model for viewports to synchronize the vertical scrollbar.
If this widget has no reasonable vertical range model it should return null.
Reimplemented in Dragengine.Gui.Viewport, Dragengine.Gui.TextArea, and Dragengine.Gui.ListBox.
bool Dragengine.Gui.Widget.getVisible | ( | ) |
Retrieve if widget is visible.
Widget at coordinates or null if not found.
Reimplemented in Dragengine.Gui.WindowToolTip, Dragengine.Gui.WindowOverColor, Dragengine.Gui.ShoutConsole, and Dragengine.Gui.Container.
int Dragengine.Gui.Widget.getWidth | ( | ) |
Width of widget.
Window Dragengine.Gui.Widget.getWindow | ( | ) |
Retrieves the window or null if this widget is not part of a window. The default implementation forwards the request to the parent with the Window or a subclass thereof intercepting.
Reimplemented in Dragengine.Gui.Window.
Point Dragengine.Gui.Widget.getWindowPosition | ( | ) |
Widget position in window coordinates.
Reimplemented in Dragengine.Gui.Window.
int Dragengine.Gui.Widget.getX | ( | ) |
X position of widget.
int Dragengine.Gui.Widget.getY | ( | ) |
Y position of widget.
void Dragengine.Gui.Widget.grabFocus | ( | ) |
Makes the widget grab the focus if possible.
Reimplemented in Dragengine.Gui.WindowVirtualKeyboard, Dragengine.Gui.WindowToolTip, Dragengine.Gui.WindowPopup, Dragengine.Gui.Window, and Dragengine.Gui.ComboBox.
bool Dragengine.Gui.Widget.hasParent | ( | Container | container | ) |
Determines if this widget is parent directly or indirectly to a given container.
bool Dragengine.Gui.Widget.isDesignerSet | ( | ) |
Custom designer is set.
bool Dragengine.Gui.Widget.isFullEnabled | ( | ) |
Widget and all parent widgets are enabled.
bool Dragengine.Gui.Widget.isMinimumSizeSet | ( | ) |
Determines if the minimal size is set explicitly.
bool Dragengine.Gui.Widget.isMouseInside | ( | ) |
Mouse is hovering over this widget.
Tests if the hover widget of the parent desktop is this widget.
Reimplemented in Dragengine.Gui.MenuBarItem, and Dragengine.Gui.Container.
bool Dragengine.Gui.Widget.isPointInside | ( | Point | position | ) |
Determines if the given point lies inside the widget. This returns true if the x and y coordinates are bigger or equal 0 and are less tha width or height of the widget.
bool Dragengine.Gui.Widget.isTransformationSet | ( | ) |
Transformation is set.
void Dragengine.Gui.Widget.layoutParent | ( | ) |
Layout parent if existing. Call if a change potentially alters the size requirements.
Reimplemented in Dragengine.Gui.Viewport, Dragengine.Gui.Desktop, and Dragengine.Gui.Container.
void Dragengine.Gui.Widget.layoutParentIfBlocked | ( | ) |
Calls layoutParent if getHasBlockedLayoutParent() is true.
Call this instead of calling layoutParent() directly to improve performance by not calling layoutParent() if not required. This method is typically called after calling runWhileBlockingLayoutParent().
Widget Dragengine.Gui.Widget.new | ( | ) |
Create widget.
Reimplemented in Dragengine.Gui.WorldRenderer, Dragengine.Gui.WindowVirtualKeyboard, Dragengine.Gui.WindowToolTip, Dragengine.Gui.WindowPopup, Dragengine.Gui.WindowOverColor, Dragengine.Gui.WindowModal, Dragengine.Gui.WindowLogo, Dragengine.Gui.WindowLoading, Dragengine.Gui.WindowGameWorld, Dragengine.Gui.WindowDialog, Dragengine.Gui.WindowConsole, Dragengine.Gui.Window, Dragengine.Gui.Viewport, Dragengine.Gui.ToggleButton, Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.SwitchPanel, Dragengine.Gui.WindowSubTitle, Dragengine.Gui.SubTitleBox, Dragengine.Gui.SpinButton, Dragengine.Gui.ScrollPanel, Dragengine.Gui.ProgressBar, Dragengine.Gui.PanelPlayerChoice, Dragengine.Gui.PanelHud, Dragengine.Gui.PanelFPSRates, Dragengine.Gui.Panel, Dragengine.Gui.OptionBox, Dragengine.Gui.ModManagement.MMWindowModManagement, Dragengine.Gui.MenuPopup, Dragengine.Gui.MenuItemSeparator, Dragengine.Gui.MenuItem, Dragengine.Gui.MenuBar, Dragengine.Gui.ListBox, Dragengine.Gui.PanelInteractPromptController, Dragengine.Gui.PanelInteractPrompt, Dragengine.Gui.DisplayInteractPromptEntry, Dragengine.Gui.GameRoot, Dragengine.Gui.EditModuleParametersPanel, Dragengine.Gui.DisplayVideo, Dragengine.Gui.DisplayStyledText, Dragengine.Gui.DisplayRotatingImage, Dragengine.Gui.DisplayImage, Dragengine.Gui.DisplayIcon, Dragengine.Gui.DisplayFPSRate, Dragengine.Gui.DisplayCanvas, Dragengine.Gui.DefaultComboBoxEditor, Dragengine.Gui.Container, Dragengine.Gui.ConsoleInputField, Dragengine.Gui.ComboBox, Dragengine.Gui.CheckBox, and Dragengine.Gui.Button.
Widget Dragengine.Gui.Widget.new | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Create widget with initial location and size.
Width and height are clamped to 0 at minimum. Negative sizes can not be used.
Reimplemented in Dragengine.Gui.WorldRenderer, Dragengine.Gui.WindowModal, Dragengine.Gui.WindowDialog, Dragengine.Gui.WindowConsole, Dragengine.Gui.Window, Dragengine.Gui.WindowSettings, Dragengine.Gui.Panel, Dragengine.Gui.Desktop, and Dragengine.Gui.Container.
Create widget with initial location and size.
Width and height are clamped to 0 at minimum. Negative sizes can not be used.
Reimplemented in Dragengine.Gui.Window, and Dragengine.Gui.Container.
Widget Dragengine.Gui.Widget.nextFocusWidget | ( | ) |
Find next widget in the focus cycle that can grab the focus.
void Dragengine.Gui.Widget.notifyBorderParametersChanged | ( | ) |
Notify border about changes to the widget parameters potentially affecing the border.
void Dragengine.Gui.Widget.onDesignerChanged | ( | ) |
Designer changed.
Reimplemented in Dragengine.Gui.Window, Dragengine.Gui.SpinButton, Dragengine.Gui.OptionBox, Dragengine.Gui.MenuItemToggle, and Dragengine.Gui.CheckBox.
void Dragengine.Gui.Widget.onDesignerSelectorChanged | ( | ) |
Designer selector changed.
Reimplemented in Dragengine.Gui.WindowGameWorld, Dragengine.Gui.Window, Dragengine.Gui.SubTitleBoxTextBorder, Dragengine.Gui.RatingUpDown, Dragengine.Gui.PanelPlayerChoiceEntry, Dragengine.Gui.PanelHud, Dragengine.Gui.PanelFPSRates, Dragengine.Gui.MenuItemCommand, Dragengine.Gui.MenuBarItem, Dragengine.Gui.DisplayInteractPromptEntry, and Dragengine.Gui.ComboBox.
void Dragengine.Gui.Widget.onDispose | ( | WidgetEvent | event | ) |
Window is disposing.
Sends event to listeners of this widget only. Method is only called if widget listeners are present.
void Dragengine.Gui.Widget.onFocusLost | ( | FocusEvent | event | ) |
Widget lost focus.
Sends event to listeners.
Reimplemented in Dragengine.Gui.TextWidget, Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.ComboBox, and Dragengine.Gui.Button.
void Dragengine.Gui.Widget.onFocusReceived | ( | FocusEvent | event | ) |
Widget received focus.
Sends event to listeners.
Reimplemented in Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.ComboBox, and Dragengine.Gui.Button.
void Dragengine.Gui.Widget.onFrameUpdate | ( | float | elapsed | ) |
Do frame update.
Called every frame update if startFrameUpdater() is called.
elapsed | Elapsed time since the last frame update. Equals Engine.getElapsedTime(). |
Reimplemented in Dragengine.Gui.MainMenus.Interactive.InteractiveMainMenu, Dragengine.Gui.WindowVirtualKeyboard, Dragengine.Gui.WindowOverColor, Dragengine.Gui.WindowLogo, Dragengine.Gui.WindowLoading, Dragengine.Gui.WindowGameWorld, and Dragengine.Gui.DisplayVideo.
void Dragengine.Gui.Widget.onGamepadButtonPressed | ( | GamepadEvent | event | ) |
Gamepad button has been pressed.
Default behaviour sends event to all gamepad listeners or propagates event to parent if allowed.
Reimplemented in Dragengine.Gui.WindowCaptureBinding.
void Dragengine.Gui.Widget.onGamepadButtonReleased | ( | GamepadEvent | event | ) |
Gamepad button has been released.
Default behaviour sends event to all gamepad listeners or propagates event to parent if allowed.
void Dragengine.Gui.Widget.onGuiThemeChanged | ( | ) |
Notification that the gui theme changed. Attention! You have to super-call this method since it is used a bit differently than the other callback methods.
Reimplemented in Dragengine.Gui.WindowConsole, Dragengine.Gui.Window, Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.SpinButton, Dragengine.Gui.ProgressBar, Dragengine.Gui.ModManagement.MMPanelModInfo, Dragengine.Gui.ListBox, Dragengine.Gui.Label, Dragengine.Gui.Container, Dragengine.Gui.ComboBox, and Dragengine.Gui.Button.
void Dragengine.Gui.Widget.onHidden | ( | WidgetEvent | event | ) |
Widget has been hidden.
Sends event to listeners.
void Dragengine.Gui.Widget.onPaddingChanged | ( | ) |
Padding changed.
Reimplemented in Dragengine.Gui.WorldRenderer, Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.DisplayVideo, Dragengine.Gui.DisplayImage, and Dragengine.Gui.Container.
void Dragengine.Gui.Widget.onParentStateChanged | ( | ) |
Parent state changed.
Called by some certain widgets supporting childs widgets able to track their state.
The default implementation triggers a design() call.
void Dragengine.Gui.Widget.onParentStateChanged | ( | bool | force | ) |
Parent state changed.
Calls onParentStateChanged(bool) on all child widgets. Supports forcing update on the entire children chain.
void Dragengine.Gui.Widget.onReposition | ( | WidgetEvent | event | ) |
Position changed.
Sends event to listeners.
void Dragengine.Gui.Widget.onResize | ( | WidgetEvent | event | ) |
Size changed.
Sends event to listeners.
Reimplemented in Dragengine.Gui.WorldRenderer, Dragengine.Gui.WindowConsole, Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.WindowSubTitle, Dragengine.Gui.ShoutConsole, Dragengine.Gui.ProgressBar, Dragengine.Gui.ListBox, Dragengine.Gui.Label, Dragengine.Gui.DisplayVideo, Dragengine.Gui.DisplayStyledText, Dragengine.Gui.DisplayImage, Dragengine.Gui.DisplayCanvas, Dragengine.Gui.Desktop, and Dragengine.Gui.ComboBox.
void Dragengine.Gui.Widget.onSetFont | ( | ) |
Notification that the widget font changed.
Reimplemented in Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.ProgressBar, and Dragengine.Gui.Label.
void Dragengine.Gui.Widget.onSetTextColor | ( | ) |
Text color changed.
Reimplemented in Dragengine.Gui.TextField, Dragengine.Gui.TextArea, Dragengine.Gui.ProgressBar, and Dragengine.Gui.Label.
void Dragengine.Gui.Widget.onShown | ( | WidgetEvent | event | ) |
void Dragengine.Gui.Widget.onStateChanged | ( | StateChangeEvent | event | ) |
State changed.
Sends event to listeners.
Reimplemented in Dragengine.Gui.WorldRenderer, Dragengine.Gui.ListBox, Dragengine.Gui.Label, Dragengine.Gui.DisplayVideo, Dragengine.Gui.DisplayImage, Dragengine.Gui.Container, and Dragengine.Gui.BgButton.
void Dragengine.Gui.Widget.onTranslationChanged | ( | ) |
Translation manager or active language pack changed.
Reimplemented in Dragengine.Gui.Window, and Dragengine.Gui.Label.
void Dragengine.Gui.Widget.popdownVirtualKeyboard | ( | ) |
Popdown virtual keyboard if Desktop has one assigned.
void Dragengine.Gui.Widget.popupVirtualKeyboard | ( | ) |
Popup virtual keyboard if Desktop has one assigned.
Widget Dragengine.Gui.Widget.prevFocusWidget | ( | ) |
Find previous widget in the focus cycle that can grab the focus.
void Dragengine.Gui.Widget.processEvent | ( | Event | event | ) |
Process an event. This allows the widget to be used as the root widget in a game. Using this function you can implement your own desktop management routines or use no windows at all. An event is send to the root widget using this function. No other widget has to get an event sent through this function. Use the sendEvent function to further dispatch events through all widgets.
The default implementation is to send the event to yourself. Overwrite this behaviour to implement Desktop Widgets.
Reimplemented in Dragengine.Gui.GameRoot, and Dragengine.Gui.Desktop.
void Dragengine.Gui.Widget.releaseMouse | ( | ) |
Release mouse capture.
Reimplemented in Dragengine.Gui.WindowPopup, and Dragengine.Gui.MenuPopup.
void Dragengine.Gui.Widget.removeDragListener | ( | DragListener | listener | ) |
Remove a drag listener.
void Dragengine.Gui.Widget.removeFocusListener | ( | FocusListener | listener | ) |
Remove focus listener.
void Dragengine.Gui.Widget.removeGamepadListener | ( | GamepadListener | listener | ) |
Remove gamepad listener.
void Dragengine.Gui.Widget.removeKeyListener | ( | KeyListener | listener | ) |
Remove key listener.
void Dragengine.Gui.Widget.removeMouseListener | ( | MouseListener | listener | ) |
Remove mouse listener.
void Dragengine.Gui.Widget.removeStateChangeListener | ( | StateChangeListener | listener | ) |
Remove state change listener.
void Dragengine.Gui.Widget.removeWidgetListener | ( | WidgetListener | listener | ) |
Remove widget listener.
void Dragengine.Gui.Widget.requestGrabFocus | ( | Widget | widget | ) |
Request to focus the specified widget.
Reimplemented in Dragengine.Gui.Window, and Dragengine.Gui.Desktop.
void Dragengine.Gui.Widget.runWhileBlockingLayoutParent | ( | Block | ablock | ) |
Run block while layouting is blocked.
This method is useful when you do multiple changes to a widget avoiding layoutParent 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 layoutParent() to trigger an update after returning from the method call. This method call can be nested safely.
void Dragengine.Gui.Widget.safeDispose | ( | ) |
Safely dispose of widget.
If widget has parent removes the widget from the parent before calling dispose().
It is recommended to use safeDispose() instead of dispose() to be on the safe side.
void Dragengine.Gui.Widget.sendEvent | ( | Event | event | ) |
Sends an event to the widget. The Widget will check for focus grab and other situations and sends the event to all registered listeners.
Reimplemented in Dragengine.Gui.WindowPopup, Dragengine.Gui.MenuPopup, and Dragengine.Gui.ComboBox.ComboPopup.
void Dragengine.Gui.Widget.sendEventToListeners | ( | Event | event, |
bool | sendToParent | ||
) |
Send event to all appropriate listeners for events of its kind.
If there are no listeners the event is send to the parent if sendToParent is true.
Reimplemented in Dragengine.Gui.Window, and Dragengine.Gui.Desktop.
void Dragengine.Gui.Widget.setBackgroundCanvasCreator | ( | CanvasCreator | creator | ) |
Set background canvas creator or null to use background color.
void Dragengine.Gui.Widget.setBlockLayoutParent | ( | bool | blockLayoutParent | ) |
Set block layoutParent calls.
Used to prevent deadloops and performance problems with layoutParent/doLayout calls. Be careful to disable blocking even in case of exceptions. Also make sure to restore the block layout call in place before changing it by yourself to not break chains.
void Dragengine.Gui.Widget.setBorder | ( | Border | border | ) |
Sets the border or null if not set.
void Dragengine.Gui.Widget.setCanFocus | ( | bool | canFocus | ) |
Sets if widget can get the focus.
void Dragengine.Gui.Widget.setClipboard | ( | Clipboard | clipboard | ) |
Set clipboard or null to use parent clipboard.
void Dragengine.Gui.Widget.setColorTransformation | ( | ColorMatrix | transformation | ) |
Set color transformation.
void Dragengine.Gui.Widget.setDesigner | ( | WidgetDesigner | designer | ) |
Set designer.
void Dragengine.Gui.Widget.setDesignerSelector | ( | String | selector | ) |
Set designer selector.
Selects designer from gui theme. Selector composes of alphanumeric identifier. A chain of identifiers can be specified separated by periods. If a chain is defined the full chain is first checked to find the designer. If not found the right most identifier is stripped and the remaining chain checked for a match. The first match is used. This allows to add optional quallifier identifers at the end of the chain for future use while still matching broader designers in the mean time.
If null no designer is used from gui theme. Otherwise use class name (for example Widget) with optional qualifiers appended if necessary.
Reimplemented in Dragengine.Gui.DisplayInputSource.
void Dragengine.Gui.Widget.setEnabled | ( | bool | enabled | ) |
Sets if widget is enabled.
Reimplemented in Dragengine.Gui.Container.
void Dragengine.Gui.Widget.setFont | ( | Font | font | ) |
Sets new font of widget or null to use the gui theme one.
Reimplemented in Dragengine.Gui.BgButton.
void Dragengine.Gui.Widget.setHasBlockedLayoutParent | ( | bool | hasBlockedLayoutParent | ) |
Set if layoutParent calls happened during runWhileBlockingLayoutParent.
void Dragengine.Gui.Widget.setHasFocus | ( | bool | hasFocus | ) |
Sets if widget has the focus.
void Dragengine.Gui.Widget.setHeight | ( | int | height | ) |
Set height of widget.
void Dragengine.Gui.Widget.setMinimumSize | ( | Point | size | ) |
Sets the minimum size of widget or null if there is no limit.
void Dragengine.Gui.Widget.setMousePointer | ( | MousePointerFactory | mousePointer | ) |
Set mouse pointer to use.
If widget has no mouse pointer the parent mouse pointer is used.
Reimplemented in Dragengine.Gui.Container.
void Dragengine.Gui.Widget.setPadding | ( | BorderSize | padding | ) |
Set padding.
void Dragengine.Gui.Widget.setParent | ( | Container | parent | ) |
Sets the parent of widget. Use this function with caution. It should only be used by widgets which can contain other widgets to set their parent widget.
void Dragengine.Gui.Widget.setPosition | ( | Point | position | ) |
Set position of widget.
void Dragengine.Gui.Widget.setProtectBackgroundCanvasCreator | ( | bool | protect | ) |
Set protect custom set background canvas creator.
void Dragengine.Gui.Widget.setProtectBorder | ( | bool | protect | ) |
Set protect custom set border.
void Dragengine.Gui.Widget.setProtectFont | ( | bool | protect | ) |
Set protect custom set font.
void Dragengine.Gui.Widget.setProtectMinimumSize | ( | bool | protect | ) |
Set protect custom set minimumsize.
void Dragengine.Gui.Widget.setProtectMousePointer | ( | bool | protect | ) |
Set protect custom set mouse pointer.
void Dragengine.Gui.Widget.setProtectPadding | ( | bool | protect | ) |
Set protect custom set padding.
void Dragengine.Gui.Widget.setProtectTextColor | ( | bool | protect | ) |
Set protect custom set text color.
void Dragengine.Gui.Widget.setSize | ( | Point | size | ) |
Set size of widget.
void Dragengine.Gui.Widget.setTextColor | ( | Color | color | ) |
Set text color.
Reimplemented in Dragengine.Gui.BgButton.
void Dragengine.Gui.Widget.setTitle | ( | String | title | ) |
Set widget title.
For use by borders and decorators to provide a title to a widget.
Reimplemented in Dragengine.Gui.Window.
void Dragengine.Gui.Widget.setToolTip | ( | Object | toolTip | ) |
Set tooltip or null.
Object is typically of type String or StyledTextDocument. Other object types are possible if the tool tip providing object supports it.
void Dragengine.Gui.Widget.setTransformation | ( | TexMatrix2 | transformation | ) |
Set transformation or null if not set.
void Dragengine.Gui.Widget.setTransparency | ( | float | transparency | ) |
Sets transparency of widget.
void Dragengine.Gui.Widget.setVisible | ( | bool | visible | ) |
Sets if widget is visible.
void Dragengine.Gui.Widget.setWidth | ( | int | width | ) |
Set width of widget.
void Dragengine.Gui.Widget.setX | ( | int | x | ) |
Set X position of widget.
void Dragengine.Gui.Widget.setY | ( | int | y | ) |
Set Y Position of widget.
void Dragengine.Gui.Widget.startFrameUpdater | ( | ) |
Start frame updater if not running.
Once running the widget receives onFrameUpdate() calls every frame update.
void Dragengine.Gui.Widget.stopFrameUpdater | ( | ) |
Stop frame updater if running.
|
protected |
Update background canvas content.
Sets the content of the background canvas to canvas created by canvas creator if existing. Widget calls this method if background canvas creator or gui theme changed.
|
protected |
Update canvas position and size.
The position and size of the background and content canvas are adjusted to match the position and size of the widget in the parent container. Border canvas if existing is adjusted to always fit properly around the canvas background and content.
Reimplemented in Dragengine.Gui.Window.
CanvasCreator Dragengine.Gui.Widget.pBackgroundCanvasCreator |
bool Dragengine.Gui.Widget.pBlockLayoutParent |
Border Dragengine.Gui.Widget.pBorder |
bool Dragengine.Gui.Widget.pCanFocus |
CanvasView Dragengine.Gui.Widget.pCanvasBackground |
CanvasView Dragengine.Gui.Widget.pCanvasContent |
CanvasView Dragengine.Gui.Widget.pCanvasWidget |
Clipboard Dragengine.Gui.Widget.pClipboard |
WidgetDesigner Dragengine.Gui.Widget.pDesigner |
String Dragengine.Gui.Widget.pDesignerSelector |
Array Dragengine.Gui.Widget.pDragListeners |
bool Dragengine.Gui.Widget.pEnabled |
Array Dragengine.Gui.Widget.pFocusListeners |
Font Dragengine.Gui.Widget.pFont |
FrameUpdater Dragengine.Gui.Widget.pFrameUpdater |
Array Dragengine.Gui.Widget.pGamepadListeners |
bool Dragengine.Gui.Widget.pHasBlockedLayoutParent |
bool Dragengine.Gui.Widget.pHasFocus |
bool Dragengine.Gui.Widget.pIsDesignerSet |
Array Dragengine.Gui.Widget.pKeyListeners |
Point Dragengine.Gui.Widget.pMinSize |
Array Dragengine.Gui.Widget.pMouseListeners |
MousePointerFactory Dragengine.Gui.Widget.pMousePointer |
BorderSize Dragengine.Gui.Widget.pPadding |
Container Dragengine.Gui.Widget.pParent |
Point Dragengine.Gui.Widget.pPosition |
bool Dragengine.Gui.Widget.pProtectBackgroundCanvasCreator |
bool Dragengine.Gui.Widget.pProtectBorder |
bool Dragengine.Gui.Widget.pProtectFont |
bool Dragengine.Gui.Widget.pProtectMinimumSize |
bool Dragengine.Gui.Widget.pProtectMousePointer |
bool Dragengine.Gui.Widget.pProtectPadding |
bool Dragengine.Gui.Widget.pProtectTextColor |
RepeatKeyEventTimer Dragengine.Gui.Widget.pRepeatEventTimer |
Point Dragengine.Gui.Widget.pSize |
Array Dragengine.Gui.Widget.pStateChangeListeners |
Color Dragengine.Gui.Widget.pTextColor |
GuiTheme Dragengine.Gui.Widget.pTheme |
String Dragengine.Gui.Widget.pThemeSelector |
String Dragengine.Gui.Widget.pTitle |
Object Dragengine.Gui.Widget.pToolTip |
TexMatrix2 Dragengine.Gui.Widget.pTransformation |
TranslationManager Dragengine.Gui.Widget.pTranslationManager |
float Dragengine.Gui.Widget.pTransparency |
bool Dragengine.Gui.Widget.pVisible |
Array Dragengine.Gui.Widget.pWidgetListeners |