From 350e59c861c35e63e573c24aff650c77a4f6bfc3 Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Fri, 17 Jun 2022 11:28:59 -0600 Subject: [PATCH 1/9] edited htdrv_map.c for css efficiency --- centrallix/htmlgen/htdrv_map.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/centrallix/htmlgen/htdrv_map.c b/centrallix/htmlgen/htdrv_map.c index 73f0d5518..940a62ec1 100755 --- a/centrallix/htmlgen/htdrv_map.c +++ b/centrallix/htmlgen/htdrv_map.c @@ -46,6 +46,11 @@ static struct int idcnt; } HTMAP; +int htmapSetup(pHtSession s) + { + htrAddStylesheetItem(s, " div.wmap { VISIBILITY:inherit; POSITION:absolute; overflow:hidden; }\n"); + return 0; + } /*** htmapRender - generate the HTML code for the page. ***/ int htmapRender(pHtSession s, pWgtrNode map_node, int z) @@ -104,7 +109,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z) strtcpy(name, ptr, sizeof(name)); /** Add css item for the layer **/ - htrAddStylesheetItem_va(s, "\t#map%POSbase { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; overflow: hidden; %STR}\n", id, x, y, w, h, z, main_bg); + htrAddStylesheetItem_va(s, "\t#map%POSbase { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; %STR}\n", id, x, y, w, h, z, main_bg); htrAddWgtrObjLinkage_va(s, map_node, "map%POSbase", id); @@ -128,7 +133,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z) name, *osrc, osrc, !*osrc, allow_select, show_select, name); /** HTML body
element to be used by the OpenLayers map. **/ - htrAddBodyItem_va(s, "
\n", id); + htrAddBodyItem_va(s, "
\n", id); /** Check for widgets within the map. **/ htrRenderSubwidgets(s, map_node, z + 2); @@ -153,6 +158,7 @@ int htmapInitialize() /** Fill in the structure. **/ strcpy(drv->Name, "DHTML Map Driver"); strcpy(drv->WidgetName, "map"); + drv->Setup = htmapSetup; drv->Render = htmapRender; htrAddEvent(drv, "MouseUp"); From 1a07317add24e298eea9a6a3b04a3b0f0cf79637 Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Fri, 17 Jun 2022 11:34:39 -0600 Subject: [PATCH 2/9] fixed a typo --- centrallix/htmlgen/htdrv_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centrallix/htmlgen/htdrv_map.c b/centrallix/htmlgen/htdrv_map.c index 940a62ec1..4dcae9d80 100755 --- a/centrallix/htmlgen/htdrv_map.c +++ b/centrallix/htmlgen/htdrv_map.c @@ -133,7 +133,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z) name, *osrc, osrc, !*osrc, allow_select, show_select, name); /** HTML body
element to be used by the OpenLayers map. **/ - htrAddBodyItem_va(s, "
\n", id); + htrAddBodyItem_va(s, "
\n", id); /** Check for widgets within the map. **/ htrRenderSubwidgets(s, map_node, z + 2); From d89838a0c10d8da3cb049690784c419a6cce4e3a Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Fri, 8 Jul 2022 13:04:03 -0600 Subject: [PATCH 3/9] The roughest draft of the CSS Efficiency Redo. Recommendations for changes are both welcome and desired. --- centrallix/htmlgen/Setup | 198 +++++++++++++++++++++++++ centrallix/htmlgen/htdrv_chart.c | 11 +- centrallix/htmlgen/htdrv_checkbox.c | 12 +- centrallix/htmlgen/htdrv_datetime.c | 20 ++- centrallix/htmlgen/htdrv_dropdown.c | 22 ++- centrallix/htmlgen/htdrv_editbox.c | 19 ++- centrallix/htmlgen/htdrv_fileupload.c | 9 +- centrallix/htmlgen/htdrv_formstatus.c | 14 +- centrallix/htmlgen/htdrv_imagebutton.c | 17 ++- centrallix/htmlgen/htdrv_label.c | 10 +- centrallix/htmlgen/htdrv_menu.c | 87 ++++++----- centrallix/htmlgen/htdrv_objcanvas.c | 13 +- centrallix/htmlgen/htdrv_page.c | 80 +++++----- centrallix/htmlgen/htdrv_pane.c | 14 +- centrallix/htmlgen/htdrv_radiobutton.c | 48 +++--- centrallix/htmlgen/htdrv_scrollbar.c | 17 ++- centrallix/htmlgen/htdrv_scrollpane.c | 49 +++--- centrallix/htmlgen/htdrv_spinner.c | 31 ++-- centrallix/htmlgen/htdrv_tab.c | 17 ++- centrallix/htmlgen/htdrv_table.c | 21 ++- centrallix/htmlgen/htdrv_textbutton.c | 5 +- 21 files changed, 509 insertions(+), 205 deletions(-) create mode 100644 centrallix/htmlgen/Setup diff --git a/centrallix/htmlgen/Setup b/centrallix/htmlgen/Setup new file mode 100644 index 000000000..97ce951a0 --- /dev/null +++ b/centrallix/htmlgen/Setup @@ -0,0 +1,198 @@ +htdrv_alerter.c: strcpy(drv->Name,"DHTML Alert Widget"); +htdrv_alerter.c: strcpy(drv->WidgetName,"alerter"); +htdrv_alerter.c: drv->Render = htalrtRender; +htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver"); +htdrv_autolayout.c: strcpy(drv->WidgetName,"autolayout"); +htdrv_autolayout.c: drv->Render = htalRender; +htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver - VBox"); +htdrv_autolayout.c: strcpy(drv->WidgetName,"vbox"); +htdrv_autolayout.c: drv->Render = htalRender; +htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver - HBox"); +htdrv_autolayout.c: strcpy(drv->WidgetName,"hbox"); +htdrv_autolayout.c: drv->Render = htalRender; +htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver - Spacer"); +htdrv_autolayout.c: strcpy(drv->WidgetName,"autolayoutspacer"); +htdrv_autolayout.c: drv->Render = htalRenderSpacer; +htdrv_button.c: strcpy(drv->Name,"HTML Button Widget Driver"); +htdrv_button.c: strcpy(drv->WidgetName,"button"); +htdrv_button.c: drv->Render = htbtnRender; +htdrv_calendar.c: strcpy(drv->Name,"DHTML Calendar View Driver"); +htdrv_calendar.c: strcpy(drv->WidgetName,"calendar"); +htdrv_calendar.c: drv->Render = htcaRender; +htdrv_chart.c: strcpy(drv->Name, "DHTML Chart Driver"); +htdrv_chart.c: strcpy(drv->WidgetName, "chart"); +htdrv_chart.c: drv->Render = htchtRender; +htdrv_chart.c: xaAddItem(&(drv->PseudoTypes), "chart-axis"); +htdrv_chart.c: xaAddItem(&(drv->PseudoTypes), "chart-series"); +htdrv_checkbox.c: strcpy(drv->Name,"DHTML Checkbox Driver"); +htdrv_checkbox.c: strcpy(drv->WidgetName,"checkbox"); +htdrv_checkbox.c: drv->Render = htcbRender; +htdrv_clock.c: strcpy(drv->Name,"DHTML Local Time Clock Driver"); +htdrv_clock.c: strcpy(drv->WidgetName,"clock"); +htdrv_clock.c: drv->Render = htclRender; +htdrv_component.c: strcpy(drv->Name,"DHTML Component Instance Driver"); +htdrv_component.c: strcpy(drv->WidgetName,"component"); +htdrv_component.c: drv->Render = htcmpRender; +htdrv_componentdecl.c: strcpy(drv->Name,"DHTML Component Declaration Driver"); +htdrv_componentdecl.c: strcpy(drv->WidgetName,"component-decl"); +htdrv_componentdecl.c: drv->Render = htcmpdRender; +htdrv_connector.c: strcpy(drv->Name,"Event-Action Connector Driver"); +htdrv_connector.c: strcpy(drv->WidgetName,"connector"); +htdrv_connector.c: drv->Render = htconnRender; +htdrv_datetime.c: strcpy(drv->Name,"HTML Date/Time Widget Driver"); +htdrv_datetime.c: strcpy(drv->WidgetName,"datetime"); +htdrv_datetime.c: drv->Render = htdtRender; +htdrv_dropdown.c: strcpy(drv->Name,"DHTML Drop Down Widget Driver"); +htdrv_dropdown.c: strcpy(drv->WidgetName,"dropdown"); +htdrv_dropdown.c: drv->Render = htddRender; +htdrv_dropdown.c: xaAddItem(&(drv->PseudoTypes), "dropdownitem"); +htdrv_editbox.c: strcpy(drv->Name,"DHTML Single-line Editbox Driver"); +htdrv_editbox.c: strcpy(drv->WidgetName,"editbox"); +htdrv_editbox.c: drv->Render = htebRender; +htdrv_execmethod.c: strcpy(drv->Name,"DHTML Method-Execution Widget"); +htdrv_execmethod.c: strcpy(drv->WidgetName,"execmethod"); +htdrv_execmethod.c: drv->Render = htexRender; +htdrv_fileupload.c: strcpy(drv->Name,"DHTML File Upload Driver"); +htdrv_fileupload.c: strcpy(drv->WidgetName,"fileupload"); +htdrv_fileupload.c: drv->Render = htfuRender; +htdrv_formbar.c: strcpy(drv->Name,"DHTML Form Bar Driver"); +htdrv_formbar.c: strcpy(drv->WidgetName,"formbar"); +htdrv_formbar.c: drv->Render = htfbRender; +htdrv_form.c: strcpy(drv->Name,"DHTML Form Widget"); +htdrv_form.c: strcpy(drv->WidgetName,"form"); +htdrv_form.c: drv->Render = htformRender; +htdrv_formstatus.c: strcpy(drv->Name,"DHTML Form Status Driver"); +htdrv_formstatus.c: strcpy(drv->WidgetName,"formstatus"); +htdrv_formstatus.c: drv->Render = htfsRender; +htdrv_frameset.c: strcpy(drv->Name,"HTML Frameset Driver"); +htdrv_frameset.c: strcpy(drv->WidgetName,"frameset"); +htdrv_frameset.c: drv->Render = htsetRender; +htdrv_hints.c: strcpy(drv->Name,"Presentation Hints pseudo-widget Driver"); +htdrv_hints.c: strcpy(drv->WidgetName,"hints"); +htdrv_hints.c: drv->Render = hthintRender; +htdrv_html.c: strcpy(drv->Name,"HTML Textual Source Driver"); +htdrv_html.c: strcpy(drv->WidgetName,"html"); +htdrv_html.c: drv->Render = hthtmlRender; +htdrv_imagebutton.c: strcpy(drv->Name,"HTML ImageButton Widget Driver"); +htdrv_imagebutton.c: strcpy(drv->WidgetName,"imagebutton"); +htdrv_imagebutton.c: drv->Render = htibtnRender; +htdrv_image.c: strcpy(drv->Name,"DHTML Image Widget"); +htdrv_image.c: strcpy(drv->WidgetName,"image"); +htdrv_image.c: drv->Setup = htimgSetup; +htdrv_image.c: drv->Render = htimgRender; +htdrv_label.c: strcpy(drv->Name,"DHTML Single-line Label Driver"); +htdrv_label.c: strcpy(drv->WidgetName,"label"); +htdrv_label.c: drv->Render = htlblRender; +htdrv_map.c: strcpy(drv->Name, "DHTML Map Driver"); +htdrv_map.c: strcpy(drv->WidgetName, "map"); +htdrv_map.c: drv->Setup = htmapSetup; +htdrv_map.c: drv->Render = htmapRender; +htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Widget Driver"); +htdrv_menu.c: strcpy(drv->WidgetName,"menu"); +htdrv_menu.c: drv->Render = htmenuRender; +htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Title Driver"); +htdrv_menu.c: strcpy(drv->WidgetName,"menutitle"); +htdrv_menu.c: drv->Render = htmenuRender_ttl; +htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Separator Driver"); +htdrv_menu.c: strcpy(drv->WidgetName,"menusep"); +htdrv_menu.c: drv->Render = htmenuRender_sep; +htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Widget Item Driver"); +htdrv_menu.c: strcpy(drv->WidgetName,"menuitem"); +htdrv_menu.c: drv->Render = htmenuRender_item; +htdrv_multiscroll.c: strcpy(drv->Name,"DHTML MultiScroll Driver"); +htdrv_multiscroll.c: strcpy(drv->WidgetName,"multiscroll"); +htdrv_multiscroll.c: drv->Render = htmsRender; +htdrv_multiscroll.c: strcpy(drv->Name,"DHTML MultiScroll Part Driver"); +htdrv_multiscroll.c: strcpy(drv->WidgetName,"multiscrollpart"); +htdrv_multiscroll.c: drv->Render = htmsRender_part; +htdrv_objcanvas.c: strcpy(drv->Name,"DHTML Pane Driver"); +htdrv_objcanvas.c: strcpy(drv->WidgetName,"objcanvas"); +htdrv_objcanvas.c: drv->Render = htocRender; +htdrv_osrc.c: strcpy(drv->Name,"DHTML OSRC Driver"); +htdrv_osrc.c: strcpy(drv->WidgetName,"osrc"); +htdrv_osrc.c: drv->Render = htosrcRender; +htdrv_page.c: strcpy(drv->Name,"HTML Page Driver"); +htdrv_page.c: strcpy(drv->WidgetName,"page"); +htdrv_page.c: drv->Render = htpageRender; +htdrv_pane.c: strcpy(drv->Name,"DHTML Pane Driver"); +htdrv_pane.c: strcpy(drv->WidgetName,"pane"); +htdrv_pane.c: drv->Render = htpnRender; +htdrv_parameter.c: strcpy(drv->Name,"Parameter Driver"); +htdrv_parameter.c: strcpy(drv->WidgetName,"parameter"); +htdrv_parameter.c: drv->Render = htparamRender; +htdrv_radiobutton.c: strcpy(drv->Name,"DHTML RadioButton Driver"); +htdrv_radiobutton.c: strcpy(drv->WidgetName,"radiobuttonpanel"); +htdrv_radiobutton.c: drv->Render = htrbRender; +htdrv_repeat.c: strcpy(drv->Name,"Repeat Object Driver"); +htdrv_repeat.c: strcpy(drv->WidgetName,"repeat"); +htdrv_repeat.c: drv->Render = htrptRender; +htdrv_rule.c: strcpy(drv->Name,"Declarative Rule Widget Driver"); +htdrv_rule.c: strcpy(drv->WidgetName,"rule"); +htdrv_rule.c: drv->Render = htruleRender; +htdrv_scrollbar.c: strcpy(drv->Name,"DHTML Scrollbar Widget Driver"); +htdrv_scrollbar.c: strcpy(drv->WidgetName,"scrollbar"); +htdrv_scrollbar.c: drv->Render = htsbRender; +htdrv_scrollpane.c: strcpy(drv->Name,"HTML ScrollPane Widget Driver"); +htdrv_scrollpane.c: strcpy(drv->WidgetName,"scrollpane"); +htdrv_scrollpane.c: drv->Render = htspaneRender; +htdrv_spinner.c: strcpy(drv->Name,"DHTML Spinner Box Driver"); +htdrv_spinner.c: strcpy(drv->WidgetName,"spinner"); +htdrv_spinner.c: drv->Render = htspnrRender; +htdrv_tab.c: strcpy(drv->Name,"DHTML Tab Control Driver"); +htdrv_tab.c: strcpy(drv->WidgetName,"tab"); +htdrv_tab.c: drv->Render = httabRender; +htdrv_tab.c: /*xaAddItem(&(drv->PseudoTypes), "tabpage");*/ +htdrv_tab.c: strcpy(drv->Name,"DHTML Tab Page Driver"); +htdrv_tab.c: strcpy(drv->WidgetName,"tabpage"); +htdrv_tab.c: drv->Render = httabRender_page; +htdrv_table.c: strcpy(drv->Name,"DHTML DataTable Driver"); +htdrv_table.c: strcpy(drv->WidgetName,"table"); +htdrv_table.c: drv->Render = httblRender; +htdrv_table.c: xaAddItem(&(drv->PseudoTypes), "table-column"); +htdrv_table.c: xaAddItem(&(drv->PseudoTypes), "table-row-detail"); +htdrv_terminal.c: strcpy(drv->Name,"DHTML Terminal Widget"); +htdrv_terminal.c: strcpy(drv->WidgetName,"terminal"); +htdrv_terminal.c: drv->Render = httermRender; +htdrv_textarea.c: strcpy(drv->Name,"DHTML Multiline Textarea Driver"); +htdrv_textarea.c: strcpy(drv->WidgetName,"textarea"); +htdrv_textarea.c: drv->Render = httxRender; +htdrv_textbutton.c: strcpy(drv->Name,"HTML Text Button Widget Driver"); +htdrv_textbutton.c: strcpy(drv->WidgetName,"textbutton"); +htdrv_textbutton.c: drv->Render = httbtnRender; +htdrv_timer.c: strcpy(drv->Name,"DHTML Nonvisual Timer Widget"); +htdrv_timer.c: strcpy(drv->WidgetName,"timer"); +htdrv_timer.c: drv->Render = httmRender; +htdrv_treeview.c: strcpy(drv->Name,"HTML Treeview Widget Driver"); +htdrv_treeview.c: strcpy(drv->WidgetName,"treeview"); +htdrv_treeview.c: drv->Render = httreeRender; +htdrv_uawindow.c: strcpy(drv->Name,"User-Agent Window Object Driver"); +htdrv_uawindow.c: strcpy(drv->WidgetName,"window"); +htdrv_uawindow.c: drv->Render = htuawinRender; +htdrv_variable.c: strcpy(drv->Name,"Variable Object Driver"); +htdrv_variable.c: strcpy(drv->WidgetName,"variable"); +htdrv_variable.c: drv->Render = htvblRender; +htdrv_window.c: strcpy(drv->Name,"Child Window Widget Driver"); +htdrv_window.c: strcpy(drv->WidgetName,"childwindow"); +htdrv_window.c: drv->Render = htwinRender; +ht_render.c: if (xhLookup(&session->UsedDrivers, drv->WidgetName) == NULL) +ht_render.c: xhAdd(&session->UsedDrivers, drv->WidgetName, (void*)drv); +ht_render.c: if (drv->Setup) +ht_render.c: if (drv->Setup(session) < 0) +ht_render.c: rval = drv->Render(session, widget, z); +ht_render.c: xaAddItem(&drv->Events, (void*)event); +ht_render.c: xaAddItem(&drv->Actions, (void*)action); +ht_render.c: for(i=0;iActions.nItems;i++) +ht_render.c: if (!strcmp(((pHtEventAction)(drv->Actions.Items[i]))->Name, eventaction)) +ht_render.c: ea = (pHtEventAction)(drv->Actions.Items[i]); +ht_render.c: if (!ea) for(i=0;iEvents.nItems;i++) +ht_render.c: if (!strcmp(((pHtEventAction)(drv->Events.Items[i]))->Name, eventaction)) +ht_render.c: ea = (pHtEventAction)(drv->Events.Items[i]); +ht_render.c: xaInit(&(drv->PosParams),16); +ht_render.c: xaInit(&(drv->Properties),16); +ht_render.c: xaInit(&(drv->Events),16); +ht_render.c: xaInit(&(drv->Actions),16); +ht_render.c: xaInit(&(drv->PseudoTypes), 4); +ht_render.c: mssError(1,"HTR","unable to find class '%s' for widget driver '%s'",className,drv->WidgetName); +ht_render.c: if (xhAdd(&(class->WidgetDrivers),drv->WidgetName, (void*)drv) < 0) return -1; +ht_render.c: for (i=0;iPseudoTypes));i++) +ht_render.c: if (xhAdd(&(class->WidgetDrivers),xaGetItem(&(drv->PseudoTypes), i), (void*)drv) < 0) return -1; diff --git a/centrallix/htmlgen/htdrv_chart.c b/centrallix/htmlgen/htdrv_chart.c index 654c86348..fab2e333d 100644 --- a/centrallix/htmlgen/htdrv_chart.c +++ b/centrallix/htmlgen/htdrv_chart.c @@ -51,6 +51,12 @@ static struct int idcnt; } HTCHT; +int htchtSetup(pHtSession s) + { + htrAddStylesheetItem_va(s, "\t.chtChart { POSITION:absolute; VISIBILITY:inherit; }\n"); + return 0; + } + int htchtCheckBrowserSupport(pHtSession session) { @@ -328,7 +334,7 @@ htchtGenHTML(pHtSession session, pWgtrNode tree, int z) htchtGetCanvasId(tree, buf, sizeof(buf)); - htrAddBodyItem_va(session,"
\n", + htrAddBodyItem_va(session,"
\n", buf, buf, htchtGetWidth(tree), @@ -338,7 +344,7 @@ htchtGenHTML(pHtSession session, pWgtrNode tree, int z) htrAddBodyItem(session,"

CHART HERE

\n"); htrAddBodyItem(session,"
\n"); - htrAddStylesheetItem_va(session, "\t#%STR&SYMdiv { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; } \n", + htrAddStylesheetItem_va(session, "\t#%STR&SYMdiv { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; } \n", buf, htchtGetX(tree), htchtGetY(tree), @@ -391,6 +397,7 @@ htchtInitialize() strcpy(drv->Name, "DHTML Chart Driver"); strcpy(drv->WidgetName, "chart"); drv->Render = htchtRender; + drv->Setup = htchtSetup; xaAddItem(&(drv->PseudoTypes), "chart-axis"); xaAddItem(&(drv->PseudoTypes), "chart-series"); diff --git a/centrallix/htmlgen/htdrv_checkbox.c b/centrallix/htmlgen/htdrv_checkbox.c index c2f699e91..d598f1fb0 100644 --- a/centrallix/htmlgen/htdrv_checkbox.c +++ b/centrallix/htmlgen/htdrv_checkbox.c @@ -46,6 +46,12 @@ static struct { int idcnt; } HTCB; +int htcbSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.cbMain { POSITION:absolute; VISIBILITY:inherit; HEIGHT:13px; WIDTH:13px; }\n"); + return 0; + } + int htcbRender(pHtSession s, pWgtrNode tree, int z) { char fieldname[HT_FIELDNAME_SIZE]; @@ -92,7 +98,7 @@ int htcbRender(pHtSession s, pWgtrNode tree, int z) { htrAddWgtrObjLinkage_va(s, tree, "cb%INTmain", id); /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#cb%POSmain { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; HEIGHT:13px; WIDTH:13px; Z-INDEX:%POS; }\n",id,x,y,z); + htrAddStylesheetItem_va(s,"\t#cb%POSmain { LEFT:%INTpx; TOP:%INTpx; Z-INDEX:%POS; }\n",id,x,y,z); htrAddScriptInclude(s,"/sys/js/htdrv_checkbox.js",0); htrAddScriptInclude(s,"/sys/js/ht_utils_hints.js",0); @@ -106,7 +112,8 @@ int htcbRender(pHtSession s, pWgtrNode tree, int z) { htrAddScriptInit_va(s," checkbox_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), fieldname:\"%STR&JSSTR\", checked:%INT, enabled:%INT, form:\"%STR&JSSTR\"});\n", name, fieldname,checked,enabled,form); /** HTML body
element for the layers. **/ - htrAddBodyItemLayerStart(s, 0, "cb%POSmain", id, NULL); + htrAddBodyItemLayerStart(s, 0, "cb%POSmain", id, "cbMain"); + //htrAddBodyItem_va(s, "
\n"); switch(checked) { case 1: @@ -144,6 +151,7 @@ int htcbInitialize() { strcpy(drv->Name,"DHTML Checkbox Driver"); strcpy(drv->WidgetName,"checkbox"); drv->Render = htcbRender; + drv->Setup = htcbSetup; /** Events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_datetime.c b/centrallix/htmlgen/htdrv_datetime.c index 7463cf561..554165a3e 100644 --- a/centrallix/htmlgen/htdrv_datetime.c +++ b/centrallix/htmlgen/htdrv_datetime.c @@ -48,6 +48,13 @@ static struct } HTDT; +int htdtSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.absHidInh { OVERFLOW: hidden; POSITION:absolute; VISIBILITY:inherit;}\n"); + htrAddStylesheetItem_va(s,"\t.dtBtn { cursor:default; border:1px outset #e0e0e0;}\n"); + htrAddStylesheetItem_va(s,"\t.dtCon { LEFT:1px; TOP:1px; }\n"); + return 0; + } /*** htdtRender - generate the HTML code for the page. ***/ @@ -201,9 +208,9 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) strcpy(fgcolor,"black"); /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#dt%POSbtn { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; cursor:default; border:1px outset #e0e0e0; %STR }\n",id,x,y,w,h,z, bgcolor); - htrAddStylesheetItem_va(s,"\t#dt%POScon1 { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,w-20,h-2,z+1); - htrAddStylesheetItem_va(s,"\t#dt%POScon2 { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,w-20,h-2,z+1); + htrAddStylesheetItem_va(s,"\t#dt%POSbtn { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; %STR }\n",id,x,y,w,h,z, bgcolor); + htrAddStylesheetItem_va(s,"\t#dt%POScon1 { WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,w-20,h-2,z+1); + htrAddStylesheetItem_va(s,"\t#dt%POScon2 { WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,w-20,h-2,z+1); /** Write named global **/ htrAddScriptGlobal(s, "dt_current", "null", 0); @@ -230,7 +237,7 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) date_only, default_time); /** HTML body
elements for the layers. **/ - htrAddBodyItem_va(s,"
\n" + htrAddBodyItem_va(s,"
\n" "\n", id); /*htrAddBodyItem_va(s,"\n",w); htrAddBodyItem(s, " \n"); @@ -243,8 +250,8 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) htrAddBodyItem_va(s," \n",w-2); htrAddBodyItem(s, " \n"); htrAddBodyItem(s, "
\n");*/ - htrAddBodyItem_va(s,"
\n",id); - htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); htrAddBodyItem(s, "
\n"); /** Add the event handling scripts **/ @@ -277,6 +284,7 @@ htdtInitialize() strcpy(drv->Name,"HTML Date/Time Widget Driver"); strcpy(drv->WidgetName,"datetime"); drv->Render = htdtRender; + drv->Setup = htdtSetup; /** Register events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_dropdown.c b/centrallix/htmlgen/htdrv_dropdown.c index c8167e706..b8eed8374 100644 --- a/centrallix/htmlgen/htdrv_dropdown.c +++ b/centrallix/htmlgen/htdrv_dropdown.c @@ -46,7 +46,14 @@ static struct { int idcnt; } HTDD; - +int htddSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.hidAbs { OVERFLOW:hidden; POSITION:absolute; }\n:"); + htrAddStylesheetItem_va(s,"\t.ddBtn { VISIBILITY:inherit; cursor:default; border:1px outset #e0e0e0;}\n"); + htrAddStylesheetItem_va(s,"\t.ddCon1 { VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); + htrAddStylesheetItem_va(s,"\t.ddCon2 { VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); + return 0; + } /* htddRender - generate the HTML code for the page. */ @@ -138,9 +145,9 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { strtcpy(name,ptr,sizeof(name)); /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#dd%POSbtn { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; HEIGHT:%POSpx; WIDTH:%POSpx; Z-INDEX:%POS; cursor:default; background-color: %STR&CSSVAL; border:1px outset #e0e0e0;}\n",id,x,y,h,w,z,bgstr); - htrAddStylesheetItem_va(s,"\t#dd%POScon1 { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); - htrAddStylesheetItem_va(s,"\t#dd%POScon2 { OVERFLOW:hidden; POSITION:absolute; VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); + htrAddStylesheetItem_va(s,"\t#dd%POSbtn { LEFT:%INTpx; TOP:%INTpx; HEIGHT:%POSpx; WIDTH:%POSpx; Z-INDEX:%POS; background-color: %STR&CSSVAL;}\n",id,x,y,h,w,z,bgstr); + htrAddStylesheetItem_va(s,"\t#dd%POScon1 { HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); + htrAddStylesheetItem_va(s,"\t#dd%POScon2 { HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,h-2,z+1); htrAddScriptGlobal(s, "dd_current", "null", 0); htrAddScriptGlobal(s, "dd_lastkey", "null", 0); @@ -190,7 +197,7 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { htrAddScriptInit_va(s," dd_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), c1:htr_subel(wgtrGetNodeRef(ns,\"%STR&SYM\"), \"dd%POScon1\"), c2:htr_subel(wgtrGetNodeRef(ns,\"%STR&SYM\"), \"dd%POScon2\"), background:'%STR&JSSTR', highlight:'%STR&JSSTR', fieldname:'%STR&JSSTR', numDisplay:%INT, mode:%INT, sql:'%STR&JSSTR', width:%INT, height:%INT, form:'%STR&JSSTR', osrc:'%STR&JSSTR', qms:%INT, ivs:%INT, popup_width:%INT});\n", name, name, id, name, id, bgstr, hilight, fieldname, num_disp, mode, sql?sql:"", w, h, form, osrc, query_multiselect, invalid_select_default, pop_w); /** HTML body
element for the layers. **/ - htrAddBodyItem_va(s,"
\n" + htrAddBodyItem_va(s,"
\n" "\n", id); /*htrAddBodyItem_va(s,"\n",w); htrAddBodyItem(s, " \n"); @@ -203,8 +210,8 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { htrAddBodyItem_va(s," \n",w-2); htrAddBodyItem(s, " \n"); htrAddBodyItem(s, "
\n");*/ - htrAddBodyItem_va(s,"
\n",id); - htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); htrAddBodyItem(s, "
\n"); /* Read and initialize the dropdown items */ @@ -376,6 +383,7 @@ int htddInitialize() { strcpy(drv->Name,"DHTML Drop Down Widget Driver"); strcpy(drv->WidgetName,"dropdown"); drv->Render = htddRender; + drv->Setup = htddSetup; xaAddItem(&(drv->PseudoTypes), "dropdownitem"); /** Register events **/ diff --git a/centrallix/htmlgen/htdrv_editbox.c b/centrallix/htmlgen/htdrv_editbox.c index 0223038f9..f5a236ab7 100644 --- a/centrallix/htmlgen/htdrv_editbox.c +++ b/centrallix/htmlgen/htdrv_editbox.c @@ -49,6 +49,12 @@ static struct } HTEB; +int htebSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.ebBase { POSITION:absolute; VISIBILITY:inherit; overflow:hidden; border-style:solid; border-width:1px; }\n"); + htrAddStylesheetItem_va(s,"\t.ebCon1 { VISIBILITY:inherit; border:none; }\n"); + return 0; + } /*** htebRender - generate the HTML code for the editbox widget. ***/ @@ -149,8 +155,8 @@ htebRender(pHtSession s, pWgtrNode tree, int z) box_offset = 0; /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#eb%POSbase { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; overflow:hidden; }\n",id,x,y,w-2*box_offset,z); - htrAddStylesheetItem_va(s,"\t#eb%POScon1 { VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; border:none; }\n",id,5,0,w-10,z+1); + htrAddStylesheetItem_va(s,"\t#eb%POSbase { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,z); + htrAddStylesheetItem_va(s,"\t#eb%POScon1 { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; }\n",id,5,0,w-10,z+1); /** Write named global **/ htrAddWgtrObjLinkage_va(s, tree, "eb%POSbase",id); @@ -179,19 +185,19 @@ htebRender(pHtSession s, pWgtrNode tree, int z) tooltip, descfg, descr); /** HTML body
element for the base layer. **/ - htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); /** Use CSS border for drawing **/ if (is_raised) - htrAddStylesheetItem_va(s,"\t#eb%POSbase { border-style:solid; border-width:1px; border-color: white gray gray white; %STR }\n",id, main_bg); + htrAddStylesheetItem_va(s,"\t#eb%POSbase { border-color: white gray gray white; %STR }\n",id, main_bg); else - htrAddStylesheetItem_va(s,"\t#eb%POSbase { border-style:solid; border-width:1px; border-color: gray white white gray; %STR }\n",id, main_bg); + htrAddStylesheetItem_va(s,"\t#eb%POSbase { border-color: gray white white gray; %STR }\n",id, main_bg); if (h >= 0) htrAddStylesheetItem_va(s,"\t#eb%POSbase { height:%POSpx; }\n\t#eb%POScon1 { height:%POSpx; }\n", id, h-2*box_offset, id, h-2*box_offset-2); //htrAddBodyItem_va(s, "
 
\n", w-2, h-2); //htrAddBodyItem_va(s, "
\n",id); - htrAddBodyItem_va(s, "\n",id); + htrAddBodyItem_va(s, "\n",id); /** Check for more sub-widgets **/ for (i=0;iChildren));i++) @@ -221,6 +227,7 @@ htebInitialize() strcpy(drv->Name,"DHTML Single-line Editbox Driver"); strcpy(drv->WidgetName,"editbox"); drv->Render = htebRender; + drv->Setup = htebSetup; /** Events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_fileupload.c b/centrallix/htmlgen/htdrv_fileupload.c index a3ed1a5c2..e546d3206 100755 --- a/centrallix/htmlgen/htdrv_fileupload.c +++ b/centrallix/htmlgen/htdrv_fileupload.c @@ -48,6 +48,11 @@ static struct } HTFU; +int htfuSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,".fuBase { POSITION:absolute; VISIBILITY:hidden; }\n"); + return 0; + } /*** htfuRender - generate the HTML code for the fileupload widget ***/ int @@ -94,8 +99,7 @@ htfuRender(pHtSession s, pWgtrNode tree, int z) htrAddScriptInit_va(s, " fu_init({layer:wgtrGetNodeRef(ns,'%STR&SYM'), pane:document.getElementById(\"fu%POSform\"), input:document.getElementById(\"fu%POSinput\"), iframe:document.getElementById(\"fu%POSiframe\"), target:\"%STR&JSSTR\"});\n", name, id, id, id, target); /** style header items **/ - htrAddStylesheetItem_va(s,"#fu%POSbase { POSITION:absolute; VISIBILITY:hidden; }\n", id); - htrAddBodyItem_va(s,"
", id, id, id, id, id, id, id, multiselect?"MULTIPLE":""); + htrAddBodyItem_va(s,"
", id, id, id, id, id, id, id, multiselect?"MULTIPLE":""); /** Check for more sub-widgets **/ for (i=0;iChildren));i++) @@ -121,6 +125,7 @@ htfuInitialize() strcpy(drv->Name,"DHTML File Upload Driver"); strcpy(drv->WidgetName,"fileupload"); drv->Render = htfuRender; + drv->Setup = htfuSetup; /** Add actions **/ htrAddAction(drv,"Reset"); diff --git a/centrallix/htmlgen/htdrv_formstatus.c b/centrallix/htmlgen/htdrv_formstatus.c index 33258e3c1..5b27934d8 100644 --- a/centrallix/htmlgen/htdrv_formstatus.c +++ b/centrallix/htmlgen/htdrv_formstatus.c @@ -46,6 +46,11 @@ static struct { int idcnt; } HTFS; +int htfsSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.fsMain { POSITION:absolute; VISIBILITY:inherit; HEIGHT:13px; }\n"); + return 0; + } /* htfsRender - generate the HTML code for the page. @@ -89,7 +94,7 @@ int htfsRender(pHtSession s, pWgtrNode tree, int z) { htrAddWgtrObjLinkage_va(s, tree, "fs%POSmain", id); /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#fs%POSmain { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; HEIGHT:13px; WIDTH:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w,z); + htrAddStylesheetItem_va(s,"\t#fs%POSmain { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w,z); htrAddScriptInclude(s, "/sys/js/htdrv_formstatus.js", 0); @@ -99,11 +104,11 @@ int htfsRender(pHtSession s, pWgtrNode tree, int z) { /** HTML body
element for the layers. **/ if (!strcmp(style,"large")) - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); else if (!strcmp(style,"largeflat")) - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); else - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); htrAddEventHandlerFunction(s,"document","MOUSEDOWN","fs","fs_mousedown"); htrAddEventHandlerFunction(s,"document","MOUSEUP", "fs","fs_mouseup"); @@ -133,6 +138,7 @@ int htfsInitialize() { strcpy(drv->Name,"DHTML Form Status Driver"); strcpy(drv->WidgetName,"formstatus"); drv->Render = htfsRender; + drv->Setup = htfsSetup; htrAddEvent(drv,"Click"); htrAddEvent(drv,"MouseUp"); diff --git a/centrallix/htmlgen/htdrv_imagebutton.c b/centrallix/htmlgen/htdrv_imagebutton.c index 64cfe92eb..d9992d7cd 100644 --- a/centrallix/htmlgen/htdrv_imagebutton.c +++ b/centrallix/htmlgen/htdrv_imagebutton.c @@ -51,7 +51,11 @@ static struct } HTIBTN; - +int htibtnSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.ibtnPane { POSITION:absolute; VISIBILITY:inherit; cursor:pointer; }\n"); + return 0; + } /*** htibtnRender - generate the HTML code for the page. ***/ int @@ -137,7 +141,7 @@ htibtnRender(pHtSession s, pWgtrNode tree, int z) button_repeat = htrGetBoolean(tree, "repeat", 0); /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#ib%POSpane { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; cursor:pointer; }\n",id,x,y,w,z); + htrAddStylesheetItem_va(s,"\t#ib%POSpane { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w,z); htrAddScriptGlobal(s, "ib_cur_img", "null", 0); htrAddWgtrObjLinkage_va(s, tree, "ib%POSpane", id); @@ -158,14 +162,14 @@ htibtnRender(pHtSession s, pWgtrNode tree, int z) /** HTML body
elements for the layers. **/ if (h < 0) if(is_enabled) - htrAddBodyItem_va(s,"
\n",id,n_img); + htrAddBodyItem_va(s,"
\n",id,n_img); else - htrAddBodyItem_va(s,"
\n",id,d_img); + htrAddBodyItem_va(s,"
\n",id,d_img); else if(is_enabled) - htrAddBodyItem_va(s,"
\n",id,n_img,w,h); + htrAddBodyItem_va(s,"
\n",id,n_img,w,h); else - htrAddBodyItem_va(s,"
\n",id,d_img,w,h); + htrAddBodyItem_va(s,"
\n",id,d_img,w,h); /** Add the event handling scripts **/ htrAddEventHandlerFunction(s, "document", "MOUSEDOWN", "ib", "ib_mousedown"); @@ -199,6 +203,7 @@ htibtnInitialize() strcpy(drv->Name,"HTML ImageButton Widget Driver"); strcpy(drv->WidgetName,"imagebutton"); drv->Render = htibtnRender; + drv->Setup = htibtnSetup; htrAddAction(drv,"Enable"); htrAddAction(drv,"Disable"); diff --git a/centrallix/htmlgen/htdrv_label.c b/centrallix/htmlgen/htdrv_label.c index d7140489f..7d8ed12b1 100644 --- a/centrallix/htmlgen/htdrv_label.c +++ b/centrallix/htmlgen/htdrv_label.c @@ -49,6 +49,11 @@ static struct } HTLBL; +int htlblSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.lbl { POSITION:absolute; VISIBILITY:inherit; cursor:default; }\n"); + return 0; + } /*** htlblRender - generate the HTML code for the label widget. ***/ @@ -197,7 +202,7 @@ htlblRender(pHtSession s, pWgtrNode tree, int z) form[0]='\0'; /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#lbl%POS { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; %[HEIGHT:%POSpx; %]WIDTH:%POSpx; Z-INDEX:%POS; cursor:default; %[font-weight:bold; %]%[color:%STR&CSSVAL; %]%[font-size:%POSpx; %]text-align:%STR&CSSVAL; vertical-align:%STR&CSSVAL; %[white-space:nowrap; %]%[text-overflow:ellipsis; overflow:hidden; %]%[font-style:italic; %]}\n", + htrAddStylesheetItem_va(s,"\t#lbl%POS { LEFT:%INTpx; TOP:%INTpx; %[HEIGHT:%POSpx; %]WIDTH:%POSpx; Z-INDEX:%POS; %[font-weight:bold; %]%[color:%STR&CSSVAL; %]%[font-size:%POSpx; %]text-align:%STR&CSSVAL; vertical-align:%STR&CSSVAL; %[white-space:nowrap; %]%[text-overflow:ellipsis; overflow:hidden; %]%[font-style:italic; %]}\n", id,x,y, !auto_height, h, w,z, @@ -225,7 +230,7 @@ htlblRender(pHtSession s, pWgtrNode tree, int z) htrAddEventHandlerFunction(s, "document","MOUSEMOVE", "lbl", "lbl_mousemove"); /** HTML body
element for the base layer. **/ - htrAddBodyItemLayer_va(s, 0, "lbl%POS", id, NULL, "

%STR&HTENLBR

", text); + htrAddBodyItemLayer_va(s, 0, "lbl%POS", id, "lbl", "

%STR&HTENLBR

", text); /** Check for more sub-widgets **/ htrRenderSubwidgets(s, tree, z+1); @@ -252,6 +257,7 @@ htlblInitialize() strcpy(drv->Name,"DHTML Single-line Label Driver"); strcpy(drv->WidgetName,"label"); drv->Render = htlblRender; + drv->Setup = htlblSetup; /** Events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_menu.c b/centrallix/htmlgen/htdrv_menu.c index a400c885e..798c248b8 100644 --- a/centrallix/htmlgen/htdrv_menu.c +++ b/centrallix/htmlgen/htdrv_menu.c @@ -48,6 +48,14 @@ static struct } HTMN; +int htmenuSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.zeroLeftTop { LEFT:0px; TOP:0px; }\n"); + htrAddStylesheetItem_va(s,"\t.menuMain { POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.menuContent { POSITION:absolute; VISIBILITY: inherit; }\n"); + htrAddStylesheetItem_va(s, "\t.menuHigh { POSITION:absolute; VISIBILITY: hidden; }\n"); + return 0; + } int htmenu_internal_AddDot(pHtSession s, int mcnt, char* nptr, int is_horizontal, int row_height) @@ -285,12 +293,12 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) if (is_popup < 0) is_popup = 0; /** Write the main style header item. **/ - htrAddStylesheetItem_va(s,"\t#mn%POSmain { POSITION:absolute; VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; %[HEIGHT:%POSpx; %]%[WIDTH:%POSpx; %]Z-INDEX:%POS; }\n", id,is_popup?"hidden":"inherit", x, y, h != -1, h-2*bx, w != -1, w-2*bx, z); + htrAddStylesheetItem_va(s,"\t#mn%POSmain { VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; %[HEIGHT:%POSpx; %]%[WIDTH:%POSpx; %]Z-INDEX:%POS; }\n", id,is_popup?"hidden":"inherit", x, y, h != -1, h-2*bx, w != -1, w-2*bx, z); if (shadow_radius > 0) { htrAddStylesheetItem_va(s,"\t#mn%POSmain { box-shadow: %POSpx %POSpx %POSpx %STR&CSSVAL; }\n", id, shadow_offset, shadow_offset, shadow_radius, shadow_color); } - htrAddStylesheetItem_va(s,"\t#mn%POScontent { POSITION:absolute; VISIBILITY: inherit; LEFT:0px; TOP:0px; %[HEIGHT:%POSpx; %]%[WIDTH:%POSpx; %]Z-INDEX:%POS; }\n", id, h != -1, h-2*bx, w != -1, w-2*bx, z+1); + htrAddStylesheetItem_va(s,"\t#mn%POScontent { %[HEIGHT:%POSpx; %]%[WIDTH:%POSpx; %]Z-INDEX:%POS; }\n", id, h != -1, h-2*bx, w != -1, w-2*bx, z+1); if (s->Capabilities.CSS2) htrAddStylesheetItem_va(s,"\t#mn%POSmain { overflow:hidden; border-style: solid; border-width: 1px; border-color: white gray gray white; color:%STR; %STR }\n", id, textcolor, bgstr); @@ -299,7 +307,7 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) htrAddStylesheetItem_va(s,"\t#mn%POScontent { overflow:hidden; cursor:default; }\n", id ); /** highlight bar **/ - htrAddStylesheetItem_va(s, "\t#mn%POShigh { POSITION:absolute; VISIBILITY: hidden; LEFT:0px; TOP:0px; Z-INDEX:%POS; }\n", id, z); + htrAddStylesheetItem_va(s, "\t#mn%POShigh { Z-INDEX:%POS; }\n", id, z); if (s->Capabilities.CSS2) htrAddStylesheetItem_va(s,"\t#mn%POShigh { overflow:hidden; }\n", id ); @@ -336,26 +344,26 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) htrAddEventHandlerFunction(s, "document", "MOUSEDOWN", "mn", "mn_mousedown"); /** Beginning of code for menu **/ - htrAddBodyItem_va(s,"
", id); - if (s->Capabilities.Dom0NS) - htrAddBodyItem_va(s,"",bgstr); - htrAddBodyItem_va(s,"
\n", id, s->Capabilities.Dom0NS?"":"width=\"100%\" height=\"100%\""); + htrAddBodyItem_va(s,"
", id); + //if (s->Capabilities.Dom0NS) + // htrAddBodyItem_va(s,"",bgstr); + htrAddBodyItem_va(s,"
\n", id, s->Capabilities.Dom0NS?"":"width=\"100%\" height=\"100%\""); /** Only draw border if it is NS4 **/ - if (s->Capabilities.Dom0NS) - { - htrAddBodyItem(s,""); - if (w != -1) - htrAddBodyItem_va(s,"", w-2); - else - htrAddBodyItem(s,""); - htrAddBodyItem(s,"\n"); - if (h != -1) - htrAddBodyItem_va(s,""); +// if (w != -1) +// htrAddBodyItem_va(s,"", w-2); +// else +// htrAddBodyItem(s,""); +// htrAddBodyItem(s,"\n"); +// if (h != -1) +// htrAddBodyItem_va(s,"
", h-2); - else - htrAddBodyItem(s,"
"); - } - else +// if (s->Capabilities.Dom0NS) +// { +// htrAddBodyItem(s,"
", h-2); +// else +// htrAddBodyItem(s,"
"); +// } +// else htrAddBodyItem(s,"
"); /** Add 'meat' of menu... **/ @@ -450,27 +458,27 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) htrAddBodyItem(s,"
\n"); /** closing border for NS4 **/ - if (s->Capabilities.Dom0NS) - { - if (h != -1) - htrAddBodyItem_va(s,"\n", h-2); - else - htrAddBodyItem(s,"\n"); - htrAddBodyItem(s,""); - if (w != -1) - htrAddBodyItem_va(s,"", w-2); - else - htrAddBodyItem(s,""); - htrAddBodyItem(s,"\n"); - } - else +// if (s->Capabilities.Dom0NS) +// { +// if (h != -1) +// htrAddBodyItem_va(s,"\n", h-2); +// else +// htrAddBodyItem(s,"\n"); +// htrAddBodyItem(s,""); +// if (w != -1) +// htrAddBodyItem_va(s,"", w-2); +// else +// htrAddBodyItem(s,""); +// htrAddBodyItem(s,"\n"); +// } +// else htrAddBodyItem(s,""); /** Ending of layer **/ - if (s->Capabilities.Dom0NS) - htrAddBodyItem_va(s,"
", id); - else - htrAddBodyItem_va(s,"
\n", id); +// if (s->Capabilities.Dom0NS) +// htrAddBodyItem_va(s,"
", id); +// else + htrAddBodyItem_va(s,"
\n", id); xsDeInit(xs); nmFree(xs, sizeof(XString)); @@ -552,6 +560,7 @@ htmenuInitialize() strcpy(drv->Name,"DHTML Menu Widget Driver"); strcpy(drv->WidgetName,"menu"); drv->Render = htmenuRender; + drv->Setup = htmenuSetup; /** Register events **/ htrAddEvent(drv,"MouseUp"); diff --git a/centrallix/htmlgen/htdrv_objcanvas.c b/centrallix/htmlgen/htdrv_objcanvas.c index 6ff6078e8..7cfa06aec 100644 --- a/centrallix/htmlgen/htdrv_objcanvas.c +++ b/centrallix/htmlgen/htdrv_objcanvas.c @@ -48,6 +48,12 @@ static struct } HTOC; +int htocSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.ocBase { POSITION:absolute; VISIBILITY:inherit; }\n"); + + return 0; + } /*** htocRender - generate the HTML code for the page. ***/ @@ -106,9 +112,9 @@ htocRender(pHtSession s, pWgtrNode oc_node, int z) /** Add css item for the layer **/ if (s->Capabilities.CSS2) - htrAddStylesheetItem_va(s,"\t#oc%POSbase { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; overflow: hidden; %STR}\n",id,x,y,w,h,z,main_bg); + htrAddStylesheetItem_va(s,"\t#oc%POSbase { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; overflow: hidden; %STR}\n",id,x,y,w,h,z,main_bg); else - htrAddStylesheetItem_va(s,"\t#oc%POSbase { POSITION:absolute; VISIBILITY:inherit; LEFT:%INT; TOP:%INT; WIDTH:%POS; HEIGHT:%POS; Z-INDEX:%POS; }\n",id,x,y,w,h,z); + htrAddStylesheetItem_va(s,"\t#oc%POSbase { LEFT:%INT; TOP:%INT; WIDTH:%POS; HEIGHT:%POS; Z-INDEX:%POS; }\n",id,x,y,w,h,z); htrAddWgtrObjLinkage_va(s, oc_node, "oc%POSbase",id); @@ -128,7 +134,7 @@ htocRender(pHtSession s, pWgtrNode oc_node, int z) name, *osrc, osrc, !*osrc, allow_select, show_select, name); /** HTML body
element for the base layer. **/ - htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); if (!s->Capabilities.CSS2) htrAddBodyItem_va(s,"
 
\n",main_bg,w); @@ -158,6 +164,7 @@ htocInitialize() strcpy(drv->Name,"DHTML Pane Driver"); strcpy(drv->WidgetName,"objcanvas"); drv->Render = htocRender; + drv->Setup = htocSetup; htrAddEvent(drv,"Click"); htrAddEvent(drv,"MouseUp"); diff --git a/centrallix/htmlgen/htdrv_page.c b/centrallix/htmlgen/htdrv_page.c index a2bec722b..7eca3fe89 100755 --- a/centrallix/htmlgen/htdrv_page.c +++ b/centrallix/htmlgen/htdrv_page.c @@ -46,6 +46,12 @@ /************************************************************************/ +int htpageSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.absHid { POSITION:absolute; VISIBILITY:hidden }\n"); + htrAddStylesheetItem_va(s,"\t.setZInd { Z-INDEX:1000 }\n"); + return 0; + } int htpageRender(pHtSession s, pWgtrNode tree, int z) @@ -325,35 +331,35 @@ htpageRender(pHtSession s, pWgtrNode tree, int z) { /** Add focus box **/ htrAddStylesheetItem(s,"\ttd img { display: block; }\n"); - htrAddStylesheetItem(s,"\t#pgtop { POSITION:absolute; VISIBILITY:hidden; LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pgbtm { POSITION:absolute; VISIBILITY:hidden; LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pgrgt { POSITION:absolute; VISIBILITY:hidden; LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pglft { POSITION:absolute; VISIBILITY:hidden; LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pgtvl { POSITION:absolute; VISIBILITY:hidden; LEFT:0px;TOP:0px;WIDTH:1px;HEIGHT:1px; Z-INDEX:0; }\n"); - htrAddStylesheetItem(s,"\t#pgktop { POSITION:absolute; VISIBILITY:hidden; LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pgkbtm { POSITION:absolute; VISIBILITY:hidden; LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pgkrgt { POSITION:absolute; VISIBILITY:hidden; LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pgklft { POSITION:absolute; VISIBILITY:hidden; LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); Z-INDEX:1000; overflow:hidden;}\n"); - htrAddStylesheetItem(s,"\t#pginpt { POSITION:absolute; VISIBILITY:hidden; LEFT:0px; TOP:20px; Z-INDEX:20; }\n"); - htrAddStylesheetItem(s,"\t#pgping { POSITION:absolute; VISIBILITY:hidden; LEFT:0px; TOP:0px; WIDTH:0px; HEIGHT:0px; Z-INDEX:0;}\n"); - htrAddStylesheetItem(s,"\t#pgmsg { POSITION:absolute; VISIBILITY:hidden; LEFT:0px; TOP:0px; WIDTH:0px; HEIGHT:0px; Z-INDEX:0;}\n"); + htrAddStylesheetItem(s,"\t#pgtop { LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pgbtm { LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pgrgt { LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pglft { LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pgtvl { LEFT:0px;TOP:0px;WIDTH:1px;HEIGHT:1px; Z-INDEX:0; }\n"); + htrAddStylesheetItem(s,"\t#pgktop { LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pgkbtm { LEFT:-1000px;TOP:0px;WIDTH:1152px;HEIGHT:1px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pgkrgt { LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pgklft { LEFT:0px;TOP:-1000px;WIDTH:1px;HEIGHT:864px; clip:rect(0px,0px,0px,0px); overflow:hidden;}\n"); + htrAddStylesheetItem(s,"\t#pginpt { LEFT:0px; TOP:20px; Z-INDEX:20; }\n"); + htrAddStylesheetItem(s,"\t#pgping { LEFT:0px; TOP:0px; WIDTH:0px; HEIGHT:0px; Z-INDEX:0;}\n"); + htrAddStylesheetItem(s,"\t#pgmsg { LEFT:0px; TOP:0px; WIDTH:0px; HEIGHT:0px; Z-INDEX:0;}\n"); } else { /** Add focus box **/ htrAddStylesheetItem(s, - "\t#pgtop { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pgbtm { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pgrgt { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pglft { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pgtvl { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1;HEIGHT:1; Z-INDEX:0; }\n" - "\t#pgktop { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pgkbtm { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pgkrgt { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pgklft { POSITION:absolute; VISIBILITY:hidden; LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); Z-INDEX:1000;}\n" - "\t#pginpt { POSITION:absolute; VISIBILITY:hidden; LEFT:0; TOP:20; Z-INDEX:20; }\n" - "\t#pgping { POSITION:absolute; VISIBILITY:hidden; LEFT:0; TOP:0; Z-INDEX:0; }\n" - "\t#pgmsg { POSITION:absolute; VISIBILITY:hidden; LEFT:0; TOP:0; Z-INDEX:0; }\n"); + "\t#pgtop { LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); }\n" + "\t#pgbtm { LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); }\n" + "\t#pgrgt { LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); }\n" + "\t#pglft { LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); }\n" + "\t#pgtvl { LEFT:0;TOP:0;WIDTH:1;HEIGHT:1; Z-INDEX:0; }\n" + "\t#pgktop { LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); }\n" + "\t#pgkbtm { LEFT:0;TOP:0;WIDTH:1152;HEIGHT:1; clip:rect(1,1); }\n" + "\t#pgkrgt { LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); }\n" + "\t#pgklft { LEFT:0;TOP:0;WIDTH:1;HEIGHT:864; clip:rect(1,1); }\n" + "\t#pginpt { LEFT:0; TOP:20; Z-INDEX:20; }\n" + "\t#pgping { LEFT:0; TOP:0; Z-INDEX:0; }\n" + "\t#pgmsg { LEFT:0; TOP:0; Z-INDEX:0; }\n"); } if (show == 1) @@ -377,20 +383,19 @@ htpageRender(pHtSession s, pWgtrNode tree, int z) htrAddStylesheetItem_va(s, "\tfont { %[font-size:%POSpx; %]%[font-family:%STR&CSSVAL; %]}\n", font_size > 0, font_size, *font_name, font_name); } - - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - - htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgping",0, NULL); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + + htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgping",0, "absHid"); htrAddBodyItemLayerEnd(s,HTR_LAYER_F_DYNAMIC); - htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgmsg",0, NULL); + htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgmsg",0, "absHid"); htrAddBodyItemLayerEnd(s,HTR_LAYER_F_DYNAMIC); htrAddBodyItem(s, "\n"); @@ -466,6 +471,7 @@ htpageInitialize() strcpy(drv->Name,"HTML Page Driver"); strcpy(drv->WidgetName,"page"); drv->Render = htpageRender; + drv->Setup = htpageSetup; /** Actions **/ htrAddAction(drv, "LoadPage"); htrAddParam(drv, "LoadPage", "Source", DATA_T_STRING); diff --git a/centrallix/htmlgen/htdrv_pane.c b/centrallix/htmlgen/htdrv_pane.c index 0683cc6e6..448d10fa7 100644 --- a/centrallix/htmlgen/htdrv_pane.c +++ b/centrallix/htmlgen/htdrv_pane.c @@ -48,6 +48,11 @@ static struct } HTPN; +int htpnSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.paneMain { POSITION:absolute; VISIBILITY:inherit; overflow:hidden; }\n"); + return 0; + } /*** htpnRender - generate the HTML code for the page. ***/ @@ -156,17 +161,17 @@ htpnRender(pHtSession s, pWgtrNode tree, int z) /** Ok, write the style header items. **/ if (style == 2) /* flat */ { - htrAddStylesheetItem_va(s,"\t#pn%POSmain { POSITION:absolute; VISIBILITY:inherit; overflow:hidden; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w,h,z); + htrAddStylesheetItem_va(s,"\t#pn%POSmain { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w,h,z); htrAddStylesheetItem_va(s,"\t#pn%POSmain { border-radius: %INTpx; %STR}\n",id,border_radius,main_bg); } else if (style == 0 || style == 1) /* lowered or raised */ { - htrAddStylesheetItem_va(s,"\t#pn%POSmain { POSITION:absolute; VISIBILITY:inherit; overflow: hidden; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,h-2*box_offset,z); + htrAddStylesheetItem_va(s,"\t#pn%POSmain { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,h-2*box_offset,z); htrAddStylesheetItem_va(s,"\t#pn%POSmain { border-style: solid; border-width: 1px; border-color: %STR %STR %STR %STR; border-radius: %INTpx; %STR}\n",id,c1,c2,c2,c1,border_radius,main_bg); } else if (style == 3) /* bordered */ { - htrAddStylesheetItem_va(s,"\t#pn%POSmain { POSITION:absolute; VISIBILITY:inherit; overflow: hidden; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,h-2*box_offset,z); + htrAddStylesheetItem_va(s,"\t#pn%POSmain { LEFTT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,h-2*box_offset,z); htrAddStylesheetItem_va(s,"\t#pn%POSmain { border-style: solid; border-width: 1px; border-color:%STR&CSSVAL; border-radius: %INTpx; %STR}\n",id,bdr,border_radius,main_bg); } if (shadow_radius > 0) @@ -194,7 +199,7 @@ htpnRender(pHtSession s, pWgtrNode tree, int z) /** HTML body
element for the base layer. **/ //htrAddBodyItem_va(s,"
\n",id, w-2, h-2); - htrAddBodyItem_va(s,"
\n",id, w-2, h-2); + htrAddBodyItem_va(s,"
\n",id, w-2, h-2); /** Check for objects within the pane. **/ htrRenderSubwidgets(s, tree, z+2); @@ -221,6 +226,7 @@ htpnInitialize() strcpy(drv->Name,"DHTML Pane Driver"); strcpy(drv->WidgetName,"pane"); drv->Render = htpnRender; + drv->Setup = htpnSetup; htrAddEvent(drv,"Click"); htrAddEvent(drv,"MouseUp"); diff --git a/centrallix/htmlgen/htdrv_radiobutton.c b/centrallix/htmlgen/htdrv_radiobutton.c index c1d395c06..c1bf61bda 100644 --- a/centrallix/htmlgen/htdrv_radiobutton.c +++ b/centrallix/htmlgen/htdrv_radiobutton.c @@ -47,6 +47,13 @@ static struct { int idcnt; } HTRB; +int htrbSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.posAbs\t{ POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.visInh\t{ VISIBILITY:inherit; }\n"); + htrAddStylesheetItem_va(s,"\t.visHid\t{ VISIBILITY:hidden; }\n"); + return 0; + } /** htrbRender - generate the HTML code for the page. **/ int htrbRender(pHtSession s, pWgtrNode tree, int z) { @@ -141,13 +148,13 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { top_offset = s->ClientInfo->ParagraphHeight*3/4+1; cover_height = h-(top_offset+3+2); cover_width = w-(2*3 +2); - htrAddStylesheetItem_va(s,"\t#rb%POSparent { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", + htrAddStylesheetItem_va(s,"\t#rb%POSparent { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", id,x,y,w,h,z,w,h); - htrAddStylesheetItem_va(s,"\t#rb%POSborder { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", + htrAddStylesheetItem_va(s,"\t#rb%POSborder { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", id,3,top_offset,w-(2*3),h-(top_offset+3),z+1,w-(2*3),h-(top_offset+3)); - htrAddStylesheetItem_va(s,"\t#rb%POScover { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", + htrAddStylesheetItem_va(s,"\t#rb%POScover { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", id,1,1,cover_width,cover_height,z+2,cover_width,cover_height); - htrAddStylesheetItem_va(s,"\t#rb%POStitle { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n", + htrAddStylesheetItem_va(s,"\t#rb%POStitle { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n", id,10,1,w/2,s->ClientInfo->ParagraphHeight,z+3); htrAddScriptGlobal(s, "radiobutton", "null", 0); @@ -186,7 +193,7 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { wgtrGetPropertyValue(radiobutton_obj,"outer_type",DATA_T_STRING,POD(&ptr)); if (!strcmp(ptr,"widget/radiobutton")) { - htrAddStylesheetItem_va(s,"\t#rb%POSoption%POS { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px, %POSpx, %POSpx, 0px); }\n", + htrAddStylesheetItem_va(s,"\t#rb%POSoption%POS { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px, %POSpx, %POSpx, 0px); }\n", id,i,7,cover_margin+((i-1)*item_spacing)+3,cover_width-7,item_spacing,z+2,cover_width-7,item_spacing); i++; } @@ -253,9 +260,9 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { /* Do the HTML layers */ - htrAddBodyItem_va(s,"
\n", id); - htrAddBodyItem_va(s,"
\n", id); - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); /* Loop through each radio button and do the option pane and sub layers */ i = 1; @@ -266,23 +273,19 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { if (!strcmp(ptr,"widget/radiobutton")) { /** CSS layers **/ - htrAddStylesheetItem_va(s,"\t#rb%POSbuttonset%POS { POSITION:absolute; VISIBILITY:hidden; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n", - id,i,5,2+(s->ClientInfo->ParagraphHeight-12)/2,12,12,z+2,12,12); - htrAddStylesheetItem_va(s,"\t#rb%POSbuttonunset%POS { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n", - id,i,5,2+(s->ClientInfo->ParagraphHeight-12)/2,12,12,z+2,12,12); - htrAddStylesheetItem_va(s,"\t#rb%POSvalue%POS { POSITION:absolute; VISIBILITY:hidden; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n", - id,i,5,5,12,12,z+2,12,12); - htrAddStylesheetItem_va(s,"\t#rb%POSlabel%POS { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n", - id,i,27,2,cover_width-(27+1),item_spacing-1,z+2,cover_width-(27+1),item_spacing-1); + htrAddStylesheetItem_va(s,"\t#rb%POSbuttonset%POS\t{ LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n",id,i,5,2+(s->ClientInfo->ParagraphHeight-12)/2,12,12,z+2,12,12); + htrAddStylesheetItem_va(s,"\t#rb%POSbuttonunset%POS { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n",id,i,5,2+(s->ClientInfo->ParagraphHeight-12)/2,12,12,z+2,12,12); + htrAddStylesheetItem_va(s,"\t#rb%POSvalue%POS\t{ LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); }\n",id,i,5,5,12,12,z+2,12,12); + htrAddStylesheetItem_va(s,"\t#rb%POSlabel%POS\t{ LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n",id,i,27,2,cover_width-(27+1),item_spacing-1,z+2,cover_width-(27+1),item_spacing-1); /** Body layers **/ - htrAddBodyItem_va(s,"
\n", id, i); - htrAddBodyItem_va(s,"
\n", id, i); - htrAddBodyItem_va(s,"
\n", id, i); + htrAddBodyItem_va(s,"
\n", id, i); + htrAddBodyItem_va(s,"
\n", id, i); + htrAddBodyItem_va(s,"
\n", id, i); wgtrGetPropertyValue(radiobutton_obj,"label",DATA_T_STRING,POD(&ptr)); strtcpy(sbuf2,ptr,sizeof(sbuf2)); - htrAddBodyItem_va(s,"
%STR&HTE
\n", + htrAddBodyItem_va(s,"
%STR&HTE
\n", id, i, textcolor, sbuf2); /* use label (from above) as default value if no value given */ @@ -291,7 +294,7 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { strtcpy(sbuf2,ptr,sizeof(sbuf2)); } - htrAddBodyItem_va(s," \n", + htrAddBodyItem_va(s," \n", id, i, sbuf2); htrAddBodyItem(s, "
\n"); i++; @@ -300,7 +303,7 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { htrAddBodyItem(s, "
\n"); htrAddBodyItem(s, "
\n"); - htrAddBodyItem_va(s,"
%STR&HTE
\n", id, textcolor, title); + htrAddBodyItem_va(s,"
%STR&HTE
\n", id, textcolor, title); htrAddBodyItem(s, "
\n"); return 0; @@ -319,6 +322,7 @@ int htrbInitialize() { strcpy(drv->Name,"DHTML RadioButton Driver"); strcpy(drv->WidgetName,"radiobuttonpanel"); drv->Render = htrbRender; + drv->Setup = htrbSetup; /** Events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_scrollbar.c b/centrallix/htmlgen/htdrv_scrollbar.c index e9b5b65e4..828b5d52c 100644 --- a/centrallix/htmlgen/htdrv_scrollbar.c +++ b/centrallix/htmlgen/htdrv_scrollbar.c @@ -49,6 +49,12 @@ static struct } HTSB; +int htsbSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.posAbs { POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.thum { VISIBILITY:inherit; WIDTH:18px; }\n"); + return 0; + } /*** htsbRender - generate the HTML code for the page. ***/ @@ -163,11 +169,11 @@ htsbRender(pHtSession s, pWgtrNode tree, int z) } /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#sb%POSpane { POSITION:absolute; VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; clip:rect(0px,%POSpx,%POSpx,0px); Z-INDEX:%POS; }\n",id,visible?"inherit":"hidden",x,y,w,h,w,h, z); + htrAddStylesheetItem_va(s,"\t#sb%POSpane { VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; clip:rect(0px,%POSpx,%POSpx,0px); Z-INDEX:%POS; }\n",id,visible?"inherit":"hidden",x,y,w,h,w,h, z); if (is_horizontal) - htrAddStylesheetItem_va(s,"\t#sb%POSthum { POSITION:absolute; VISIBILITY:inherit; LEFT:18px; TOP:0px; WIDTH:18px; Z-INDEX:%POS; }\n",id,z+1); + htrAddStylesheetItem_va(s,"\t#sb%POSthum { LEFT:18px; TOP:0px; Z-INDEX:%POS; }\n",id,z+1); else - htrAddStylesheetItem_va(s,"\t#sb%POSthum { POSITION:absolute; VISIBILITY:inherit; LEFT:0px; TOP:18px; WIDTH:18px; Z-INDEX:%POS; }\n",id,z+1); + htrAddStylesheetItem_va(s,"\t#sb%POSthum { LEFT:0px; TOP:18px; Z-INDEX:%POS; }\n",id,z+1); /** Write globals for internal use **/ htrAddScriptGlobal(s, "sb_target_img", "null", 0); @@ -189,7 +195,7 @@ htsbRender(pHtSession s, pWgtrNode tree, int z) htrAddScriptInit_va(s," sb_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), tname:\"sb%POSthum\", isHorizontal:%INT, range:%INT});\n", name, id, is_horizontal, r); /** HTML body
elements for the layers. **/ - htrAddBodyItem_va(s,"
", id, *bcolor, bcolor, *bimage, bimage, w); + htrAddBodyItem_va(s,"
", id, *bcolor, bcolor, *bimage, bimage, w); if (is_horizontal) { htrAddBodyItem(s, "
"); @@ -202,7 +208,7 @@ htsbRender(pHtSession s, pWgtrNode tree, int z) htrAddBodyItem_va(s,"",h-36); htrAddBodyItem(s, "
\n"); } - htrAddBodyItem_va(s,"
",id); + htrAddBodyItem_va(s,"
",id); /** Add the event handling scripts **/ @@ -237,6 +243,7 @@ htsbInitialize() strcpy(drv->Name,"DHTML Scrollbar Widget Driver"); strcpy(drv->WidgetName,"scrollbar"); drv->Render = htsbRender; + drv->Setup = htsbSetup; /** Events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_scrollpane.c b/centrallix/htmlgen/htdrv_scrollpane.c index db1a6ec40..f4be33538 100644 --- a/centrallix/htmlgen/htdrv_scrollpane.c +++ b/centrallix/htmlgen/htdrv_scrollpane.c @@ -50,6 +50,13 @@ static struct } HTSPANE; +int htspaneSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.spThum { POSITION:absolute; VISIBILITY:inherit; TOP:18px; WIDTH:18px; }\n"); + htrAddStylesheetItem_va(s,"\t.spArea { POSITION:absolute; VISIBILITY:inherit; LEFT:0px; TOP:0px; }\n"); + htrAddStylesheetItem_va(s,"\t.spPane { POSITION:absolute; }\n"); + return 0; + } /*** htspaneRender - generate the HTML code for the page. ***/ @@ -115,14 +122,6 @@ htspaneRender(pHtSession s, pWgtrNode tree, int z) if (!strcmp(ptr,"false")) visible = 0; } - /** Ok, write the style header items. **/ - if (s->Capabilities.Dom0NS) - { - htrAddStylesheetItem_va(s,"\t#sp%POSpane { POSITION:absolute; VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; clip:rect(0px,%POSpx,%POSpx,0px); Z-INDEX:%POS; }\n",id,visible?"inherit":"hidden",x,y,w,h,w,h, z); - htrAddStylesheetItem_va(s,"\t#sp%POSarea { POSITION:absolute; VISIBILITY:inherit; LEFT:0px; TOP:0px; WIDTH:%POSpx; Z-INDEX:%POS; }\n",id,w-18,z+1); - htrAddStylesheetItem_va(s,"\t#sp%POSthum { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:18px; WIDTH:18px; Z-INDEX:%POS; }\n",id,w-18,z+1); - } - /** Write globals for internal use **/ htrAddScriptGlobal(s, "sp_target_img", "null", 0); htrAddScriptGlobal(s, "sp_click_x","0",0); @@ -142,31 +141,20 @@ htspaneRender(pHtSession s, pWgtrNode tree, int z) htrAddScriptInit_va(s," sp_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), aname:\"sp%POSarea\", tname:\"sp%POSthum\"});\n", name,id,id); /** HTML body
elements for the layers. **/ - if(s->Capabilities.Dom0NS) - { - htrAddBodyItem_va(s,"
", id, *bcolor, bcolor, *bimage, bimage, w); - htrAddBodyItem(s, "
"); - htrAddBodyItem_va(s,"",h-36); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem_va(s,"
\n
",id,id,w-2,h-2); - } - else if(s->Capabilities.Dom1HTML) + if(s->Capabilities.Dom1HTML) { - //htrAddStylesheetItem_va(s,"\t#sp%dpane { POSITION:absolute; VISIBILITY:%s; LEFT:%dpx; TOP:%dpx; WIDTH:%dpx; HEIGHT:%dpx; clip:rect(0px,%dpx,%dpx,0px); Z-INDEX:%d; }\n",id,visible?"inherit":"hidden",x,y,w,h,w,h, z); - //htrAddStylesheetItem_va(s,"\t#sp%darea { HEIGHT: %dpx; WIDTH:%dpx; }\n",id, h, w-18); - //htrAddStylesheetItem_va(s,"\t#sp%dthum { POSITION:absolute; VISIBILITY:inherit; LEFT:%dpx; TOP:18px; WIDTH:18px; Z-INDEX:%dpx; }\n",id,w-18,z+1); - htrAddBodyItem_va(s,"
\n",id,visible?"inherit":"hidden",x,y,w,h,w,h,z); + htrAddBodyItem_va(s,"
\n",id,visible?"inherit":"hidden",x,y,w,h,w,h,z); htrAddBodyItem_va(s,"", id); htrAddBodyItem_va(s,"", id); htrAddBodyItem_va(s,"", id); - htrAddStylesheetItem_va(s,"\t#sp%POSup { POSITION: absolute; LEFT: %INTpx; TOP: 0px; }\n",id, w-18); - htrAddStylesheetItem_va(s,"\t#sp%POSbar { POSITION: absolute; LEFT: %INTpx; TOP: 18px; WIDTH: 18px; HEIGHT: %POSpx;}\n",id, w-18, h-36); - htrAddStylesheetItem_va(s,"\t#sp%POSdown { POSITION: absolute; LEFT: %INTpx; TOP: %INTpx; }\n",id, w-18, h-18); - htrAddBodyItem_va(s,"
\n", id,w-18,z+1); - htrAddBodyItem_va(s,"
",id,h,w-18,z+1); + htrAddStylesheetItem_va(s,"\t#sp%POSup { POSITION:absolute; LEFT: %INTpx; TOP: 0px; }\n",id, w-18); + htrAddStylesheetItem_va(s,"\t#sp%POSbar { POSITION:absolute; LEFT: %INTpx; TOP: 18px; WIDTH: 18px; HEIGHT: %POSpx;}\n",id, w-18, h-36); + htrAddStylesheetItem_va(s,"\t#sp%POSdown { POSITION:absolute; LEFT: %INTpx; TOP: %INTpx; }\n",id, w-18, h-18); + htrAddBodyItem_va(s,"
\n", id,w-18,z+1); + htrAddBodyItem_va(s,"
",id,h,w-18,z+1); } else - { + { mssError(1,"HTSPNE","Browser not supported"); } @@ -181,11 +169,7 @@ htspaneRender(pHtSession s, pWgtrNode tree, int z) htrRenderWidget(s, xaGetItem(&(tree->Children), i), z+2); /** Finish off the last
**/ - if(s->Capabilities.Dom0NS) - { - htrAddBodyItem(s,"
\n"); - } - else if(s->Capabilities.Dom1HTML) + if(s->Capabilities.Dom1HTML) { htrAddBodyItem(s,"
\n"); } @@ -213,6 +197,7 @@ htspaneInitialize() strcpy(drv->Name,"HTML ScrollPane Widget Driver"); strcpy(drv->WidgetName,"scrollpane"); drv->Render = htspaneRender; + drv->Setup = htspaneSetup; /** Events **/ htrAddEvent(drv,"Click"); diff --git a/centrallix/htmlgen/htdrv_spinner.c b/centrallix/htmlgen/htdrv_spinner.c index 7252b86a5..df2f0cba3 100644 --- a/centrallix/htmlgen/htdrv_spinner.c +++ b/centrallix/htmlgen/htdrv_spinner.c @@ -51,6 +51,12 @@ static struct } HTSPNR; +int htspnrSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.posAbsVisInh{ POSITION:absolute; VISIBILITY:inherit; }\n"); + htrAddStylesheetItem_va(s,"\t.posAbsVisHid{ POSITION:absolute; VISIBILITY:hidden; }\n"); + return 0; + } /*** htspnrRender - generate the HTML code for the spinner widget. ***/ @@ -114,12 +120,12 @@ htspnrRender(pHtSession s, pWgtrNode tree, int z) } /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#spnr%POSmain { POSITION:absolute; VISIBILITY:inherit; LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,x,y,w,z); - htrAddStylesheetItem_va(s,"\t#spnr%POSbase { POSITION:absolute; VISIBILITY:inherit; LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,1,1,w-12,z); - htrAddStylesheetItem_va(s,"\t#spnr%POScon1 { POSITION:absolute; VISIBILITY:inherit; LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,1,1,w-2-12,z+1); - htrAddStylesheetItem_va(s,"\t#spnr%POScon2 { POSITION:absolute; VISIBILITY:hidden; LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,1,1,w-2-12,z+1); - htrAddStylesheetItem_va(s,"\t#spnr_button_up { POSITION:absolute; VISIBILITY:inherit; LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",1+w-12,1,w,z); - htrAddStylesheetItem_va(s,"\t#spnr_button_down { POSITION:absolute; VISIBILITY:inherit; LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",1+w-12,1+9,w,z); + htrAddStylesheetItem_va(s,"\t#spnr%POSmain { LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,x,y,w,z); + htrAddStylesheetItem_va(s,"\t#spnr%POSbase { LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,1,1,w-12,z); + htrAddStylesheetItem_va(s,"\t#spnr%POScon1 { LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,1,1,w-2-12,z+1); + htrAddStylesheetItem_va(s,"\t#spnr%POScon2 { LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",id,1,1,w-2-12,z+1); + htrAddStylesheetItem_va(s,"\t#spnr_button_up { LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",1+w-12,1,w,z); + htrAddStylesheetItem_va(s,"\t#spnr_button_down { LEFT:%INT; TOP:%INT; WIDTH:%POS; Z-INDEX:%POS; }\n",1+w-12,1+9,w,z); /** DOM Linkage **/ htrAddWgtrObjLinkage_va(s, tree, "spnr%POSmain",id); @@ -143,8 +149,8 @@ htspnrRender(pHtSession s, pWgtrNode tree, int z) id, id); /** HTML body
element for the base layer. **/ - htrAddBodyItem_va(s, "
\n",id); - htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); htrAddBodyItem_va(s, " \n",w-12,main_bg); htrAddBodyItem_va(s, " \n",c1); htrAddBodyItem_va(s, " \n",c1,w-2-12); @@ -155,12 +161,12 @@ htspnrRender(pHtSession s, pWgtrNode tree, int z) htrAddBodyItem_va(s, " \n",c2); htrAddBodyItem_va(s, " \n",c2,w-2-12); htrAddBodyItem_va(s, " \n
\n\n",c2); - htrAddBodyItem_va(s, "
\n",id); - htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); htrAddBodyItem(s, "
\n"); /*Add the spinner buttons*/ - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); htrAddBodyItem(s, "
\n"); return 0; @@ -182,6 +188,7 @@ htspnrInitialize() strcpy(drv->Name,"DHTML Spinner Box Driver"); strcpy(drv->WidgetName,"spinner"); drv->Render = htspnrRender; + drv->Setup = htspnrSetup; /** Add a 'set value' action **/ diff --git a/centrallix/htmlgen/htdrv_tab.c b/centrallix/htmlgen/htdrv_tab.c index 9b029bf6e..1b7da462b 100644 --- a/centrallix/htmlgen/htdrv_tab.c +++ b/centrallix/htmlgen/htdrv_tab.c @@ -49,6 +49,12 @@ static struct } HTTAB; +int httabSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.tcBase { background-position: 0px -24px; }\n"); + htrAddStylesheetItem_va(s, "\t.tcTab { position:absolute; visibility:inherit; overflow:hidden; cursor:default; font-weight:bold; }\n"); + return 0; + } enum httab_locations { Top=0, Bottom=1, Left=2, Right=3, None=4 }; @@ -229,7 +235,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) } /** Ok, write the style header items. **/ - htrAddStylesheetItem_va(s,"\t#tc%POSbase { background-position: 0px -24px; %STR }\n", id, main_bg); + htrAddStylesheetItem_va(s,"\t#tc%POSbase { %STR }\n", id, main_bg); /** DOM Linkages **/ htrAddWgtrObjLinkage_va(s, tree, "tc%POSbase",id); @@ -271,7 +277,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) if (wgtrGetPropertyValue(tabpage_obj,"title",DATA_T_STRING,POD(&tabname)) != 0) wgtrGetPropertyValue(tabpage_obj,"name",DATA_T_STRING,POD(&tabname)); - htrAddStylesheetItem_va(s, "\t#tc%POStab%POS { position:absolute; visibility:inherit; left:%INTpx; top:%INTpx; %[width:%POSpx; %]overflow:hidden; z-index:%POS; cursor:default; border-radius:%POSpx %POSpx %POSpx %POSpx; border-style:%STR&CSSVAL; border-width: %POSpx %POSpx %POSpx %POSpx; border-color: %STR&CSSVAL; box-shadow:%DBLpx %DBLpx %POSpx %STR&CSSVAL; text-align:%STR&CSSVAL; color:%STR&CSSVAL; font-weight:bold; %STR }\n", + htrAddStylesheetItem_va(s, "\t#tc%POStab%POS { left:%INTpx; top:%INTpx; %[width:%POSpx; %] z-index:%POS; border-radius:%POSpx %POSpx %POSpx %POSpx; border-style:%STR&CSSVAL; border-width: %POSpx %POSpx %POSpx %POSpx; border-color: %STR&CSSVAL; box-shadow:%DBLpx %DBLpx %POSpx %STR&CSSVAL; text-align:%STR&CSSVAL; color:%STR&CSSVAL; %STR }\n", id, i+1, x+xtoffset, y+ytoffset, tab_width>0, tab_width, @@ -286,7 +292,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) tab_txt, bg ); - htrAddBodyItem_va(s, "

%[ %STR&HTE %]%[ %STR&HTE %]

\n", + htrAddBodyItem_va(s, "

%[ %STR&HTE %]%[ %STR&HTE %]

\n", id, i+1, tloc == Right, tabname, is_selected?2:3, @@ -296,7 +302,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) } /** h-2 and w-2 because w3c dom borders add to actual width **/ - htrAddBodyItem_va(s,"
\n", + htrAddBodyItem_va(s,"
\n", id, h-border_width*2, w-border_width*2, x+xoffset, y+yoffset, z+1, border_style, border_color, (tloc==Top || tloc==Left)?0:border_radius, (tloc==Right)?0:border_radius, border_radius, (tloc==Bottom)?0:border_radius, @@ -343,7 +349,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) htrAddWgtrCtrLinkage_va(s, tabpage_obj, "htr_subel(_parentobj, \"tc%POSpane%POS\")", id, i+1); /** Add DIV section for the tabpage. **/ - htrAddBodyItem_va(s,"
\n", + htrAddBodyItem_va(s,"
\n", id,i+1,is_selected?"inherit":"hidden",w-2,z+2); /** Now look for sub-items within the tabpage. **/ @@ -393,6 +399,7 @@ httabInitialize() strcpy(drv->Name,"DHTML Tab Control Driver"); strcpy(drv->WidgetName,"tab"); drv->Render = httabRender; + drv->Setup = httabSetup; /*xaAddItem(&(drv->PseudoTypes), "tabpage");*/ /** Register. **/ diff --git a/centrallix/htmlgen/htdrv_table.c b/centrallix/htmlgen/htdrv_table.c index 3cab1f9d1..07ef6870e 100644 --- a/centrallix/htmlgen/htdrv_table.c +++ b/centrallix/htmlgen/htdrv_table.c @@ -68,6 +68,14 @@ static struct } HTTBL; +int httblSetup(pHtSession s) + { + htrAddStylesheetItem_va(s,"\t.posAbs { POSITION:absolute }\n"); + htrAddStylesheetItem_va(s,"\t.tbldPane { VISIBILITY:inherit; } \n"); + htrAddStylesheetItem_va(s,"\t.tbldScroll { WIDTH:18px; }\n"); + htrAddStylesheetItem_va(s,"\t.tbldBox { VISIBILITY:inherit; LEFT:0px; TOP:18px; WIDTH:16px; HEIGHT:16px; BORDER: solid 1px; BORDER-COLOR: white gray gray white; }\n"); + return 0; + } typedef struct { @@ -161,9 +169,9 @@ httblRenderDynamic(pHtSession s, pWgtrNode tree, int z, httbl_struct* t) } /** STYLE for the layer **/ - htrAddStylesheetItem_va(s,"\t#tbld%POSpane { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; } \n",t->id,t->x,t->y,(t->overlap_scrollbar)?(t->w):(t->w-18),z+0); - htrAddStylesheetItem_va(s,"\t#tbld%POSscroll { POSITION:absolute; VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; WIDTH:18px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",t->id,(t->hide_scrollbar || t->demand_scrollbar)?"hidden":"inherit",t->x+t->w-18,t->y+first_offset,t->h-first_offset,z+0); - htrAddStylesheetItem_va(s,"\t#tbld%POSbox { POSITION:absolute; VISIBILITY:inherit; LEFT:0px; TOP:18px; WIDTH:16px; HEIGHT:16px; Z-INDEX:%POS; BORDER: solid 1px; BORDER-COLOR: white gray gray white; }\n",t->id,z+1); + htrAddStylesheetItem_va(s,"\t#tbld%POSpane { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; Z-INDEX:%POS; } \n",t->id,t->x,t->y,(t->overlap_scrollbar)?(t->w):(t->w-18),z+0); + htrAddStylesheetItem_va(s,"\t#tbld%POSscroll { VISIBILITY:%STR; LEFT:%INTpx; TOP:%INTpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",t->id,(t->hide_scrollbar || t->demand_scrollbar)?"hidden":"inherit",t->x+t->w-18,t->y+first_offset,t->h-first_offset,z+0); + htrAddStylesheetItem_va(s,"\t#tbld%POSbox { Z-INDEX:%POS; }\n",t->id,z+1); htrAddScriptGlobal(s,"tbld_current","null",0); htrAddScriptGlobal(s,"tbldb_current","null",0); @@ -214,7 +222,7 @@ httblRenderDynamic(pHtSession s, pWgtrNode tree, int z, httbl_struct* t) htrAddScriptInit(s,"null]});\n"); - htrAddBodyItem_va(s,"
\n",t->id); + htrAddBodyItem_va(s,"
\n",t->id); detailcnt = wgtrGetMatchingChildList(tree, "widget/table-row-detail", children, sizeof(children)/sizeof(pWgtrNode)); //for (i=0;iChildren));i++) @@ -251,14 +259,14 @@ httblRenderDynamic(pHtSession s, pWgtrNode tree, int z, httbl_struct* t) htrAddBodyItem(s,"
\n"); /** HTML body
element for the scrollbar layer. **/ - htrAddBodyItem_va(s,"
\n",t->id); + htrAddBodyItem_va(s,"
\n",t->id); htrAddBodyItem(s,"\n"); htrAddBodyItem(s,"\n"); htrAddBodyItem_va(s,"\n", t->id, t->h-2*18-first_offset); htrAddBodyItem(s,"\n"); htrAddBodyItem(s,"
\n"); /*htrAddBodyItem_va(s,"
\n",t->id);*/ - htrAddBodyItem_va(s,"
\n",t->id); + htrAddBodyItem_va(s,"
\n",t->id); htrAddBodyItem(s,"
\n"); htrAddEventHandlerFunction(s,"document","MOUSEOVER","tbld","tbld_mouseover"); @@ -501,6 +509,7 @@ httblInitialize() strcpy(drv->Name,"DHTML DataTable Driver"); strcpy(drv->WidgetName,"table"); drv->Render = httblRender; + drv->Setup = httblSetup; xaAddItem(&(drv->PseudoTypes), "table-column"); xaAddItem(&(drv->PseudoTypes), "table-row-detail"); diff --git a/centrallix/htmlgen/htdrv_textbutton.c b/centrallix/htmlgen/htdrv_textbutton.c index 34575df52..2b3d36618 100644 --- a/centrallix/htmlgen/htdrv_textbutton.c +++ b/centrallix/htmlgen/htdrv_textbutton.c @@ -50,7 +50,6 @@ static struct } HTTBTN; - /*** httbtnRender - generate the HTML code for the page. ***/ int @@ -206,11 +205,11 @@ httbtnRender(pHtSession s, pWgtrNode tree, int z) htrAddScriptInclude(s, "/sys/js/ht_utils_layers.js", 0); /** Initial CSS styles **/ - htrAddStylesheetItem_va(s,"\t#tb%POSpane { POSITION:absolute; VISIBILITY:inherit; LEFT:%INTpx; TOP:%INTpx; %[HEIGHT:%POSpx; %]WIDTH:%POSpx; Z-INDEX:%POS; OVERFLOW:hidden; display:table; }\n", + htrAddStylesheetItem_va(s,"\t#tb%POSpane { POSITION:absolute; VISIBILITY:inherit; OVERFLOW:hidden; display:table; LEFT:%INTpx; TOP:%INTpx; %[HEIGHT:%POSpx; %]WIDTH:%POSpx; Z-INDEX:%POS; }\n", id, x, y, h>=0, h-1-2*box_offset, w-1-2*box_offset, z ); - htrAddStylesheetItem_va(s, "\t#tb%POSpane .cell { height:100%%; width:100%%; vertical-align:middle; display:table-cell; padding:1px; font-weight:bold; cursor:default; text-align:%STR; border-width:1px; border-style:%STR&CSSVAL; border-color:%STR&CSSVAL; border-radius:%INTpx; color:%STR&CSSVAL; %[text-shadow:1px 1px %STR&CSSVAL; %]%STR }\n", + htrAddStylesheetItem_va(s, "\t#tb%POSpane .cell { height:100%%; width:100%%; vertical-align:middle; display:table-cell; padding:1px; font-weight:bold; cursor:default; border-width:1px; text-align:%STR; border-style:%STR&CSSVAL; border-color:%STR&CSSVAL; border-radius:%INTpx; color:%STR&CSSVAL; %[text-shadow:1px 1px %STR&CSSVAL; %]%STR }\n", /* clipping no longer needed: 0, w-1-2*box_offset+2*clip_offset, h-1-2*box_offset+2*clip_offset, 0, */ id, h_align, From 26ef7633d916a8977e60fcd020c2db411c767a49 Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Fri, 8 Jul 2022 13:06:15 -0600 Subject: [PATCH 4/9] Removed unneccessary file --- centrallix/htmlgen/Setup | 198 --------------------------------------- 1 file changed, 198 deletions(-) delete mode 100644 centrallix/htmlgen/Setup diff --git a/centrallix/htmlgen/Setup b/centrallix/htmlgen/Setup deleted file mode 100644 index 97ce951a0..000000000 --- a/centrallix/htmlgen/Setup +++ /dev/null @@ -1,198 +0,0 @@ -htdrv_alerter.c: strcpy(drv->Name,"DHTML Alert Widget"); -htdrv_alerter.c: strcpy(drv->WidgetName,"alerter"); -htdrv_alerter.c: drv->Render = htalrtRender; -htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver"); -htdrv_autolayout.c: strcpy(drv->WidgetName,"autolayout"); -htdrv_autolayout.c: drv->Render = htalRender; -htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver - VBox"); -htdrv_autolayout.c: strcpy(drv->WidgetName,"vbox"); -htdrv_autolayout.c: drv->Render = htalRender; -htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver - HBox"); -htdrv_autolayout.c: strcpy(drv->WidgetName,"hbox"); -htdrv_autolayout.c: drv->Render = htalRender; -htdrv_autolayout.c: strcpy(drv->Name,"DHTML Autolayout Driver - Spacer"); -htdrv_autolayout.c: strcpy(drv->WidgetName,"autolayoutspacer"); -htdrv_autolayout.c: drv->Render = htalRenderSpacer; -htdrv_button.c: strcpy(drv->Name,"HTML Button Widget Driver"); -htdrv_button.c: strcpy(drv->WidgetName,"button"); -htdrv_button.c: drv->Render = htbtnRender; -htdrv_calendar.c: strcpy(drv->Name,"DHTML Calendar View Driver"); -htdrv_calendar.c: strcpy(drv->WidgetName,"calendar"); -htdrv_calendar.c: drv->Render = htcaRender; -htdrv_chart.c: strcpy(drv->Name, "DHTML Chart Driver"); -htdrv_chart.c: strcpy(drv->WidgetName, "chart"); -htdrv_chart.c: drv->Render = htchtRender; -htdrv_chart.c: xaAddItem(&(drv->PseudoTypes), "chart-axis"); -htdrv_chart.c: xaAddItem(&(drv->PseudoTypes), "chart-series"); -htdrv_checkbox.c: strcpy(drv->Name,"DHTML Checkbox Driver"); -htdrv_checkbox.c: strcpy(drv->WidgetName,"checkbox"); -htdrv_checkbox.c: drv->Render = htcbRender; -htdrv_clock.c: strcpy(drv->Name,"DHTML Local Time Clock Driver"); -htdrv_clock.c: strcpy(drv->WidgetName,"clock"); -htdrv_clock.c: drv->Render = htclRender; -htdrv_component.c: strcpy(drv->Name,"DHTML Component Instance Driver"); -htdrv_component.c: strcpy(drv->WidgetName,"component"); -htdrv_component.c: drv->Render = htcmpRender; -htdrv_componentdecl.c: strcpy(drv->Name,"DHTML Component Declaration Driver"); -htdrv_componentdecl.c: strcpy(drv->WidgetName,"component-decl"); -htdrv_componentdecl.c: drv->Render = htcmpdRender; -htdrv_connector.c: strcpy(drv->Name,"Event-Action Connector Driver"); -htdrv_connector.c: strcpy(drv->WidgetName,"connector"); -htdrv_connector.c: drv->Render = htconnRender; -htdrv_datetime.c: strcpy(drv->Name,"HTML Date/Time Widget Driver"); -htdrv_datetime.c: strcpy(drv->WidgetName,"datetime"); -htdrv_datetime.c: drv->Render = htdtRender; -htdrv_dropdown.c: strcpy(drv->Name,"DHTML Drop Down Widget Driver"); -htdrv_dropdown.c: strcpy(drv->WidgetName,"dropdown"); -htdrv_dropdown.c: drv->Render = htddRender; -htdrv_dropdown.c: xaAddItem(&(drv->PseudoTypes), "dropdownitem"); -htdrv_editbox.c: strcpy(drv->Name,"DHTML Single-line Editbox Driver"); -htdrv_editbox.c: strcpy(drv->WidgetName,"editbox"); -htdrv_editbox.c: drv->Render = htebRender; -htdrv_execmethod.c: strcpy(drv->Name,"DHTML Method-Execution Widget"); -htdrv_execmethod.c: strcpy(drv->WidgetName,"execmethod"); -htdrv_execmethod.c: drv->Render = htexRender; -htdrv_fileupload.c: strcpy(drv->Name,"DHTML File Upload Driver"); -htdrv_fileupload.c: strcpy(drv->WidgetName,"fileupload"); -htdrv_fileupload.c: drv->Render = htfuRender; -htdrv_formbar.c: strcpy(drv->Name,"DHTML Form Bar Driver"); -htdrv_formbar.c: strcpy(drv->WidgetName,"formbar"); -htdrv_formbar.c: drv->Render = htfbRender; -htdrv_form.c: strcpy(drv->Name,"DHTML Form Widget"); -htdrv_form.c: strcpy(drv->WidgetName,"form"); -htdrv_form.c: drv->Render = htformRender; -htdrv_formstatus.c: strcpy(drv->Name,"DHTML Form Status Driver"); -htdrv_formstatus.c: strcpy(drv->WidgetName,"formstatus"); -htdrv_formstatus.c: drv->Render = htfsRender; -htdrv_frameset.c: strcpy(drv->Name,"HTML Frameset Driver"); -htdrv_frameset.c: strcpy(drv->WidgetName,"frameset"); -htdrv_frameset.c: drv->Render = htsetRender; -htdrv_hints.c: strcpy(drv->Name,"Presentation Hints pseudo-widget Driver"); -htdrv_hints.c: strcpy(drv->WidgetName,"hints"); -htdrv_hints.c: drv->Render = hthintRender; -htdrv_html.c: strcpy(drv->Name,"HTML Textual Source Driver"); -htdrv_html.c: strcpy(drv->WidgetName,"html"); -htdrv_html.c: drv->Render = hthtmlRender; -htdrv_imagebutton.c: strcpy(drv->Name,"HTML ImageButton Widget Driver"); -htdrv_imagebutton.c: strcpy(drv->WidgetName,"imagebutton"); -htdrv_imagebutton.c: drv->Render = htibtnRender; -htdrv_image.c: strcpy(drv->Name,"DHTML Image Widget"); -htdrv_image.c: strcpy(drv->WidgetName,"image"); -htdrv_image.c: drv->Setup = htimgSetup; -htdrv_image.c: drv->Render = htimgRender; -htdrv_label.c: strcpy(drv->Name,"DHTML Single-line Label Driver"); -htdrv_label.c: strcpy(drv->WidgetName,"label"); -htdrv_label.c: drv->Render = htlblRender; -htdrv_map.c: strcpy(drv->Name, "DHTML Map Driver"); -htdrv_map.c: strcpy(drv->WidgetName, "map"); -htdrv_map.c: drv->Setup = htmapSetup; -htdrv_map.c: drv->Render = htmapRender; -htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Widget Driver"); -htdrv_menu.c: strcpy(drv->WidgetName,"menu"); -htdrv_menu.c: drv->Render = htmenuRender; -htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Title Driver"); -htdrv_menu.c: strcpy(drv->WidgetName,"menutitle"); -htdrv_menu.c: drv->Render = htmenuRender_ttl; -htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Separator Driver"); -htdrv_menu.c: strcpy(drv->WidgetName,"menusep"); -htdrv_menu.c: drv->Render = htmenuRender_sep; -htdrv_menu.c: strcpy(drv->Name,"DHTML Menu Widget Item Driver"); -htdrv_menu.c: strcpy(drv->WidgetName,"menuitem"); -htdrv_menu.c: drv->Render = htmenuRender_item; -htdrv_multiscroll.c: strcpy(drv->Name,"DHTML MultiScroll Driver"); -htdrv_multiscroll.c: strcpy(drv->WidgetName,"multiscroll"); -htdrv_multiscroll.c: drv->Render = htmsRender; -htdrv_multiscroll.c: strcpy(drv->Name,"DHTML MultiScroll Part Driver"); -htdrv_multiscroll.c: strcpy(drv->WidgetName,"multiscrollpart"); -htdrv_multiscroll.c: drv->Render = htmsRender_part; -htdrv_objcanvas.c: strcpy(drv->Name,"DHTML Pane Driver"); -htdrv_objcanvas.c: strcpy(drv->WidgetName,"objcanvas"); -htdrv_objcanvas.c: drv->Render = htocRender; -htdrv_osrc.c: strcpy(drv->Name,"DHTML OSRC Driver"); -htdrv_osrc.c: strcpy(drv->WidgetName,"osrc"); -htdrv_osrc.c: drv->Render = htosrcRender; -htdrv_page.c: strcpy(drv->Name,"HTML Page Driver"); -htdrv_page.c: strcpy(drv->WidgetName,"page"); -htdrv_page.c: drv->Render = htpageRender; -htdrv_pane.c: strcpy(drv->Name,"DHTML Pane Driver"); -htdrv_pane.c: strcpy(drv->WidgetName,"pane"); -htdrv_pane.c: drv->Render = htpnRender; -htdrv_parameter.c: strcpy(drv->Name,"Parameter Driver"); -htdrv_parameter.c: strcpy(drv->WidgetName,"parameter"); -htdrv_parameter.c: drv->Render = htparamRender; -htdrv_radiobutton.c: strcpy(drv->Name,"DHTML RadioButton Driver"); -htdrv_radiobutton.c: strcpy(drv->WidgetName,"radiobuttonpanel"); -htdrv_radiobutton.c: drv->Render = htrbRender; -htdrv_repeat.c: strcpy(drv->Name,"Repeat Object Driver"); -htdrv_repeat.c: strcpy(drv->WidgetName,"repeat"); -htdrv_repeat.c: drv->Render = htrptRender; -htdrv_rule.c: strcpy(drv->Name,"Declarative Rule Widget Driver"); -htdrv_rule.c: strcpy(drv->WidgetName,"rule"); -htdrv_rule.c: drv->Render = htruleRender; -htdrv_scrollbar.c: strcpy(drv->Name,"DHTML Scrollbar Widget Driver"); -htdrv_scrollbar.c: strcpy(drv->WidgetName,"scrollbar"); -htdrv_scrollbar.c: drv->Render = htsbRender; -htdrv_scrollpane.c: strcpy(drv->Name,"HTML ScrollPane Widget Driver"); -htdrv_scrollpane.c: strcpy(drv->WidgetName,"scrollpane"); -htdrv_scrollpane.c: drv->Render = htspaneRender; -htdrv_spinner.c: strcpy(drv->Name,"DHTML Spinner Box Driver"); -htdrv_spinner.c: strcpy(drv->WidgetName,"spinner"); -htdrv_spinner.c: drv->Render = htspnrRender; -htdrv_tab.c: strcpy(drv->Name,"DHTML Tab Control Driver"); -htdrv_tab.c: strcpy(drv->WidgetName,"tab"); -htdrv_tab.c: drv->Render = httabRender; -htdrv_tab.c: /*xaAddItem(&(drv->PseudoTypes), "tabpage");*/ -htdrv_tab.c: strcpy(drv->Name,"DHTML Tab Page Driver"); -htdrv_tab.c: strcpy(drv->WidgetName,"tabpage"); -htdrv_tab.c: drv->Render = httabRender_page; -htdrv_table.c: strcpy(drv->Name,"DHTML DataTable Driver"); -htdrv_table.c: strcpy(drv->WidgetName,"table"); -htdrv_table.c: drv->Render = httblRender; -htdrv_table.c: xaAddItem(&(drv->PseudoTypes), "table-column"); -htdrv_table.c: xaAddItem(&(drv->PseudoTypes), "table-row-detail"); -htdrv_terminal.c: strcpy(drv->Name,"DHTML Terminal Widget"); -htdrv_terminal.c: strcpy(drv->WidgetName,"terminal"); -htdrv_terminal.c: drv->Render = httermRender; -htdrv_textarea.c: strcpy(drv->Name,"DHTML Multiline Textarea Driver"); -htdrv_textarea.c: strcpy(drv->WidgetName,"textarea"); -htdrv_textarea.c: drv->Render = httxRender; -htdrv_textbutton.c: strcpy(drv->Name,"HTML Text Button Widget Driver"); -htdrv_textbutton.c: strcpy(drv->WidgetName,"textbutton"); -htdrv_textbutton.c: drv->Render = httbtnRender; -htdrv_timer.c: strcpy(drv->Name,"DHTML Nonvisual Timer Widget"); -htdrv_timer.c: strcpy(drv->WidgetName,"timer"); -htdrv_timer.c: drv->Render = httmRender; -htdrv_treeview.c: strcpy(drv->Name,"HTML Treeview Widget Driver"); -htdrv_treeview.c: strcpy(drv->WidgetName,"treeview"); -htdrv_treeview.c: drv->Render = httreeRender; -htdrv_uawindow.c: strcpy(drv->Name,"User-Agent Window Object Driver"); -htdrv_uawindow.c: strcpy(drv->WidgetName,"window"); -htdrv_uawindow.c: drv->Render = htuawinRender; -htdrv_variable.c: strcpy(drv->Name,"Variable Object Driver"); -htdrv_variable.c: strcpy(drv->WidgetName,"variable"); -htdrv_variable.c: drv->Render = htvblRender; -htdrv_window.c: strcpy(drv->Name,"Child Window Widget Driver"); -htdrv_window.c: strcpy(drv->WidgetName,"childwindow"); -htdrv_window.c: drv->Render = htwinRender; -ht_render.c: if (xhLookup(&session->UsedDrivers, drv->WidgetName) == NULL) -ht_render.c: xhAdd(&session->UsedDrivers, drv->WidgetName, (void*)drv); -ht_render.c: if (drv->Setup) -ht_render.c: if (drv->Setup(session) < 0) -ht_render.c: rval = drv->Render(session, widget, z); -ht_render.c: xaAddItem(&drv->Events, (void*)event); -ht_render.c: xaAddItem(&drv->Actions, (void*)action); -ht_render.c: for(i=0;iActions.nItems;i++) -ht_render.c: if (!strcmp(((pHtEventAction)(drv->Actions.Items[i]))->Name, eventaction)) -ht_render.c: ea = (pHtEventAction)(drv->Actions.Items[i]); -ht_render.c: if (!ea) for(i=0;iEvents.nItems;i++) -ht_render.c: if (!strcmp(((pHtEventAction)(drv->Events.Items[i]))->Name, eventaction)) -ht_render.c: ea = (pHtEventAction)(drv->Events.Items[i]); -ht_render.c: xaInit(&(drv->PosParams),16); -ht_render.c: xaInit(&(drv->Properties),16); -ht_render.c: xaInit(&(drv->Events),16); -ht_render.c: xaInit(&(drv->Actions),16); -ht_render.c: xaInit(&(drv->PseudoTypes), 4); -ht_render.c: mssError(1,"HTR","unable to find class '%s' for widget driver '%s'",className,drv->WidgetName); -ht_render.c: if (xhAdd(&(class->WidgetDrivers),drv->WidgetName, (void*)drv) < 0) return -1; -ht_render.c: for (i=0;iPseudoTypes));i++) -ht_render.c: if (xhAdd(&(class->WidgetDrivers),xaGetItem(&(drv->PseudoTypes), i), (void*)drv) < 0) return -1; From 12f9449289ac549ede7c05c41916957f5f2dc450 Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Fri, 8 Jul 2022 15:01:27 -0600 Subject: [PATCH 5/9] Tweaked map widget --- centrallix/htmlgen/htdrv_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centrallix/htmlgen/htdrv_map.c b/centrallix/htmlgen/htdrv_map.c index 4dcae9d80..b7d86cd49 100755 --- a/centrallix/htmlgen/htdrv_map.c +++ b/centrallix/htmlgen/htdrv_map.c @@ -133,7 +133,7 @@ int htmapRender(pHtSession s, pWgtrNode map_node, int z) name, *osrc, osrc, !*osrc, allow_select, show_select, name); /** HTML body
element to be used by the OpenLayers map. **/ - htrAddBodyItem_va(s, "
\n", id); + htrAddBodyItem_va(s, "
\n", id); /** Check for widgets within the map. **/ htrRenderSubwidgets(s, map_node, z + 2); From b1dcaf8889d428b7b1e4dc04cd8e0a8271a3c71e Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Mon, 11 Jul 2022 17:22:10 -0600 Subject: [PATCH 6/9] Renamed and applied CSS classes --- centrallix/htmlgen/htdrv_datetime.c | 16 ++++++++-------- centrallix/htmlgen/htdrv_dropdown.c | 4 ++-- centrallix/htmlgen/htdrv_page.c | 26 +++++++++++++------------- centrallix/htmlgen/htdrv_radiobutton.c | 24 ++++++++++++------------ centrallix/htmlgen/htdrv_scrollbar.c | 8 ++++---- centrallix/htmlgen/htdrv_spinner.c | 16 ++++++++-------- centrallix/htmlgen/htdrv_table.c | 8 ++++---- 7 files changed, 51 insertions(+), 51 deletions(-) diff --git a/centrallix/htmlgen/htdrv_datetime.c b/centrallix/htmlgen/htdrv_datetime.c index 554165a3e..b6f72a0f5 100644 --- a/centrallix/htmlgen/htdrv_datetime.c +++ b/centrallix/htmlgen/htdrv_datetime.c @@ -50,9 +50,10 @@ static struct int htdtSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.absHidInh { OVERFLOW: hidden; POSITION:absolute; VISIBILITY:inherit;}\n"); - htrAddStylesheetItem_va(s,"\t.dtBtn { cursor:default; border:1px outset #e0e0e0;}\n"); - htrAddStylesheetItem_va(s,"\t.dtCon { LEFT:1px; TOP:1px; }\n"); + htrAddStylesheetItem_va(s,"\t.dtAbsHid { OVERFLOW: hidden; POSITION:absolute;}\n"); + htrAddStylesheetItem_va(s,"\t.dtBtn { VISIBILITY:inherit; cursor:default; border:1px outset #e0e0e0;}\n"); + htrAddStylesheetItem_va(s,"\t.dtCon1 { VISIBILITY:inherit; LEFT:1px; TOP:1px; }\n"); + htrAddStylesheetItem_va(s,"\t.dtCon2 { VISIBILITY:hidden; LEFT:1px; TOP:1px; }\n"); return 0; } @@ -204,8 +205,7 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) if (wgtrGetPropertyValue(tree,"fgcolor",DATA_T_STRING,POD(&ptr)) == 0) strtcpy(fgcolor,ptr,sizeof(fgcolor)); - else - strcpy(fgcolor,"black"); + /** Ok, write the style header items. **/ htrAddStylesheetItem_va(s,"\t#dt%POSbtn { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; %STR }\n",id,x,y,w,h,z, bgcolor); @@ -237,7 +237,7 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) date_only, default_time); /** HTML body
elements for the layers. **/ - htrAddBodyItem_va(s,"
\n" + htrAddBodyItem_va(s,"
\n" "\n", id); /*htrAddBodyItem_va(s,"\n",w); htrAddBodyItem(s, " \n"); @@ -250,8 +250,8 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) htrAddBodyItem_va(s," \n",w-2); htrAddBodyItem(s, " \n"); htrAddBodyItem(s, "
\n");*/ - htrAddBodyItem_va(s,"
\n",id); - htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); htrAddBodyItem(s, "
\n"); /** Add the event handling scripts **/ diff --git a/centrallix/htmlgen/htdrv_dropdown.c b/centrallix/htmlgen/htdrv_dropdown.c index b8eed8374..33377b100 100644 --- a/centrallix/htmlgen/htdrv_dropdown.c +++ b/centrallix/htmlgen/htdrv_dropdown.c @@ -48,7 +48,7 @@ static struct { int htddSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.hidAbs { OVERFLOW:hidden; POSITION:absolute; }\n:"); + htrAddStylesheetItem_va(s,"\t.ddHidAbs { OVERFLOW:hidden; POSITION:absolute; }\n:"); htrAddStylesheetItem_va(s,"\t.ddBtn { VISIBILITY:inherit; cursor:default; border:1px outset #e0e0e0;}\n"); htrAddStylesheetItem_va(s,"\t.ddCon1 { VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); htrAddStylesheetItem_va(s,"\t.ddCon2 { VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); @@ -197,7 +197,7 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { htrAddScriptInit_va(s," dd_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), c1:htr_subel(wgtrGetNodeRef(ns,\"%STR&SYM\"), \"dd%POScon1\"), c2:htr_subel(wgtrGetNodeRef(ns,\"%STR&SYM\"), \"dd%POScon2\"), background:'%STR&JSSTR', highlight:'%STR&JSSTR', fieldname:'%STR&JSSTR', numDisplay:%INT, mode:%INT, sql:'%STR&JSSTR', width:%INT, height:%INT, form:'%STR&JSSTR', osrc:'%STR&JSSTR', qms:%INT, ivs:%INT, popup_width:%INT});\n", name, name, id, name, id, bgstr, hilight, fieldname, num_disp, mode, sql?sql:"", w, h, form, osrc, query_multiselect, invalid_select_default, pop_w); /** HTML body
element for the layers. **/ - htrAddBodyItem_va(s,"
\n" + htrAddBodyItem_va(s,"
\n" "\n", id); /*htrAddBodyItem_va(s,"\n",w); htrAddBodyItem(s, " \n"); diff --git a/centrallix/htmlgen/htdrv_page.c b/centrallix/htmlgen/htdrv_page.c index 7eca3fe89..a51414d2b 100755 --- a/centrallix/htmlgen/htdrv_page.c +++ b/centrallix/htmlgen/htdrv_page.c @@ -48,7 +48,7 @@ int htpageSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.absHid { POSITION:absolute; VISIBILITY:hidden }\n"); + htrAddStylesheetItem_va(s,"\t.pageAbsHid { POSITION:absolute; VISIBILITY:hidden }\n"); htrAddStylesheetItem_va(s,"\t.setZInd { Z-INDEX:1000 }\n"); return 0; } @@ -383,19 +383,19 @@ htpageRender(pHtSession s, pWgtrNode tree, int z) htrAddStylesheetItem_va(s, "\tfont { %[font-size:%POSpx; %]%[font-family:%STR&CSSVAL; %]}\n", font_size > 0, font_size, *font_name, font_name); } - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - - htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgping",0, "absHid"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + + htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgping",0, "pageAbsHid"); htrAddBodyItemLayerEnd(s,HTR_LAYER_F_DYNAMIC); - htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgmsg",0, "absHid"); + htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgmsg",0, "pageAbsHid"); htrAddBodyItemLayerEnd(s,HTR_LAYER_F_DYNAMIC); htrAddBodyItem(s, "\n"); diff --git a/centrallix/htmlgen/htdrv_radiobutton.c b/centrallix/htmlgen/htdrv_radiobutton.c index c1bf61bda..8496ce0bc 100644 --- a/centrallix/htmlgen/htdrv_radiobutton.c +++ b/centrallix/htmlgen/htdrv_radiobutton.c @@ -49,9 +49,9 @@ static struct { int htrbSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.posAbs\t{ POSITION:absolute; }\n"); - htrAddStylesheetItem_va(s,"\t.visInh\t{ VISIBILITY:inherit; }\n"); - htrAddStylesheetItem_va(s,"\t.visHid\t{ VISIBILITY:hidden; }\n"); + htrAddStylesheetItem_va(s,"\t.rbPosAbs\t{ POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.rbVisInh\t{ VISIBILITY:inherit; }\n"); + htrAddStylesheetItem_va(s,"\t.rbVisHid\t{ VISIBILITY:hidden; }\n"); return 0; } @@ -260,9 +260,9 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { /* Do the HTML layers */ - htrAddBodyItem_va(s,"
\n", id); - htrAddBodyItem_va(s,"
\n", id); - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); /* Loop through each radio button and do the option pane and sub layers */ i = 1; @@ -279,13 +279,13 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { htrAddStylesheetItem_va(s,"\t#rb%POSlabel%POS\t{ LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; CLIP:rect(0px,%POSpx,%POSpx,0px); CURSOR:pointer; }\n",id,i,27,2,cover_width-(27+1),item_spacing-1,z+2,cover_width-(27+1),item_spacing-1); /** Body layers **/ - htrAddBodyItem_va(s,"
\n", id, i); - htrAddBodyItem_va(s,"
\n", id, i); - htrAddBodyItem_va(s,"
\n", id, i); + htrAddBodyItem_va(s,"
\n", id, i); + htrAddBodyItem_va(s,"
\n", id, i); + htrAddBodyItem_va(s,"
\n", id, i); wgtrGetPropertyValue(radiobutton_obj,"label",DATA_T_STRING,POD(&ptr)); strtcpy(sbuf2,ptr,sizeof(sbuf2)); - htrAddBodyItem_va(s,"
%STR&HTE
\n", + htrAddBodyItem_va(s,"
%STR&HTE
\n", id, i, textcolor, sbuf2); /* use label (from above) as default value if no value given */ @@ -294,7 +294,7 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { strtcpy(sbuf2,ptr,sizeof(sbuf2)); } - htrAddBodyItem_va(s," \n", + htrAddBodyItem_va(s," \n", id, i, sbuf2); htrAddBodyItem(s, "
\n"); i++; @@ -303,7 +303,7 @@ int htrbRender(pHtSession s, pWgtrNode tree, int z) { htrAddBodyItem(s, "
\n"); htrAddBodyItem(s, "
\n"); - htrAddBodyItem_va(s,"
%STR&HTE
\n", id, textcolor, title); + htrAddBodyItem_va(s,"
%STR&HTE
\n", id, textcolor, title); htrAddBodyItem(s, "
\n"); return 0; diff --git a/centrallix/htmlgen/htdrv_scrollbar.c b/centrallix/htmlgen/htdrv_scrollbar.c index 828b5d52c..c5e33cc04 100644 --- a/centrallix/htmlgen/htdrv_scrollbar.c +++ b/centrallix/htmlgen/htdrv_scrollbar.c @@ -51,8 +51,8 @@ static struct int htsbSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.posAbs { POSITION:absolute; }\n"); - htrAddStylesheetItem_va(s,"\t.thum { VISIBILITY:inherit; WIDTH:18px; }\n"); + htrAddStylesheetItem_va(s,"\t.sbPosAbs { POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.sbThum { VISIBILITY:inherit; WIDTH:18px; }\n"); return 0; } @@ -195,7 +195,7 @@ htsbRender(pHtSession s, pWgtrNode tree, int z) htrAddScriptInit_va(s," sb_init({layer:wgtrGetNodeRef(ns,\"%STR&SYM\"), tname:\"sb%POSthum\", isHorizontal:%INT, range:%INT});\n", name, id, is_horizontal, r); /** HTML body
elements for the layers. **/ - htrAddBodyItem_va(s,"
", id, *bcolor, bcolor, *bimage, bimage, w); + htrAddBodyItem_va(s,"
", id, *bcolor, bcolor, *bimage, bimage, w); if (is_horizontal) { htrAddBodyItem(s, "
"); @@ -208,7 +208,7 @@ htsbRender(pHtSession s, pWgtrNode tree, int z) htrAddBodyItem_va(s,"",h-36); htrAddBodyItem(s, "
\n"); } - htrAddBodyItem_va(s,"
",id); + htrAddBodyItem_va(s,"
",id); /** Add the event handling scripts **/ diff --git a/centrallix/htmlgen/htdrv_spinner.c b/centrallix/htmlgen/htdrv_spinner.c index df2f0cba3..f21591e90 100644 --- a/centrallix/htmlgen/htdrv_spinner.c +++ b/centrallix/htmlgen/htdrv_spinner.c @@ -53,8 +53,8 @@ static struct int htspnrSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.posAbsVisInh{ POSITION:absolute; VISIBILITY:inherit; }\n"); - htrAddStylesheetItem_va(s,"\t.posAbsVisHid{ POSITION:absolute; VISIBILITY:hidden; }\n"); + htrAddStylesheetItem_va(s,"\t.spnrAbsInh{ POSITION:absolute; VISIBILITY:inherit; }\n"); + htrAddStylesheetItem_va(s,"\t.spnrAbsHid{ POSITION:absolute; VISIBILITY:hidden; }\n"); return 0; } @@ -149,8 +149,8 @@ htspnrRender(pHtSession s, pWgtrNode tree, int z) id, id); /** HTML body
element for the base layer. **/ - htrAddBodyItem_va(s, "
\n",id); - htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); htrAddBodyItem_va(s, " \n",w-12,main_bg); htrAddBodyItem_va(s, " \n",c1); htrAddBodyItem_va(s, " \n",c1,w-2-12); @@ -161,12 +161,12 @@ htspnrRender(pHtSession s, pWgtrNode tree, int z) htrAddBodyItem_va(s, " \n",c2); htrAddBodyItem_va(s, " \n",c2,w-2-12); htrAddBodyItem_va(s, " \n
\n\n",c2); - htrAddBodyItem_va(s, "
\n",id); - htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); + htrAddBodyItem_va(s, "
\n",id); htrAddBodyItem(s, "
\n"); /*Add the spinner buttons*/ - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); htrAddBodyItem(s, "
\n"); return 0; diff --git a/centrallix/htmlgen/htdrv_table.c b/centrallix/htmlgen/htdrv_table.c index 07ef6870e..b7944cfa0 100644 --- a/centrallix/htmlgen/htdrv_table.c +++ b/centrallix/htmlgen/htdrv_table.c @@ -70,7 +70,7 @@ static struct int httblSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.posAbs { POSITION:absolute }\n"); + htrAddStylesheetItem_va(s,"\t.tbldPosAbs { POSITION:absolute }\n"); htrAddStylesheetItem_va(s,"\t.tbldPane { VISIBILITY:inherit; } \n"); htrAddStylesheetItem_va(s,"\t.tbldScroll { WIDTH:18px; }\n"); htrAddStylesheetItem_va(s,"\t.tbldBox { VISIBILITY:inherit; LEFT:0px; TOP:18px; WIDTH:16px; HEIGHT:16px; BORDER: solid 1px; BORDER-COLOR: white gray gray white; }\n"); @@ -222,7 +222,7 @@ httblRenderDynamic(pHtSession s, pWgtrNode tree, int z, httbl_struct* t) htrAddScriptInit(s,"null]});\n"); - htrAddBodyItem_va(s,"
\n",t->id); + htrAddBodyItem_va(s,"
\n",t->id); detailcnt = wgtrGetMatchingChildList(tree, "widget/table-row-detail", children, sizeof(children)/sizeof(pWgtrNode)); //for (i=0;iChildren));i++) @@ -259,14 +259,14 @@ httblRenderDynamic(pHtSession s, pWgtrNode tree, int z, httbl_struct* t) htrAddBodyItem(s,"
\n"); /** HTML body
element for the scrollbar layer. **/ - htrAddBodyItem_va(s,"
\n",t->id); + htrAddBodyItem_va(s,"
\n",t->id); htrAddBodyItem(s,"\n"); htrAddBodyItem(s,"\n"); htrAddBodyItem_va(s,"\n", t->id, t->h-2*18-first_offset); htrAddBodyItem(s,"\n"); htrAddBodyItem(s,"
\n"); /*htrAddBodyItem_va(s,"
\n",t->id);*/ - htrAddBodyItem_va(s,"
\n",t->id); + htrAddBodyItem_va(s,"
\n",t->id); htrAddBodyItem(s,"
\n"); htrAddEventHandlerFunction(s,"document","MOUSEOVER","tbld","tbld_mouseover"); From ea9d9aee901af8deb0c6af1cc7cb0b0bf8991ca9 Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Tue, 12 Jul 2022 16:15:48 -0600 Subject: [PATCH 7/9] Changes requested for PR --- centrallix/htmlgen/htdrv_dropdown.c | 4 +-- centrallix/htmlgen/htdrv_menu.c | 43 ++++------------------------- centrallix/htmlgen/htdrv_page.c | 18 ++++++------ centrallix/htmlgen/htdrv_pane.c | 2 +- centrallix/htmlgen/htdrv_tab.c | 12 ++++---- 5 files changed, 24 insertions(+), 55 deletions(-) diff --git a/centrallix/htmlgen/htdrv_dropdown.c b/centrallix/htmlgen/htdrv_dropdown.c index 33377b100..9ed564675 100644 --- a/centrallix/htmlgen/htdrv_dropdown.c +++ b/centrallix/htmlgen/htdrv_dropdown.c @@ -210,8 +210,8 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { htrAddBodyItem_va(s," \n",w-2); htrAddBodyItem(s, " \n"); htrAddBodyItem(s, "\n");*/ - htrAddBodyItem_va(s,"
\n",id); - htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); htrAddBodyItem(s, "
\n"); /* Read and initialize the dropdown items */ diff --git a/centrallix/htmlgen/htdrv_menu.c b/centrallix/htmlgen/htdrv_menu.c index 798c248b8..e073fb103 100644 --- a/centrallix/htmlgen/htdrv_menu.c +++ b/centrallix/htmlgen/htdrv_menu.c @@ -50,7 +50,7 @@ static struct int htmenuSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.zeroLeftTop { LEFT:0px; TOP:0px; }\n"); + htrAddStylesheetItem_va(s,"\t.menuZeroLeftTop { LEFT:0px; TOP:0px; }\n"); htrAddStylesheetItem_va(s,"\t.menuMain { POSITION:absolute; }\n"); htrAddStylesheetItem_va(s,"\t.menuContent { POSITION:absolute; VISIBILITY: inherit; }\n"); htrAddStylesheetItem_va(s, "\t.menuHigh { POSITION:absolute; VISIBILITY: hidden; }\n"); @@ -345,26 +345,10 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) /** Beginning of code for menu **/ htrAddBodyItem_va(s,"
", id); - //if (s->Capabilities.Dom0NS) - // htrAddBodyItem_va(s,"",bgstr); - htrAddBodyItem_va(s,"
\n", id, s->Capabilities.Dom0NS?"":"width=\"100%\" height=\"100%\""); + htrAddBodyItem_va(s,"
\n", id, s->Capabilities.Dom0NS?"":"width=\"100%\" height=\"100%\""); /** Only draw border if it is NS4 **/ -// if (s->Capabilities.Dom0NS) -// { -// htrAddBodyItem(s,""); -// if (w != -1) -// htrAddBodyItem_va(s,"", w-2); -// else -// htrAddBodyItem(s,""); -// htrAddBodyItem(s,"\n"); -// if (h != -1) -// htrAddBodyItem_va(s,"
", h-2); -// else -// htrAddBodyItem(s,"
"); -// } -// else - htrAddBodyItem(s,"
"); + htrAddBodyItem(s,"
"); /** Add 'meat' of menu... **/ xs = (pXString)nmMalloc(sizeof(XString)); @@ -458,27 +442,10 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) htrAddBodyItem(s,"
\n"); /** closing border for NS4 **/ -// if (s->Capabilities.Dom0NS) -// { -// if (h != -1) -// htrAddBodyItem_va(s,"\n", h-2); -// else -// htrAddBodyItem(s,"\n"); -// htrAddBodyItem(s,""); -// if (w != -1) -// htrAddBodyItem_va(s,"", w-2); -// else -// htrAddBodyItem(s,""); -// htrAddBodyItem(s,"\n"); -// } -// else - htrAddBodyItem(s,""); + htrAddBodyItem(s,""); /** Ending of layer **/ -// if (s->Capabilities.Dom0NS) -// htrAddBodyItem_va(s,"
", id); -// else - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); xsDeInit(xs); nmFree(xs, sizeof(XString)); diff --git a/centrallix/htmlgen/htdrv_page.c b/centrallix/htmlgen/htdrv_page.c index a51414d2b..f67c2b7a8 100755 --- a/centrallix/htmlgen/htdrv_page.c +++ b/centrallix/htmlgen/htdrv_page.c @@ -49,7 +49,7 @@ int htpageSetup(pHtSession s) { htrAddStylesheetItem_va(s,"\t.pageAbsHid { POSITION:absolute; VISIBILITY:hidden }\n"); - htrAddStylesheetItem_va(s,"\t.setZInd { Z-INDEX:1000 }\n"); + htrAddStylesheetItem_va(s,"\t.pageSetZInd { Z-INDEX:1000 }\n"); return 0; } @@ -383,15 +383,15 @@ htpageRender(pHtSession s, pWgtrNode tree, int z) htrAddStylesheetItem_va(s, "\tfont { %[font-size:%POSpx; %]%[font-family:%STR&CSSVAL; %]}\n", font_size > 0, font_size, *font_name, font_name); } - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); - htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); + htrAddBodyItem(s, "
\n"); htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgping",0, "pageAbsHid"); htrAddBodyItemLayerEnd(s,HTR_LAYER_F_DYNAMIC); diff --git a/centrallix/htmlgen/htdrv_pane.c b/centrallix/htmlgen/htdrv_pane.c index 448d10fa7..b29034f50 100644 --- a/centrallix/htmlgen/htdrv_pane.c +++ b/centrallix/htmlgen/htdrv_pane.c @@ -171,7 +171,7 @@ htpnRender(pHtSession s, pWgtrNode tree, int z) } else if (style == 3) /* bordered */ { - htrAddStylesheetItem_va(s,"\t#pn%POSmain { LEFTT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,h-2*box_offset,z); + htrAddStylesheetItem_va(s,"\t#pn%POSmain { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; }\n",id,x,y,w-2*box_offset,h-2*box_offset,z); htrAddStylesheetItem_va(s,"\t#pn%POSmain { border-style: solid; border-width: 1px; border-color:%STR&CSSVAL; border-radius: %INTpx; %STR}\n",id,bdr,border_radius,main_bg); } if (shadow_radius > 0) diff --git a/centrallix/htmlgen/htdrv_tab.c b/centrallix/htmlgen/htdrv_tab.c index 1b7da462b..f5ec566ef 100644 --- a/centrallix/htmlgen/htdrv_tab.c +++ b/centrallix/htmlgen/htdrv_tab.c @@ -51,8 +51,10 @@ static struct int httabSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.tcBase { background-position: 0px -24px; }\n"); - htrAddStylesheetItem_va(s, "\t.tcTab { position:absolute; visibility:inherit; overflow:hidden; cursor:default; font-weight:bold; }\n"); + htrAddStylesheetItem_va(s,"\t.tcPosAbs {POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.tcBase { background-position: 0px -24px; OVERFLOW:hidden; border-width: 1px; }\n"); + htrAddStylesheetItem_va(s, "\t.tcTab { VISIBILITY:inherit; OVERFLOW:hidden; cursor:default; font-weight:bold; }\n"); + htrAddStylesheetItem_va(s, "\t.tcPane { LEFT:0px; TOP:0px;} \n"); return 0; } @@ -292,7 +294,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) tab_txt, bg ); - htrAddBodyItem_va(s, "

%[ %STR&HTE %]%[ %STR&HTE %]

\n", + htrAddBodyItem_va(s, "

%[ %STR&HTE %]%[ %STR&HTE %]

\n", id, i+1, tloc == Right, tabname, is_selected?2:3, @@ -302,7 +304,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) } /** h-2 and w-2 because w3c dom borders add to actual width **/ - htrAddBodyItem_va(s,"
\n", + htrAddBodyItem_va(s,"
\n", id, h-border_width*2, w-border_width*2, x+xoffset, y+yoffset, z+1, border_style, border_color, (tloc==Top || tloc==Left)?0:border_radius, (tloc==Right)?0:border_radius, border_radius, (tloc==Bottom)?0:border_radius, @@ -349,7 +351,7 @@ httabRender(pHtSession s, pWgtrNode tree, int z) htrAddWgtrCtrLinkage_va(s, tabpage_obj, "htr_subel(_parentobj, \"tc%POSpane%POS\")", id, i+1); /** Add DIV section for the tabpage. **/ - htrAddBodyItem_va(s,"
\n", + htrAddBodyItem_va(s,"
\n", id,i+1,is_selected?"inherit":"hidden",w-2,z+2); /** Now look for sub-items within the tabpage. **/ From 93e90b593a9849ea5fb65c1ba1fd9f96db8e4ece Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Tue, 12 Jul 2022 17:09:30 -0600 Subject: [PATCH 8/9] Changes requested for PR (part 2) --- centrallix/htmlgen/htdrv_dropdown.c | 4 ++-- centrallix/htmlgen/htdrv_menu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/centrallix/htmlgen/htdrv_dropdown.c b/centrallix/htmlgen/htdrv_dropdown.c index 9ed564675..247b73887 100644 --- a/centrallix/htmlgen/htdrv_dropdown.c +++ b/centrallix/htmlgen/htdrv_dropdown.c @@ -210,8 +210,8 @@ int htddRender(pHtSession s, pWgtrNode tree, int z) { htrAddBodyItem_va(s," \n",w-2); htrAddBodyItem(s, " \n"); htrAddBodyItem(s, "\n");*/ - htrAddBodyItem_va(s,"
\n",id); - htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); + htrAddBodyItem_va(s,"
\n",id); htrAddBodyItem(s, "
\n"); /* Read and initialize the dropdown items */ diff --git a/centrallix/htmlgen/htdrv_menu.c b/centrallix/htmlgen/htdrv_menu.c index e073fb103..3095fc34d 100644 --- a/centrallix/htmlgen/htdrv_menu.c +++ b/centrallix/htmlgen/htdrv_menu.c @@ -445,7 +445,7 @@ htmenuRender(pHtSession s, pWgtrNode menu, int z) htrAddBodyItem(s,""); /** Ending of layer **/ - htrAddBodyItem_va(s,"
\n", id); + htrAddBodyItem_va(s,"
\n", id); xsDeInit(xs); nmFree(xs, sizeof(XString)); From 2907a7b1a247e4fc65752ab0f23c01f440785150 Mon Sep 17 00:00:00 2001 From: Sam Adams Date: Thu, 28 Jul 2022 16:18:05 -0600 Subject: [PATCH 9/9] Fixed dropdown borders and datetime font color --- centrallix/htmlgen/htdrv_datetime.c | 3 ++- centrallix/htmlgen/htdrv_dropdown.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/centrallix/htmlgen/htdrv_datetime.c b/centrallix/htmlgen/htdrv_datetime.c index b6f72a0f5..61834d5cd 100644 --- a/centrallix/htmlgen/htdrv_datetime.c +++ b/centrallix/htmlgen/htdrv_datetime.c @@ -205,7 +205,8 @@ htdtRender(pHtSession s, pWgtrNode tree, int z) if (wgtrGetPropertyValue(tree,"fgcolor",DATA_T_STRING,POD(&ptr)) == 0) strtcpy(fgcolor,ptr,sizeof(fgcolor)); - + else + strcpy(fgcolor,"black"); /** Ok, write the style header items. **/ htrAddStylesheetItem_va(s,"\t#dt%POSbtn { LEFT:%INTpx; TOP:%INTpx; WIDTH:%POSpx; HEIGHT:%POSpx; Z-INDEX:%POS; %STR }\n",id,x,y,w,h,z, bgcolor); diff --git a/centrallix/htmlgen/htdrv_dropdown.c b/centrallix/htmlgen/htdrv_dropdown.c index 247b73887..269fa1da3 100644 --- a/centrallix/htmlgen/htdrv_dropdown.c +++ b/centrallix/htmlgen/htdrv_dropdown.c @@ -48,7 +48,7 @@ static struct { int htddSetup(pHtSession s) { - htrAddStylesheetItem_va(s,"\t.ddHidAbs { OVERFLOW:hidden; POSITION:absolute; }\n:"); + htrAddStylesheetItem_va(s,"\t.ddHidAbs { OVERFLOW:hidden; POSITION:absolute; }\n"); htrAddStylesheetItem_va(s,"\t.ddBtn { VISIBILITY:inherit; cursor:default; border:1px outset #e0e0e0;}\n"); htrAddStylesheetItem_va(s,"\t.ddCon1 { VISIBILITY:inherit; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n"); htrAddStylesheetItem_va(s,"\t.ddCon2 { VISIBILITY:hidden; LEFT:1px; TOP:1px; WIDTH:1024px; HEIGHT:%POSpx; Z-INDEX:%POS; }\n");