Regen data tables from lightgui e474894: kTypes 36->38, EventDef lazarus

- tools/extract_palette.py: kTypes expectation 36->38 (ToggleButton and
  CheckListBox added in C); palette total 598->600
- tools/extract_events.py: parse 6th EventDef field `lazarus` (Flag 10
  Lazarus Object Inspector name); scope table/dispatch parsing to
  events_for() (raw_events_for() has its own `raw` table, deliberately
  excluded); dispatch now tests the normalised key `t`, not `type`
- data/*.json regenerated via `make regen`: registry default sizes per
  the C rule (incl. the 15 monitor widgets' hand-written sizes),
  palette Misc/X order per C xframe_palette.h, props 37 types / 270
  props / 25 enum tables / 35 common props, events 29 types with
  lazarus names; indicators provenance head only
- crates/xframe-common: palette asserts 598->600, LightGUI 36->38
- crates/xframe-widgets: *_gen.rs regenerated; gen_data.py opt_f now
  emits float literals for Option<f64> lo/hi (pre-existing latent bug:
  running it on the old data also emitted Some(0)); stale eb0b5fc /
  547 / 9 / 35 / 27 counts updated to e474894 / 562 / 25 / 37 / 29

make check: all 5 tables OK. cargo build warning-free. cargo test
--workspace --no-fail-fast: all suites green except 5 pre-existing
environmental failures, verified identical on HEAD: lightgui-debug
console (37) + gtk (7) need /usr/bin/gdb (not installed on dallas),
lightgui-support font/theme need a display (gtk::init fails), and
lightgui-gen fixtures is stale vs the Task 4 event routing in gen.rs.
This commit is contained in:
Muse committed 2026-12-05 19:20:00 +00:00
1 parent ad23184f1c
commit 9e6f882575
19 files changed
+2236 -258

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ inside this designer.
code window shows it. code window shows it.
- `data/palette.json` (562 XFrame entries) and `data/registry.json` - `data/palette.json` (562 XFrame entries) and `data/registry.json`
(562 widgets) are embedded at compile time (`src/palette.rs`). The (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. designer reads the XFrame part only.
## Build & run ## Build & run
+2 -2
View File
@@ -2,7 +2,7 @@
//! extracts (generated from lightgui eb0b5fc; do not edit by hand). //! extracts (generated from lightgui eb0b5fc; do not edit by hand).
//! //!
//! * `data/palette.json`: the frozen extract still carries the old //! * `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 //! sections; the designer reads the XFrame part only — the GTK
//! palette is gone (see `palette_counts`). //! palette is gone (see `palette_counts`).
//! * `data/registry.json`: the 562 XFrame widgets with family, section, //! * `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 /// (lightgui_count, xframe_count, total) as the designer sees the
/// palette: XFrame-only, so the LightGUI count is always 0 and 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 /// 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) { pub fn palette_counts() -> (usize, usize, usize) {
let xf = xframe_entries().len(); let xf = xframe_entries().len();
(0, xf, xf) (0, xf, xf)
+3 -3
View File
@@ -1,5 +1,5 @@
//! Codegen: compile data/registry.json (562 widgets) and data/palette.json //! 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 //! widgets/common/registry.h and src/xframe_palette.h. The registry stays
//! generated, never hand-maintained. //! generated, never hand-maintained.
use serde::Deserialize; use serde::Deserialize;
@@ -87,9 +87,9 @@ fn main() {
assert_eq!(reg.widget_count, 562, "registry widget_count"); assert_eq!(reg.widget_count, 562, "registry widget_count");
assert_eq!(reg.widgets.len(), 562, "registry widgets len"); assert_eq!(reg.widgets.len(), 562, "registry widgets len");
assert_eq!(reg.section_count, 11, "registry section_count"); 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.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(); 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("// @generated by crates/xframe-common/build.rs from data/registry.json + data/palette.json\n");
out.push_str(&format!( out.push_str(&format!(
+1 -1
View File
@@ -1,6 +1,6 @@
//! Shared support for the XFrame half of the LightGUI Rust port. //! 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 //! code-generated at build time from `data/registry.json` and
//! `data/palette.json` (mirrors C++ `widgets/common/registry.h`). //! `data/palette.json` (mirrors C++ `widgets/common/registry.h`).
//! * `ico` — minimal BMP-format ICO decoder (mirrors `widgets/common/ico.h`). //! * `ico` — minimal BMP-format ICO decoder (mirrors `widgets/common/ico.h`).
+2 -2
View File
@@ -57,8 +57,8 @@ mod tests {
fn counts_match_plan() { fn counts_match_plan() {
assert_eq!(WIDGET_COUNT, 562); assert_eq!(WIDGET_COUNT, 562);
assert_eq!(SECTION_COUNT, 11); assert_eq!(SECTION_COUNT, 11);
assert_eq!(PALETTE_TOTAL, 598); assert_eq!(PALETTE_TOTAL, 600);
assert_eq!(LIGHTGUI_PALETTE_COUNT, 36); assert_eq!(LIGHTGUI_PALETTE_COUNT, 38);
assert_eq!(XFRAME_PALETTE_COUNT, 562); assert_eq!(XFRAME_PALETTE_COUNT, 562);
assert_eq!(SECTION_COUNTS.iter().sum::<usize>(), 562); assert_eq!(SECTION_COUNTS.iter().sum::<usize>(), 562);
assert_eq!( assert_eq!(
+15 -9
View File
@@ -2,8 +2,8 @@
"""Generate the xframe-widgets data tables from data/*.json. """Generate the xframe-widgets data tables from data/*.json.
Reads registry.json / props.json / events.json (the data agent's Reads registry.json / props.json / events.json (the data agent's
extracts of lightgui eb0b5fc) and emits: extracts of lightgui e474894) and emits:
src/registry_gen.rs — the 547-entry registry + factory src/registry_gen.rs — the 562-entry registry + factory
src/props_gen.rs — enum tables + common props + per-type prop tables src/props_gen.rs — enum tables + common props + per-type prop tables
src/events_gen.rs — per-type signal 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: 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 registry — DO NOT EDIT BY HAND.\n")
f.write("//! Generated by `generator/gen_data.py` from `data/registry.json`\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("//! script. Regenerate: `python3 generator/gen_data.py`.\n\n")
f.write("use crate::archetypes::*;\n") f.write("use crate::archetypes::*;\n")
f.write("use crate::graph::XGraph;\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 # ---------------------------------------------------------------- props
def opt_f(v): def opt_f(v):
return "None" if v is None else f"Some({v})" """Option<f64> 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: 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 property tables — DO NOT EDIT BY HAND.\n")
f.write("//! Generated by `generator/gen_data.py` from `data/props.json`\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("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") f.write("pub static ENUM_TABLES: &[(&str, &[i32], &[&str])] = &[\n")
for name, tab in props["enum_tables"].items(): for name, tab in props["enum_tables"].items():
labels = [x.strip() for x in tab["comment"].split(",")] 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"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("pub fn props_for(type_name: &str) -> &'static [PropDef] {\n")
f.write(" match type_name {\n") f.write(" match type_name {\n")
for tname, plist in props["types"].items(): 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: 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 signal tables — DO NOT EDIT BY HAND.\n")
f.write("//! Generated by `generator/gen_data.py` from `data/events.json`\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("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("pub fn signals_for(type_name: &str) -> &'static [SignalDef] {\n")
f.write(" match type_name {\n") f.write(" match type_name {\n")
for tname, slist in events["types"].items(): for tname, slist in events["types"].items():
+8 -2
View File
@@ -1,10 +1,10 @@
//! Generated signal tables — DO NOT EDIT BY HAND. //! Generated signal tables — DO NOT EDIT BY HAND.
//! Generated by `generator/gen_data.py` from `data/events.json` //! 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}; 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] { pub fn signals_for(type_name: &str) -> &'static [SignalDef] {
match type_name { match type_name {
"Button" => &[ "Button" => &[
@@ -17,6 +17,9 @@ pub fn signals_for(type_name: &str) -> &'static [SignalDef] {
"Checkbutton" => &[ "Checkbutton" => &[
SignalDef { signal: "toggled", handler: "on_toggled", label: "Toggled", kind: EventKind::Simple, builtin: false }, 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" => &[ "Radiobutton" => &[
SignalDef { signal: "toggled", handler: "on_toggled", label: "Toggled", kind: EventKind::Simple, builtin: false }, 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" => &[ "Listbox" => &[
SignalDef { signal: "row-selected", handler: "on_row_selected", label: "Row selected", kind: EventKind::RowSelected, builtin: false }, 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" => &[ "Menubutton" => &[
SignalDef { signal: "clicked", handler: "on_clicked", label: "Clicked", kind: EventKind::Simple, builtin: false }, SignalDef { signal: "clicked", handler: "on_clicked", label: "Clicked", kind: EventKind::Simple, builtin: false },
], ],
+232 -9
View File
@@ -1,10 +1,10 @@
//! Generated property tables — DO NOT EDIT BY HAND. //! Generated property tables — DO NOT EDIT BY HAND.
//! Generated by `generator/gen_data.py` from `data/props.json` //! 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}; 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])] = &[ pub static ENUM_TABLES: &[(&str, &[i32], &[&str])] = &[
("kReliefValues", &[0, 1, 2], &["NORMAL", "HALF", "NONE"]), ("kReliefValues", &[0, 1, 2], &["NORMAL", "HALF", "NONE"]),
("kShadowValues", &[0, 1, 2, 3, 4], &["NONE", "IN", "OUT", "ETCHED_IN", "ETCHED_OUT"]), ("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"]), ("kScaleModeValues", &[0, 1], &["PRICE", "PERCENT"]),
("kOrientationValues", &[0, 1], &["HORIZONTAL", "VERTICAL"]), ("kOrientationValues", &[0, 1], &["HORIZONTAL", "VERTICAL"]),
("kToolbarStyleValues", &[0, 1, 2, 3], &["ICONS", "TEXT", "BOTH", "BOTH_HORIZ"]), ("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). /// Properties every widget has (background / foreground / tooltip).
pub static COMMON_PROPS: &[PropDef] = &[ pub static COMMON_PROPS: &[PropDef] = &[
PropDef::new("background", PropKind::Color, ""), PropDef::new("background", PropKind::Color, ""),
PropDef::new("foreground", 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("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] { pub fn props_for(type_name: &str) -> &'static [PropDef] {
match type_name { match type_name {
"Button" => &[ "Button" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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: "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" => &[ "Label" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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: "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: "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" => &[ "Entry" => &[
PropDef { name: "text", 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 },
@@ -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: "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: "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: "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" => &[ "Checkbutton" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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: "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" => &[ "Radiobutton" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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" => &[ "Frame" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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]) }, 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" => &[ "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: "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" => &[ "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: "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" => &[ "Menubutton" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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" => &[ "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: "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: "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: "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: "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" => &[ "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: "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: "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" => &[ "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: "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: "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: "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" => &[ "Toplevel" => &[
PropDef { name: "title", kind: PropKind::Str, default: "", 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 },
PropDef { name: "resizable", kind: PropKind::Bool, default: "true", 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" => &[ "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: "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: "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" => &[ "StockChart" => &[
PropDef { name: "data-file", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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(220,0,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: "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: "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: "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: "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: "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" => &[ "Memo" => &[
PropDef { name: "text", 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: "editable", kind: PropKind::Bool, default: "true", 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: "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" => &[ "GroupBox" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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]) }, 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" => &[ "Panel" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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]) }, 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" => &[ "Image" => &[
PropDef { name: "file", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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" => &[ "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: "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(53,132,228)", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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" => &[ "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: "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: "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" => &[ "ScrollBox" => &[
PropDef { name: "label", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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" => &[ "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: "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: "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" => &[ "StatusBar" => &[
PropDef { name: "text", 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: "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" => &[ "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: "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: "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" => &[ "MenuBar" => &[
PropDef { name: "menus", kind: PropKind::Str, default: "File|Edit|Help", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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: "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: "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: "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" => &[ "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 }, 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: "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: "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: "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" => &[ "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: "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: "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: "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" => &[ "DateTimePicker" => &[
PropDef { name: "date", kind: PropKind::Str, default: "", lo: None, hi: None, enum_table: None, enum_labels: None, enum_values: None }, 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-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-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" => &[ "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: "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: "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 }, 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: "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: "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: "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" => &[ "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: "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: "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" => &[ "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: "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: "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: "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" => &[ "Plot" => &[
PropDef { name: "title", kind: PropKind::Str, default: "", 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 },
+14 -14
View File
@@ -1,6 +1,6 @@
//! Generated registry — DO NOT EDIT BY HAND. //! Generated registry — DO NOT EDIT BY HAND.
//! Generated by `generator/gen_data.py` from `data/registry.json` //! 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`. //! script. Regenerate: `python3 generator/gen_data.py`.
use crate::archetypes::*; 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: 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: 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: 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: 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: 360, default_h: 220, archetype: Archetype::Monitor, kind: "CoreGrid", 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: 220, default_h: 220, archetype: Archetype::Monitor, kind: "DonutGauge", 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: 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: 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: 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: 200, default_h: 64, archetype: Archetype::Monitor, kind: "MonitorButton", 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: 420, default_h: 200, archetype: Archetype::Monitor, kind: "MonitorGrid", 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: 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: 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: 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: 320, default_h: 200, archetype: Archetype::Monitor, kind: "SysBox", 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: 280, default_h: 220, archetype: Archetype::Monitor, kind: "Tachometer", 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: 320, default_h: 200, archetype: Archetype::Monitor, kind: "TempHistory", 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: 320, default_h: 60, archetype: Archetype::Monitor, kind: "UsageBar", 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: 120, default_h: 220, archetype: Archetype::Monitor, kind: "VerticalBar", 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++). /// Look a widget up by exact name (case-sensitive, as in C++).
+88 -36
View File
@@ -1,7 +1,7 @@
{ {
"_provenance": { "_provenance": {
"source_repo": "https://github.com/cnmcdee/lightgui", "source_repo": "https://github.com/cnmcdee/lightgui",
"source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2",
"source_files": [ "source_files": [
"src/events.h", "src/events.h",
"src/model.h" "src/model.h"
@@ -24,7 +24,7 @@
], ],
"event_kind_count": 10, "event_kind_count": 10,
"kind_notes": { "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\"", "SwitchPage": "void on_x(guint page); notebook \"switch-page\"",
"RowActivated": "void on_x(GtkTreePath* path); tree \"row-activated\"", "RowActivated": "void on_x(GtkTreePath* path); tree \"row-activated\"",
"RowSelected": "void on_x(); trampoline (GtkListBox*, GtkListBoxRow*, gpointer)", "RowSelected": "void on_x(); trampoline (GtkListBox*, GtkListBoxRow*, gpointer)",
@@ -42,7 +42,8 @@
"handler": "on_clicked", "handler": "on_clicked",
"label": "Clicked", "label": "Clicked",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnClick"
} }
], ],
"Entry": [ "Entry": [
@@ -51,14 +52,16 @@
"handler": "on_changed", "handler": "on_changed",
"label": "Text changed", "label": "Text changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
}, },
{ {
"signal": "activate", "signal": "activate",
"handler": "on_activate", "handler": "on_activate",
"label": "Enter pressed (activate)", "label": "Enter pressed (activate)",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnKeyPress"
} }
], ],
"Checkbutton": [ "Checkbutton": [
@@ -67,7 +70,18 @@
"handler": "on_toggled", "handler": "on_toggled",
"label": "Toggled", "label": "Toggled",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnClick"
}
],
"ToggleButton": [
{
"signal": "toggled",
"handler": "on_toggled",
"label": "Toggled",
"kind": "Simple",
"builtin": false,
"lazarus": "OnClick"
} }
], ],
"Radiobutton": [ "Radiobutton": [
@@ -76,7 +90,8 @@
"handler": "on_toggled", "handler": "on_toggled",
"label": "Toggled", "label": "Toggled",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnClick"
} }
], ],
"Combobox": [ "Combobox": [
@@ -85,7 +100,8 @@
"handler": "on_changed", "handler": "on_changed",
"label": "Selection changed", "label": "Selection changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"Listbox": [ "Listbox": [
@@ -94,7 +110,18 @@
"handler": "on_row_selected", "handler": "on_row_selected",
"label": "Row selected", "label": "Row selected",
"kind": "RowSelected", "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": [ "Menubutton": [
@@ -103,7 +130,8 @@
"handler": "on_clicked", "handler": "on_clicked",
"label": "Clicked", "label": "Clicked",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnClick"
} }
], ],
"Canvas": [ "Canvas": [
@@ -112,7 +140,8 @@
"handler": "on_draw", "handler": "on_draw",
"label": "Draw (redraw)", "label": "Draw (redraw)",
"kind": "Draw", "kind": "Draw",
"builtin": false "builtin": false,
"lazarus": "OnPaint"
} }
], ],
"Scale": [ "Scale": [
@@ -121,7 +150,8 @@
"handler": "on_value_changed", "handler": "on_value_changed",
"label": "Value changed", "label": "Value changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"Scrollbar": [ "Scrollbar": [
@@ -130,7 +160,8 @@
"handler": "on_value_changed", "handler": "on_value_changed",
"label": "Value changed", "label": "Value changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"Text": [ "Text": [
@@ -139,7 +170,8 @@
"handler": "on_changed", "handler": "on_changed",
"label": "Text changed", "label": "Text changed",
"kind": "BufferChanged", "kind": "BufferChanged",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"Toplevel": [ "Toplevel": [
@@ -148,7 +180,8 @@
"handler": "on_delete_event", "handler": "on_delete_event",
"label": "Window close (delete-event)", "label": "Window close (delete-event)",
"kind": "DeleteEvent", "kind": "DeleteEvent",
"builtin": false "builtin": false,
"lazarus": "OnClose"
} }
], ],
"Spreadsheet": [ "Spreadsheet": [
@@ -157,7 +190,8 @@
"handler": "on_cell_changed", "handler": "on_cell_changed",
"label": "Cell text changed", "label": "Cell text changed",
"kind": "CellChanged", "kind": "CellChanged",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"StockChart": [ "StockChart": [
@@ -166,7 +200,8 @@
"handler": "on_draw", "handler": "on_draw",
"label": "Draw (redraw)", "label": "Draw (redraw)",
"kind": "Draw", "kind": "Draw",
"builtin": true "builtin": true,
"lazarus": "OnPaint"
} }
], ],
"Memo": [ "Memo": [
@@ -175,7 +210,8 @@
"handler": "on_changed", "handler": "on_changed",
"label": "Text changed", "label": "Text changed",
"kind": "BufferChanged", "kind": "BufferChanged",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"Shape": [ "Shape": [
@@ -184,7 +220,8 @@
"handler": "on_draw", "handler": "on_draw",
"label": "Draw (redraw)", "label": "Draw (redraw)",
"kind": "Draw", "kind": "Draw",
"builtin": true "builtin": true,
"lazarus": "OnPaint"
} }
], ],
"Notebook": [ "Notebook": [
@@ -193,7 +230,8 @@
"handler": "on_switch_page", "handler": "on_switch_page",
"label": "Page switched", "label": "Page switched",
"kind": "SwitchPage", "kind": "SwitchPage",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"ToolBar": [ "ToolBar": [
@@ -202,7 +240,8 @@
"handler": "on_clicked", "handler": "on_clicked",
"label": "Tool button clicked", "label": "Tool button clicked",
"kind": "ItemClicked", "kind": "ItemClicked",
"builtin": false "builtin": false,
"lazarus": "OnClick"
} }
], ],
"MenuBar": [ "MenuBar": [
@@ -211,7 +250,8 @@
"handler": "on_activate", "handler": "on_activate",
"label": "Menu item activated", "label": "Menu item activated",
"kind": "ItemActivate", "kind": "ItemActivate",
"builtin": false "builtin": false,
"lazarus": "OnClick"
} }
], ],
"SpinEdit": [ "SpinEdit": [
@@ -220,7 +260,8 @@
"handler": "on_value_changed", "handler": "on_value_changed",
"label": "Value changed", "label": "Value changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"TrackBar": [ "TrackBar": [
@@ -229,7 +270,8 @@
"handler": "on_value_changed", "handler": "on_value_changed",
"label": "Value changed", "label": "Value changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"DateTimePicker": [ "DateTimePicker": [
@@ -238,14 +280,16 @@
"handler": "on_day_selected", "handler": "on_day_selected",
"label": "Day selected", "label": "Day selected",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
}, },
{ {
"signal": "month-changed", "signal": "month-changed",
"handler": "on_month_changed", "handler": "on_month_changed",
"label": "Month changed", "label": "Month changed",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"ColorBox": [ "ColorBox": [
@@ -254,7 +298,8 @@
"handler": "on_color_set", "handler": "on_color_set",
"label": "Colour chosen", "label": "Colour chosen",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnChange"
} }
], ],
"ListView": [ "ListView": [
@@ -263,14 +308,16 @@
"handler": "on_row_activated", "handler": "on_row_activated",
"label": "Row activated (double-click)", "label": "Row activated (double-click)",
"kind": "RowActivated", "kind": "RowActivated",
"builtin": false "builtin": false,
"lazarus": "OnDblClick"
}, },
{ {
"signal": "cursor-changed", "signal": "cursor-changed",
"handler": "on_cursor_changed", "handler": "on_cursor_changed",
"label": "Cursor moved", "label": "Cursor moved",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnSelectionChange"
} }
], ],
"TreeView": [ "TreeView": [
@@ -279,14 +326,16 @@
"handler": "on_row_activated", "handler": "on_row_activated",
"label": "Row activated (double-click)", "label": "Row activated (double-click)",
"kind": "RowActivated", "kind": "RowActivated",
"builtin": false "builtin": false,
"lazarus": "OnDblClick"
}, },
{ {
"signal": "cursor-changed", "signal": "cursor-changed",
"handler": "on_cursor_changed", "handler": "on_cursor_changed",
"label": "Cursor moved", "label": "Cursor moved",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnSelectionChange"
} }
], ],
"StringGrid": [ "StringGrid": [
@@ -295,14 +344,16 @@
"handler": "on_row_activated", "handler": "on_row_activated",
"label": "Row activated (double-click)", "label": "Row activated (double-click)",
"kind": "RowActivated", "kind": "RowActivated",
"builtin": false "builtin": false,
"lazarus": "OnDblClick"
}, },
{ {
"signal": "cursor-changed", "signal": "cursor-changed",
"handler": "on_cursor_changed", "handler": "on_cursor_changed",
"label": "Cursor moved", "label": "Cursor moved",
"kind": "Simple", "kind": "Simple",
"builtin": false "builtin": false,
"lazarus": "OnSelectionChange"
} }
], ],
"Plot": [ "Plot": [
@@ -311,11 +362,12 @@
"handler": "on_draw", "handler": "on_draw",
"label": "Draw (redraw)", "label": "Draw (redraw)",
"kind": "Draw", "kind": "Draw",
"builtin": true "builtin": true,
"lazarus": "OnPaint"
} }
] ]
}, },
"types_with_events": 27, "types_with_events": 29,
"types_without_events": { "types_without_events": {
"Label": "Display-only: no widget-specific signal (mouse handlers still apply).", "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.", "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.", "StatusBar": "Display-only: no widget-specific signal.",
"ProgressBar": "Display-only: no widget-specific signal \u2014 set its fraction from another widget's handler." "ProgressBar": "Display-only: no widget-specific signal \u2014 set its fraction from another widget's handler."
}, },
"type_count": 36 "type_count": 38
} }
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"_provenance": { "_provenance": {
"source_repo": "https://github.com/cnmcdee/lightgui", "source_repo": "https://github.com/cnmcdee/lightgui",
"source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2",
"source_files": [ "source_files": [
"src/indicators.h" "src/indicators.h"
], ],
+67 -53
View File
@@ -1,7 +1,7 @@
{ {
"_provenance": { "_provenance": {
"source_repo": "https://github.com/cnmcdee/lightgui", "source_repo": "https://github.com/cnmcdee/lightgui",
"source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2",
"source_files": [ "source_files": [
"data/registry.json", "data/registry.json",
"src/model.h", "src/model.h",
@@ -9,10 +9,10 @@
], ],
"generated_by": "python3 tools/extract_palette.py", "generated_by": "python3 tools/extract_palette.py",
"regenerate": "make regen (or: 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, "total": 600,
"lightgui_count": 36, "lightgui_count": 38,
"xframe_count": 562, "xframe_count": 562,
"sections": [ "sections": [
{ {
@@ -89,6 +89,13 @@
"default_h": 26, "default_h": 26,
"phase1": true "phase1": true
}, },
{
"key": "ToggleButton",
"palette_id": "pal_togglebutton",
"default_w": 110,
"default_h": 30,
"phase1": true
},
{ {
"key": "Radiobutton", "key": "Radiobutton",
"palette_id": "pal_radiobutton", "palette_id": "pal_radiobutton",
@@ -117,6 +124,13 @@
"default_h": 110, "default_h": 110,
"phase1": true "phase1": true
}, },
{
"key": "CheckListBox",
"palette_id": "pal_checklistbox",
"default_w": 180,
"default_h": 110,
"phase1": true
},
{ {
"key": "Menubutton", "key": "Menubutton",
"palette_id": "pal_menubutton", "palette_id": "pal_menubutton",
@@ -1276,29 +1290,69 @@
"registry_index": 456 "registry_index": 456
}, },
{ {
"name": "XArcGauge", "name": "XGraph",
"section": "Misc / X", "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", "name": "XCoreGrid",
"section": "Misc / X", "section": "Misc / X",
"registry_index": 546 "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", "name": "XDonutGauge",
"section": "Misc / X", "section": "Misc / X",
"registry_index": 547 "registry_index": 547
}, },
{ {
"name": "XGraph", "name": "XProcessList",
"section": "Misc / X", "section": "Misc / X",
"registry_index": 548 "registry_index": 554
},
{
"name": "XHistoryGraph",
"section": "Misc / X",
"registry_index": 549
}, },
{ {
"name": "XLoadBadge", "name": "XLoadBadge",
@@ -1315,51 +1369,11 @@
"section": "Misc / X", "section": "Misc / X",
"registry_index": 552 "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", "name": "XSysBox",
"section": "Misc / X", "section": "Misc / X",
"registry_index": 557 "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", "name": "IndADX",
"section": "Stock Market", "section": "Stock Market",
+1668 -12
View File
File diff suppressed because it is too large. Load diff
+82 -82
View File
@@ -1,7 +1,7 @@
{ {
"_provenance": { "_provenance": {
"source_repo": "https://github.com/cnmcdee/lightgui", "source_repo": "https://github.com/cnmcdee/lightgui",
"source_head": "eb0b5fc91a3eaafd9a8d1cc0ddd1a94165822a9b", "source_head": "e474894bae32d9e73cd78b4971fcd516f53a0db2",
"source_files": [ "source_files": [
"widgets/common/registry.h", "widgets/common/registry.h",
"widgets/tools/gen_registry.py", "widgets/tools/gen_registry.py",
@@ -10,7 +10,7 @@
], ],
"generated_by": "python3 tools/extract_registry.py", "generated_by": "python3 tools/extract_registry.py",
"regenerate": "make regen (or: 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, "widget_count": 562,
"section_count": 11, "section_count": 11,
@@ -141,8 +141,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 520,
"default_h": 220, "default_h": 260,
"header": "widgets/components/GtkAboutDialog/GtkAboutDialog.h" "header": "widgets/components/GtkAboutDialog/GtkAboutDialog.h"
}, },
{ {
@@ -191,8 +191,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Choosers", "section": "Choosers",
"section_index": 5, "section_index": 5,
"default_w": 200, "default_w": 320,
"default_h": 90, "default_h": 240,
"header": "widgets/components/GtkAppChooserWidget/GtkAppChooserWidget.h" "header": "widgets/components/GtkAppChooserWidget/GtkAppChooserWidget.h"
}, },
{ {
@@ -221,8 +221,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 320,
"default_h": 220, "default_h": 280,
"header": "widgets/components/GtkAssistant/GtkAssistant.h" "header": "widgets/components/GtkAssistant/GtkAssistant.h"
}, },
{ {
@@ -261,8 +261,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Display", "section": "Display",
"section_index": 3, "section_index": 3,
"default_w": 200, "default_w": 260,
"default_h": 90, "default_h": 200,
"header": "widgets/components/GtkCalendar/GtkCalendar.h" "header": "widgets/components/GtkCalendar/GtkCalendar.h"
}, },
{ {
@@ -321,8 +321,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 340,
"default_h": 220, "default_h": 240,
"header": "widgets/components/GtkColorChooserDialog/GtkColorChooserDialog.h" "header": "widgets/components/GtkColorChooserDialog/GtkColorChooserDialog.h"
}, },
{ {
@@ -331,8 +331,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Choosers", "section": "Choosers",
"section_index": 5, "section_index": 5,
"default_w": 200, "default_w": 340,
"default_h": 90, "default_h": 260,
"header": "widgets/components/GtkColorChooserWidget/GtkColorChooserWidget.h" "header": "widgets/components/GtkColorChooserWidget/GtkColorChooserWidget.h"
}, },
{ {
@@ -471,8 +471,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 360,
"default_h": 220, "default_h": 240,
"header": "widgets/components/GtkFileChooserDialog/GtkFileChooserDialog.h" "header": "widgets/components/GtkFileChooserDialog/GtkFileChooserDialog.h"
}, },
{ {
@@ -481,8 +481,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Choosers", "section": "Choosers",
"section_index": 5, "section_index": 5,
"default_w": 200, "default_w": 340,
"default_h": 90, "default_h": 260,
"header": "widgets/components/GtkFileChooserWidget/GtkFileChooserWidget.h" "header": "widgets/components/GtkFileChooserWidget/GtkFileChooserWidget.h"
}, },
{ {
@@ -521,8 +521,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 340,
"default_h": 220, "default_h": 240,
"header": "widgets/components/GtkFontChooserDialog/GtkFontChooserDialog.h" "header": "widgets/components/GtkFontChooserDialog/GtkFontChooserDialog.h"
}, },
{ {
@@ -531,8 +531,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Choosers", "section": "Choosers",
"section_index": 5, "section_index": 5,
"default_w": 200, "default_w": 340,
"default_h": 90, "default_h": 260,
"header": "widgets/components/GtkFontChooserWidget/GtkFontChooserWidget.h" "header": "widgets/components/GtkFontChooserWidget/GtkFontChooserWidget.h"
}, },
{ {
@@ -851,8 +851,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 360,
"default_h": 220, "default_h": 300,
"header": "widgets/components/GtkPrintUnixDialog/GtkPrintUnixDialog.h" "header": "widgets/components/GtkPrintUnixDialog/GtkPrintUnixDialog.h"
}, },
{ {
@@ -981,8 +981,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 320,
"default_h": 220, "default_h": 300,
"header": "widgets/components/GtkShortcutsWindow/GtkShortcutsWindow.h" "header": "widgets/components/GtkShortcutsWindow/GtkShortcutsWindow.h"
}, },
{ {
@@ -1111,8 +1111,8 @@
"family": "Gtk", "family": "Gtk",
"section": "Views & Lists", "section": "Views & Lists",
"section_index": 6, "section_index": 6,
"default_w": 260, "default_w": 320,
"default_h": 180, "default_h": 200,
"header": "widgets/components/GtkTreeView/GtkTreeView.h" "header": "widgets/components/GtkTreeView/GtkTreeView.h"
}, },
{ {
@@ -4781,8 +4781,8 @@
"family": "T", "family": "T",
"section": "Display", "section": "Display",
"section_index": 3, "section_index": 3,
"default_w": 200, "default_w": 260,
"default_h": 90, "default_h": 200,
"header": "widgets/components/TCalendar/TCalendar.h" "header": "widgets/components/TCalendar/TCalendar.h"
}, },
{ {
@@ -4791,8 +4791,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 320,
"default_h": 220, "default_h": 280,
"header": "widgets/components/TCalendarDialog/TCalendarDialog.h" "header": "widgets/components/TCalendarDialog/TCalendarDialog.h"
}, },
{ {
@@ -4861,8 +4861,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 520,
"default_h": 220, "default_h": 300,
"header": "widgets/components/TColorDialog/TColorDialog.h" "header": "widgets/components/TColorDialog/TColorDialog.h"
}, },
{ {
@@ -5011,8 +5011,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 380,
"default_h": 220, "default_h": 260,
"header": "widgets/components/TFindDialog/TFindDialog.h" "header": "widgets/components/TFindDialog/TFindDialog.h"
}, },
{ {
@@ -5041,8 +5041,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 320,
"default_h": 220, "default_h": 420,
"header": "widgets/components/TFontDialog/TFontDialog.h" "header": "widgets/components/TFontDialog/TFontDialog.h"
}, },
{ {
@@ -5141,8 +5141,8 @@
"family": "T", "family": "T",
"section": "Views & Lists", "section": "Views & Lists",
"section_index": 6, "section_index": 6,
"default_w": 260, "default_w": 320,
"default_h": 180, "default_h": 200,
"header": "widgets/components/TListView/TListView.h" "header": "widgets/components/TListView/TListView.h"
}, },
{ {
@@ -5201,8 +5201,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 480,
"default_h": 220, "default_h": 240,
"header": "widgets/components/TOpenPictureDialog/TOpenPictureDialog.h" "header": "widgets/components/TOpenPictureDialog/TOpenPictureDialog.h"
}, },
{ {
@@ -5221,8 +5221,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 320,
"default_h": 220, "default_h": 400,
"header": "widgets/components/TPageSetupDialog/TPageSetupDialog.h" "header": "widgets/components/TPageSetupDialog/TPageSetupDialog.h"
}, },
{ {
@@ -5281,8 +5281,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 320,
"default_h": 220, "default_h": 300,
"header": "widgets/components/TPrintDialog/TPrintDialog.h" "header": "widgets/components/TPrintDialog/TPrintDialog.h"
}, },
{ {
@@ -5331,8 +5331,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 360,
"default_h": 220, "default_h": 260,
"header": "widgets/components/TReplaceDialog/TReplaceDialog.h" "header": "widgets/components/TReplaceDialog/TReplaceDialog.h"
}, },
{ {
@@ -5351,8 +5351,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 480,
"default_h": 220, "default_h": 240,
"header": "widgets/components/TSavePictureDialog/TSavePictureDialog.h" "header": "widgets/components/TSavePictureDialog/TSavePictureDialog.h"
}, },
{ {
@@ -5381,8 +5381,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 360,
"default_h": 220, "default_h": 260,
"header": "widgets/components/TSelectDirectoryDialog/TSelectDirectoryDialog.h" "header": "widgets/components/TSelectDirectoryDialog/TSelectDirectoryDialog.h"
}, },
{ {
@@ -5471,8 +5471,8 @@
"family": "T", "family": "T",
"section": "Views & Lists", "section": "Views & Lists",
"section_index": 6, "section_index": 6,
"default_w": 260, "default_w": 360,
"default_h": 180, "default_h": 200,
"header": "widgets/components/TStringGrid/TStringGrid.h" "header": "widgets/components/TStringGrid/TStringGrid.h"
}, },
{ {
@@ -5491,8 +5491,8 @@
"family": "T", "family": "T",
"section": "Windows & Dialogs", "section": "Windows & Dialogs",
"section_index": 0, "section_index": 0,
"default_w": 300, "default_w": 340,
"default_h": 220, "default_h": 280,
"header": "widgets/components/TTaskDialog/TTaskDialog.h" "header": "widgets/components/TTaskDialog/TTaskDialog.h"
}, },
{ {
@@ -5591,8 +5591,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 260, "default_w": 200,
"default_h": 200, "default_h": 90,
"header": "widgets/components/XArcGauge/XArcGauge.h" "header": "widgets/components/XArcGauge/XArcGauge.h"
}, },
{ {
@@ -5601,8 +5601,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 360, "default_w": 260,
"default_h": 220, "default_h": 180,
"header": "widgets/components/XCoreGrid/XCoreGrid.h" "header": "widgets/components/XCoreGrid/XCoreGrid.h"
}, },
{ {
@@ -5611,8 +5611,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 220, "default_w": 200,
"default_h": 220, "default_h": 90,
"header": "widgets/components/XDonutGauge/XDonutGauge.h" "header": "widgets/components/XDonutGauge/XDonutGauge.h"
}, },
{ {
@@ -5641,8 +5641,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 260, "default_w": 200,
"default_h": 80, "default_h": 90,
"header": "widgets/components/XLoadBadge/XLoadBadge.h" "header": "widgets/components/XLoadBadge/XLoadBadge.h"
}, },
{ {
@@ -5651,8 +5651,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 200, "default_w": 150,
"default_h": 64, "default_h": 36,
"header": "widgets/components/XMonitorButton/XMonitorButton.h" "header": "widgets/components/XMonitorButton/XMonitorButton.h"
}, },
{ {
@@ -5661,8 +5661,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 420, "default_w": 260,
"default_h": 200, "default_h": 180,
"header": "widgets/components/XMonitorGrid/XMonitorGrid.h" "header": "widgets/components/XMonitorGrid/XMonitorGrid.h"
}, },
{ {
@@ -5681,8 +5681,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 480, "default_w": 200,
"default_h": 260, "default_h": 90,
"header": "widgets/components/XProcessList/XProcessList.h" "header": "widgets/components/XProcessList/XProcessList.h"
}, },
{ {
@@ -5701,8 +5701,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 360, "default_w": 260,
"default_h": 80, "default_h": 180,
"header": "widgets/components/XStackBar/XStackBar.h" "header": "widgets/components/XStackBar/XStackBar.h"
}, },
{ {
@@ -5711,8 +5711,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 320, "default_w": 200,
"default_h": 200, "default_h": 90,
"header": "widgets/components/XSysBox/XSysBox.h" "header": "widgets/components/XSysBox/XSysBox.h"
}, },
{ {
@@ -5721,8 +5721,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 280, "default_w": 200,
"default_h": 220, "default_h": 90,
"header": "widgets/components/XTachometer/XTachometer.h" "header": "widgets/components/XTachometer/XTachometer.h"
}, },
{ {
@@ -5731,8 +5731,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 320, "default_w": 200,
"default_h": 200, "default_h": 90,
"header": "widgets/components/XTempHistory/XTempHistory.h" "header": "widgets/components/XTempHistory/XTempHistory.h"
}, },
{ {
@@ -5741,8 +5741,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 320, "default_w": 200,
"default_h": 60, "default_h": 90,
"header": "widgets/components/XUsageBar/XUsageBar.h" "header": "widgets/components/XUsageBar/XUsageBar.h"
}, },
{ {
@@ -5751,8 +5751,8 @@
"family": "X", "family": "X",
"section": "Misc / X", "section": "Misc / X",
"section_index": 8, "section_index": 8,
"default_w": 120, "default_w": 200,
"default_h": 220, "default_h": 90,
"header": "widgets/components/XVerticalBar/XVerticalBar.h" "header": "widgets/components/XVerticalBar/XVerticalBar.h"
} }
] ]
+14 -13
View File
@@ -25,15 +25,15 @@ make check-registry | check-palette | check-props | check-events | check-indicat
| Script | Source(s) | Output | Contents | | 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_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` | 583 palette entries: 36 LightGUI + 547 XFrame | | `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, 9 enum tables, 35 per-type tables (99 props), common props | | `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, 27 per-type tables (32 events), 9 no-events notes | | `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) | | `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 `common.py` holds the shared C++ parsing helpers (braced-initializer
splitting, string literals, provenance stamping) and `parse_ktypes()` 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 five extractors in dependency order. `check.py` re-derives each table
fresh and deep-compares it against the committed JSON. 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 `sections.py`, and the `default_size()` rule, and fails if they
disagree. The palette extractor verifies every entry against the disagree. The palette extractor verifies every entry against the
registry (name set, index, section). Props/events verify full 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. compute function is defined in the header.
- **Counts are derived, never hard-coded.** The scripts fail loudly - **Counts are derived, never hard-coded.** The scripts fail loudly
on any mismatch instead of warning. 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, - Widgets: **562** — families Gtk 102, Ind 250, Inst 66, Stock 37,
T 90, X 2. (The survey's Stock 38 / Inst 67 counted the shared T 90, X 17. (The survey's Stock 38 / Inst 67 counted the shared
non-widget headers `StockData.h` / `InstData.h`; the X family — non-widget headers `StockData.h` / `InstData.h`; the X family was
XGraph, XSpreadsheet — was omitted from its family table.) 2 at survey time — XGraph, XSpreadsheet — and is 17 now with the
15 monitor widgets.)
- Sections: 11 — Windows & Dialogs 28, Containers & Layout 34, - Sections: 11 — Windows & Dialogs 28, Containers & Layout 34,
Buttons 24, Display 33, Text & Entry 28, Choosers 10, Views & 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. Instrumentation 66.
- Palette: **583** = 36 LightGUI + 547 XFrame. - Palette: **600** = 38 LightGUI + 562 XFrame.
- PropKinds: 6. EventKinds: **10**, not 11 as the survey stated - PropKinds: 6. EventKinds: **10**, not 11 as the survey stated
(Simple, SwitchPage, RowActivated, RowSelected, BufferChanged, (Simple, SwitchPage, RowActivated, RowSelected, BufferChanged,
DeleteEvent, Draw, ItemClicked, ItemActivate, CellChanged). DeleteEvent, Draw, ItemClicked, ItemActivate, CellChanged).
+1 -1
View File
@@ -253,7 +253,7 @@ def data_without_provenance(doc):
# ---------------------------------------------------------------- model.h # ---------------------------------------------------------------- model.h
def parse_ktypes(): 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), Each entry: key, palette button id (GtkBuilder id in ui/designer.ui),
default width/height, phase1 flag. default width/height, phase1 flag.
+28 -8
View File
@@ -5,11 +5,13 @@ Sources (read-only, /opt/lightgui):
- src/events.h — EventKind enum (+ wiring notes in the header comment), - src/events.h — EventKind enum (+ wiring notes in the header comment),
one EventDef table per widget type, events_for() dispatch, one EventDef table per widget type, events_for() dispatch,
no_events_note() for the types with no widget-specific signal 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 EventDef fields: signal (GTK signal name), handler (member handler
name), label (Events-pane label), kind, builtin (already wired by the 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 NOTE on the count: the survey/PORTING_PLAN.md says EventKind has 11
variants. The header itself defines 10 (Simple, SwitchPage, variants. The header itself defines 10 (Simple, SwitchPage,
@@ -70,10 +72,17 @@ def parse_event_entry(group, kinds):
else: else:
fail("unexpected 5th field in EventDef for %r: %s" fail("unexpected 5th field in EventDef for %r: %s"
% (signal, fields[4])) % (signal, fields[4]))
lazarus = None
if len(fields) > 5: 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) fail("unexpected trailing fields in EventDef for %r" % signal)
return {"signal": signal, "handler": handler, "label": label, return {"signal": signal, "handler": handler, "label": label,
"kind": kind, "builtin": builtin} "kind": kind, "builtin": builtin, "lazarus": lazarus}
def parse_table(text, var_name, kinds): def parse_table(text, var_name, kinds):
@@ -115,19 +124,30 @@ def build():
if k not in kind_notes: if k not in kind_notes:
fail("EventKind %r has no wiring note in the header comment" % k) 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<EventDef>& events_for\(const std::string& type\) \{")
if fn_body is None:
fail("events_for not found in %s" % EVENTS_H)
tables = {} tables = {}
for m in re.finditer( for m in re.finditer(
r"static const std::vector<EventDef> (\w+) = \{", text): r"static const std::vector<EventDef> (\w+) = \{", fn_body):
var = m.group(1) var = m.group(1)
if var in tables: if var in tables:
fail("duplicate EventDef table %r" % var) fail("duplicate EventDef table %r" % var)
tables[var] = parse_table(text, var, kinds) tables[var] = parse_table(text, var, kinds)
dispatch = {} dispatch = {}
for m in re.finditer(r'if \(type == "([^"]+)"\) return (\w+);', text): for m in re.finditer(r'if \((\w+) == "([^"]+)"\) return (\w+);',
if m.group(1) in dispatch: fn_body):
fail("type %r dispatched twice in events_for" % m.group(1)) if m.group(2) in dispatch:
dispatch[m.group(1)] = m.group(2) fail("type %r dispatched twice in events_for" % m.group(2))
dispatch[m.group(2)] = m.group(3)
for t, var in dispatch.items(): for t, var in dispatch.items():
if var not in tables: if var not in tables:
fail("events_for dispatches %r to missing table %r" % (t, var)) fail("events_for dispatches %r to missing table %r" % (t, var))
+8 -8
View File
@@ -1,18 +1,18 @@
#!/usr/bin/env python3 #!/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): 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 each with its registry index (the index the palette -> layout
selection file carries) 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) buttons in ui/designer.ui, ids pal_button ... pal_plot)
- data/registry.json — the registry this palette must agree with - data/registry.json — the registry this palette must agree with
(run tools/extract_registry.py first) (run tools/extract_registry.py first)
The combined palette is what LIGHTGUI_PALETTE_SELFTEST drives: 36 The combined palette is what LIGHTGUI_PALETTE_SELFTEST drives: 38
LightGUI buttons each add one widget, 547 XFrame buttons each write LightGUI buttons each add one widget, 562 XFrame buttons each write
name+index to the selection file. Total 583. name+index to the selection file. Total 600.
Usage: python3 tools/extract_palette.py Usage: python3 tools/extract_palette.py
""" """
@@ -76,8 +76,8 @@ def build():
fail("xframe palette is not in section order") fail("xframe palette is not in section order")
lightgui = parse_ktypes() lightgui = parse_ktypes()
if len(lightgui) != 36: if len(lightgui) != 38:
fail("expected 36 LightGUI types in kTypes, got %d" % len(lightgui)) fail("expected 38 LightGUI types in kTypes, got %d" % len(lightgui))
sec_counts = Counter(e["section"] for e in xframe) sec_counts = Counter(e["section"] for e in xframe)
sections = [{"name": s["name"], "count": sec_counts.get(s["name"], 0)} sections = [{"name": s["name"], "count": sec_counts.get(s["name"], 0)}
+1 -1
View File
@@ -4,7 +4,7 @@
Sources (read-only, /opt/lightgui): Sources (read-only, /opt/lightgui):
- src/props.h — PropKind enum, enum value tables, one PropDef table - src/props.h — PropKind enum, enum value tables, one PropDef table
per widget type, common_props(), props_for() dispatch 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 PropDef fields: name, kind, default (canonical string), lo/hi (spin
range, meaningful only for Int/Double), enum_labels / enum_values range, meaningful only for Int/Double), enum_labels / enum_values