diff --git a/crates/lightgui-designer/README.md b/crates/lightgui-designer/README.md index 84bf282..69ccb50 100644 --- a/crates/lightgui-designer/README.md +++ b/crates/lightgui-designer/README.md @@ -49,7 +49,7 @@ inside this designer. code window shows it. - `data/palette.json` (562 XFrame entries) and `data/registry.json` (562 widgets) are embedded at compile time (`src/palette.rs`). The - palette extract still carries the old 36 LightGUI entries, but the + palette extract still carries the old 38 LightGUI entries, but the designer reads the XFrame part only. ## Build & run diff --git a/crates/lightgui-designer/src/palette.rs b/crates/lightgui-designer/src/palette.rs index c06a17c..724e777 100644 --- a/crates/lightgui-designer/src/palette.rs +++ b/crates/lightgui-designer/src/palette.rs @@ -2,7 +2,7 @@ //! extracts (generated from lightgui eb0b5fc; do not edit by hand). //! //! * `data/palette.json`: the frozen extract still carries the old -//! 36 LightGUI types alongside the 562 XFrame widgets in 11 +//! 38 LightGUI types alongside the 562 XFrame widgets in 11 //! sections; the designer reads the XFrame part only — the GTK //! palette is gone (see `palette_counts`). //! * `data/registry.json`: the 562 XFrame widgets with family, section, @@ -40,7 +40,7 @@ fn parse_registry() -> serde_json::Value { /// (lightgui_count, xframe_count, total) as the designer sees the /// palette: XFrame-only, so the LightGUI count is always 0 and the /// total is the XFrame count (562). The extract still carries the old -/// 36 LightGUI entries, but nothing in the designer reads them. +/// 38 LightGUI entries, but nothing in the designer reads them. pub fn palette_counts() -> (usize, usize, usize) { let xf = xframe_entries().len(); (0, xf, xf) diff --git a/crates/xframe-common/build.rs b/crates/xframe-common/build.rs index d96b229..9e3a509 100644 --- a/crates/xframe-common/build.rs +++ b/crates/xframe-common/build.rs @@ -1,5 +1,5 @@ //! Codegen: compile data/registry.json (562 widgets) and data/palette.json -//! (598 entries) into Rust constants, mirroring the C++ generated +//! (600 entries) into Rust constants, mirroring the C++ generated //! widgets/common/registry.h and src/xframe_palette.h. The registry stays //! generated, never hand-maintained. use serde::Deserialize; @@ -87,9 +87,9 @@ fn main() { assert_eq!(reg.widget_count, 562, "registry widget_count"); assert_eq!(reg.widgets.len(), 562, "registry widgets len"); assert_eq!(reg.section_count, 11, "registry section_count"); - assert_eq!(pal.total, 598, "palette total"); + assert_eq!(pal.total, 600, "palette total"); assert_eq!(pal.xframe_count, 562, "palette xframe_count"); - assert_eq!(pal.lightgui_count, 36, "palette lightgui_count"); + assert_eq!(pal.lightgui_count, 38, "palette lightgui_count"); let mut out = String::new(); out.push_str("// @generated by crates/xframe-common/build.rs from data/registry.json + data/palette.json\n"); out.push_str(&format!( diff --git a/crates/xframe-common/src/lib.rs b/crates/xframe-common/src/lib.rs index 716cc14..0ac368c 100644 --- a/crates/xframe-common/src/lib.rs +++ b/crates/xframe-common/src/lib.rs @@ -1,6 +1,6 @@ //! Shared support for the XFrame half of the LightGUI Rust port. //! -//! * `registry` — the 562-widget registry + 598-entry palette counts, +//! * `registry` — the 562-widget registry + 600-entry palette counts, //! code-generated at build time from `data/registry.json` and //! `data/palette.json` (mirrors C++ `widgets/common/registry.h`). //! * `ico` — minimal BMP-format ICO decoder (mirrors `widgets/common/ico.h`). diff --git a/crates/xframe-common/src/registry.rs b/crates/xframe-common/src/registry.rs index a2c04c2..c5d9e83 100644 --- a/crates/xframe-common/src/registry.rs +++ b/crates/xframe-common/src/registry.rs @@ -57,8 +57,8 @@ mod tests { fn counts_match_plan() { assert_eq!(WIDGET_COUNT, 562); assert_eq!(SECTION_COUNT, 11); - assert_eq!(PALETTE_TOTAL, 598); - assert_eq!(LIGHTGUI_PALETTE_COUNT, 36); + assert_eq!(PALETTE_TOTAL, 600); + assert_eq!(LIGHTGUI_PALETTE_COUNT, 38); assert_eq!(XFRAME_PALETTE_COUNT, 562); assert_eq!(SECTION_COUNTS.iter().sum::(), 562); assert_eq!( diff --git a/crates/xframe-widgets/generator/gen_data.py b/crates/xframe-widgets/generator/gen_data.py index 0347163..70e1efe 100644 --- a/crates/xframe-widgets/generator/gen_data.py +++ b/crates/xframe-widgets/generator/gen_data.py @@ -2,8 +2,8 @@ """Generate the xframe-widgets data tables from data/*.json. Reads registry.json / props.json / events.json (the data agent's -extracts of lightgui eb0b5fc) and emits: - src/registry_gen.rs — the 547-entry registry + factory +extracts of lightgui e474894) and emits: + src/registry_gen.rs — the 562-entry registry + factory src/props_gen.rs — enum tables + common props + per-type prop tables src/events_gen.rs — per-type signal tables @@ -252,7 +252,7 @@ FACTORY = { with open(os.path.join(OUT, "registry_gen.rs"), "w") as f: f.write("//! Generated registry — DO NOT EDIT BY HAND.\n") f.write("//! Generated by `generator/gen_data.py` from `data/registry.json`\n") - f.write("//! (lightgui eb0b5fc) plus the archetype classification in that\n") + f.write("//! (lightgui e474894) plus the archetype classification in that\n") f.write("//! script. Regenerate: `python3 generator/gen_data.py`.\n\n") f.write("use crate::archetypes::*;\n") f.write("use crate::graph::XGraph;\n") @@ -310,15 +310,21 @@ with open(os.path.join(OUT, "registry_gen.rs"), "w") as f: # ---------------------------------------------------------------- props def opt_f(v): - return "None" if v is None else f"Some({v})" + """Option literal: JSON ints need a `.0` suffix (Some(0.0)), + JSON floats already print with one (repr(0.0) == '0.0').""" + if v is None: + return "None" + if isinstance(v, int): + return "Some(%d.0)" % v + return "Some(%r)" % v with open(os.path.join(OUT, "props_gen.rs"), "w") as f: f.write("//! Generated property tables — DO NOT EDIT BY HAND.\n") f.write("//! Generated by `generator/gen_data.py` from `data/props.json`\n") - f.write("//! (lightgui eb0b5fc). Regenerate: `python3 generator/gen_data.py`.\n\n") + f.write("//! (lightgui e474894). Regenerate: `python3 generator/gen_data.py`.\n\n") f.write("use crate::props::{PropDef, PropKind};\n\n") - f.write("/// The 9 enum value tables (`kReliefValues`, ...): (name, values, labels).\n") + f.write("/// The 25 enum value tables (`kReliefValues`, ...): (name, values, labels).\n") f.write("pub static ENUM_TABLES: &[(&str, &[i32], &[&str])] = &[\n") for name, tab in props["enum_tables"].items(): labels = [x.strip() for x in tab["comment"].split(",")] @@ -349,7 +355,7 @@ with open(os.path.join(OUT, "props_gen.rs"), "w") as f: f"enum_table: {tab_s}, enum_labels: {labs_s}, enum_values: {vals_s} }},\n" ) - f.write("/// Per-type property tables (35 types have one; Canvas has none).\n") + f.write("/// Per-type property tables (37 types have one; Canvas has none).\n") f.write("pub fn props_for(type_name: &str) -> &'static [PropDef] {\n") f.write(" match type_name {\n") for tname, plist in props["types"].items(): @@ -365,9 +371,9 @@ with open(os.path.join(OUT, "props_gen.rs"), "w") as f: with open(os.path.join(OUT, "events_gen.rs"), "w") as f: f.write("//! Generated signal tables — DO NOT EDIT BY HAND.\n") f.write("//! Generated by `generator/gen_data.py` from `data/events.json`\n") - f.write("//! (lightgui eb0b5fc). Regenerate: `python3 generator/gen_data.py`.\n\n") + f.write("//! (lightgui e474894). Regenerate: `python3 generator/gen_data.py`.\n\n") f.write("use crate::events::{EventKind, SignalDef};\n\n") - f.write("/// Per-type GTK signals (27 types have one).\n") + f.write("/// Per-type GTK signals (29 types have one).\n") f.write("pub fn signals_for(type_name: &str) -> &'static [SignalDef] {\n") f.write(" match type_name {\n") for tname, slist in events["types"].items(): diff --git a/crates/xframe-widgets/src/events_gen.rs b/crates/xframe-widgets/src/events_gen.rs index 16b94f1..99b7141 100644 --- a/crates/xframe-widgets/src/events_gen.rs +++ b/crates/xframe-widgets/src/events_gen.rs @@ -1,10 +1,10 @@ //! Generated signal tables — DO NOT EDIT BY HAND. //! Generated by `generator/gen_data.py` from `data/events.json` -//! (lightgui eb0b5fc). Regenerate: `python3 generator/gen_data.py`. +//! (lightgui e474894). Regenerate: `python3 generator/gen_data.py`. use crate::events::{EventKind, SignalDef}; -/// Per-type GTK signals (27 types have one). +/// Per-type GTK signals (29 types have one). pub fn signals_for(type_name: &str) -> &'static [SignalDef] { match type_name { "Button" => &[ @@ -17,6 +17,9 @@ pub fn signals_for(type_name: &str) -> &'static [SignalDef] { "Checkbutton" => &[ SignalDef { signal: "toggled", handler: "on_toggled", label: "Toggled", kind: EventKind::Simple, builtin: false }, ], + "ToggleButton" => &[ + SignalDef { signal: "toggled", handler: "on_toggled", label: "Toggled", kind: EventKind::Simple, builtin: false }, + ], "Radiobutton" => &[ SignalDef { signal: "toggled", handler: "on_toggled", label: "Toggled", kind: EventKind::Simple, builtin: false }, ], @@ -26,6 +29,9 @@ pub fn signals_for(type_name: &str) -> &'static [SignalDef] { "Listbox" => &[ SignalDef { signal: "row-selected", handler: "on_row_selected", label: "Row selected", kind: EventKind::RowSelected, builtin: false }, ], + "CheckListBox" => &[ + SignalDef { signal: "row-selected", handler: "on_row_selected", label: "Row selected", kind: EventKind::RowSelected, builtin: false }, + ], "Menubutton" => &[ SignalDef { signal: "clicked", handler: "on_clicked", label: "Clicked", kind: EventKind::Simple, builtin: false }, ], diff --git a/crates/xframe-widgets/src/props_gen.rs b/crates/xframe-widgets/src/props_gen.rs index 6c911d6..40a3b6b 100644 --- a/crates/xframe-widgets/src/props_gen.rs +++ b/crates/xframe-widgets/src/props_gen.rs @@ -1,10 +1,10 @@ //! Generated property tables — DO NOT EDIT BY HAND. //! Generated by `generator/gen_data.py` from `data/props.json` -//! (lightgui eb0b5fc). Regenerate: `python3 generator/gen_data.py`. +//! (lightgui e474894). Regenerate: `python3 generator/gen_data.py`. use crate::props::{PropDef, PropKind}; -/// The 9 enum value tables (`kReliefValues`, ...): (name, values, labels). +/// The 25 enum value tables (`kReliefValues`, ...): (name, values, labels). pub static ENUM_TABLES: &[(&str, &[i32], &[&str])] = &[ ("kReliefValues", &[0, 1, 2], &["NORMAL", "HALF", "NONE"]), ("kShadowValues", &[0, 1, 2, 3, 4], &["NONE", "IN", "OUT", "ETCHED_IN", "ETCHED_OUT"]), @@ -14,29 +14,87 @@ pub static ENUM_TABLES: &[(&str, &[i32], &[&str])] = &[ ("kScaleModeValues", &[0, 1], &["PRICE", "PERCENT"]), ("kOrientationValues", &[0, 1], &["HORIZONTAL", "VERTICAL"]), ("kToolbarStyleValues", &[0, 1, 2, 3], &["ICONS", "TEXT", "BOTH", "BOTH_HORIZ"]), - ("kShapeValues", &[0, 1, 2, 3], &["RECTANGLE", "ELLIPSE", "LINE", "TRIANGLE"]), + ("kShapeValues", &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], &["TShapeType: RECTANGLE", "SQUARE", "ROUNDRECT", "ROUNDSQUARE", "ELLIPSE", "CIRCLE", "TRIANGLE", "DIAMOND", "PENTAGON", "HEXAGON"]), + ("kViewStyleValues", &[0, 1, 2, 3], &["REPORT", "ICON", "SMALL_ICON", "LIST"]), + ("kSortTypeValues", &[0, 1, 2], &["NONE", "ASCENDING", "DESCENDING"]), + ("kTabPositionValues", &[0, 1, 2, 3], &["TOP", "BOTTOM", "LEFT", "RIGHT"]), + ("kBorderStyleValues", &[0, 1, 2, 3], &["DEFAULT", "NONE", "SINGLE", "DIALOG"]), + ("kWindowPositionValues", &[0, 1, 2, 3, 4], &["DEFAULT", "CENTER", "SCREEN_CENTER", "MAIN_FORM_CENTER", "DESIGNED"]), + ("kWindowStateValues", &[0, 1, 2, 3], &["NORMAL", "MINIMIZED", "MAXIMIZED", "FULLSCREEN"]), + ("kColorStyleValues", &[0, 1, 2, 3], &["STANDARD", "EXTENDED", "SYSTEM", "CUSTOM"]), + ("kResizeStyleValues", &[0, 1], &["UPDATE", "LINE"]), + ("kAlignValues", &[0, 1, 2, 3, 4, 5], &["NONE", "TOP", "BOTTOM", "LEFT", "RIGHT", "CLIENT"]), + ("kButtonKindValues", &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], &["NONE", "OK", "CANCEL", "YES", "NO", "CLOSE", "HELP", "RETRY", "IGNORE", "ABORT"]), + ("kButtonLayoutValues", &[0, 1, 2, 3], &["LEFT", "RIGHT", "TOP", "BOTTOM"]), + ("kTextAlignValues", &[0, 1, 2], &["LEFT", "CENTER", "RIGHT"]), + ("kCharCaseValues", &[0, 1, 2], &["NORMAL", "UPPER", "LOWER"]), + ("kComboStyleValues", &[0, 1, 2], &["DROPDOWN", "SIMPLE", "DROPDOWNLIST"]), + ("kTickMarksValues", &[0, 1, 2, 3], &["NONE", "TOPLEFT", "BOTTOMRIGHT", "BOTH"]), + ("kScrollBarsValues", &[0, 1, 2, 3], &["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]), ]; /// Properties every widget has (background / foreground / tooltip). pub static COMMON_PROPS: &[PropDef] = &[ PropDef::new("background", PropKind::Color, ""), PropDef::new("foreground", PropKind::Color, ""), + PropDef::new("border-width", PropKind::Int, "0"), + PropDef::new("border-color", PropKind::Color, ""), + PropDef::new("border-radius", PropKind::Int, "0"), PropDef::new("tooltip-text", PropKind::Str, ""), + PropDef::new("enabled", PropKind::Bool, "true"), + PropDef::new("visible", PropKind::Bool, "true"), + PropDef::new("font-name", PropKind::Str, ""), + PropDef::new("font-size", PropKind::Int, "13"), + PropDef::new("font-bold", PropKind::Bool, "false"), + PropDef::new("font-italic", PropKind::Bool, "false"), + PropDef::new("font-underline", PropKind::Bool, "false"), + PropDef::new("font-strikeout", PropKind::Bool, "false"), + PropDef::new("hint", PropKind::Str, ""), + PropDef::new("show-hint", PropKind::Bool, "false"), + PropDef::new("cursor", PropKind::Str, ""), + PropDef::new("tab-order", PropKind::Int, "0"), + PropDef::new("tab-stop", PropKind::Bool, "true"), + PropDef::new("min-width", PropKind::Int, "0"), + PropDef::new("min-height", PropKind::Int, "0"), + PropDef::new("max-width", PropKind::Int, "0"), + PropDef::new("max-height", PropKind::Int, "0"), + PropDef::new("margin-left", PropKind::Int, "0"), + PropDef::new("margin-top", PropKind::Int, "0"), + PropDef::new("margin-right", PropKind::Int, "0"), + PropDef::new("margin-bottom", PropKind::Int, "0"), + PropDef::new("margin-around", PropKind::Int, "0"), + PropDef::new("autosize", PropKind::Bool, "false"), + PropDef::new("tag", PropKind::Int, "0"), + PropDef::new("anchor-top", PropKind::Bool, "true"), + PropDef::new("anchor-left", PropKind::Bool, "true"), + PropDef::new("anchor-right", PropKind::Bool, "false"), + PropDef::new("anchor-bottom", PropKind::Bool, "false"), + PropDef::new("align", PropKind::Enum, "0"), ]; -/// Per-type property tables (35 types have one; Canvas has none). +/// Per-type property tables (37 types have one; Canvas has none). pub fn props_for(type_name: &str) -> &'static [PropDef] { match type_name { "Button" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "relief", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kReliefValues"), enum_labels: Some(&["Normal", "Half", "None"]), enum_values: Some(&[0, 1, 2]) }, PropDef { name: "focus-on-click", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "default", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "cancel", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "kind", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kButtonKindValues"), enum_labels: Some(&["None", "OK", "Cancel", "Yes", "No", "Close", "Help", "Retry", "Ignore", "Abort"]), enum_values: Some(&[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) }, + PropDef { name: "modal-result", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "layout", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kButtonLayoutValues"), enum_labels: Some(&["Left", "Right", "Top", "Bottom"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "glyph", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "Label" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "xalign", kind: PropKind::Double, default: "0.5", lo: Some(0.0), hi: Some(1.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "yalign", kind: PropKind::Double, default: "0.5", lo: Some(0.0), hi: Some(1.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "selectable", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "wrap", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "transparent", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-accel-char", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "focus-control", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "Entry" => &[ PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, @@ -44,26 +102,71 @@ pub fn props_for(type_name: &str) -> &'static [PropDef] { PropDef { name: "max-length", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "width-chars", kind: PropKind::Int, default: "-1", lo: Some(-1.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "editable", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, - PropDef { name: "visibility", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "password", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-password", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "alignment", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kTextAlignValues"), enum_labels: Some(&["Left", "Center", "Right"]), enum_values: Some(&[0, 1, 2]) }, + PropDef { name: "char-case", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kCharCaseValues"), enum_labels: Some(&["Normal", "Upper", "Lower"]), enum_values: Some(&[0, 1, 2]) }, + PropDef { name: "numbers-only", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "hide-selection", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "auto-select", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "Checkbutton" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "active", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "inconsistent", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "allow-grayed", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "alignment", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kOrientationValues"), enum_labels: Some(&["Left", "Right"]), enum_values: Some(&[0, 1]) }, + PropDef { name: "value-checked", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "value-unchecked", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + ], + "ToggleButton" => &[ + PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "active", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "group-index", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "allow-all-up", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "flat", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "glyph", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "Radiobutton" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "active", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "group", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "Frame" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "label-xalign", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(1.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "inset", kind: PropKind::Int, default: "8", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "top-inset", kind: PropKind::Int, default: "14", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "shadow-type", kind: PropKind::Enum, default: "3", lo: None, hi: None, enum_table: Some("kShadowValues"), enum_labels: Some(&["None", "In", "Out", "Etched in", "Etched out"]), enum_values: Some(&[0, 1, 2, 3, 4]) }, ], "Combobox" => &[ + PropDef { name: "items", kind: PropKind::Str, default: "Item 1|Item 2|Item 3", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "active", kind: PropKind::Int, default: "0", lo: Some(-1.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "style", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kComboStyleValues"), enum_labels: Some(&["DropDown", "Simple", "DropDownList"]), enum_values: Some(&[0, 1, 2]) }, + PropDef { name: "drop-down-count", kind: PropKind::Int, default: "8", lo: Some(1.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "drop-down-width", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(10000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sorted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "read-only", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "max-length", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "auto-complete", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "char-case", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kCharCaseValues"), enum_labels: Some(&["Normal", "Upper", "Lower"]), enum_values: Some(&[0, 1, 2]) }, ], "Listbox" => &[ + PropDef { name: "items", kind: PropKind::Str, default: "Item 1|Item 2|Item 3", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "selection-mode", kind: PropKind::Enum, default: "1", lo: None, hi: None, enum_table: Some("kSelModeValues"), enum_labels: Some(&["None", "Single", "Browse", "Multiple"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "item-index", kind: PropKind::Int, default: "-1", lo: Some(-1.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sorted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "columns", kind: PropKind::Int, default: "1", lo: Some(1.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-height", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "integral-height", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + ], + "CheckListBox" => &[ + PropDef { name: "items", kind: PropKind::Str, default: "Item 1|Item 2|Item 3", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "checked-items", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-index", kind: PropKind::Int, default: "-1", lo: Some(-1.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-height", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sorted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "Menubutton" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, @@ -71,61 +174,123 @@ pub fn props_for(type_name: &str) -> &'static [PropDef] { ], "Scale" => &[ PropDef { name: "value", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "minimum", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "maximum", kind: PropKind::Double, default: "100", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "digits", kind: PropKind::Int, default: "1", lo: Some(-1.0), hi: Some(10.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "draw-value", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "inverted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "page-step", kind: PropKind::Double, default: "10", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "tick-marks", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kTickMarksValues"), enum_labels: Some(&["None", "TopLeft", "BottomRight", "Both"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "frequency", kind: PropKind::Int, default: "10", lo: Some(1.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-sel-range", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sel-start", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sel-end", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "Scrollbar" => &[ PropDef { name: "value", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "lower", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "upper", kind: PropKind::Double, default: "100", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "step-increment", kind: PropKind::Double, default: "1", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "page-increment", kind: PropKind::Double, default: "10", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "page-size", kind: PropKind::Double, default: "10", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "inverted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "orientation", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kOrientationValues"), enum_labels: Some(&["Horizontal", "Vertical"]), enum_values: Some(&[0, 1]) }, + PropDef { name: "large-change", kind: PropKind::Double, default: "10", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "Text" => &[ + PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "editable", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "cursor-visible", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "wrap-mode", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kWrapValues"), enum_labels: Some(&["None", "Char", "Word", "Word-char"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "max-length", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "scroll-bars", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kScrollBarsValues"), enum_labels: Some(&["None", "Horizontal", "Vertical", "Both"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "want-tabs", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "want-returns", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "hide-selection", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "alignment", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kTextAlignValues"), enum_labels: Some(&["Left", "Center", "Right"]), enum_values: Some(&[0, 1, 2]) }, ], "Toplevel" => &[ PropDef { name: "title", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "resizable", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "border-style", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kBorderStyleValues"), enum_labels: Some(&["Default", "None", "Single", "Dialog"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "icon", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "position", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kWindowPositionValues"), enum_labels: Some(&["Default", "Center", "ScreenCenter", "MainFormCenter", "Designed"]), enum_values: Some(&[0, 1, 2, 3, 4]) }, + PropDef { name: "window-state", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kWindowStateValues"), enum_labels: Some(&["Normal", "Minimized", "Maximized", "Fullscreen"]), enum_values: Some(&[0, 1, 2, 3]) }, ], "Spreadsheet" => &[ PropDef { name: "rows", kind: PropKind::Int, default: "5", lo: Some(1.0), hi: Some(50.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "columns", kind: PropKind::Int, default: "4", lo: Some(1.0), hi: Some(26.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "fixed-cols", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(26.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "fixed-rows", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(50.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "default-col-width", kind: PropKind::Int, default: "84", lo: Some(1.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "default-row-height", kind: PropKind::Int, default: "20", lo: Some(1.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "grid-line-width", kind: PropKind::Int, default: "1", lo: Some(0.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, ], "StockChart" => &[ PropDef { name: "data-file", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, - PropDef { name: "up-color", kind: PropKind::Color, default: "rgb(0,200,0)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, - PropDef { name: "down-color", kind: PropKind::Color, default: "rgb(220,0,0)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "up-color", kind: PropKind::Color, default: "rgb(0,150,0)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "down-color", kind: PropKind::Color, default: "rgb(200,30,30)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "max-candles", kind: PropKind::Int, default: "120", lo: Some(1.0), hi: Some(5000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "indicators", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "scale-mode", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kScaleModeValues"), enum_labels: Some(&["Price", "Percent"]), enum_values: Some(&[0, 1]) }, PropDef { name: "compare-files", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "drawings", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "grid-color", kind: PropKind::Color, default: "rgb(225,225,225)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "axis-width", kind: PropKind::Int, default: "56", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "axis-height", kind: PropKind::Int, default: "20", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "view-first", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "view-count", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "auto-y", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "y-min", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "y-max", kind: PropKind::Double, default: "1", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "Memo" => &[ PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "editable", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "cursor-visible", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "wrap-mode", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kWrapValues"), enum_labels: Some(&["None", "Char", "Word", "Word-char"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "max-length", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "scroll-bars", kind: PropKind::Enum, default: "3", lo: None, hi: None, enum_table: Some("kScrollBarsValues"), enum_labels: Some(&["None", "Horizontal", "Vertical", "Both"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "want-tabs", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "want-returns", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "hide-selection", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "alignment", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kTextAlignValues"), enum_labels: Some(&["Left", "Center", "Right"]), enum_values: Some(&[0, 1, 2]) }, ], "GroupBox" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "label-xalign", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(1.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "inset", kind: PropKind::Int, default: "8", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "top-inset", kind: PropKind::Int, default: "14", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "shadow-type", kind: PropKind::Enum, default: "3", lo: None, hi: None, enum_table: Some("kShadowValues"), enum_labels: Some(&["None", "In", "Out", "Etched in", "Etched out"]), enum_values: Some(&[0, 1, 2, 3, 4]) }, ], "Panel" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "label-xalign", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(1.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "inset", kind: PropKind::Int, default: "8", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "top-inset", kind: PropKind::Int, default: "14", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "shadow-type", kind: PropKind::Enum, default: "3", lo: None, hi: None, enum_table: Some("kShadowValues"), enum_labels: Some(&["None", "In", "Out", "Etched in", "Etched out"]), enum_values: Some(&[0, 1, 2, 3, 4]) }, ], "Image" => &[ PropDef { name: "file", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "pixel-size", kind: PropKind::Int, default: "-1", lo: Some(-1.0), hi: Some(512.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "stretch", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "proportional", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "center", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "transparent", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "Shape" => &[ - PropDef { name: "shape", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kShapeValues"), enum_labels: Some(&["Rectangle", "Ellipse", "Line", "Triangle"]), enum_values: Some(&[0, 1, 2, 3]) }, - PropDef { name: "fill-color", kind: PropKind::Color, default: "rgb(53,132,228)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "shape", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kShapeValues"), enum_labels: Some(&["Rectangle", "Square", "RoundRect", "RoundSquare", "Ellipse", "Circle", "Triangle", "Diamond", "Pentagon", "Hexagon"]), enum_values: Some(&[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) }, + PropDef { name: "fill-color", kind: PropKind::Color, default: "rgb(70,130,200)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "pen-color", kind: PropKind::Color, default: "rgb(20,40,80)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "pen-width", kind: PropKind::Int, default: "2", lo: Some(1.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, ], "Notebook" => &[ PropDef { name: "pages", kind: PropKind::Str, default: "Tab 1|Tab 2|Tab 3", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "page", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "tab-height", kind: PropKind::Int, default: "26", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "tab-position", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kTabPositionValues"), enum_labels: Some(&["Top", "Bottom", "Left", "Right"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "tab-width", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "ScrollBox" => &[ PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, @@ -133,13 +298,22 @@ pub fn props_for(type_name: &str) -> &'static [PropDef] { "Splitter" => &[ PropDef { name: "position", kind: PropKind::Int, default: "100", lo: Some(0.0), hi: Some(10000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "orientation", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kOrientationValues"), enum_labels: Some(&["Horizontal", "Vertical"]), enum_values: Some(&[0, 1]) }, + PropDef { name: "min-size", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(10000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "resize-style", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kResizeStyleValues"), enum_labels: Some(&["Update", "Line"]), enum_values: Some(&[0, 1]) }, + PropDef { name: "auto-snap", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "StatusBar" => &[ PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "panels", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "size-grip", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "ToolBar" => &[ PropDef { name: "items", kind: PropKind::Str, default: "New|Open|Save", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "toolbar-style", kind: PropKind::Enum, default: "2", lo: None, hi: None, enum_table: Some("kToolbarStyleValues"), enum_labels: Some(&["Icons", "Text", "Both", "Both horizontal"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "show-captions", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "flat", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "button-width", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "button-height", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "MenuBar" => &[ PropDef { name: "menus", kind: PropKind::Str, default: "File|Edit|Help", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, @@ -152,6 +326,7 @@ pub fn props_for(type_name: &str) -> &'static [PropDef] { PropDef { name: "digits", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(10.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "numeric", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "wrap", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "editor-enabled", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "TrackBar" => &[ PropDef { name: "minimum", kind: PropKind::Int, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, @@ -162,19 +337,44 @@ pub fn props_for(type_name: &str) -> &'static [PropDef] { PropDef { name: "draw-value", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "inverted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "orientation", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kOrientationValues"), enum_labels: Some(&["Horizontal", "Vertical"]), enum_values: Some(&[0, 1]) }, + PropDef { name: "page-step", kind: PropKind::Double, default: "10", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "tick-marks", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kTickMarksValues"), enum_labels: Some(&["None", "TopLeft", "BottomRight", "Both"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "frequency", kind: PropKind::Int, default: "10", lo: Some(1.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-sel-range", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sel-start", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sel-end", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, ], "ProgressBar" => &[ PropDef { name: "fraction", kind: PropKind::Double, default: "0", lo: Some(0.0), hi: Some(1.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "position", kind: PropKind::Double, default: "45", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "minimum", kind: PropKind::Double, default: "0", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "maximum", kind: PropKind::Double, default: "100", lo: Some(-1000000.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "step", kind: PropKind::Double, default: "1", lo: Some(0.0), hi: Some(1000000.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "show-text", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "text", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "pulsing", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "inverted", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "bar-color", kind: PropKind::Color, default: "rgb(52,101,164)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "trough-color", kind: PropKind::Color, default: "rgb(225,225,225)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "DateTimePicker" => &[ PropDef { name: "date", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "show-heading", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "show-day-names", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-week-numbers", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "grid-color", kind: PropKind::Color, default: "rgb(205,205,205)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "selected-fill-color", kind: PropKind::Color, default: "rgb(52,101,164)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "selected-text-color", kind: PropKind::Color, default: "rgb(255,255,255)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "today-color", kind: PropKind::Color, default: "rgb(200,50,50)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "dim-text-color", kind: PropKind::Color, default: "rgb(110,110,110)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "weekends-color", kind: PropKind::Color, default: "rgb(170,60,60)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "disabled-color", kind: PropKind::Color, default: "rgb(150,150,150)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "ColorBox" => &[ PropDef { name: "color", kind: PropKind::Color, default: "rgb(53,132,228)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "style", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kColorStyleValues"), enum_labels: Some(&["Standard", "Extended", "System", "Custom"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "default-color", kind: PropKind::Color, default: "rgb(255,255,255)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "none-color", kind: PropKind::Color, default: "rgb(0,0,0)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "use-alpha", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "title", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], @@ -182,15 +382,38 @@ pub fn props_for(type_name: &str) -> &'static [PropDef] { PropDef { name: "columns", kind: PropKind::Str, default: "Name|Value", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "items", kind: PropKind::Str, default: "Row 1,Value 1;Row 2,Value 2", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "headers-visible", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-index", kind: PropKind::Int, default: "-1", lo: Some(-1.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-height", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "view-style", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kViewStyleValues"), enum_labels: Some(&["Report", "Icon", "SmallIcon", "List"]), enum_values: Some(&[0, 1, 2, 3]) }, + PropDef { name: "grid-lines", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "row-select", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "multi-select", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sort-type", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kSortTypeValues"), enum_labels: Some(&["None", "Ascending", "Descending"]), enum_values: Some(&[0, 1, 2]) }, ], "TreeView" => &[ PropDef { name: "items", kind: PropKind::Str, default: "Root/Child 1;Root/Child 2;Other", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "headers-visible", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-index", kind: PropKind::Int, default: "-1", lo: Some(-1.0), hi: Some(100000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "item-height", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "header-height", kind: PropKind::Int, default: "22", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "grid-lines", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "row-select", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "multi-select", kind: PropKind::Bool, default: "false", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "sort-type", kind: PropKind::Enum, default: "0", lo: None, hi: None, enum_table: Some("kSortTypeValues"), enum_labels: Some(&["None", "Ascending", "Descending"]), enum_values: Some(&[0, 1, 2]) }, + PropDef { name: "indent", kind: PropKind::Int, default: "16", lo: Some(0.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-buttons", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-lines", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "show-root", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, ], "StringGrid" => &[ PropDef { name: "rows", kind: PropKind::Int, default: "5", lo: Some(1.0), hi: Some(50.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "columns", kind: PropKind::Int, default: "4", lo: Some(1.0), hi: Some(26.0), enum_table: None, enum_labels: None, enum_values: None }, PropDef { name: "headers-visible", kind: PropKind::Bool, default: "true", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "fixed-cols", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(26.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "fixed-rows", kind: PropKind::Int, default: "0", lo: Some(0.0), hi: Some(50.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "default-col-width", kind: PropKind::Int, default: "84", lo: Some(1.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "default-row-height", kind: PropKind::Int, default: "20", lo: Some(1.0), hi: Some(1000.0), enum_table: None, enum_labels: None, enum_values: None }, + PropDef { name: "grid-line-width", kind: PropKind::Int, default: "1", lo: Some(0.0), hi: Some(100.0), enum_table: None, enum_labels: None, enum_values: None }, ], "Plot" => &[ PropDef { name: "title", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, diff --git a/crates/xframe-widgets/src/registry_gen.rs b/crates/xframe-widgets/src/registry_gen.rs index 9dc07e3..be45877 100644 --- a/crates/xframe-widgets/src/registry_gen.rs +++ b/crates/xframe-widgets/src/registry_gen.rs @@ -1,6 +1,6 @@ //! Generated registry — DO NOT EDIT BY HAND. //! Generated by `generator/gen_data.py` from `data/registry.json` -//! (lightgui eb0b5fc) plus the archetype classification in that +//! (lightgui e474894) plus the archetype classification in that //! script. Regenerate: `python3 generator/gen_data.py`. use crate::archetypes::*; @@ -573,23 +573,23 @@ pub static REGISTRY: &[RegistryEntry] = &[ RegistryEntry { index: 542, name: "TTreeView", family: "T", section: "Views & Lists", section_index: 6, default_w: 260, default_h: 180, archetype: Archetype::ListSel, kind: "TreeView", line: None }, RegistryEntry { index: 543, name: "TUpDown", family: "T", section: "Buttons", section_index: 2, default_w: 150, default_h: 36, archetype: Archetype::Range, kind: "UpDown", line: None }, RegistryEntry { index: 544, name: "TValueListEditor", family: "T", section: "Text & Entry", section_index: 4, default_w: 180, default_h: 30, archetype: Archetype::ListSel, kind: "ValueListEditor", line: None }, - RegistryEntry { index: 545, name: "XArcGauge", family: "X", section: "Misc / X", section_index: 8, default_w: 260, default_h: 200, archetype: Archetype::Monitor, kind: "ArcGauge", line: None }, - RegistryEntry { index: 546, name: "XCoreGrid", family: "X", section: "Misc / X", section_index: 8, default_w: 360, default_h: 220, archetype: Archetype::Monitor, kind: "CoreGrid", line: None }, - RegistryEntry { index: 547, name: "XDonutGauge", family: "X", section: "Misc / X", section_index: 8, default_w: 220, default_h: 220, archetype: Archetype::Monitor, kind: "DonutGauge", line: None }, + RegistryEntry { index: 545, name: "XArcGauge", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "ArcGauge", line: None }, + RegistryEntry { index: 546, name: "XCoreGrid", family: "X", section: "Misc / X", section_index: 8, default_w: 260, default_h: 180, archetype: Archetype::Monitor, kind: "CoreGrid", line: None }, + RegistryEntry { index: 547, name: "XDonutGauge", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "DonutGauge", line: None }, RegistryEntry { index: 548, name: "XGraph", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 200, archetype: Archetype::Graph, kind: "XGraph", line: None }, RegistryEntry { index: 549, name: "XHistoryGraph", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 200, archetype: Archetype::Monitor, kind: "HistoryGraph", line: None }, - RegistryEntry { index: 550, name: "XLoadBadge", family: "X", section: "Misc / X", section_index: 8, default_w: 260, default_h: 80, archetype: Archetype::Monitor, kind: "LoadBadge", line: None }, - RegistryEntry { index: 551, name: "XMonitorButton", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 64, archetype: Archetype::Monitor, kind: "MonitorButton", line: None }, - RegistryEntry { index: 552, name: "XMonitorGrid", family: "X", section: "Misc / X", section_index: 8, default_w: 420, default_h: 200, archetype: Archetype::Monitor, kind: "MonitorGrid", line: None }, + RegistryEntry { index: 550, name: "XLoadBadge", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "LoadBadge", line: None }, + RegistryEntry { index: 551, name: "XMonitorButton", family: "X", section: "Misc / X", section_index: 8, default_w: 150, default_h: 36, archetype: Archetype::Monitor, kind: "MonitorButton", line: None }, + RegistryEntry { index: 552, name: "XMonitorGrid", family: "X", section: "Misc / X", section_index: 8, default_w: 260, default_h: 180, archetype: Archetype::Monitor, kind: "MonitorGrid", line: None }, RegistryEntry { index: 553, name: "XNetGraph", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 200, archetype: Archetype::Monitor, kind: "NetGraph", line: None }, - RegistryEntry { index: 554, name: "XProcessList", family: "X", section: "Misc / X", section_index: 8, default_w: 480, default_h: 260, archetype: Archetype::Monitor, kind: "ProcessList", line: None }, + RegistryEntry { index: 554, name: "XProcessList", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "ProcessList", line: None }, RegistryEntry { index: 555, name: "XSpreadsheet", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 200, archetype: Archetype::Spreadsheet, kind: "XSpreadsheet", line: None }, - RegistryEntry { index: 556, name: "XStackBar", family: "X", section: "Misc / X", section_index: 8, default_w: 360, default_h: 80, archetype: Archetype::Monitor, kind: "StackBar", line: None }, - RegistryEntry { index: 557, name: "XSysBox", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 200, archetype: Archetype::Monitor, kind: "SysBox", line: None }, - RegistryEntry { index: 558, name: "XTachometer", family: "X", section: "Misc / X", section_index: 8, default_w: 280, default_h: 220, archetype: Archetype::Monitor, kind: "Tachometer", line: None }, - RegistryEntry { index: 559, name: "XTempHistory", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 200, archetype: Archetype::Monitor, kind: "TempHistory", line: None }, - RegistryEntry { index: 560, name: "XUsageBar", family: "X", section: "Misc / X", section_index: 8, default_w: 320, default_h: 60, archetype: Archetype::Monitor, kind: "UsageBar", line: None }, - RegistryEntry { index: 561, name: "XVerticalBar", family: "X", section: "Misc / X", section_index: 8, default_w: 120, default_h: 220, archetype: Archetype::Monitor, kind: "VerticalBar", line: None }, + RegistryEntry { index: 556, name: "XStackBar", family: "X", section: "Misc / X", section_index: 8, default_w: 260, default_h: 180, archetype: Archetype::Monitor, kind: "StackBar", line: None }, + RegistryEntry { index: 557, name: "XSysBox", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "SysBox", line: None }, + RegistryEntry { index: 558, name: "XTachometer", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "Tachometer", line: None }, + RegistryEntry { index: 559, name: "XTempHistory", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "TempHistory", line: None }, + RegistryEntry { index: 560, name: "XUsageBar", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "UsageBar", line: None }, + RegistryEntry { index: 561, name: "XVerticalBar", family: "X", section: "Misc / X", section_index: 8, default_w: 200, default_h: 90, archetype: Archetype::Monitor, kind: "VerticalBar", line: None }, ]; /// Look a widget up by exact name (case-sensitive, as in C++). diff --git a/data/events.json b/data/events.json index 54f95a2..a18787b 100644 --- a/data/events.json +++ b/data/events.json @@ -1,7 +1,7 @@ { "_provenance": { "source_repo": "https://github.com/cnmcdee/lightgui", - "source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", + "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2", "source_files": [ "src/events.h", "src/model.h" @@ -24,7 +24,7 @@ ], "event_kind_count": 10, "kind_notes": { - "Simple": "void on_x(); trampoline (GtkWidget*, gpointer)", + "Simple": "void on_x(); widget std::function callback", "SwitchPage": "void on_x(guint page); notebook \"switch-page\"", "RowActivated": "void on_x(GtkTreePath* path); tree \"row-activated\"", "RowSelected": "void on_x(); trampoline (GtkListBox*, GtkListBoxRow*, gpointer)", @@ -42,7 +42,8 @@ "handler": "on_clicked", "label": "Clicked", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnClick" } ], "Entry": [ @@ -51,14 +52,16 @@ "handler": "on_changed", "label": "Text changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" }, { "signal": "activate", "handler": "on_activate", "label": "Enter pressed (activate)", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnKeyPress" } ], "Checkbutton": [ @@ -67,7 +70,18 @@ "handler": "on_toggled", "label": "Toggled", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnClick" + } + ], + "ToggleButton": [ + { + "signal": "toggled", + "handler": "on_toggled", + "label": "Toggled", + "kind": "Simple", + "builtin": false, + "lazarus": "OnClick" } ], "Radiobutton": [ @@ -76,7 +90,8 @@ "handler": "on_toggled", "label": "Toggled", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnClick" } ], "Combobox": [ @@ -85,7 +100,8 @@ "handler": "on_changed", "label": "Selection changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "Listbox": [ @@ -94,7 +110,18 @@ "handler": "on_row_selected", "label": "Row selected", "kind": "RowSelected", - "builtin": false + "builtin": false, + "lazarus": "OnClick" + } + ], + "CheckListBox": [ + { + "signal": "row-selected", + "handler": "on_row_selected", + "label": "Row selected", + "kind": "RowSelected", + "builtin": false, + "lazarus": "OnClick" } ], "Menubutton": [ @@ -103,7 +130,8 @@ "handler": "on_clicked", "label": "Clicked", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnClick" } ], "Canvas": [ @@ -112,7 +140,8 @@ "handler": "on_draw", "label": "Draw (redraw)", "kind": "Draw", - "builtin": false + "builtin": false, + "lazarus": "OnPaint" } ], "Scale": [ @@ -121,7 +150,8 @@ "handler": "on_value_changed", "label": "Value changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "Scrollbar": [ @@ -130,7 +160,8 @@ "handler": "on_value_changed", "label": "Value changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "Text": [ @@ -139,7 +170,8 @@ "handler": "on_changed", "label": "Text changed", "kind": "BufferChanged", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "Toplevel": [ @@ -148,7 +180,8 @@ "handler": "on_delete_event", "label": "Window close (delete-event)", "kind": "DeleteEvent", - "builtin": false + "builtin": false, + "lazarus": "OnClose" } ], "Spreadsheet": [ @@ -157,7 +190,8 @@ "handler": "on_cell_changed", "label": "Cell text changed", "kind": "CellChanged", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "StockChart": [ @@ -166,7 +200,8 @@ "handler": "on_draw", "label": "Draw (redraw)", "kind": "Draw", - "builtin": true + "builtin": true, + "lazarus": "OnPaint" } ], "Memo": [ @@ -175,7 +210,8 @@ "handler": "on_changed", "label": "Text changed", "kind": "BufferChanged", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "Shape": [ @@ -184,7 +220,8 @@ "handler": "on_draw", "label": "Draw (redraw)", "kind": "Draw", - "builtin": true + "builtin": true, + "lazarus": "OnPaint" } ], "Notebook": [ @@ -193,7 +230,8 @@ "handler": "on_switch_page", "label": "Page switched", "kind": "SwitchPage", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "ToolBar": [ @@ -202,7 +240,8 @@ "handler": "on_clicked", "label": "Tool button clicked", "kind": "ItemClicked", - "builtin": false + "builtin": false, + "lazarus": "OnClick" } ], "MenuBar": [ @@ -211,7 +250,8 @@ "handler": "on_activate", "label": "Menu item activated", "kind": "ItemActivate", - "builtin": false + "builtin": false, + "lazarus": "OnClick" } ], "SpinEdit": [ @@ -220,7 +260,8 @@ "handler": "on_value_changed", "label": "Value changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "TrackBar": [ @@ -229,7 +270,8 @@ "handler": "on_value_changed", "label": "Value changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "DateTimePicker": [ @@ -238,14 +280,16 @@ "handler": "on_day_selected", "label": "Day selected", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" }, { "signal": "month-changed", "handler": "on_month_changed", "label": "Month changed", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "ColorBox": [ @@ -254,7 +298,8 @@ "handler": "on_color_set", "label": "Colour chosen", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnChange" } ], "ListView": [ @@ -263,14 +308,16 @@ "handler": "on_row_activated", "label": "Row activated (double-click)", "kind": "RowActivated", - "builtin": false + "builtin": false, + "lazarus": "OnDblClick" }, { "signal": "cursor-changed", "handler": "on_cursor_changed", "label": "Cursor moved", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnSelectionChange" } ], "TreeView": [ @@ -279,14 +326,16 @@ "handler": "on_row_activated", "label": "Row activated (double-click)", "kind": "RowActivated", - "builtin": false + "builtin": false, + "lazarus": "OnDblClick" }, { "signal": "cursor-changed", "handler": "on_cursor_changed", "label": "Cursor moved", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnSelectionChange" } ], "StringGrid": [ @@ -295,14 +344,16 @@ "handler": "on_row_activated", "label": "Row activated (double-click)", "kind": "RowActivated", - "builtin": false + "builtin": false, + "lazarus": "OnDblClick" }, { "signal": "cursor-changed", "handler": "on_cursor_changed", "label": "Cursor moved", "kind": "Simple", - "builtin": false + "builtin": false, + "lazarus": "OnSelectionChange" } ], "Plot": [ @@ -311,11 +362,12 @@ "handler": "on_draw", "label": "Draw (redraw)", "kind": "Draw", - "builtin": true + "builtin": true, + "lazarus": "OnPaint" } ] }, - "types_with_events": 27, + "types_with_events": 29, "types_without_events": { "Label": "Display-only: no widget-specific signal (mouse handlers still apply).", "Frame": "Container: no widget-specific signal \u2014 connect the signals of the widgets placed inside it.", @@ -327,5 +379,5 @@ "StatusBar": "Display-only: no widget-specific signal.", "ProgressBar": "Display-only: no widget-specific signal \u2014 set its fraction from another widget's handler." }, - "type_count": 36 + "type_count": 38 } diff --git a/data/indicators.json b/data/indicators.json index 798a249..71abd2f 100644 --- a/data/indicators.json +++ b/data/indicators.json @@ -1,7 +1,7 @@ { "_provenance": { "source_repo": "https://github.com/cnmcdee/lightgui", - "source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", + "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2", "source_files": [ "src/indicators.h" ], diff --git a/data/palette.json b/data/palette.json index 93fd8cc..15ce15d 100644 --- a/data/palette.json +++ b/data/palette.json @@ -1,7 +1,7 @@ { "_provenance": { "source_repo": "https://github.com/cnmcdee/lightgui", - "source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", + "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2", "source_files": [ "data/registry.json", "src/model.h", @@ -9,10 +9,10 @@ ], "generated_by": "python3 tools/extract_palette.py", "regenerate": "make regen (or: python3 tools/extract_palette.py)", - "note": "Generated from the C++ sources \u2014 do not edit by hand. 15 X* monitor widgets (indices 547-561) hand-added Dec 2026 pending the C port; `make check` reports them as drift until the C sources contain them." + "note": "Generated from the C++ sources \u2014 do not edit by hand." }, - "total": 598, - "lightgui_count": 36, + "total": 600, + "lightgui_count": 38, "xframe_count": 562, "sections": [ { @@ -89,6 +89,13 @@ "default_h": 26, "phase1": true }, + { + "key": "ToggleButton", + "palette_id": "pal_togglebutton", + "default_w": 110, + "default_h": 30, + "phase1": true + }, { "key": "Radiobutton", "palette_id": "pal_radiobutton", @@ -117,6 +124,13 @@ "default_h": 110, "phase1": true }, + { + "key": "CheckListBox", + "palette_id": "pal_checklistbox", + "default_w": 180, + "default_h": 110, + "phase1": true + }, { "key": "Menubutton", "palette_id": "pal_menubutton", @@ -1276,29 +1290,69 @@ "registry_index": 456 }, { - "name": "XArcGauge", + "name": "XGraph", "section": "Misc / X", - "registry_index": 545 + "registry_index": 548 + }, + { + "name": "XSpreadsheet", + "section": "Misc / X", + "registry_index": 555 + }, + { + "name": "XHistoryGraph", + "section": "Misc / X", + "registry_index": 549 }, { "name": "XCoreGrid", "section": "Misc / X", "registry_index": 546 }, + { + "name": "XNetGraph", + "section": "Misc / X", + "registry_index": 553 + }, + { + "name": "XTempHistory", + "section": "Misc / X", + "registry_index": 559 + }, + { + "name": "XUsageBar", + "section": "Misc / X", + "registry_index": 560 + }, + { + "name": "XStackBar", + "section": "Misc / X", + "registry_index": 556 + }, + { + "name": "XVerticalBar", + "section": "Misc / X", + "registry_index": 561 + }, + { + "name": "XTachometer", + "section": "Misc / X", + "registry_index": 558 + }, + { + "name": "XArcGauge", + "section": "Misc / X", + "registry_index": 545 + }, { "name": "XDonutGauge", "section": "Misc / X", "registry_index": 547 }, { - "name": "XGraph", + "name": "XProcessList", "section": "Misc / X", - "registry_index": 548 - }, - { - "name": "XHistoryGraph", - "section": "Misc / X", - "registry_index": 549 + "registry_index": 554 }, { "name": "XLoadBadge", @@ -1315,51 +1369,11 @@ "section": "Misc / X", "registry_index": 552 }, - { - "name": "XNetGraph", - "section": "Misc / X", - "registry_index": 553 - }, - { - "name": "XProcessList", - "section": "Misc / X", - "registry_index": 554 - }, - { - "name": "XSpreadsheet", - "section": "Misc / X", - "registry_index": 555 - }, - { - "name": "XStackBar", - "section": "Misc / X", - "registry_index": 556 - }, { "name": "XSysBox", "section": "Misc / X", "registry_index": 557 }, - { - "name": "XTachometer", - "section": "Misc / X", - "registry_index": 558 - }, - { - "name": "XTempHistory", - "section": "Misc / X", - "registry_index": 559 - }, - { - "name": "XUsageBar", - "section": "Misc / X", - "registry_index": 560 - }, - { - "name": "XVerticalBar", - "section": "Misc / X", - "registry_index": 561 - }, { "name": "IndADX", "section": "Stock Market", diff --git a/data/props.json b/data/props.json index 6b7b416..2828a31 100644 --- a/data/props.json +++ b/data/props.json @@ -1,7 +1,7 @@ { "_provenance": { "source_repo": "https://github.com/cnmcdee/lightgui", - "source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", + "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2", "source_files": [ "src/model.h", "src/props.h" @@ -89,13 +89,166 @@ "comment": "ICONS, TEXT, BOTH, BOTH_HORIZ" }, "kShapeValues": { + "values": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "comment": "TShapeType: RECTANGLE, SQUARE, ROUNDRECT, ROUNDSQUARE, ELLIPSE, CIRCLE, TRIANGLE, DIAMOND, PENTAGON, HEXAGON" + }, + "kViewStyleValues": { "values": [ 0, 1, 2, 3 ], - "comment": "RECTANGLE, ELLIPSE, LINE, TRIANGLE" + "comment": "REPORT, ICON, SMALL_ICON, LIST" + }, + "kSortTypeValues": { + "values": [ + 0, + 1, + 2 + ], + "comment": "NONE, ASCENDING, DESCENDING" + }, + "kTabPositionValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "TOP, BOTTOM, LEFT, RIGHT" + }, + "kBorderStyleValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "DEFAULT, NONE, SINGLE, DIALOG" + }, + "kWindowPositionValues": { + "values": [ + 0, + 1, + 2, + 3, + 4 + ], + "comment": "DEFAULT, CENTER, SCREEN_CENTER, MAIN_FORM_CENTER, DESIGNED" + }, + "kWindowStateValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "NORMAL, MINIMIZED, MAXIMIZED, FULLSCREEN" + }, + "kColorStyleValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "STANDARD, EXTENDED, SYSTEM, CUSTOM" + }, + "kResizeStyleValues": { + "values": [ + 0, + 1 + ], + "comment": "UPDATE, LINE" + }, + "kAlignValues": { + "values": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "comment": "NONE, TOP, BOTTOM, LEFT, RIGHT, CLIENT" + }, + "kButtonKindValues": { + "values": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "comment": "NONE, OK, CANCEL, YES, NO, CLOSE, HELP, RETRY, IGNORE, ABORT" + }, + "kButtonLayoutValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "LEFT, RIGHT, TOP, BOTTOM" + }, + "kTextAlignValues": { + "values": [ + 0, + 1, + 2 + ], + "comment": "LEFT, CENTER, RIGHT" + }, + "kCharCaseValues": { + "values": [ + 0, + 1, + 2 + ], + "comment": "NORMAL, UPPER, LOWER" + }, + "kComboStyleValues": { + "values": [ + 0, + 1, + 2 + ], + "comment": "DROPDOWN, SIMPLE, DROPDOWNLIST" + }, + "kTickMarksValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "NONE, TOPLEFT, BOTTOMRIGHT, BOTH" + }, + "kScrollBarsValues": { + "values": [ + 0, + 1, + 2, + 3 + ], + "comment": "NONE, HORIZONTAL, VERTICAL, BOTH" } }, "common_props": [ @@ -109,10 +262,215 @@ "kind": "Color", "default": "" }, + { + "name": "border-width", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100 + }, + { + "name": "border-color", + "kind": "Color", + "default": "" + }, + { + "name": "border-radius", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 + }, { "name": "tooltip-text", "kind": "Str", "default": "" + }, + { + "name": "enabled", + "kind": "Bool", + "default": "true" + }, + { + "name": "visible", + "kind": "Bool", + "default": "true" + }, + { + "name": "font-name", + "kind": "Str", + "default": "" + }, + { + "name": "font-size", + "kind": "Int", + "default": "13", + "lo": 6, + "hi": 72 + }, + { + "name": "font-bold", + "kind": "Bool", + "default": "false" + }, + { + "name": "font-italic", + "kind": "Bool", + "default": "false" + }, + { + "name": "font-underline", + "kind": "Bool", + "default": "false" + }, + { + "name": "font-strikeout", + "kind": "Bool", + "default": "false" + }, + { + "name": "hint", + "kind": "Str", + "default": "" + }, + { + "name": "show-hint", + "kind": "Bool", + "default": "false" + }, + { + "name": "cursor", + "kind": "Str", + "default": "" + }, + { + "name": "tab-order", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "tab-stop", + "kind": "Bool", + "default": "true" + }, + { + "name": "min-width", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "min-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "max-width", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "max-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "margin-left", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "margin-top", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "margin-right", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "margin-bottom", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "margin-around", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "autosize", + "kind": "Bool", + "default": "false" + }, + { + "name": "tag", + "kind": "Int", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "anchor-top", + "kind": "Bool", + "default": "true" + }, + { + "name": "anchor-left", + "kind": "Bool", + "default": "true" + }, + { + "name": "anchor-right", + "kind": "Bool", + "default": "false" + }, + { + "name": "anchor-bottom", + "kind": "Bool", + "default": "false" + }, + { + "name": "align", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "Top", + "Bottom", + "Left", + "Right", + "Client" + ], + "enum_values_table": "kAlignValues", + "enum_values": [ + 0, + 1, + 2, + 3, + 4, + 5 + ] } ], "types": { @@ -142,6 +500,76 @@ "name": "focus-on-click", "kind": "Bool", "default": "true" + }, + { + "name": "default", + "kind": "Bool", + "default": "false" + }, + { + "name": "cancel", + "kind": "Bool", + "default": "false" + }, + { + "name": "kind", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "OK", + "Cancel", + "Yes", + "No", + "Close", + "Help", + "Retry", + "Ignore", + "Abort" + ], + "enum_values_table": "kButtonKindValues", + "enum_values": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] + }, + { + "name": "modal-result", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100 + }, + { + "name": "layout", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Left", + "Right", + "Top", + "Bottom" + ], + "enum_values_table": "kButtonLayoutValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "glyph", + "kind": "Str", + "default": "" } ], "Label": [ @@ -157,6 +585,13 @@ "lo": 0.0, "hi": 1.0 }, + { + "name": "yalign", + "kind": "Double", + "default": "0.5", + "lo": 0.0, + "hi": 1.0 + }, { "name": "selectable", "kind": "Bool", @@ -166,6 +601,21 @@ "name": "wrap", "kind": "Bool", "default": "false" + }, + { + "name": "transparent", + "kind": "Bool", + "default": "false" + }, + { + "name": "show-accel-char", + "kind": "Bool", + "default": "true" + }, + { + "name": "focus-control", + "kind": "Str", + "default": "" } ], "Entry": [ @@ -199,9 +649,61 @@ "default": "true" }, { - "name": "visibility", + "name": "password", "kind": "Bool", - "default": "true" + "default": "false" + }, + { + "name": "show-password", + "kind": "Bool", + "default": "false" + }, + { + "name": "alignment", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Left", + "Center", + "Right" + ], + "enum_values_table": "kTextAlignValues", + "enum_values": [ + 0, + 1, + 2 + ] + }, + { + "name": "char-case", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Normal", + "Upper", + "Lower" + ], + "enum_values_table": "kCharCaseValues", + "enum_values": [ + 0, + 1, + 2 + ] + }, + { + "name": "numbers-only", + "kind": "Bool", + "default": "false" + }, + { + "name": "hide-selection", + "kind": "Bool", + "default": "false" + }, + { + "name": "auto-select", + "kind": "Bool", + "default": "false" } ], "Checkbutton": [ @@ -219,6 +721,69 @@ "name": "inconsistent", "kind": "Bool", "default": "false" + }, + { + "name": "allow-grayed", + "kind": "Bool", + "default": "false" + }, + { + "name": "alignment", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Left", + "Right" + ], + "enum_values_table": "kOrientationValues", + "enum_values": [ + 0, + 1 + ] + }, + { + "name": "value-checked", + "kind": "Str", + "default": "" + }, + { + "name": "value-unchecked", + "kind": "Str", + "default": "" + } + ], + "ToggleButton": [ + { + "name": "text", + "kind": "Str", + "default": "" + }, + { + "name": "active", + "kind": "Bool", + "default": "false" + }, + { + "name": "group-index", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "allow-all-up", + "kind": "Bool", + "default": "false" + }, + { + "name": "flat", + "kind": "Bool", + "default": "false" + }, + { + "name": "glyph", + "kind": "Str", + "default": "" } ], "Radiobutton": [ @@ -231,6 +796,13 @@ "name": "active", "kind": "Bool", "default": "false" + }, + { + "name": "group", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 } ], "Frame": [ @@ -239,6 +811,27 @@ "kind": "Str", "default": "" }, + { + "name": "label-xalign", + "kind": "Double", + "default": "0", + "lo": 0, + "hi": 1 + }, + { + "name": "inset", + "kind": "Int", + "default": "8", + "lo": 0, + "hi": 1000 + }, + { + "name": "top-inset", + "kind": "Int", + "default": "14", + "lo": 0, + "hi": 1000 + }, { "name": "shadow-type", "kind": "Enum", @@ -261,15 +854,98 @@ } ], "Combobox": [ + { + "name": "items", + "kind": "Str", + "default": "Item 1|Item 2|Item 3" + }, { "name": "active", "kind": "Int", "default": "0", "lo": -1, "hi": 1000 + }, + { + "name": "text", + "kind": "Str", + "default": "" + }, + { + "name": "style", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "DropDown", + "Simple", + "DropDownList" + ], + "enum_values_table": "kComboStyleValues", + "enum_values": [ + 0, + 1, + 2 + ] + }, + { + "name": "drop-down-count", + "kind": "Int", + "default": "8", + "lo": 1, + "hi": 100 + }, + { + "name": "drop-down-width", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 10000 + }, + { + "name": "sorted", + "kind": "Bool", + "default": "false" + }, + { + "name": "read-only", + "kind": "Bool", + "default": "false" + }, + { + "name": "max-length", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "auto-complete", + "kind": "Bool", + "default": "false" + }, + { + "name": "char-case", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Normal", + "Upper", + "Lower" + ], + "enum_values_table": "kCharCaseValues", + "enum_values": [ + 0, + 1, + 2 + ] } ], "Listbox": [ + { + "name": "items", + "kind": "Str", + "default": "Item 1|Item 2|Item 3" + }, { "name": "selection-mode", "kind": "Enum", @@ -287,6 +963,68 @@ 2, 3 ] + }, + { + "name": "item-index", + "kind": "Int", + "default": "-1", + "lo": -1, + "hi": 100000 + }, + { + "name": "sorted", + "kind": "Bool", + "default": "false" + }, + { + "name": "columns", + "kind": "Int", + "default": "1", + "lo": 1, + "hi": 100 + }, + { + "name": "item-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 + }, + { + "name": "integral-height", + "kind": "Bool", + "default": "false" + } + ], + "CheckListBox": [ + { + "name": "items", + "kind": "Str", + "default": "Item 1|Item 2|Item 3" + }, + { + "name": "checked-items", + "kind": "Str", + "default": "" + }, + { + "name": "item-index", + "kind": "Int", + "default": "-1", + "lo": -1, + "hi": 100000 + }, + { + "name": "item-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 + }, + { + "name": "sorted", + "kind": "Bool", + "default": "false" } ], "Menubutton": [ @@ -324,6 +1062,20 @@ "lo": 0, "hi": 100 }, + { + "name": "minimum", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "maximum", + "kind": "Double", + "default": "100", + "lo": -1000000, + "hi": 1000000 + }, { "name": "digits", "kind": "Int", @@ -340,6 +1092,57 @@ "name": "inverted", "kind": "Bool", "default": "false" + }, + { + "name": "page-step", + "kind": "Double", + "default": "10", + "lo": 0, + "hi": 1000000 + }, + { + "name": "tick-marks", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "TopLeft", + "BottomRight", + "Both" + ], + "enum_values_table": "kTickMarksValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "frequency", + "kind": "Int", + "default": "10", + "lo": 1, + "hi": 1000000 + }, + { + "name": "show-sel-range", + "kind": "Bool", + "default": "false" + }, + { + "name": "sel-start", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "sel-end", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 } ], "Scrollbar": [ @@ -350,13 +1153,74 @@ "lo": 0, "hi": 100 }, + { + "name": "lower", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "upper", + "kind": "Double", + "default": "100", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "step-increment", + "kind": "Double", + "default": "1", + "lo": 0, + "hi": 1000000 + }, + { + "name": "page-increment", + "kind": "Double", + "default": "10", + "lo": 0, + "hi": 1000000 + }, + { + "name": "page-size", + "kind": "Double", + "default": "10", + "lo": 0, + "hi": 1000000 + }, { "name": "inverted", "kind": "Bool", "default": "false" + }, + { + "name": "orientation", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Horizontal", + "Vertical" + ], + "enum_values_table": "kOrientationValues", + "enum_values": [ + 0, + 1 + ] + }, + { + "name": "large-change", + "kind": "Double", + "default": "10", + "lo": 0, + "hi": 1000000 } ], "Text": [ + { + "name": "text", + "kind": "Str", + "default": "" + }, { "name": "editable", "kind": "Bool", @@ -384,6 +1248,62 @@ 2, 3 ] + }, + { + "name": "max-length", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "scroll-bars", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "Horizontal", + "Vertical", + "Both" + ], + "enum_values_table": "kScrollBarsValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "want-tabs", + "kind": "Bool", + "default": "true" + }, + { + "name": "want-returns", + "kind": "Bool", + "default": "true" + }, + { + "name": "hide-selection", + "kind": "Bool", + "default": "false" + }, + { + "name": "alignment", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Left", + "Center", + "Right" + ], + "enum_values_table": "kTextAlignValues", + "enum_values": [ + 0, + 1, + 2 + ] } ], "Toplevel": [ @@ -396,6 +1316,67 @@ "name": "resizable", "kind": "Bool", "default": "true" + }, + { + "name": "border-style", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Default", + "None", + "Single", + "Dialog" + ], + "enum_values_table": "kBorderStyleValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "icon", + "kind": "Str", + "default": "" + }, + { + "name": "position", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Default", + "Center", + "ScreenCenter", + "MainFormCenter", + "Designed" + ], + "enum_values_table": "kWindowPositionValues", + "enum_values": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + { + "name": "window-state", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Normal", + "Minimized", + "Maximized", + "Fullscreen" + ], + "enum_values_table": "kWindowStateValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] } ], "Spreadsheet": [ @@ -412,6 +1393,41 @@ "default": "4", "lo": 1, "hi": 26 + }, + { + "name": "fixed-cols", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 26 + }, + { + "name": "fixed-rows", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 50 + }, + { + "name": "default-col-width", + "kind": "Int", + "default": "84", + "lo": 1, + "hi": 1000 + }, + { + "name": "default-row-height", + "kind": "Int", + "default": "20", + "lo": 1, + "hi": 1000 + }, + { + "name": "grid-line-width", + "kind": "Int", + "default": "1", + "lo": 0, + "hi": 100 } ], "StockChart": [ @@ -423,12 +1439,12 @@ { "name": "up-color", "kind": "Color", - "default": "rgb(0,200,0)" + "default": "rgb(0,150,0)" }, { "name": "down-color", "kind": "Color", - "default": "rgb(220,0,0)" + "default": "rgb(200,30,30)" }, { "name": "max-candles", @@ -465,6 +1481,63 @@ "name": "drawings", "kind": "Str", "default": "" + }, + { + "name": "text", + "kind": "Str", + "default": "" + }, + { + "name": "grid-color", + "kind": "Color", + "default": "rgb(225,225,225)" + }, + { + "name": "axis-width", + "kind": "Int", + "default": "56", + "lo": 0, + "hi": 1000 + }, + { + "name": "axis-height", + "kind": "Int", + "default": "20", + "lo": 0, + "hi": 1000 + }, + { + "name": "view-first", + "kind": "Double", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "view-count", + "kind": "Double", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "auto-y", + "kind": "Bool", + "default": "true" + }, + { + "name": "y-min", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "y-max", + "kind": "Double", + "default": "1", + "lo": -1000000, + "hi": 1000000 } ], "Memo": [ @@ -478,6 +1551,11 @@ "kind": "Bool", "default": "true" }, + { + "name": "cursor-visible", + "kind": "Bool", + "default": "true" + }, { "name": "wrap-mode", "kind": "Enum", @@ -495,6 +1573,62 @@ 2, 3 ] + }, + { + "name": "max-length", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 100000 + }, + { + "name": "scroll-bars", + "kind": "Enum", + "default": "3", + "enum_labels": [ + "None", + "Horizontal", + "Vertical", + "Both" + ], + "enum_values_table": "kScrollBarsValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "want-tabs", + "kind": "Bool", + "default": "true" + }, + { + "name": "want-returns", + "kind": "Bool", + "default": "true" + }, + { + "name": "hide-selection", + "kind": "Bool", + "default": "false" + }, + { + "name": "alignment", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Left", + "Center", + "Right" + ], + "enum_values_table": "kTextAlignValues", + "enum_values": [ + 0, + 1, + 2 + ] } ], "GroupBox": [ @@ -503,6 +1637,27 @@ "kind": "Str", "default": "" }, + { + "name": "label-xalign", + "kind": "Double", + "default": "0", + "lo": 0, + "hi": 1 + }, + { + "name": "inset", + "kind": "Int", + "default": "8", + "lo": 0, + "hi": 1000 + }, + { + "name": "top-inset", + "kind": "Int", + "default": "14", + "lo": 0, + "hi": 1000 + }, { "name": "shadow-type", "kind": "Enum", @@ -530,6 +1685,27 @@ "kind": "Str", "default": "" }, + { + "name": "label-xalign", + "kind": "Double", + "default": "0", + "lo": 0, + "hi": 1 + }, + { + "name": "inset", + "kind": "Int", + "default": "8", + "lo": 0, + "hi": 1000 + }, + { + "name": "top-inset", + "kind": "Int", + "default": "14", + "lo": 0, + "hi": 1000 + }, { "name": "shadow-type", "kind": "Enum", @@ -563,6 +1739,26 @@ "default": "-1", "lo": -1, "hi": 512 + }, + { + "name": "stretch", + "kind": "Bool", + "default": "false" + }, + { + "name": "proportional", + "kind": "Bool", + "default": "true" + }, + { + "name": "center", + "kind": "Bool", + "default": "true" + }, + { + "name": "transparent", + "kind": "Bool", + "default": "false" } ], "Shape": [ @@ -572,22 +1768,46 @@ "default": "0", "enum_labels": [ "Rectangle", + "Square", + "RoundRect", + "RoundSquare", "Ellipse", - "Line", - "Triangle" + "Circle", + "Triangle", + "Diamond", + "Pentagon", + "Hexagon" ], "enum_values_table": "kShapeValues", "enum_values": [ 0, 1, 2, - 3 + 3, + 4, + 5, + 6, + 7, + 8, + 9 ] }, { "name": "fill-color", "kind": "Color", - "default": "rgb(53,132,228)" + "default": "rgb(70,130,200)" + }, + { + "name": "pen-color", + "kind": "Color", + "default": "rgb(20,40,80)" + }, + { + "name": "pen-width", + "kind": "Int", + "default": "2", + "lo": 1, + "hi": 100 } ], "Notebook": [ @@ -602,6 +1822,38 @@ "default": "0", "lo": 0, "hi": 100 + }, + { + "name": "tab-height", + "kind": "Int", + "default": "26", + "lo": 0, + "hi": 1000 + }, + { + "name": "tab-position", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Top", + "Bottom", + "Left", + "Right" + ], + "enum_values_table": "kTabPositionValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "tab-width", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 } ], "ScrollBox": [ @@ -632,6 +1884,32 @@ 0, 1 ] + }, + { + "name": "min-size", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 10000 + }, + { + "name": "resize-style", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Update", + "Line" + ], + "enum_values_table": "kResizeStyleValues", + "enum_values": [ + 0, + 1 + ] + }, + { + "name": "auto-snap", + "kind": "Bool", + "default": "false" } ], "StatusBar": [ @@ -639,6 +1917,16 @@ "name": "text", "kind": "Str", "default": "" + }, + { + "name": "panels", + "kind": "Str", + "default": "" + }, + { + "name": "size-grip", + "kind": "Bool", + "default": "true" } ], "ToolBar": [ @@ -664,6 +1952,30 @@ 2, 3 ] + }, + { + "name": "show-captions", + "kind": "Bool", + "default": "true" + }, + { + "name": "flat", + "kind": "Bool", + "default": "false" + }, + { + "name": "button-width", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 + }, + { + "name": "button-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 } ], "MenuBar": [ @@ -718,6 +2030,11 @@ "name": "wrap", "kind": "Bool", "default": "false" + }, + { + "name": "editor-enabled", + "kind": "Bool", + "default": "true" } ], "TrackBar": [ @@ -779,6 +2096,57 @@ 0, 1 ] + }, + { + "name": "page-step", + "kind": "Double", + "default": "10", + "lo": 0, + "hi": 1000000 + }, + { + "name": "tick-marks", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "TopLeft", + "BottomRight", + "Both" + ], + "enum_values_table": "kTickMarksValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "frequency", + "kind": "Int", + "default": "10", + "lo": 1, + "hi": 1000000 + }, + { + "name": "show-sel-range", + "kind": "Bool", + "default": "false" + }, + { + "name": "sel-start", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "sel-end", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 } ], "ProgressBar": [ @@ -789,6 +2157,34 @@ "lo": 0, "hi": 1 }, + { + "name": "position", + "kind": "Double", + "default": "45", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "minimum", + "kind": "Double", + "default": "0", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "maximum", + "kind": "Double", + "default": "100", + "lo": -1000000, + "hi": 1000000 + }, + { + "name": "step", + "kind": "Double", + "default": "1", + "lo": 0, + "hi": 1000000 + }, { "name": "show-text", "kind": "Bool", @@ -798,6 +2194,26 @@ "name": "text", "kind": "Str", "default": "" + }, + { + "name": "pulsing", + "kind": "Bool", + "default": "false" + }, + { + "name": "inverted", + "kind": "Bool", + "default": "false" + }, + { + "name": "bar-color", + "kind": "Color", + "default": "rgb(52,101,164)" + }, + { + "name": "trough-color", + "kind": "Color", + "default": "rgb(225,225,225)" } ], "DateTimePicker": [ @@ -815,6 +2231,46 @@ "name": "show-day-names", "kind": "Bool", "default": "true" + }, + { + "name": "show-week-numbers", + "kind": "Bool", + "default": "false" + }, + { + "name": "grid-color", + "kind": "Color", + "default": "rgb(205,205,205)" + }, + { + "name": "selected-fill-color", + "kind": "Color", + "default": "rgb(52,101,164)" + }, + { + "name": "selected-text-color", + "kind": "Color", + "default": "rgb(255,255,255)" + }, + { + "name": "today-color", + "kind": "Color", + "default": "rgb(200,50,50)" + }, + { + "name": "dim-text-color", + "kind": "Color", + "default": "rgb(110,110,110)" + }, + { + "name": "weekends-color", + "kind": "Color", + "default": "rgb(170,60,60)" + }, + { + "name": "disabled-color", + "kind": "Color", + "default": "rgb(150,150,150)" } ], "ColorBox": [ @@ -823,6 +2279,34 @@ "kind": "Color", "default": "rgb(53,132,228)" }, + { + "name": "style", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Standard", + "Extended", + "System", + "Custom" + ], + "enum_values_table": "kColorStyleValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "default-color", + "kind": "Color", + "default": "rgb(255,255,255)" + }, + { + "name": "none-color", + "kind": "Color", + "default": "rgb(0,0,0)" + }, { "name": "use-alpha", "kind": "Bool", @@ -849,6 +2333,69 @@ "name": "headers-visible", "kind": "Bool", "default": "true" + }, + { + "name": "item-index", + "kind": "Int", + "default": "-1", + "lo": -1, + "hi": 100000 + }, + { + "name": "item-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 + }, + { + "name": "view-style", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "Report", + "Icon", + "SmallIcon", + "List" + ], + "enum_values_table": "kViewStyleValues", + "enum_values": [ + 0, + 1, + 2, + 3 + ] + }, + { + "name": "grid-lines", + "kind": "Bool", + "default": "false" + }, + { + "name": "row-select", + "kind": "Bool", + "default": "true" + }, + { + "name": "multi-select", + "kind": "Bool", + "default": "false" + }, + { + "name": "sort-type", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "Ascending", + "Descending" + ], + "enum_values_table": "kSortTypeValues", + "enum_values": [ + 0, + 1, + 2 + ] } ], "TreeView": [ @@ -861,6 +2408,80 @@ "name": "headers-visible", "kind": "Bool", "default": "true" + }, + { + "name": "item-index", + "kind": "Int", + "default": "-1", + "lo": -1, + "hi": 100000 + }, + { + "name": "item-height", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 1000 + }, + { + "name": "header-height", + "kind": "Int", + "default": "22", + "lo": 0, + "hi": 1000 + }, + { + "name": "grid-lines", + "kind": "Bool", + "default": "false" + }, + { + "name": "row-select", + "kind": "Bool", + "default": "true" + }, + { + "name": "multi-select", + "kind": "Bool", + "default": "false" + }, + { + "name": "sort-type", + "kind": "Enum", + "default": "0", + "enum_labels": [ + "None", + "Ascending", + "Descending" + ], + "enum_values_table": "kSortTypeValues", + "enum_values": [ + 0, + 1, + 2 + ] + }, + { + "name": "indent", + "kind": "Int", + "default": "16", + "lo": 0, + "hi": 1000 + }, + { + "name": "show-buttons", + "kind": "Bool", + "default": "true" + }, + { + "name": "show-lines", + "kind": "Bool", + "default": "true" + }, + { + "name": "show-root", + "kind": "Bool", + "default": "true" } ], "StringGrid": [ @@ -882,6 +2503,41 @@ "name": "headers-visible", "kind": "Bool", "default": "true" + }, + { + "name": "fixed-cols", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 26 + }, + { + "name": "fixed-rows", + "kind": "Int", + "default": "0", + "lo": 0, + "hi": 50 + }, + { + "name": "default-col-width", + "kind": "Int", + "default": "84", + "lo": 1, + "hi": 1000 + }, + { + "name": "default-row-height", + "kind": "Int", + "default": "20", + "lo": 1, + "hi": 1000 + }, + { + "name": "grid-line-width", + "kind": "Int", + "default": "1", + "lo": 0, + "hi": 100 } ], "Plot": [ @@ -897,9 +2553,9 @@ } ] }, - "types_with_table": 35, + "types_with_table": 37, "types_without_table": [ "Canvas" ], - "type_count": 36 + "type_count": 38 } diff --git a/data/registry.json b/data/registry.json index 57af4ef..321b4c9 100644 --- a/data/registry.json +++ b/data/registry.json @@ -1,7 +1,7 @@ { "_provenance": { "source_repo": "https://github.com/cnmcdee/lightgui", - "source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", + "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2", "source_files": [ "widgets/common/registry.h", "widgets/tools/gen_registry.py", @@ -10,7 +10,7 @@ ], "generated_by": "python3 tools/extract_registry.py", "regenerate": "make regen (or: python3 tools/extract_registry.py)", - "note": "Generated from the C++ sources \u2014 do not edit by hand. 15 X* monitor widgets (indices 547-561) hand-added Dec 2026 pending the C port; `make check` reports them as drift until the C sources contain them." + "note": "Generated from the C++ sources \u2014 do not edit by hand." }, "widget_count": 562, "section_count": 11, @@ -141,8 +141,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 520, + "default_h": 260, "header": "widgets/components/GtkAboutDialog/GtkAboutDialog.h" }, { @@ -191,8 +191,8 @@ "family": "Gtk", "section": "Choosers", "section_index": 5, - "default_w": 200, - "default_h": 90, + "default_w": 320, + "default_h": 240, "header": "widgets/components/GtkAppChooserWidget/GtkAppChooserWidget.h" }, { @@ -221,8 +221,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 320, + "default_h": 280, "header": "widgets/components/GtkAssistant/GtkAssistant.h" }, { @@ -261,8 +261,8 @@ "family": "Gtk", "section": "Display", "section_index": 3, - "default_w": 200, - "default_h": 90, + "default_w": 260, + "default_h": 200, "header": "widgets/components/GtkCalendar/GtkCalendar.h" }, { @@ -321,8 +321,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 340, + "default_h": 240, "header": "widgets/components/GtkColorChooserDialog/GtkColorChooserDialog.h" }, { @@ -331,8 +331,8 @@ "family": "Gtk", "section": "Choosers", "section_index": 5, - "default_w": 200, - "default_h": 90, + "default_w": 340, + "default_h": 260, "header": "widgets/components/GtkColorChooserWidget/GtkColorChooserWidget.h" }, { @@ -471,8 +471,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 360, + "default_h": 240, "header": "widgets/components/GtkFileChooserDialog/GtkFileChooserDialog.h" }, { @@ -481,8 +481,8 @@ "family": "Gtk", "section": "Choosers", "section_index": 5, - "default_w": 200, - "default_h": 90, + "default_w": 340, + "default_h": 260, "header": "widgets/components/GtkFileChooserWidget/GtkFileChooserWidget.h" }, { @@ -521,8 +521,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 340, + "default_h": 240, "header": "widgets/components/GtkFontChooserDialog/GtkFontChooserDialog.h" }, { @@ -531,8 +531,8 @@ "family": "Gtk", "section": "Choosers", "section_index": 5, - "default_w": 200, - "default_h": 90, + "default_w": 340, + "default_h": 260, "header": "widgets/components/GtkFontChooserWidget/GtkFontChooserWidget.h" }, { @@ -851,8 +851,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 360, + "default_h": 300, "header": "widgets/components/GtkPrintUnixDialog/GtkPrintUnixDialog.h" }, { @@ -981,8 +981,8 @@ "family": "Gtk", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 320, + "default_h": 300, "header": "widgets/components/GtkShortcutsWindow/GtkShortcutsWindow.h" }, { @@ -1111,8 +1111,8 @@ "family": "Gtk", "section": "Views & Lists", "section_index": 6, - "default_w": 260, - "default_h": 180, + "default_w": 320, + "default_h": 200, "header": "widgets/components/GtkTreeView/GtkTreeView.h" }, { @@ -4781,8 +4781,8 @@ "family": "T", "section": "Display", "section_index": 3, - "default_w": 200, - "default_h": 90, + "default_w": 260, + "default_h": 200, "header": "widgets/components/TCalendar/TCalendar.h" }, { @@ -4791,8 +4791,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 320, + "default_h": 280, "header": "widgets/components/TCalendarDialog/TCalendarDialog.h" }, { @@ -4861,8 +4861,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 520, + "default_h": 300, "header": "widgets/components/TColorDialog/TColorDialog.h" }, { @@ -5011,8 +5011,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 380, + "default_h": 260, "header": "widgets/components/TFindDialog/TFindDialog.h" }, { @@ -5041,8 +5041,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 320, + "default_h": 420, "header": "widgets/components/TFontDialog/TFontDialog.h" }, { @@ -5141,8 +5141,8 @@ "family": "T", "section": "Views & Lists", "section_index": 6, - "default_w": 260, - "default_h": 180, + "default_w": 320, + "default_h": 200, "header": "widgets/components/TListView/TListView.h" }, { @@ -5201,8 +5201,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 480, + "default_h": 240, "header": "widgets/components/TOpenPictureDialog/TOpenPictureDialog.h" }, { @@ -5221,8 +5221,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 320, + "default_h": 400, "header": "widgets/components/TPageSetupDialog/TPageSetupDialog.h" }, { @@ -5281,8 +5281,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 320, + "default_h": 300, "header": "widgets/components/TPrintDialog/TPrintDialog.h" }, { @@ -5331,8 +5331,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 360, + "default_h": 260, "header": "widgets/components/TReplaceDialog/TReplaceDialog.h" }, { @@ -5351,8 +5351,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 480, + "default_h": 240, "header": "widgets/components/TSavePictureDialog/TSavePictureDialog.h" }, { @@ -5381,8 +5381,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 360, + "default_h": 260, "header": "widgets/components/TSelectDirectoryDialog/TSelectDirectoryDialog.h" }, { @@ -5471,8 +5471,8 @@ "family": "T", "section": "Views & Lists", "section_index": 6, - "default_w": 260, - "default_h": 180, + "default_w": 360, + "default_h": 200, "header": "widgets/components/TStringGrid/TStringGrid.h" }, { @@ -5491,8 +5491,8 @@ "family": "T", "section": "Windows & Dialogs", "section_index": 0, - "default_w": 300, - "default_h": 220, + "default_w": 340, + "default_h": 280, "header": "widgets/components/TTaskDialog/TTaskDialog.h" }, { @@ -5591,8 +5591,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 260, - "default_h": 200, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XArcGauge/XArcGauge.h" }, { @@ -5601,8 +5601,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 360, - "default_h": 220, + "default_w": 260, + "default_h": 180, "header": "widgets/components/XCoreGrid/XCoreGrid.h" }, { @@ -5611,8 +5611,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 220, - "default_h": 220, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XDonutGauge/XDonutGauge.h" }, { @@ -5641,8 +5641,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 260, - "default_h": 80, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XLoadBadge/XLoadBadge.h" }, { @@ -5651,8 +5651,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 200, - "default_h": 64, + "default_w": 150, + "default_h": 36, "header": "widgets/components/XMonitorButton/XMonitorButton.h" }, { @@ -5661,8 +5661,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 420, - "default_h": 200, + "default_w": 260, + "default_h": 180, "header": "widgets/components/XMonitorGrid/XMonitorGrid.h" }, { @@ -5681,8 +5681,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 480, - "default_h": 260, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XProcessList/XProcessList.h" }, { @@ -5701,8 +5701,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 360, - "default_h": 80, + "default_w": 260, + "default_h": 180, "header": "widgets/components/XStackBar/XStackBar.h" }, { @@ -5711,8 +5711,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 320, - "default_h": 200, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XSysBox/XSysBox.h" }, { @@ -5721,8 +5721,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 280, - "default_h": 220, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XTachometer/XTachometer.h" }, { @@ -5731,8 +5731,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 320, - "default_h": 200, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XTempHistory/XTempHistory.h" }, { @@ -5741,8 +5741,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 320, - "default_h": 60, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XUsageBar/XUsageBar.h" }, { @@ -5751,8 +5751,8 @@ "family": "X", "section": "Misc / X", "section_index": 8, - "default_w": 120, - "default_h": 220, + "default_w": 200, + "default_h": 90, "header": "widgets/components/XVerticalBar/XVerticalBar.h" } ] diff --git a/tools/README.md b/tools/README.md index bfb7b5f..4b4d02f 100644 --- a/tools/README.md +++ b/tools/README.md @@ -25,15 +25,15 @@ make check-registry | check-palette | check-props | check-events | check-indicat | Script | Source(s) | Output | Contents | |---|---|---|---| -| `extract_registry.py` | `widgets/common/registry.h`, `widgets/components/`, `widgets/tools/sections.py`, `widgets/tools/gen_registry.py` | `data/registry.json` | 547 widgets: name, family, section, default size, header path | -| `extract_palette.py` | `src/xframe_palette.h`, `src/model.h`, `data/registry.json` | `data/palette.json` | 583 palette entries: 36 LightGUI + 547 XFrame | -| `extract_props.py` | `src/props.h`, `src/model.h` | `data/props.json` | 6 PropKinds, 9 enum tables, 35 per-type tables (99 props), common props | -| `extract_events.py` | `src/events.h`, `src/model.h` | `data/events.json` | 10 EventKinds, 27 per-type tables (32 events), 9 no-events notes | +| `extract_registry.py` | `widgets/common/registry.h`, `widgets/components/`, `widgets/tools/sections.py`, `widgets/tools/gen_registry.py` | `data/registry.json` | 562 widgets: name, family, section, default size, header path | +| `extract_palette.py` | `src/xframe_palette.h`, `src/model.h`, `data/registry.json` | `data/palette.json` | 600 palette entries: 38 LightGUI + 562 XFrame | +| `extract_props.py` | `src/props.h`, `src/model.h` | `data/props.json` | 6 PropKinds, 25 enum tables, 37 per-type tables (270 props), 35 common props | +| `extract_events.py` | `src/events.h`, `src/model.h` | `data/events.json` | 10 EventKinds, 29 per-type tables (34 events), 9 no-events notes | | `extract_indicators.py` | `src/indicators.h` | `data/indicators.json` | 250 indicator catalog entries (name, group, plot kind, style, colour, defaults, function) | `common.py` holds the shared C++ parsing helpers (braced-initializer splitting, string literals, provenance stamping) and `parse_ktypes()` -for the 36 LightGUI types in `src/model.h`. `extract_all.py` runs the +for the 38 LightGUI types in `src/model.h`. `extract_all.py` runs the five extractors in dependency order. `check.py` re-derives each table fresh and deep-compares it against the committed JSON. @@ -47,22 +47,23 @@ fresh and deep-compares it against the committed JSON. `sections.py`, and the `default_size()` rule, and fails if they disagree. The palette extractor verifies every entry against the registry (name set, index, section). Props/events verify full - coverage of the 36 `kTypes` keys. Indicators verify every referenced + coverage of the 38 `kTypes` keys. Indicators verify every referenced compute function is defined in the header. - **Counts are derived, never hard-coded.** The scripts fail loudly on any mismatch instead of warning. -## Re-derived counts (lightgui eb0b5fc) +## Re-derived counts (lightgui e474894) -- Widgets: **547** — families Gtk 102, Ind 250, Inst 66, Stock 37, - T 90, X 2. (The survey's Stock 38 / Inst 67 counted the shared - non-widget headers `StockData.h` / `InstData.h`; the X family — - XGraph, XSpreadsheet — was omitted from its family table.) +- Widgets: **562** — families Gtk 102, Ind 250, Inst 66, Stock 37, + T 90, X 17. (The survey's Stock 38 / Inst 67 counted the shared + non-widget headers `StockData.h` / `InstData.h`; the X family was + 2 at survey time — XGraph, XSpreadsheet — and is 17 now with the + 15 monitor widgets.) - Sections: 11 — Windows & Dialogs 28, Containers & Layout 34, Buttons 24, Display 33, Text & Entry 28, Choosers 10, Views & - Lists 17, Menus & Toolbars 16, Misc / X 4, Stock Market 287, + Lists 17, Menus & Toolbars 16, Misc / X 19, Stock Market 287, Instrumentation 66. -- Palette: **583** = 36 LightGUI + 547 XFrame. +- Palette: **600** = 38 LightGUI + 562 XFrame. - PropKinds: 6. EventKinds: **10**, not 11 as the survey stated (Simple, SwitchPage, RowActivated, RowSelected, BufferChanged, DeleteEvent, Draw, ItemClicked, ItemActivate, CellChanged). diff --git a/tools/common.py b/tools/common.py index 32b12e7..c131e93 100644 --- a/tools/common.py +++ b/tools/common.py @@ -253,7 +253,7 @@ def data_without_provenance(doc): # ---------------------------------------------------------------- model.h def parse_ktypes(): - """The 36 LightGUI designer types from src/model.h (kTypes). + """The 38 LightGUI designer types from src/model.h (kTypes). Each entry: key, palette button id (GtkBuilder id in ui/designer.ui), default width/height, phase1 flag. diff --git a/tools/extract_events.py b/tools/extract_events.py index 30a3297..ce1f490 100644 --- a/tools/extract_events.py +++ b/tools/extract_events.py @@ -5,11 +5,13 @@ Sources (read-only, /opt/lightgui): - src/events.h — EventKind enum (+ wiring notes in the header comment), one EventDef table per widget type, events_for() dispatch, no_events_note() for the types with no widget-specific signal - - src/model.h — kTypes: the 36 types the tables must cover + - src/model.h — kTypes: the 38 types the tables must cover EventDef fields: signal (GTK signal name), handler (member handler name), label (Events-pane label), kind, builtin (already wired by the -generator for other reasons — document only, do not reconnect). +generator for other reasons — document only, do not reconnect), +lazarus (Lazarus Object Inspector name, e.g. "OnClick"; null when the +C++ default nullptr applies). NOTE on the count: the survey/PORTING_PLAN.md says EventKind has 11 variants. The header itself defines 10 (Simple, SwitchPage, @@ -70,10 +72,17 @@ def parse_event_entry(group, kinds): else: fail("unexpected 5th field in EventDef for %r: %s" % (signal, fields[4])) + lazarus = None if len(fields) > 5: + f6 = fields[5].strip() + if f6 == "nullptr": + lazarus = None + else: + lazarus = cpp_string(f6) + if len(fields) > 6: fail("unexpected trailing fields in EventDef for %r" % signal) return {"signal": signal, "handler": handler, "label": label, - "kind": kind, "builtin": builtin} + "kind": kind, "builtin": builtin, "lazarus": lazarus} def parse_table(text, var_name, kinds): @@ -115,19 +124,30 @@ def build(): if k not in kind_notes: fail("EventKind %r has no wiring note in the header comment" % k) + # Scope to events_for(): the header also defines raw_events_for() + # with its own `raw` table (the same five raw events for every type), + # which is deliberately not part of the per-type tables, and the + # dispatch now tests the normalised key `t`, not `type`. + fn_body = table_body( + text, + r"inline const std::vector& events_for\(const std::string& type\) \{") + if fn_body is None: + fail("events_for not found in %s" % EVENTS_H) + tables = {} for m in re.finditer( - r"static const std::vector (\w+) = \{", text): + r"static const std::vector (\w+) = \{", fn_body): var = m.group(1) if var in tables: fail("duplicate EventDef table %r" % var) tables[var] = parse_table(text, var, kinds) dispatch = {} - for m in re.finditer(r'if \(type == "([^"]+)"\) return (\w+);', text): - if m.group(1) in dispatch: - fail("type %r dispatched twice in events_for" % m.group(1)) - dispatch[m.group(1)] = m.group(2) + for m in re.finditer(r'if \((\w+) == "([^"]+)"\) return (\w+);', + fn_body): + if m.group(2) in dispatch: + fail("type %r dispatched twice in events_for" % m.group(2)) + dispatch[m.group(2)] = m.group(3) for t, var in dispatch.items(): if var not in tables: fail("events_for dispatches %r to missing table %r" % (t, var)) diff --git a/tools/extract_palette.py b/tools/extract_palette.py index eeb69d3..d981f8d 100644 --- a/tools/extract_palette.py +++ b/tools/extract_palette.py @@ -1,18 +1,18 @@ #!/usr/bin/env python3 -"""Extract the combined 583-entry palette into data/palette.json. +"""Extract the combined 600-entry palette into data/palette.json. Sources (read-only, /opt/lightgui): - - src/xframe_palette.h — the 547 XFrame widgets in section order, + - src/xframe_palette.h — the 562 XFrame widgets in section order, each with its registry index (the index the palette -> layout selection file carries) - - src/model.h (kTypes) — the 36 LightGUI designer types (the palette + - src/model.h (kTypes) — the 38 LightGUI designer types (the palette buttons in ui/designer.ui, ids pal_button ... pal_plot) - data/registry.json — the registry this palette must agree with (run tools/extract_registry.py first) -The combined palette is what LIGHTGUI_PALETTE_SELFTEST drives: 36 -LightGUI buttons each add one widget, 547 XFrame buttons each write -name+index to the selection file. Total 583. +The combined palette is what LIGHTGUI_PALETTE_SELFTEST drives: 38 +LightGUI buttons each add one widget, 562 XFrame buttons each write +name+index to the selection file. Total 600. Usage: python3 tools/extract_palette.py """ @@ -76,8 +76,8 @@ def build(): fail("xframe palette is not in section order") lightgui = parse_ktypes() - if len(lightgui) != 36: - fail("expected 36 LightGUI types in kTypes, got %d" % len(lightgui)) + if len(lightgui) != 38: + fail("expected 38 LightGUI types in kTypes, got %d" % len(lightgui)) sec_counts = Counter(e["section"] for e in xframe) sections = [{"name": s["name"], "count": sec_counts.get(s["name"], 0)} diff --git a/tools/extract_props.py b/tools/extract_props.py index dbaee4d..92fed6a 100644 --- a/tools/extract_props.py +++ b/tools/extract_props.py @@ -4,7 +4,7 @@ Sources (read-only, /opt/lightgui): - src/props.h — PropKind enum, enum value tables, one PropDef table per widget type, common_props(), props_for() dispatch - - src/model.h — kTypes: the 36 types the tables must cover + - src/model.h — kTypes: the 38 types the tables must cover PropDef fields: name, kind, default (canonical string), lo/hi (spin range, meaningful only for Int/Double), enum_labels / enum_values