| Did you know ... | Search Documentation: |
| Example |
The following example shows how a key_binding object may be used to make a graphical object editable using the mouse:
send(new(P, picture('Graphical editor')), open),
send(P, display, new(B, box(100,100))), send(B, recogniser,
new(K, key_binding(@nil,
argument))), send(K, function,’TAB’, message(@receiver,
inverted,
@receiver?inverted?negate)),
send(K, function,’\C-d’, free), send(K,
function,’\C-p’, pen).
Typing TAB (= control-I), the box is inverted; typing control-d will
delete the graphical; typing META-3 control-p will make the pen
(thickness) of the line 3. See key_binding<-argument
on how to specify the universal numeric argument.