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
CURSOR_HIDDEN
CURSOR_CUSTOM
CURSOR_IBEAM
CURSOR_HAND
CURSOR_WAIT
CURSOR_SIZENS
CURSOR_SIZEWE
CURSOR_SIZENWSE
CURSOR_SIZENESW
CURSOR_SIZEALL
Events
mouseUp
mouseDown
mouseMove
mouseWheel
keyUp
keyDown
fileDrop
resizeWindow
moveWindow
closeWindow
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.
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).