| Did you know ... | Search Documentation: |
| Send methods |
->bind_resources,
which applies modifications from class-variables as defined in the XPCE
Defaults file.name is not
specified the key_binding<-name
of the binding table is used. For example, to bind ^S to save
in editor objects use
the following line in ~/.xpce/Defaults:
key_binding.editor = \
[ '\\C-s' = save \
]
->event
method.
If the event is a subtype of event-type keyboard this
method invokes
key_binding->typed: event<-id, event<-receiver.
->typed->fill_arguments_and_execute.
It simply invokes the method selector on receiver
with the given arguments. This method may be redefined to take action
before or after invoking a method on the receiver:
execute(KB, Rec:object, Sel:name, Args:any ...) :->
<before-refinement>
send(KB, send_super_vector, execute, Rec, Sel, Args),
<after-refinement>.
See also object->send_super_vector.
->typed.
The key_binding
object should send a message to receiver named selector.
arguments is a partial argument list. This method collects
possible additional arguments:
If an argument of the send-method does not accept @default,
<-receiver defines
the method key_binding<-interactive_argument,
this method will be invoked using the following arguments:
1-st: Behaviour object implementing the method 2-nd: Ordinal number of the argument required
This method should return a value for the argument or fail.
If no argument can be found, the error no_argument is raised.
When all arguments are gathered, key_binding->execute
is activated.
|event_id,
action=name|codeWhen an event_id is passed it will be converted into the corresponding symbolic key-name. The symbolic key-names for the characters
Symbolic name ASCII Description \C-@ ...\C-h0..8 Control-characters TAB 9 The tab-key or control-I LFD 10 The linefeed-key or control-J \C-k ..\C-l11..12 Control-characters RET 13 The return-key or control-M \C-n ...\C-z14..26 Control-characters \e27 The escape-key or control-[ \C-\...\C-_28..31 Control-characters SPC 32 The space-bar @ ... ~33..126 Normal printable characters DEL 127 The delete-key
The meta-characters (ASCII 128..255) are mapped onto \e,
followed by the
-bindings<-defaults). PCE predefines
some names. If a table with a predefined name is created the table will
be initialised according to this name. Tables that do not have a
predefined name are initially empty.
The predefined table-name are:
insert_self to all printable
characters and the TAB, LFD and RET keys.digit_argument to \e0 ... \e9
and \e-; assigns
universal_argument to \C-u.prefix to \e, \C-c and \C-x;‘keyboard_quit
to \C-g\C-v; \ev; \C-l<-receiver to the
argument graphical; key_binding<-prefix
to” and
key_binding<-argument
to @default.
Defaults: When no graphical is specified, key_binding<-receiver
is set to @nil.
|event_id,
for=[object]event(-id) of a keyboard event
object arrived on the given graphical. It performs the following steps:
graphical is specified and not equal to key_binding<-receiver,
invoke key_binding->reset
and set key_binding<-receiver to graphical.key by appending the symbolic name of the
typed character to the current key_binding<-prefix.
Determine the binding of this key using key_binding<-function.<-prefix
with the current key.->reset
to clear key_binding<-prefix
and key_binding<-argumentnext_line , previous_line<-saved_column
equals @default,
set it to the current column by invoking key_binding<-column
on the receiver.\e0 ... \e9 or \e-,
set the key_binding<-argument.<-argument.
First time: set
key_binding<-argument
to 4; afterwards: multiply key_binding<-argument
by
<-send_method.
Next specify the arguments according to their argument-type:<-argument
when specified
Finally, key_binding->typed
invokes key_binding->fill_arguments_and_execute
to fill additional arguments, which in turn calls key_binding->execute
to send a message to the key_binding<-receiver.
If the key-binding is a code
object, key_binding->forward this code
object with the following arguments:
@receiver key_binding <-receiver@arg1 key_binding <-argument@arg2 the argument event -id
Finally on behalf of uniting Emacs and Windows users with the editor,
if a key is bound to the function prefix_or_copy or prefix_or_cut, the
system invokes editor->cua_key_as_prefix
on the receiver. If this method succeeds the key acts as prefix and
otherwise it is mapped to the functions cut or copy.
Defaults: If no graphical is specified, key_binding<-receiver
left unmodified.
<-function ->event