Ereigniszustellung und Hostgrenzen korrigieren und Change archivieren

This commit is contained in:
2026-09-05 19:15:31 +02:00
parent 57d6386a5a
commit 644a86212f
39 changed files with 2013 additions and 271 deletions

View File

@@ -0,0 +1,32 @@
VERSION 1.00
Begin Form Form1
Width = 40
Height = 12
Begin TextBox Text1
Left = 5
Top = 5
Width = 10
Height = 1
End
End
' tb-screen: 80x25
' tb-events: time:0ms | mouse:down,1,0,2,2 | key:K
' Erwartete Handlerwirkungen in Hostreihenfolge; keine Snapshot-Neuaufnahme.
Text1.SetFocus
DIM SHARED s$
DOEVENTS
DOEVENTS
DOEVENTS
Form1.Hide
CLS
PRINT s$
END
SUB Text1_KeyPress(KeyAscii AS INTEGER)
SHARED s$
s$ = s$ + CHR$(KeyAscii)
END SUB
SUB Form_MouseDown(Button AS INTEGER, Shift AS INTEGER, X AS SINGLE, Y AS SINGLE)
SHARED s$
s$ = s$ + "M"
END SUB

View File

@@ -0,0 +1 @@
MK

View File

@@ -0,0 +1,32 @@
VERSION 1.00
Begin Form Form1
Width = 40
Height = 12
Begin TextBox Text1
Left = 5
Top = 5
Width = 10
Height = 1
End
End
' tb-screen: 80x25
' tb-events: time:0ms | key:K | mouse:down,1,0,2,2
' Erwartete Handlerwirkungen in Hostreihenfolge; keine Snapshot-Neuaufnahme.
Text1.SetFocus
DIM SHARED s$
DOEVENTS
DOEVENTS
DOEVENTS
Form1.Hide
CLS
PRINT s$
END
SUB Text1_KeyPress(KeyAscii AS INTEGER)
SHARED s$
s$ = s$ + CHR$(KeyAscii)
END SUB
SUB Form_MouseDown(Button AS INTEGER, Shift AS INTEGER, X AS SINGLE, Y AS SINGLE)
SHARED s$
s$ = s$ + "M"
END SUB

View File

@@ -0,0 +1 @@
KM

2
tests/terminalfrei/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/target
/Cargo.lock

View File

@@ -0,0 +1,13 @@
[package]
name = "tb-terminalfrei-check"
version = "0.0.0"
edition = "2021"
publish = false
# Eigener Resolver: keine Feature-Unifikation mit CLI/IDE im Hauptworkspace.
[workspace]
[dependencies]
tb-vm = { path = "../../crates/tb-vm" }
tb-runtime = { path = "../../crates/tb-runtime" }
tb-ui = { path = "../../crates/tb-ui" }

View File

@@ -0,0 +1,29 @@
use tb_runtime::host::{CaptureHost, Ereignis, MausArt, MausEreignis};
use tb_vm::interp::{RunEvent, Vm};
fn main() {
let form = tb_ui::frm::read_text(
"eingabe-taste-maus.frm",
include_str!("../../compat/eingabe-taste-maus.frm"),
)
.unwrap();
let module = tb_vm::compile_source_with_forms("FORM1", &form.code, &form.catalog()).unwrap();
let mut vm = Vm::new(module);
form.apply(&mut vm.forms).unwrap();
vm.forms.show(0, false).unwrap();
let mut host = CaptureHost::default();
host.ereignis_nach(2, Ereignis::Taste("K".into(), 0));
host.ereignis_nach(
2,
Ereignis::Maus(MausEreignis {
art: MausArt::Druck,
taste: 1,
shift: 0,
zeile: 2,
spalte: 2,
}),
);
assert_eq!(vm.run(&mut host), RunEvent::Ended);
assert_eq!(tb_runtime::snapshot::text(&vm.rt.screen), "KM\n");
println!("Terminalfreier FRM-/VM-Lauf: KM");
}