Unix & Shell-Programmierung: X-Windows |
|
|
|
|
|
finished := false;
while not finished do
cmd := readLine();
cmdType, args := parseCommand(cmd);
case cmdType of
t1 : interpret_t1_command(args);
...
t2 : interpret_t2_command(args);
...
tn : interpret_tn_command(args);
...
quit : finished := true
end case
end while
|
|
finished := false;
while not finished do
event := getEvent();
eventType,
eventPos,
eventVal := analyseEvent(event);
widget := selectWidget(eventType, eventPos);
case widget of
w1 : case eventType of
t1 : interpret_w1_t1_command(eventVal);
...
tn : interpret_w1_tn_command(eventVal);
end case
...
w2 : case eventType of
t1 : interpret_w2_t1_command(eventVal);
...
tm : interpret_w2_tm_command(eventVal);
end case
...
wk : case eventType of
t1 : interpret_wk_t1_command(eventVal);
...
tp : interpret_wk_tp_command(eventVal);
end case
end case
end while
|
|
Letzte Änderung: 14.02.2012 | © Prof. Dr. Uwe Schmidt |