Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
6569bd3
Update apos docs and code comments.
Lightning11wins Jun 26, 2025
e378338
Improve code readability without affecting functionality.
Lightning11wins Jun 26, 2025
30394df
Store adj weights for later CSS use.
Lightning11wins Jun 26, 2025
592b3f1
Add a helpful error value when attempting to write widget properties …
Lightning11wins Jun 26, 2025
436da37
Implement rendering doubles as widget properties.
Lightning11wins Jun 26, 2025
74d5f5f
Render the new adjustment weight doubles as widget properties for deb…
Lightning11wins Jun 26, 2025
bcc5987
Reformat CSS.
Lightning11wins Jun 27, 2025
15b466f
Make design responsive by replacing px with %.
Lightning11wins Jun 27, 2025
eaeeb5a
Reformat CSS for autolayout.
Lightning11wins Jun 27, 2025
9e45033
Improve debugging.
Lightning11wins Jul 1, 2025
b6daf94
Add flexibility to autoscaling, using macros to make it more readable.
Lightning11wins Jul 1, 2025
dbb1bbc
Replace magic values for fl_x and fl_y with macros.
Lightning11wins Jul 1, 2025
9b72f5f
Improve code documentation and readability.
Lightning11wins Jul 3, 2025
019319d
Fix flexibility a little, but it's still broken.
Lightning11wins Jul 3, 2025
36b5b0a
Attempt to add responsiveness to widgets (doesn't quite work): autola…
Lightning11wins Jul 3, 2025
dcbed96
Build testing apps.
Lightning11wins Jul 3, 2025
4c0bad9
Sample pages appear to work now.
Lightning11wins Jul 23, 2025
5f168ee
Working, server-side code.
Lightning11wins Jul 30, 2025
fad38e5
Merge branch 'master' into apos_autoscale
Lightning11wins Jan 8, 2026
65ff720
Improve apos.c & add design support.
Lightning11wins Feb 6, 2026
a48cdc6
Improve error handling.
Lightning11wins Feb 6, 2026
799c20d
Fix the qprintf() % bug.
Lightning11wins Feb 6, 2026
00d6366
Improve naming conventions and dev experience.
Lightning11wins Feb 7, 2026
f414f1d
Update testing apps.
Lightning11wins Feb 7, 2026
20a73e7
Add tools to ht_geom_dom1html.
Lightning11wins Feb 7, 2026
0f6f47a
Add tools for widget development and debugging.
Lightning11wins Feb 7, 2026
162d235
Add a warning when using the pane resize action, which breaks respons…
Lightning11wins Feb 7, 2026
5d65ee7
Make the point action responsive.
Lightning11wins Feb 7, 2026
2f070df
Make the autolayout widget responsive.
Lightning11wins Feb 7, 2026
9559ffc
Make the tab widget responsive.
Lightning11wins Feb 7, 2026
6ad367a
Make the clock widget responsive.
Lightning11wins Feb 9, 2026
4411bd9
Debug and clean up the component widget.
Lightning11wins Feb 9, 2026
90d09fb
Make the scrollpane widget responsive.
Lightning11wins Feb 9, 2026
8feae29
Make the button widget responsive.
Lightning11wins Feb 9, 2026
825b705
Make the chart widget responsive.
Lightning11wins Feb 9, 2026
cff62eb
Make the HTML widget responsive.
Lightning11wins Feb 9, 2026
c7af7bb
Make checkbox widget responsive.
Lightning11wins Feb 9, 2026
a5525b6
Update docs.
Lightning11wins Feb 9, 2026
3669171
Add new content for testing.
Lightning11wins Feb 9, 2026
bb5d39e
Fix a bug in the textbutton widget that broke responsiveness.
Lightning11wins Feb 9, 2026
c569d2d
Make datetime widget responsive.
Lightning11wins Feb 9, 2026
5eba8bf
Make dropdown widget responsive.
Lightning11wins Feb 9, 2026
3327935
Make editbox widget responsive.
Lightning11wins Feb 9, 2026
de97b78
Make formstatus widget responsive.
Lightning11wins Feb 9, 2026
ddc1d35
Make imagebutton widget responsive.
Lightning11wins Feb 9, 2026
f595e05
Make menu widget responsive.
Lightning11wins Feb 9, 2026
4af7bd8
Make objcanvas widget responsive (sort of).
Lightning11wins Feb 9, 2026
c0a7bb8
Make radiobutton pannel widget responsive.
Lightning11wins Feb 9, 2026
19383f9
Remove unnecessary width from htdrv_treeview.js.
Lightning11wins Feb 9, 2026
59bed9a
Make window widget responsive.
Lightning11wins Feb 9, 2026
4a80bc2
Make active areas responsive.
Lightning11wins Feb 9, 2026
2f3426f
Cleanup unused comments.
Lightning11wins Feb 9, 2026
88774b3
Add error messages to the image widget.
Lightning11wins Feb 9, 2026
59891b3
Make table widget back end code responsive.
Lightning11wins Feb 9, 2026
b759e9d
Make table widget front end code responsive (I think).
Lightning11wins Feb 9, 2026
9bfb614
Improve button layout on radio button panel widgets.
Lightning11wins Feb 11, 2026
16a8e3e
Clean up some JS for the radio button panel widget.
Lightning11wins Feb 11, 2026
d6b360d
Merge branch 'refs/heads/master' into apos_autoscale
Lightning11wins Feb 11, 2026
a5e334d
Add Easter Eggs for code reviewers to find.
Lightning11wins Feb 11, 2026
4cb04a5
Fix a bug in htdrv_radiobutton.js.
Lightning11wins Feb 11, 2026
e468f07
Tweak size of selection area in htdrv_radiobutton.js.
Lightning11wins Feb 11, 2026
527a3b9
Fix some inconsistent style issues with generated HTML & CSS.
Lightning11wins Feb 11, 2026
272fd81
Clean up focus box styles.
Lightning11wins Feb 12, 2026
f67360e
Add fallback options to the default font value.
Lightning11wins Feb 12, 2026
96d4093
Fix tab widget bugs.
Lightning11wins Feb 12, 2026
6939432
Clean up widget/label.
Lightning11wins Feb 16, 2026
4be26b8
Clean up widget/tab.
Lightning11wins Feb 16, 2026
6404f80
Fix some validation warnings in generated HTML.
Lightning11wins Feb 16, 2026
8b892d5
Improve scrollpane code.
Lightning11wins Feb 16, 2026
dda7a64
Improve startup.js.
Lightning11wins Feb 16, 2026
aa13d2f
Fix inconsistent JS generation style.
Lightning11wins Feb 16, 2026
dac7028
Disable clipping CSS by default.
Lightning11wins Feb 19, 2026
038132c
Bug fixes and cleanup.
Lightning11wins Feb 19, 2026
ab44072
Improve pre-page serverside HTML generation.
Lightning11wins Feb 19, 2026
d8fdd4c
Improve point action code.
Lightning11wins Feb 20, 2026
8fd5f73
Improve selection/hover area code.
Lightning11wins Feb 20, 2026
3fceace
Improve consistency of ResizeObserver-based code.
Lightning11wins Feb 20, 2026
a40ff7b
Improve readability of the resize listener in htdrv_window.js.
Lightning11wins Feb 20, 2026
5c8a0b2
Merge branch 'refs/heads/master' into apos_autoscale
Lightning11wins Feb 20, 2026
bc827bf
Fix a bug that caused hover boxes to not display (caused by disabling…
Lightning11wins Feb 20, 2026
13f052f
Clean up pg_mkbox() because I want to be able to read it.
Lightning11wins Feb 20, 2026
f3269a8
Clean up parent width & height functions.
Lightning11wins Feb 20, 2026
e692051
Remove a comment referring to the qprintf() % bug, patched many commi…
Lightning11wins Feb 20, 2026
e32de18
Improve code readability.
Lightning11wins Feb 20, 2026
cc4b00a
Add support for sending new client-side datatypes.
Lightning11wins Feb 23, 2026
3a74cfa
Fix a bug that caused boxes to be drawn incorrectly.
Lightning11wins Feb 23, 2026
10bacde
Update the pg_area() doc comment after realizing it had external docu…
Lightning11wins Feb 23, 2026
efe741a
Fix a bug that made window widget title bars appear broken.
Lightning11wins Feb 23, 2026
3d1d446
Fix area bugs.
Lightning11wins Feb 23, 2026
a0dbec5
Fix dynamic components being offset twice.
Lightning11wins Feb 24, 2026
b273424
Update testing apps.
Lightning11wins Feb 24, 2026
85b64e2
Clean up code.
Lightning11wins Feb 24, 2026
8e151d6
Fix a major regression that broke datetime dropdown rendering (introd…
Lightning11wins Feb 24, 2026
5f0727c
Fix a regression that caused hovers for many widgets to render incorr…
Lightning11wins Feb 24, 2026
07a27af
Add or update cursor styles to indicate clickable areas.
Lightning11wins Feb 24, 2026
c941765
Fix a bug that caused table scrollbar to sometimes not resize properly.
Lightning11wins Feb 25, 2026
d5aa9a0
Add an error when attempting to get relative values on an invalid layer.
Lightning11wins Feb 25, 2026
896a76d
Replace the deprecated __defineGetter__() function with modern altern…
Lightning11wins Feb 25, 2026
0c163fb
Remove fast_setRelativeX/Y() functions because they weren't notably f…
Lightning11wins Feb 25, 2026
c5b11e3
Improve warnings when using actions that break responsive design.
Lightning11wins Feb 25, 2026
9ed2910
Clean up from review.
Lightning11wins Feb 25, 2026
88e5969
Fix moveTo() passing incorrect parameter to setResponsiveY().
Lightning11wins Feb 25, 2026
f600019
Remove a completed todo.
Lightning11wins Feb 26, 2026
0fb8849
Add dups branch dependency changes (revert after dups branch is merged).
Lightning11wins Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,958 changes: 4,493 additions & 4,465 deletions centrallix-doc/Widgets/widgets.xml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions centrallix-lib/include/datatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ typedef union _DT
unsigned int Second:6;
unsigned int Minute:6;
unsigned int Hour:5;
unsigned int Day:5;
unsigned int Month:4;
unsigned int Year:12;
unsigned int Day:5; /* 1-based */
unsigned int Month:4; /* 0-based */
unsigned int Year:12; /* 1900-based: so 2002 is 102. */
}
Part;
long long Value;
long long Value; /* NOT seconds since the epoch! */
}
DateTime, *pDateTime;

Expand Down
9 changes: 9 additions & 0 deletions centrallix-lib/include/qprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@

#include <stdarg.h>

/*** A function to grow a string buffer.
***
*** @param str The string buffer being grown.
*** @param size A pointer to the current size of the string buffer.
*** @param offset An offset up to which data must be preserved.
*** @param args Arguments for growing the buffer.
*** @param req The requested size.
***/
// typedef int (*qpf_grow_fn_t)(char** str, size_t* size, size_t offset, void* args, size_t req);
typedef int (*qpf_grow_fn_t)(char**, size_t*, size_t, void*, size_t);

typedef struct _QPS
Expand Down
33 changes: 32 additions & 1 deletion centrallix-lib/include/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,36 @@ extern "C" {
}
#endif

#endif /* UTILITY_H */
/** TODO: ISRAEL - Remove these after the dups branch is merged. **/

/*** @brief Returns the smaller of two values.
***
*** @param a The first value.
*** @param b The second value.
*** @return The smaller of the two values.
***
*** @note This macro uses GCC extensions to ensure type safety.
***/
#define min(a, b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
(_a < _b) ? _a : _b; \
})

/*** @brief Returns the larger of two values.
***
*** @param a The first value.
*** @param b The second value.
*** @return The larger of the two values.
***
*** @note This macro uses GCC extensions to ensure type safety.
***/
#define max(a, b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
(_a > _b) ? _a : _b; \
})

#endif /* UTILITY_H */
11 changes: 7 additions & 4 deletions centrallix-lib/src/cxsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,22 @@ cxsecVerifySymbol_n(const char* sym, size_t n)
** significant security risks in the event of a locale mismatch!!
**/
if (n <= 0 || (*sym != '_' && (*sym < 'A' || *sym > 'Z') && (*sym < 'a' || *sym > 'z')))
return -1;
goto err;
n--;

/** Next chars may be 1) end of string, 2) digits, 3) alpha, or 4) underscore **/
sym++;
while(n)
{
if (*sym != '_' && (*sym < 'A' || *sym > 'Z') && (*sym < 'a' || *sym > 'z') && (*sym < '0' || *sym > '9'))
return -1;
goto err;
sym++;
n--;
}

return 0;
}
return 0;

err:
fprintf(stderr, "WARNING: '%s' (of length %lu) is not a valid symbol!\n", sym, n);
return -1;
}
22 changes: 20 additions & 2 deletions centrallix-lib/src/qprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,14 @@ qpf_internal_Translate(pQPSession s, const char* srcbuf, size_t srcsize, char**
*** change out from under this function to a new buffer if a realloc is
*** done by the grow_fn function. Do not store pointers to 'str'. Go
*** solely by offsets.
***
*** NULL, &(s->Tmpbuf), &(s->TmpbufSize), htr_internal_GrowFn, (void*)s, fmt, va
*** @param s Optional session struct.
*** @param str Pointer to a string buffer where data will be written.
*** @param size Pointer to the current size of the string buffer.
*** @param grow_fn A function to grow the string buffer.
*** @param format The format of data which should be written.
*** @param ap The arguments list to fulfill the provided format.
***/
int
qpfPrintf_va_internal(pQPSession s, char** str, size_t* size, qpf_grow_fn_t grow_fn, void* grow_arg, const char* format, va_list ap)
Expand Down Expand Up @@ -975,6 +983,12 @@ qpfPrintf_va_internal(pQPSession s, char** str, size_t* size, qpf_grow_fn_t grow
/** Simple specifiers **/
if (__builtin_expect(format[0] == '%', 0))
{
if (ignore)
{
format++;
continue;
}

if (__builtin_expect(!nogrow, 1) && (__builtin_expect(cpoffset+2 <= *size, 1) || (grow_fn(str, size, cpoffset, grow_arg, cpoffset+2))))
(*str)[cpoffset++] = '%';
else
Expand All @@ -987,6 +1001,12 @@ qpfPrintf_va_internal(pQPSession s, char** str, size_t* size, qpf_grow_fn_t grow
}
else if (__builtin_expect(format[0] == '&',0))
{
if (ignore)
{
format++;
continue;
}

if (__builtin_expect(!nogrow, 1) && (__builtin_expect(cpoffset+2 <= *size, 1) || (grow_fn(str, size, cpoffset, grow_arg, cpoffset+2))))
(*str)[cpoffset++] = '&';
else
Expand Down Expand Up @@ -1448,5 +1468,3 @@ qpfRegisterExt(char* ext_spec, int (*ext_fn)(), int is_source)

return;
}


2 changes: 1 addition & 1 deletion centrallix-os/apps/nav/default.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default "widget/template"
{
bgcolor="#e0e0e0";
linkcolor="#0000ff";
font_name = "Arial";
font_name = "Arial, Helvetica, sans-serif";
font_size = 12;
icon = "/favicon.ico";
}
Expand Down
78 changes: 78 additions & 0 deletions centrallix-os/samples/autoscale_test.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
$Version=2$
MyPage "widget/page"
{
title = "Responsive Testing Page";
bgcolor = "black";
textcolor = "#00f8ff";
width = 1000;
height = 1000;

auto "widget/hbox"
{
x=100; y=50; width=900; height=750;
spacing=20; row_height=300;
fl_width=100; fl_height=100;

pane0 "widget/pane" { fl_width=100; fl_height=100; width=190; height=180; bgcolor = "#9cf"; } // x=100; y=50;
pane1 "widget/pane" { fl_width=100; fl_height=100; width=130; height=180; bgcolor = "#ccc"; } // x=305; y=50;
pane2 "widget/pane" { fl_width=100; fl_height=100; width=80; height=320; bgcolor = "#f99"; } // x=455; y=50;
pane3 "widget/pane" { fl_width=100; fl_height=100; width=150; height=140; bgcolor = "#9f9"; } // x=555; y=50;
pane4 "widget/pane" { fl_width=100; fl_height=100; width=90; height=240; bgcolor = "#99f"; } // x=725; y=50;
pane5 "widget/pane" { fl_width=100; fl_height=100; width=230; height=100; bgcolor = "#ff9"; } // x=80; y=390;
pane6 "widget/pane" { fl_width=100; fl_height=100; width=80; height=200; bgcolor = "#f9f"; } // x=325; y=390;
pane7 "widget/pane" { fl_width=100; fl_height=100; width=170; height=220; bgcolor = "#9ff"; } // x=425; y=390;
pane8 "widget/pane" { fl_width=100; fl_height=100; width=110; height=200; bgcolor = "#fc9"; } // x=615; y=390;
pane9 "widget/pane" { fl_width=100; fl_height=100; width=130; height=120; bgcolor = "#cf9"; } // x=745; y=390;
}

// pane0 "widget/pane" { x=100; y=50; width=190; height=180; bgcolor = "#9cf"; }
// pane1 "widget/pane" { x=305; y=50; width=130; height=180; bgcolor = "#ccc"; }
// pane2 "widget/pane" { x=455; y=50; width=80; height=320; bgcolor = "#f99"; }
// pane3 "widget/pane" { x=555; y=50; width=150; height=140; bgcolor = "#9f9"; }
// pane4 "widget/pane" { x=725; y=50; width=90; height=240; bgcolor = "#99f"; }
// pane5 "widget/pane" { x=80; y=390; width=230; height=100; bgcolor = "#ff9"; }
// pane6 "widget/pane" { x=325; y=390; width=80; height=200; bgcolor = "#f9f"; }
// pane7 "widget/pane" { x=425; y=390; width=170; height=220; bgcolor = "#9ff"; }
// pane8 "widget/pane" { x=615; y=390; width=110; height=200; bgcolor = "#fc9"; }
// pane9 "widget/pane" { x=745; y=390; width=130; height=120; bgcolor = "#cf9"; }

paneA "widget/pane" { x=40; y=680; width=890; height=220; bgcolor = "#620"; }

// Outline the visible area.
top_left0 "widget/pane" { x=0; y=0; width=10; height=10; bgcolor = "#f00"; }
top_right0 "widget/pane" { x=990; y=0; width=10; height=10; bgcolor = "#ff0"; }
bottom_left0 "widget/pane" { x=0; y=990; width=10; height=10; bgcolor = "#0f0"; }
bottom_right0 "widget/pane" { x=990; y=990; width=10; height=10; bgcolor = "#00f"; }

// Advance markers.
top_left1 "widget/pane" { x=100; y=100; width=10; height=10; fl_x=25; fl_y=25; fl_width=25; fl_height=25; bgcolor = "#a00"; }
top_right1 "widget/pane" { x=890; y=100; width=10; height=10; fl_x=25; fl_y=25; fl_width=25; fl_height=25; bgcolor = "#aa0"; }
bottom_left1 "widget/pane" { x=100; y=890; width=10; height=10; fl_x=25; fl_y=25; fl_width=25; fl_height=25; bgcolor = "#0a0"; }
bottom_right1 "widget/pane" { x=890; y=890; width=10; height=10; fl_x=25; fl_y=25; fl_width=25; fl_height=25; bgcolor = "#00a"; }

// Interior markers.
top_left2 "widget/pane" { x=250; y=250; width=10; height=10; fl_x=100; fl_y=100; fl_width=25; fl_height=25; bgcolor = "#700"; }
top_right2 "widget/pane" { x=740; y=250; width=10; height=10; fl_x=100; fl_y=100; fl_width=25; fl_height=25; bgcolor = "#770"; }
bottom_left2 "widget/pane" { x=250; y=740; width=10; height=10; fl_x=100; fl_y=100; fl_width=25; fl_height=25; bgcolor = "#070"; }
bottom_right2 "widget/pane" { x=740; y=740; width=10; height=10; fl_x=100; fl_y=100; fl_width=25; fl_height=25; bgcolor = "#007"; }

// Deep interior markers.
top_left3 "widget/pane" { x=400; y=400; width=10; height=10; fl_x=25; fl_y=25; fl_width=100; fl_height=100; bgcolor = "#500"; }
top_right3 "widget/pane" { x=590; y=400; width=10; height=10; fl_x=25; fl_y=25; fl_width=100; fl_height=100; bgcolor = "#550"; }
bottom_left3 "widget/pane" { x=400; y=590; width=10; height=10; fl_x=25; fl_y=25; fl_width=100; fl_height=100; bgcolor = "#050"; }
bottom_right3 "widget/pane" { x=590; y=590; width=10; height=10; fl_x=25; fl_y=25; fl_width=100; fl_height=100; bgcolor = "#005"; }

// Center marker.
center "widget/pane"
{
x=450; y=450; width=100; height=100; bgcolor = "orange";
centerer "widget/pane" { x=25; y=25; width=50; height=50; bgcolor = "purple"; } // Debug
}

button "widget/textbutton"
{
x = 450; y = 380; width = 100; height = 30; font_size=16; bgcolor="#0c0447ff";
text = "Resize";
connector "widget/connector" { event=Click; target=center; action=Resize; }
}
}
19 changes: 19 additions & 0 deletions centrallix-os/samples/autoscale_test2.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$Version=2$
MyPage "widget/page"
{
title = "Flex Testing Page";
bgcolor = "black";
textcolor = "#00f8ff";
width = 1000;
height = 1000;

box "widget/pane"
{
x=25; y=25; width=975; height=975; bgcolor = "#111";

// Note: fl_x and fl_y seem to be ignored.
standard "widget/pane" { x=100; y=100; width=100; height=100; fl_x=100; fl_y=100; fl_width=100; fl_height=100; bgcolor = "orange"; }
big "widget/pane" { x=250; y=250; width=200; height=200; fl_x=10; fl_y=50; fl_width=10; fl_height=10; bgcolor = "purple"; }
double "widget/pane" { x=500; y=500; width=200; height=200; fl_x=50; fl_y=10; fl_width=50; fl_height=50; bgcolor = "green"; }
}
}
3 changes: 0 additions & 3 deletions centrallix-os/samples/clock.app
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ main "widget/page"
shadowx = 2;
shadowy = 2;
size=1;
moveable="true";
bold="true";
}
clock2 "widget/clock"
{
background="/sys/images/fade_pixelate_01.gif";
x=15; y=55; width=80; height=20;
fgcolor1="white";
moveable="true";
bold="true";
}
clock3 "widget/clock"
Expand All @@ -33,7 +31,6 @@ main "widget/page"
fgcolor1="orange";
fgcolor2="#666666";
// size=3;
moveable="true";
bold="true";
}
}
Loading