3df0f0e83b9b27988863a88b53b79829bbbfbe02 tdreszer Thu Nov 3 15:55:42 2011 -0700 Took care of some of the matrix hilite ghosting. Is it enough? diff --git src/hg/lib/hui.c src/hg/lib/hui.c index c7a453b..31b7bff 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -6356,31 +6356,35 @@ labelHeight = 0; } } return labelHeight; } #else///ifndef MATRIX_SQUEEZE #define matrixSqueeze(membersForAll) 0 #endif///ndef MATRIX_SQUEEZE static void matrixXheadingsRow1(char *db,struct trackDb *parentTdb,int squeeze, membersForAll_t* membersForAll,boolean top) /* prints the top row of a matrix: 'All' buttons; X titles; buttons 'All' */ { members_t *dimensionX = membersForAll->members[dimX]; members_t *dimensionY = membersForAll->members[dimY]; +#ifdef MATRIX_SQUEEZE +printf("<TR ALIGN=CENTER valign=%s>\n",top?"BOTTOM":"TOP"); +#else///ifndef MATRIX_SQUEEZE printf("<TR ALIGN=CENTER BGCOLOR='%s' valign=%s>\n",COLOR_BG_ALTDEFAULT,top?"BOTTOM":"TOP"); +#endif///ndef MATRIX_SQUEEZE if(dimensionX && dimensionY) { printf("<TH ALIGN=LEFT valign=%s>",top?"TOP":"BOTTOM"); buttonsForAll(); puts(" All</TH>"); } // If there is an X dimension, then titles go across the top if(dimensionX) { int ixX,cntX=0; if(dimensionY) { #ifdef MATRIX_SQUEEZE if(squeeze>0) @@ -6445,31 +6449,35 @@ puts("</TH>"); } puts("</TR>\n"); } static void matrixXheadingsRow2(struct trackDb *parentTdb, int squeeze, membersForAll_t* membersForAll) /* prints the 2nd row of a matrix: Y title; X buttons; title Y */ { members_t *dimensionX = membersForAll->members[dimX]; members_t *dimensionY = membersForAll->members[dimY]; // If there are both X and Y dimensions, then there is a row of buttons in X if(dimensionX && dimensionY) { int ixX,cntX=0; + #ifdef MATRIX_SQUEEZE + printf("<TR ALIGN=CENTER><TH ALIGN=CENTER colspan=2><B><EM>%s</EM></B></TH>",dimensionY->groupTitle); + #else///ifndef MATRIX_SQUEEZE printf("<TR ALIGN=CENTER BGCOLOR=\"%s\"><TH ALIGN=CENTER colspan=2><B><EM>%s</EM></B></TH>",COLOR_BG_ALTDEFAULT, dimensionY->groupTitle); + #endif///ndef MATRIX_SQUEEZE for (ixX = 0; ixX < dimensionX->count; ixX++) // Special row of +- +- +- { if(dimensionX->subtrackList && dimensionX->subtrackList[ixX] && dimensionX->subtrackList[ixX]->val) { char objName[SMALLBUF]; #ifdef MATRIX_SQUEEZE printf("<TD nowrap class='matCell %s all'>\n",dimensionX->tags[ixX]); #else///ifndef MATRIX_SQUEEZE puts("<TD>"); #endif///ndef MATRIX_SQUEEZE safef(objName, sizeof(objName), "plus_%s_all", dimensionX->tags[ixX]); boolean vertical = FALSE; #ifdef MATRIX_SQUEEZE vertical = (squeeze>0); #endif///def MATRIX_SQUEEZE @@ -6827,47 +6835,51 @@ if(!subgroupingExists(parentTdb,"view")) puts("(<A HREF=\"../goldenPath/help/multiView.html\" title='Help on subtrack selection' TARGET=_BLANK>help</A>)\n"); puts("<BR>\n"); if(membersForAll->abcCount > 0 && membersForAll->filters == FALSE) { displayABCdimensions(db,cart,parentTdb,subtrackRefList,membersForAll); } if(dimensionX == NULL && dimensionY == NULL) // Could have been just filterComposite. Must be an X or Y dimension return FALSE; #ifdef MATRIX_SQUEEZE -printf("<TABLE class='greenBox' cellspacing=0 style='background-color:%s;'>\n",COLOR_BG_ALTDEFAULT); +printf("<TABLE class='greenBox matrix' cellspacing=0 style='background-color:%s;'>\n",COLOR_BG_ALTDEFAULT); #else///ifndef MATRIX_SQUEEZE printf("<TABLE class='greenBox' style='background-color:%s;'>\n",COLOR_BG_DEFAULT); #endif///ndef MATRIX_SQUEEZE //int squeeze = matrixXheadings(db,parentTdb,membersForAll,TRUE); // right side labels could be dependent upon squeeze (void)matrixXheadings(db,parentTdb,membersForAll,TRUE); // Now the Y by X matrix int cntX=0,cntY=0; for (ixY = 0; ixY < sizeOfY; ixY++) { if(dimensionY == NULL || (dimensionY->tags[ixY])) { cntY++; assert(!dimensionY || ixY < dimensionY->count); + #ifdef MATRIX_SQUEEZE + printf("<TR ALIGN=CENTER>"); + #else///ifndef MATRIX_SQUEEZE printf("<TR ALIGN=CENTER BGCOLOR='%s'>",COLOR_BG_ALTDEFAULT); + #endif///ndef MATRIX_SQUEEZE matrixYheadings(db,parentTdb, membersForAll,ixY,TRUE); #define MAT_CB_SETUP "<INPUT TYPE=CHECKBOX NAME='%s' VALUE=on %s>" #define MAT_CB(name,js) printf(MAT_CB_SETUP,(name),(js)); for (ixX = 0; ixX < sizeOfX; ixX++) { if(dimensionX == NULL || (dimensionX->tags[ixX])) { assert(!dimensionX || ixX < dimensionX->count); if(cntY==1) // Only do this on the first good Y cntX++; if(dimensionX && ixX == dimensionX->count)