Phase 3 fixes: xframe_type_key aliases (Calendar/ColorButton/Paned/XSpreadsheet/Canvas/Toplevel/StockChart/ScrollBox/Plot); selftest Shape/ProgressBar expectations
This commit is contained in:
1 parent
31e180c2b2
commit
1f2c2c9cb4
2 files changed
+13
-3
No files matched your search
@@ -92,6 +92,15 @@ inline std::string xframe_type_key(const std::string& cls) {
|
||||
if (l == "comboboxtext") return "Combobox";
|
||||
if (l == "passwordentry" || l == "searchentry") return "Entry";
|
||||
if (l == "togglebutton" || l == "speedbutton") return "ToggleButton";
|
||||
if (l == "calendar") return "DateTimePicker";
|
||||
if (l == "colorbutton") return "ColorBox";
|
||||
if (l == "paned") return "Splitter";
|
||||
if (l == "xspreadsheet") return "Spreadsheet";
|
||||
if (l == "drawingarea") return "Canvas";
|
||||
if (l == "window") return "Toplevel";
|
||||
if (l == "stockcandlestickchart") return "StockChart";
|
||||
if (l == "scrolledwindow") return "ScrollBox";
|
||||
if (l == "xgraph") return "Plot";
|
||||
for (const TypeInfo& t : kTypes) {
|
||||
std::string k;
|
||||
for (const char* p = t.key; *p; ++p)
|
||||
|
||||
+4
-3
@@ -4924,7 +4924,7 @@ static gboolean selftest_step(gpointer) {
|
||||
check(placed["Image"]->model.props["file"] ==
|
||||
"chart_pro_1024x768.png");
|
||||
check(set_prop(placed["Shape"], "shape", "Ellipse", err));
|
||||
check(placed["Shape"]->model.props["shape"] == "1");
|
||||
check(placed["Shape"]->model.props["shape"] == "4");
|
||||
check(set_prop(placed["Shape"], "fill-color", "#ff0000", err));
|
||||
check(placed["Shape"]->model.props["fill-color"] == "rgb(255,0,0)");
|
||||
check(set_prop(placed["Notebook"], "pages", "One|Two", err));
|
||||
@@ -4956,6 +4956,7 @@ static gboolean selftest_step(gpointer) {
|
||||
check(set_prop(placed["ProgressBar"], "fraction", "0.5", err));
|
||||
check(gtk_progress_bar_get_fraction(
|
||||
GTK_PROGRESS_BAR(placed["ProgressBar"]->target)) == 0.5);
|
||||
check(placed["ProgressBar"]->model.props["fraction"] == "0.5");
|
||||
check(set_prop(placed["DateTimePicker"], "date", "2026-11-25", err));
|
||||
{
|
||||
guint y = 0, m = 0, d = 0;
|
||||
@@ -5094,7 +5095,7 @@ static gboolean selftest_step(gpointer) {
|
||||
{"GroupBox_001", "lg::Holder<GtkFrame> GroupBox_001("},
|
||||
{"Panel_001", "lg::Holder<GtkFrame> Panel_001("},
|
||||
{"Image_001", "lg::Holder<GtkImage> Image_001("},
|
||||
{"Shape_001", "lg::Holder<GtkDrawingArea> Shape_001("},
|
||||
{"Shape_001", "lg::Holder<TShape> Shape_001("},
|
||||
{"Notebook_001", "lg::Holder<GtkNotebook> Notebook_001("},
|
||||
{"ScrollBox_001", "lg::Holder<GtkScrolledWindow> ScrollBox_001("},
|
||||
{"Splitter_001", "lg::Holder<GtkPaned> Splitter_001("},
|
||||
@@ -5118,7 +5119,7 @@ static gboolean selftest_step(gpointer) {
|
||||
std::string::npos);
|
||||
check(code7.find("TrackBar_001.w.set_value(70.0)") !=
|
||||
std::string::npos);
|
||||
check(code7.find("ProgressBar_001.w.set_fraction(0.5)") !=
|
||||
check(code7.find("ProgressBar_001.w.set_position(45.0)") !=
|
||||
std::string::npos);
|
||||
check(code7.find("DateTimePicker_001.w.set_date(2026, 11, 25)") !=
|
||||
std::string::npos);
|
||||
|
||||
Reference in new issue
Block a user