Skip to content
Marcus Mascord edited this page Jul 11, 2014 · 9 revisions

The Fragment widget is a rectangle area that is drawn. It is a container widget so that other widgets can be drawn on to it. No Button widget exists in this framework, because the Fragment widget can be used just like a Button also. It allows for a click action.

The attributes for the Fragment widget are:

Attribute Type Description
m Widget The main Widget Class.
s WidgetStyle The style of the widget.
clickAction Function This is a function that is called when a user taps on the fragment. The function signature is function(Fragment Widget, x position of user tap, y position of user tap)
selectWidget Widget If this widget is not null, it allows the fragment to be selected instead on selecting the whole fragment. When this is selected, this widget is not returned but the fragment.

XML Input Widget Example

This is an example of the Input Widget written in XML:

Clone this wiki locally