@Environment(value=CLIENT) public interface ParentElement extends Element
| Modifier and Type | Method and Description |
|---|---|
default boolean |
changeFocus(boolean lookForwards)
Changes the focusing element by cycling to the next/previous element.
|
default boolean |
charTyped(char chr,
int keyCode)
Callback for when a character input has been captured.
|
List<? extends Element> |
children()
Gets a list of all child GUI elements.
|
default void |
focusOn(Element element) |
Element |
getFocused() |
default Optional<Element> |
hoveredElement(double mouseX,
double mouseY) |
boolean |
isDragging() |
default boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
default boolean |
keyReleased(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
default boolean |
mouseClicked(double mouseX,
double mouseY,
int button)
Callback for when a mouse button down event
has been captured.
|
default boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
Callback for when a mouse button drag event
has been captured.
|
default boolean |
mouseReleased(double mouseX,
double mouseY,
int button)
Callback for when a mouse button release event
has been captured.
|
default boolean |
mouseScrolled(double mouseX,
double mouseY,
double amount)
Callback for when a mouse button scroll event
has been captured.
|
void |
setDragging(boolean dragging) |
void |
setFocused(Element focused) |
default void |
setInitialFocus(Element element) |
isMouseOver, mouseMoveddefault boolean mouseClicked(double mouseX,
double mouseY,
int button)
GLFW class.mouseClicked in interface ElementmouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousebutton - the mouse button numbertrue to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int),
GLFW.GLFW_MOUSE_BUTTON_1default boolean mouseReleased(double mouseX,
double mouseY,
int button)
GLFW class.mouseReleased in interface ElementmouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousebutton - the mouse button numbertrue to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int),
GLFW.GLFW_MOUSE_BUTTON_1default boolean mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
GLFW class.mouseDragged in interface ElementmouseX - the current X coordinate of the mousemouseY - the current Y coordinate of the mousebutton - the mouse button numberdeltaX - the difference of the current X with the previous X coordinatedeltaY - the difference of the current Y with the previous Y coordinatetrue to indicate that the event handling is successful/validMouse.onCursorPos(long, double, double),
GLFW.GLFW_MOUSE_BUTTON_1boolean isDragging()
void setDragging(boolean dragging)
default boolean mouseScrolled(double mouseX,
double mouseY,
double amount)
mouseScrolled in interface ElementmouseX - the X coordinate of the mousemouseY - the Y coordinate of the mouseamount - value is > 1 if scrolled down, < 1 if scrolled uptrue to indicate that the event handling is successful/validMouse.onMouseScroll(long, double, double)default boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
GLFW class.keyPressed in interface ElementkeyCode - the named key code of the event as described in the GLFW classscanCode - the unique/platform-specific scan code of the keyboard inputmodifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)default boolean keyReleased(int keyCode,
int scanCode,
int modifiers)
GLFW class.keyReleased in interface ElementkeyCode - the named key code of the event as described in the GLFW classscanCode - the unique/platform-specific scan code of the keyboard inputmodifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)default boolean charTyped(char chr,
int keyCode)
GLFW class.charTyped in interface Elementchr - the captured characterkeyCode - the associated key codetrue to indicate that the event handling is successful/validKeyboard.onChar(long, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)default boolean changeFocus(boolean lookForwards)
changeFocus in interface ElementlookForwards - true to cycle forwards, otherwise cycle backwardstrue to indicate that the event handling is successful/valid