====== lyxvision.cluster ====== ''TCluster'' — gemeinsamer Basistyp für Radio-Button-Gruppen und Checkbox-Gruppen. Verwaltet eine Liste von Optionen mit bit-codiertem Auswahlzustand. ''TRadioButtons'' lässt nur eine Auswahl zu; ''TCheckBoxes'' erlaubt Mehrfachauswahl. → [[lyx_-_programmiersprache:units:lyxvision|lyxvision]] · [[lyx_-_programmiersprache:units:lyxvision:group|lyxvision.group]] · [[lyx_-_programmiersprache:units:lyxvision:dialog|lyxvision.dialog]] ---- ===== Verwendung ===== import lyxvision.cluster; // Radio-Buttons (Einzelauswahl) var items: [4]pchar := ["Klein", "Mittel", "Groß", "Benutzerdefiniert"]; var radio: TRadioButtons := TRadioButtonsNew(dlg, 5, 4, 4, items); TClusterSetValue(radio, 1); // "Mittel" vorauswählen TGroupInsert(dlg, radio); // Checkboxen (Mehrfachauswahl) var opts: [3]pchar := ["Sicherungskopie", "Protokoll", "Komprimiert"]; var chk: TCheckBoxes := TCheckBoxesNew(dlg, 5, 10, 3, opts); TClusterSetValue(chk, 0b011); // Bit 0 und 1 gesetzt TGroupInsert(dlg, chk); // Nach Dialog: Auswahl lesen var selected: int64 := TClusterGetValue(radio); var flags: int64 := TClusterGetValue(chk); ---- ===== Funktionen ===== ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''TRadioButtonsNew(parent: TGroup, x: int64, y: int64, count: int64, items: pchar): TRadioButtons'' | pub | Erzeugt Radio-Button-Gruppe | | ''TCheckBoxesNew(parent: TGroup, x: int64, y: int64, count: int64, items: pchar): TCheckBoxes'' | pub | Erzeugt Checkbox-Gruppe | | ''TClusterGetValue(c: TCluster): int64'' | pub | Gibt Auswahlzustand zurück (Bit-Maske bei CheckBoxes, Index bei RadioButtons) | | ''TClusterSetValue(c: TCluster, val: int64): void'' | pub | Setzt Auswahlzustand | | ''TClusterMark(c: TCluster, item: int64): bool'' | pub | Prüft ob Item ausgewählt ist | Letzte Aktualisierung: 2026-05-22