Frame or Window
Constructor
Frame|Window <id> (string title, double x, double y, double width, double height)
Action
Creates a frame with the specified width and height, and puts it at the point[x, y]
.
Predefined children
title
.
x
y
width
height
close
press
.x
.y
release
move
.x
.y
wheel
.dx
.dy
touches
.$added
.$removed
.size
key-pressed
key-released
key-pressed_text
key-released_text
refreshed
screenshot
mspf
In addition to the predefined children it is possible to enable the mouse tracking and the full-screen mode with the folowing expression:
<mouseTracking|fullScreen> = 1
Be aware that this expression will be only evaluated once when the program is started.
Example
use core
use base
use display
use gui
_main_
Component root {
Frame f ("myFrame", 0, 0, 400, 400)
mouseTracking = 1
Circle c1 (200, 200, 50)
f.move.x => c1.cx
f.move.y => c1.cy
AdderAccumulator acc (50, 10, 100)
f.wheel.dy * 1.5 => acc.input
acc.result => c1.r
}