Class Window
-
- All Implemented Interfaces:
public abstract class WindowThis class represents the physical window that PolyUI will render to. As a rendering implementation, you must:
implement all the methods
create callbacks for the event methods in PolyUI e.g. PolyUI.resize
create callbacks for all the event-related methods in org.polyfrost.polyui.event.EventManager
call open to start the rendering loop; this can be blocking or non-blocking. Please note that after open is called, the rendering implementation will be created. This means that in a thread-based system such as LWJGL's OpenGL, you must ensure that it is fully setup before exiting
init {}.
-
-
Method Summary
Modifier and Type Method Description IntegergetWidth()UnitsetWidth(Integer width)IntegergetHeight()UnitsetHeight(Integer height)abstract Windowopen(PolyUI polyUI)open the window with the specified PolyUI instance, and then start the rendering loop. abstract Unitclose()destroy the window. abstract UnitcreateCallbacks()Create the callbacks for window events. abstract StringgetClipboard()Get the clipboard string. abstract UnitsetClipboard(String text)Set the clipboard string. abstract UnitsetCursor(Cursor cursor)Set the cursor design. abstract StringgetKeyName(Integer key)Return the name of a key that is not mapped by PolyUI. -
-
Method Detail
-
open
abstract Window open(PolyUI polyUI)
open the window with the specified PolyUI instance, and then start the rendering loop. It may be blocking or non-blocking.
-
createCallbacks
abstract Unit createCallbacks()
Create the callbacks for window events.
-
getClipboard
abstract String getClipboard()
Get the clipboard string. This is used for the org.polyfrost.polyui.component.impl.TextInput class.
If the data is empty or not a string, then null is returned.
-
setClipboard
abstract Unit setClipboard(String text)
Set the clipboard string. This is used for the org.polyfrost.polyui.component.impl.TextInput class.
-
getKeyName
abstract String getKeyName(Integer key)
Return the name of a key that is not mapped by PolyUI.
-
-
-
-