7c96305a8cc177ad7792386ab9978f66fc82e0a2 braney Thu Nov 8 14:26:53 2018 -0800 make filterBy and labels be smarter about being configured at the view level diff --git src/hg/inc/hui.h src/hg/inc/hui.h index 5660711..f1c486d 100644 --- src/hg/inc/hui.h +++ src/hg/inc/hui.h @@ -1048,31 +1048,31 @@ // foldersToo means limit by folders (aka superTracks) as well. #define tdbVisLimitedByAncestry(cart,tdb,noFolders) \ tdbVisLimitedByAncestors(cart, tdb, TRUE, !(noFolders)) char *compositeViewControlNameFromTdb(struct trackDb *tdb); /* Returns a string with the composite view control name if one exists */ void compositeViewControlNameFree(char **name); /* frees a string allocated by compositeViewControlNameFromTdb */ void wigOption(struct cart *cart, char *name, char *title, struct trackDb *tdb); /* let the user choose to see the track in wiggle mode */ void wigCfgUi(struct cart *cart, struct trackDb *tdb,char *name,char *title,boolean boxed); /* UI for the wiggle track */ -void labelCfgUi(char *db, struct cart *cart, struct trackDb *tdb); +void labelCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *prefix); /* Put up a choice for labels. */ #define NO_SCORE_FILTER "noScoreFilter" #define SCORE_FILTER "scoreFilter" #define SCORE_LABEL "scoreLabel" #define SIGNAL_FILTER "signalFilter" #define PVALUE_FILTER "pValueFilter" #define QVALUE_FILTER "qValueFilter" #define _NO "No" #define _LIMITS "Limits" #define _MIN "Min" #define _MAX "Max" #define _BY_RANGE "ByRange" #define SCORE_MIN "scoreMin" #define GRAY_LEVEL_SCORE_MIN SCORE_MIN @@ -1286,31 +1286,31 @@ /* Gets one or more "highlightBy" settings (ClosestToHome). returns NULL if not found */ void filterBySetFree(filterBy_t **filterBySet); // Free a set of filterBy structs char *filterBySetClause(filterBy_t *filterBySet); // returns the "column1 in (...) and column2 in (...)" clause for a set of filterBy structs INLINE boolean filterByAllChosen(filterBy_t *filterBy) /* Is "All" chosen in the filter list? */ { return ((filterBy->slChoices == NULL) || (slNameInList(filterBy->slChoices,"All"))); } void filterBySetCfgUi(struct cart *cart, struct trackDb *tdb, - filterBy_t *filterBySet, boolean onOneLine); + filterBy_t *filterBySet, boolean onOneLine, char *prefix); // Does the UI for a list of filterBy structure char *filterByClause(filterBy_t *filterBy); // returns the SQL where clause for a single filterBy struct: "column in (...)" struct dyString *dyAddFilterByClause(struct cart *cart, struct trackDb *tdb, struct dyString *extraWhere,char *column, boolean *and); // creates the where clause condition to support a filterBy setting. // Format: filterBy column:Title=value,value [column:Title=value|label,value|label,value|label]) // filterBy filters are multiselect's so could have multiple values selected. // thus returns the "column1 in (...) and column2 in (...)" clause. // if 'column' is provided, and there are multiple filterBy columns, // only the named column's clause is returned. // The 'and' param and dyString in/out allows stringing multiple where clauses together