1291f2242d9627684efaa88259c1c09f5e7c1b10
braney
  Thu Apr 4 07:19:11 2019 -0700
some lollipop code leaked out on my last commit, so here's more leakage!

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 91df2a8..5db16af 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -1982,30 +1982,46 @@
 
 char *chimpEnumToString(enum chimpOptEnum x)
 /* Convert from enum to string representation. */
 {
 return chimpOptions[x];
 }
 
 void chimpDropDown(char *var, char *curVal)
 /* Make drop down of options. */
 {
 cgiMakeDropList(var, chimpOptions, ArraySize(chimpOptions),
     curVal);
 }
 
 
+/*
+#define POP_METHOD_AUTO "auto"
+#define POP_METHOD_MANUAL "manual"
+
+static char *popMethodLabels[] =
+{
+"auto",
+"manual",
+};
+
+static char *popMethodValues[] =
+{
+POP_METHOD_AUTO,
+POP_METHOD_MANUAL,
+};
+*/
 
 /****** Some stuff for mRNA and EST related controls *******/
 
 static void addMrnaFilter(struct mrnaUiData *mud, char *track, char *label, char *key, char *table)
 /* Add an mrna filter */
 {
 struct mrnaFilter *fil;
 AllocVar(fil);
 fil->label = label;
 fil->suffix = cloneString(key);
 fil->table = table;
 slAddTail(&mud->filterList, fil);
 }
 
 static struct mrnaUiData *newEmptyMrnaUiData(char *track)
@@ -4165,30 +4181,65 @@
 for (tdbRef = *tdbRefList; tdbRef != NULL; tdbRef = tdbRef->next)
     {
     struct trackDb *tdb = tdbRef->val;
     safef(htmlIdentifier, sizeof(htmlIdentifier), "%s.priority", tdb->track);
     char *cartHas = cartOptionalString(cart,htmlIdentifier);
     if (cartHas != NULL)
 	{
 	tdb->priority = atof(cartHas);
 	cartPriorities = TRUE;
 	}
     }
 slSort(tdbRefList, trackDbRefCmp);
 return cartPriorities;
 }
 
+void lollyCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed)
+/* UI for the wiggle track */
+{
+int maxHeightPixels;
+int minHeightPixels;
+char option[256];
+int defaultHeight;  /*  pixels per item */
+int settingsDefault;
+cartTdbFetchMinMaxPixels(cart, tdb, MIN_HEIGHT_PER, atoi(DEFAULT_HEIGHT_PER), atoi(DEFAULT_HEIGHT_PER),
+                                &minHeightPixels, &maxHeightPixels, &settingsDefault, &defaultHeight);
+
+boxed = cfgBeginBoxAndTitle(tdb, boxed, title);
+printf("<TABLE BORDER=0>");
+
+printf("<TR valign=center><th align=right>Track height:</th><td align=left colspan=3>");
+safef(option, sizeof(option), "%s.%s", name, HEIGHTPER );
+cgiMakeIntVarWithLimits(option, defaultHeight, "Track height",0, minHeightPixels, maxHeightPixels);
+printf("pixels&nbsp;(range: %d to %d)",
+       minHeightPixels, maxHeightPixels);
+
+/*
+printf("<TR valign=center><th align=right>Drawing method:</th><td align=left>");
+safef(option, sizeof(option), "%s.%s", name, POPMETHOD);
+char *popMethodVal = cartOrTdbString(cart, tdb, "popMethod", NULL);
+        
+cgiMakeDropListFull(option, popMethodLabels, popMethodValues,
+    ArraySize(popMethodValues), popMethodVal, NULL, NULL);
+    */
+
+puts("</td></TR>");
+
+printf("</TABLE>");
+cfgEndBox(boxed);
+}
+
 void cfgByCfgType(eCfgType cType,char *db, struct cart *cart, struct trackDb *tdb,char *prefix,
 	      char *title, boolean boxed)
 // Methods for putting up type specific cfgs used by composites/subtracks in hui.c
 {
 // When only one subtrack, then show it's cfg settings instead of composite/view level settings
 // This simplifies the UI where hgTrackUi won't have 2 levels of cfg,
 // while hgTracks still supports rightClick cfg of the subtrack.
 
 if (configurableByAjax(tdb,cType) > 0) // Only if subtrack's configurable by ajax do we
     {                                  // consider this option
     if (tdbIsComposite(tdb)                       // called for the composite
         && !isCustomComposite(tdb)
         && !tdbIsCompositeView(tdb->subtracks)        // and there is no view level
         && slCount(tdb->subtracks) == 1)              // and there is only one subtrack
 	{
@@ -4241,30 +4292,32 @@
 			break;
     case cfgBam:        bamCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgVcf:        vcfCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgLong:       longRangeCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgSnake:      snakeCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgPsl:        pslCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
     case cfgBarChart:   barChartCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
     case cfgInteract:   interactCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
+    case cfgLollipop:   lollyCfgUi(db,cart,tdb,prefix,title,boxed);
+                        break;
     default:            warn("Track type is not known to multi-view composites. type is: %d ",
 			     cType);
 			break;
     }
 }
 
 char *encodeRestrictionDate(char *db,struct trackDb *trackDb,boolean excludePast)
 // Create a string for ENCODE restriction date of this track
 // if return is not null, then free it after use
 {
 if (!trackDb)
     return NULL;
 
 char *date = NULL;