8c908f948b09826c6cb4452ee5b282aca41be85e
galt
  Tue Dec 8 21:52:59 2015 -0800
Multi-region (exonMostly). This work allows people to look at virtual chromosomes from a list of regions and then navigate and perform all of the usual functions on it.

diff --git src/hg/inc/cart.h src/hg/inc/cart.h
index 775271a..07e0fe7 100644
--- src/hg/inc/cart.h
+++ src/hg/inc/cart.h
@@ -41,30 +41,36 @@
    };
 
 INLINE char *_cartVarDbName(const char *db, const char *var)
 /* generate cart variable name that is local to an assembly database.
  * Only for use inside of cart.h.  WARNING: static return */
 {
 static char buf[PATH_LEN]; // something rather big
 safef(buf, sizeof(buf), "%s_%s", var, db);
 return buf;
 }
 
 boolean cartTablesOk(struct sqlConnection *conn);
 /* Return TRUE if cart tables are accessible (otherwise, the connection
  * doesn't do us any good). */
 
+void cartParseOverHash(struct cart *cart, char *contents);
+/* Parse cgi-style contents into a hash table.  This will *not*
+ * replace existing members of hash that have same name, so we can
+ * support multi-select form inputs (same var name can have multiple
+ * values which will be in separate hashEl's). */
+
 struct cart *cartNew(char *userId, char *sessionId,
 	char **exclude, struct hash *oldVars);
 /* Load up cart from user & session id's.  Exclude is a null-terminated list of
  * strings to not include. oldVars is an optional hash to put in values
  * that were just overwritten by cgi-variables. */
 
 struct cart *cartOfNothing();
 /* Create a new, empty, cart with no real connection to the database. */
 
 struct cart *cartFromHash(struct hash *hash);
 /* Create a cart from hash */
 
 struct cart *cartFromCgiOnly(char *userId, char *sessionId,
 	char **exclude, struct hash *oldVars);
 /* Create a new cart that contains only CGI variables, nothing from the
@@ -578,26 +584,28 @@
 void cartFlushHubWarnings();
 /* flush the hub errors (if any) */
 
 void cartCheckForCustomTracks(struct cart *cart, struct dyString *dyMessage);
 /* Scan cart for ctfile_<db> variables.  Tally up the databases that have
  * live custom tracks and those that have expired custom tracks. */
 /* While we're at it, also look for saved blat results. */
 
 #define CART_HAS_DEFAULT_VISIBILITY "defaultsSet"
 
 extern void cartHideDefaultTracks(struct cart *cart);
 /* Hide all the tracks who have default visibilities in trackDb
  * that are something other than hide.  Do this only if the
  * variable CART_HAS_DEFAULT_VISIBILITY is set in the cart.  */
 
-char *cartGetPosition(struct cart *cart, char *database);
+char *cartGetPosition(struct cart *cart, char *database, struct cart **pLastDbPosCart);
 /* get the current position in cart as a string chr:start-end.
  * This can handle the special CGI params 'default' and 'lastDbPos'
  * Returned value has to be freed. Returns default position of assembly 
  * if no position set in cart nor as CGI var.
+ * For virtual modes, returns the type and extraState. 
 */
 
-void cartSetDbPosition(struct cart *cart, char *database, char *position);
-/* set the 'position.db' variable in the cart */
+void cartSetDbPosition(struct cart *cart, char *database, struct cart *lastDbPosCart);
+/* Set the 'position.db' variable in the cart.*/
+
 #endif /* CART_H */