diff --git a/centrallix/htmlgen/htdrv_chart.c b/centrallix/htmlgen/htdrv_chart.c index 654c8634..fab2e333 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 c2f699e9..d598f1fb 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 7463cf56..61834d5c 100644 --- a/centrallix/htmlgen/htdrv_datetime.c +++ b/centrallix/htmlgen/htdrv_datetime.c @@ -48,6 +48,14 @@ static struct } HTDT; +int htdtSetup(pHtSession s) + { + 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; + } /*** htdtRender - generate the HTML code for the page. ***/ @@ -201,9 +209,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 +238,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 +251,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 +285,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 c8167e70..269fa1da 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.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"); + 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 0223038f..f5a236ab 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 a3ed1a5c..e546d320 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 33258e3c..5b27934d 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 64cfe92e..d9992d7c 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 d7140489..7d8ed12b 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_map.c b/centrallix/htmlgen/htdrv_map.c index 73f0d551..b7d86cd4 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"); diff --git a/centrallix/htmlgen/htdrv_menu.c b/centrallix/htmlgen/htdrv_menu.c index a400c885..3095fc34 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.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"); + 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,27 +344,11 @@ 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); + 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)); @@ -450,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)); @@ -552,6 +527,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 6ff6078e..7cfa06ae 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 a2bec722..f67c2b7a 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.pageAbsHid { POSITION:absolute; VISIBILITY:hidden }\n"); + htrAddStylesheetItem_va(s,"\t.pageSetZInd { 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, "pageAbsHid"); htrAddBodyItemLayerEnd(s,HTR_LAYER_F_DYNAMIC); - htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgmsg",0, NULL); + htrAddBodyItemLayerStart(s,HTR_LAYER_F_DYNAMIC,"pgmsg",0, "pageAbsHid"); 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 0683cc6e..b29034f5 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 { 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) @@ -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 c1d395c0..8496ce0b 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.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; + } /** 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 e9b5b65e..c5e33cc0 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.sbPosAbs { POSITION:absolute; }\n"); + htrAddStylesheetItem_va(s,"\t.sbThum { 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 db1a6ec4..f4be3353 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 7252b86a..f21591e9 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.spnrAbsInh{ POSITION:absolute; VISIBILITY:inherit; }\n"); + htrAddStylesheetItem_va(s,"\t.spnrAbsHid{ 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 9b029bf6..f5ec566e 100644 --- a/centrallix/htmlgen/htdrv_tab.c +++ b/centrallix/htmlgen/htdrv_tab.c @@ -49,6 +49,14 @@ static struct } HTTAB; +int httabSetup(pHtSession s) + { + 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; + } enum httab_locations { Top=0, Bottom=1, Left=2, Right=3, None=4 }; @@ -229,7 +237,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 +279,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 +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, @@ -296,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, @@ -343,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. **/ @@ -393,6 +401,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 3cab1f9d..b7944cfa 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.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"); + 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 34575df5..2b3d3661 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,