bbadf34db9d67578b26a7d93a7096c046be885a4
kate
  Tue Jan 13 14:06:12 2015 -0800
Set default subtracks on (10 spread across color spectrum, emphasizing ENCODE tier1 and well-known.  Additional support for subtrack color on UI. refs #14353
diff --git src/hg/inc/hui.h src/hg/inc/hui.h
index 405e8a1..7123bba 100644
--- src/hg/inc/hui.h
+++ src/hg/inc/hui.h
@@ -129,30 +129,36 @@
 #define EXTENDED_DNA_BUTTON "extended case/color options"
 
 /* Net track option */
 #define NET_OPT_TOP_ONLY  "netTopOnly"
 
 /* Microarray default setting. */
 #define MICROARRAY_CLICK_LIMIT 200
 
 /* itemImagePath trackDb variable names */
 #define ITEM_IMAGE_PATH "itemImagePath"
 #define ITEM_BIG_IMAGE_PATH "itemBigImagePath"
 
 /* SwitchGear TSS default filter. */
 #define SWITCHDBTSS_FILTER 10
 
+/* Subtrack color support in UI */
+#define SUBTRACK_COLOR_PATCH    "showSubtrackColorOnUi"
+// for use with subGroup and sortOrder settings
+// ie. subGroup1 subtrackColor Color; sortOrder subtrackColor=+ cellType=+
+#define SUBTRACK_COLOR_SUBGROUP "subtrackColor"
+
 void netUi(struct trackDb *tdb);
 
 struct controlGrid
 /* Keep track of a control grid (table) */
     {
     int columns;	/* How many columns in grid. */
     int columnIx;	/* Index (0 based) of current column. */
     char *align;	/* Which way to align. */
     boolean rowOpen;	/* True if have opened a row. */
     };
 
 struct controlGrid *startControlGrid(int columns, char *align);
 /* Start up a control grid. */
 
 void controlGridStartCell(struct controlGrid *cg);
@@ -969,30 +975,34 @@
 int subgroupCount(struct trackDb *parentTdb);
 /* How many subGroup setting does this parent have? */
 
 char * subgroupSettingByTagOrName(struct trackDb *parentTdb, char *groupNameOrTag);
 /* look for a subGroup by name (ie subGroup1) or tag (ie view) and return an unallocated char* */
 
 boolean subgroupingExists(struct trackDb *parentTdb, char *groupNameOrTag);
 /* Does this parent track contain a particular subgrouping? */
 
 boolean subgroupFind(struct trackDb *childTrack, char *name,char **value);
 /* looks for a single tag in a childTrack's subGroups setting */
 
 void subgroupFree(char **value);
 /* frees subgroup memory */
 
+boolean subgroupRequired(char *value);
+/* Returns whether subgroup much be specified for each track.
+ * Generally true.  Exceptions are specially defined subgroups */
+
 int multViewCount(struct trackDb *parentTdb);
 /* returns the number of multiView views declared */
 
 int tvConvertToNumericOrder(enum trackVisibility v);
 /* Convert the enum to numeric order of display power full=4,hide=0 */
 
 int tvCompare(enum trackVisibility a, enum trackVisibility b);
 /* enum trackVis isn't in numeric order by visibility, so compare
  * symbolically: */
 
 enum trackVisibility tvMin(enum trackVisibility a, enum trackVisibility b);
 /* Return the less visible of a and b. */
 
 enum trackVisibility tdbLocalVisibility(struct cart *cart, struct trackDb *tdb,
                                         boolean *subtrackOverride);