Phase 4: Formulardateien und Konvertierung

This commit is contained in:
2026-09-05 08:18:55 +02:00
parent 54488b5b67
commit 05837cd846
18 changed files with 5287 additions and 27 deletions

View File

@@ -68,6 +68,29 @@ impl ObjectClass {
}
}
pub fn display_name(self) -> &'static str {
match self {
Self::Form => "Form",
Self::CheckBox => "CheckBox",
Self::ComboBox => "ComboBox",
Self::CommandButton => "CommandButton",
Self::DirListBox => "DirListBox",
Self::DriveListBox => "DriveListBox",
Self::FileListBox => "FileListBox",
Self::Frame => "Frame",
Self::HScrollBar => "HScrollBar",
Self::Label => "Label",
Self::ListBox => "ListBox",
Self::Menu => "Menu",
Self::OptionButton => "OptionButton",
Self::PictureBox => "PictureBox",
Self::TextBox => "TextBox",
Self::Timer => "Timer",
Self::VScrollBar => "VScrollBar",
Self::Screen => "Screen",
}
}
pub fn parse(name: &str) -> Option<Self> {
Self::ALL
.into_iter()
@@ -182,11 +205,12 @@ pub fn properties(class: ObjectClass) -> Vec<PropertySpec> {
range("WIDTH", 1, 1, 254),
]);
}
if !matches!(
class,
Form | Frame | Label | PictureBox | Timer | Menu | Screen
) {
p.extend([int("INDEX", 0), int("TABINDEX", 0), boolp("TABSTOP", true)]);
if !matches!(class, Form | Timer | Menu | Screen) {
p.push(int("INDEX", 0));
p.push(int("TABINDEX", 0));
}
if !matches!(class, Form | Frame | Label | Timer | Menu | Screen) {
p.push(boolp("TABSTOP", true));
}
if !matches!(class, Form | Timer | Menu | Screen) {
p.push(string("CTLNAME", ""));