static void mainControlPanel() /* Make control panel. */ { controlPanelStart(); /* advFilter, configure buttons */ { cgiMakeButton(confVarName, "configure"); hPrintf(" "); if (gotAdvFilter()) cgiMakeButton(advFilterVarName, "filter (now on)"); else cgiMakeButton(advFilterVarName, "filter (now off)"); hPrintf(" "); } /* Do items to display drop-down */ { int i=0; static char *menu[] = {"25", "50", "100", "200", "500", "1000", "all"}; hPrintf(" display "); hPrintf("<SELECT NAME=\"%s\"", countVarName); hPrintf(" onchange=\"document.mainForm.submit();\">\n"); for (i = 0; i < ArraySize(menu); ++i) { hPrintf("<OPTION VALUE=\"%s\"", menu[i]); if (sameString(menu[i], displayCountString)) hPrintf(" SELECTED"); hPrintf(">%s\n", menu[i]); } hPrintf("</SELECT>\n"); } /* Make getDna, getText buttons */ { hPrintf(" output "); cgiMakeOptionalButton(getSeqPageVarName, "sequence", FALSE); hPrintf(" "); cgiMakeOptionalButton(getTextVarName, "text", FALSE); } controlPanelEnd(); }
static void configControlPanel() /* Put up configuration control panel. */ { //struct userSettings *us = colUserSettings(); controlPanelStart(); hPrintf("<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>\n"); hPrintf("<TR><TD ALIGN=LEFT>"); cgiMakeButton("submit", "submit"); hPrintf("</TD><TD> "); hPrintf("</TD><TD> "); hPrintf("</TD><TD>"); hPrintf("Columns:"); hPrintf("</TD><TD> "); cgiMakeButton(hideAllConfName, "hide all"); hPrintf("</TD><TD>"); cgiMakeButton(showAllConfName, "show all"); hPrintf("</TD><TD>"); cgiMakeButton(defaultConfName, "default"); hPrintf("</TD><TD>"); //hPrintf("Settings:"); //hPrintf("</TD><TD>"); //cgiMakeButton(saveCurrentConfName, "save"); //hPrintf("</TD><TD>"); //cgiMakeOptionalButton(useSavedConfName, "load", !userSettingsAnySaved(us)); hPrintf("</TD></TR></TABLE>"); //hPrintf("<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>\n"); //hPrintf("<TR><TD ALIGN=LEFT>"); //hPrintf("Expression ratio colors: "); //hgExpColorDropDown(cart, expRatioColorVarName); //hPrintf("</TD><TD>"); //hPrintf("Show all splicing variants: "); //cgiMakeCheckBox(showAllSpliceVarName, // cartUsualBoolean(cart, showAllSpliceVarName, FALSE)); //hPrintf("</TD><TD>"); //cgiMakeButton(customPageDoName, "custom columns"); //hPrintf("</TD></TR></TABLE>"); controlPanelEnd(); }
void doAdvFilter(struct sqlConnection *conn, struct column *colList) /* Put up advanced filter page. */ { struct column *col; boolean passPresent[2]; int onOff = 0; makeTitle("Gene Sorter Filter", "hgNearHelp.html#Filter"); hPrintf("<FORM ACTION=\"../cgi-bin/hgNear\" METHOD=%s>\n", cartUsualString(cart, "formMethod", "POST")); cartSaveSession(cart); controlPanelStart(); hPrintf("On this page you can restrict which genes appear in the main table<BR>"); hPrintf("based on the values in any column. Click the <em>submit</em> button to return<BR>"); hPrintf("to the main Gene Sorter page with the current filter settings applied."); bigButtons(); hPrintf("Quickly obtain a list of gene " "names that pass the filter: "); cgiMakeButton(advFilterListVarName, "list names"); controlPanelEnd(); /* See if have any to do in either first (displayed columns) * or second (hidden columns) pass. */ passPresent[0] = passPresent[1] = FALSE; for (onOff = 1; onOff >= 0; --onOff) { for (col = colList; col != NULL; col = col->next) if (col->filterControls && col->on == onOff) passPresent[onOff] = TRUE; } /* Print out two tables of search controls - one for displayed * columns and one for hidden ones. */ for (onOff = 1; onOff >= 0; --onOff) { if (passPresent[onOff]) { hPrintf("<H2>Filter Controls for %s Columns:</H2>", (onOff ? "Displayed" : "Hidden")); hPrintf("<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2 BGCOLOR=\"#"HG_COL_INSIDE"\">\n"); for (col = colList; col != NULL; col = col->next) { if (col->filterControls && col->on == onOff) { hPrintf("<TR><TD>"); hPrintf("<TABLE>\n"); hPrintf("<TR><TD><B>%s - %s</B></TD></TR>\n", col->shortLabel, col->longLabel); hPrintf("<TR><TD>"); col->filterControls(col, conn); hPrintf("</TD></TR>\n"); hPrintf("</TABLE>"); hPrintf("<BR>"); hPrintf("</TD></TR>\n"); } } hPrintf("</TABLE>\n"); hPrintf("<BR>"); cgiMakeButton("submit", "submit"); } } hPrintf("</FORM>\n"); }