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
.

In addition to the predefined children it is possible to enable the mouse tracking and the fullscreen 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 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 * 5 => acc.input
  acc.output => c1.r
}

run root
run syshook