Interface IOWindow
access this type via: ui.IOWindow (provides, requires or uses)
--- extends:Canvas
IOLayer is the system API to control an OS-level window and interpret its events. This API is not normally used directly by the programmer. To create graphical windows, you would usually use an application-level wrapper of this API such as ui.Window.
Constants
byte CURSOR_DEFAULT
byte CURSOR_HIDDEN
byte CURSOR_CUSTOM
byte CURSOR_IBEAM
byte CURSOR_HAND
byte CURSOR_WAIT
byte CURSOR_SIZENS
byte CURSOR_SIZEWE
byte CURSOR_SIZENWSE
byte CURSOR_SIZENESW
byte CURSOR_SIZEALL
Events
mouseUp(MouseEvent m)
mouseDown(MouseEvent m)
mouseMove(MouseEvent m)
mouseWheel(MouseEvent m)
keyUp(KeyEvent k)
keyDown(KeyEvent k)
fileDrop(DropEvent d)
resizeWindow(WH size)
moveWindow(Point position)
closeWindow()
Functions
IOWindow()
void setVisible(bool v)
void setResizable(bool v)
void setFullScreen(bool v)
void setTitle(char title[])
void setIcon(storePixelMap p)
void setPosition(int x, int y)
void setSize(int w, int h)
void setBackground(storeColor c)
void setCursor(byte cursorType, optional Cursor c)
WH getResolution()
void paint()
PixelMap getPixels()
void close()
Constants
CURSOR_DEFAULT A value for setCursor() to select the system-default mouse cursor.
CURSOR_HIDDEN A value for setCursor() to hide the mouse cursor.
CURSOR_CUSTOM A value for setCursor() to select a custom mouse cursor, alongside a pixel map.
CURSOR_IBEAM A value for setCursor() to select an I-beam (often used in text areas).
CURSOR_HAND A value for setCursor() to select a hand.
CURSOR_WAIT A value for setCursor() to select a 'wait for something' cursor.
CURSOR_SIZENS A value for setCursor() to select a north-south arrow.
CURSOR_SIZEWE A value for setCursor() to select a west-east arrow.
CURSOR_SIZENWSE A value for setCursor() to select a north-west-south-east arrow.
CURSOR_SIZENESW A value for setCursor() to select a north-east-south-west arrow.
CURSOR_SIZEALL A value for setCursor() to select an every-direction arrow.
Events
mouseUp A mouse up event, emitted for application-level windows.
mouseDown A mouse down event, emitted for application-level windows.
mouseMove A mouse move event, emitted for application-level windows.
mouseWheel A mouse wheel event, emitted for application-level windows.
keyUp A key up event, emitted for application-level windows.
keyDown A key down event, emitted for application-level windows.
fileDrop A file drop event, emitted for application-level windows.
resizeWindow A window resize event, emitted for application-level windows.
moveWindow A window move event, emitted for application-level windows.
closeWindow A window close event, emitted for application-level windows.
IOWindow()
Initialise a new OS-level window.
void setVisible(bool v)
Hide/show the window.
void setResizable(bool v)
Set the window as user-resizeable or not.
void setFullScreen(bool v)
Set the window as full-screen or not.
void setTitle(char title[])
Set the title of the window.
void setIcon(storePixelMap p)
Set the image used for the icon of the window.
void setPosition(int x, int y)
Set the x/y position of the window on the screen.
void setSize(int w, int h)
Set the width and height of the window.
void setBackground(storeColor c)
Set the background color of the window.
void setCursor(byte cursorType, optional Cursor c)
Set the current mouse cursor of the window, using one of the CURSOR_ constants.
WH getResolution()
Get the screen resolution of the display on which the window resides.
void paint()
Repaint the window and its contents.
PixelMap getPixels()
Get the window's rendered content as a pixel map.
void close()
Close the window (other functions on this API will not work after this).