11 void tabbed_dialog(int num_tabs, char *tabnames[]) {
14 wprintf("<script type=\"text/javascript\"> "
15 "var previously_selected_tab = '0'; "
16 "function tabsel(which_tab) { "
17 " if (which_tab == previously_selected_tab) { "
20 " $('tabdiv'+previously_selected_tab).style.display = 'none'; "
21 " $('tabdiv'+which_tab).style.display = 'block'; "
22 " $('tabtd'+previously_selected_tab).className = 'tab_cell_edit'; "
23 " $('tabtd'+which_tab).className = 'tab_cell_label'; "
24 " previously_selected_tab = which_tab; "
29 wprintf("<table id=\"TheTabs\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
30 "<tr align=\"center\" style=\"cursor:pointer\"><td> </td>"
33 for (i=0; i<num_tabs; ++i) {
34 wprintf("<td id=\"tabtd%d\" class=\"%s\" "
35 "onClick='tabsel(\"%d\");'"
38 ( (i==0) ? "tab_cell_label" : "tab_cell_edit" ),
41 wprintf("%s", tabnames[i]);
44 wprintf("<td> </td>\n");
47 wprintf("</tr></table>\n");
51 * print the tab-header
53 * tabnum: number of the tab to print
54 * num_tabs: total number oftabs to be printed
57 void begin_tab(int tabnum, int num_tabs) {
58 wprintf("<!-- begin tab %d of %d -->\n", tabnum, num_tabs);
59 wprintf("<div id=\"tabdiv%d\" style=\"display:%s\" class=\"tabcontent\" >",
61 ( (tabnum == 0) ? "block" : "none" )
66 * print the tab-footer
67 * tabnum: number of the tab to print
68 * num_tabs: total number of tabs to be printed
71 void end_tab(int tabnum, int num_tabs) {
73 wprintf("<!-- end tab %d of %d -->\n", tabnum, num_tabs);
75 if (tabnum == num_tabs-1) {
77 wprintf("<script type=\"text/javascript\">"
78 " Nifty(\"table#TheTabs td\", \"small transparent top\");"