File: widgets.txt

package info (click to toggle)
genesis 2.1-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 14,288 kB
  • ctags: 10,667
  • sloc: ansic: 111,959; makefile: 2,240; yacc: 1,797; lex: 976; csh: 54; sh: 13
file content (50 lines) | stat: -rw-r--r-- 1,932 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
This widget is a text widget. Use the scroll bar to read the
description of the other widgets in this example.



	THE WIDGETS EXAMPLE.

This is an example showing the use of the basic widgets. The
widgets involved are:
xform
xlabel
xbutton
xtoggle
xdialog
ximage
xtext (this one)

The xform is a widget whose purpose in life is to hold the other
widgets. All widgets must be children of a form.

The xlabel is just that - a label. You can set its color, text, and
font, but it doesnt respond to mouse events.

The xbuttons are like labels that do respond to mouse events.
Buttons have two panels, one of which is visible only when it is
pressed, and the other which is normally visible. Each panel can have
its own color, text and font. Every time a button is pressed it can 
call one or more script commands as specified in the 'script' field.

The xtoggles are buttons with two stable states. One panel is visible
when the state is 0 (off) and the other when it is 1 (on). Mouse
clicks make the xtoggle toggle.

The xdialogs are for entering and displaying data, as well as
issuing script calls. They handle a text string specified in
the value field. When entering data, the value field is updated
only when the mouse is clicked in the dialog, or when return is hit.
These two events are equivalent as far as the script call is concerned.
xdialogs can also display numerical values specified through messages.
This is useful for monintoring continually changing values.
Finally, if the value in a dialog is numerical, the fvalue field of
the dialog is set which can in turn be used for sending out messages.

The ximage is for displaying gif images. At this stage it is not
sensitive to mouse events so it cannot issue script calls.

The xtext is for displaying and editing text. One can either display
a specified string, or a text file. A scroll bar appears in the
xtext when there is too much text to display in the window.