f63a718960b6a66276d579e7cd3fbb107f2cfd78 tdreszer Tue Nov 16 16:37:13 2010 -0800 Removed obsolete ifdef for SUBTRACKS_HAVE_VIS. Streamlined some composite vis code. Added support for remote tracks being rendered by AJAX callback. Currently ifdefed out. diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index 4ed41c6..132d89c 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -223,30 +223,33 @@ /* the track was pressed (as opposed to the next-item buttons on the */ /* track items themselves... see nextPrevExon() ). This is meant for */ /* going to the next/previous item currently unseen in the browser, */ /* e.g. the next gene. SO FAR THIS IS UNIMPLEMENTED. */ char *(*itemDataName)(struct track *tg, char *itemName); /* If not NULL, function to translated an itemName into a data name. * This is can be used for looking up sequence, CDS, etc. It is used * to support item names that have uniqueness identifiers added to deal * with multiple alignments. The resulting value should *not* be freed, * and it should be assumed that it might only remain valid for a short * period of time.*/ int loadTime; /* Time it takes to load (for performance tuning) */ int drawTime; /* Time it takes to draw (for performance tuning) */ + + enum enumBool remoteDataSource; /* The data for this track is from a remote source */ + /* Slow retrieval means image can be rendered via an AJAX callback. */ }; typedef void (*TrackHandler)(struct track *tg); int trackPriCmp(const void *va, const void *vb); /* Compare for sort based on priority */ boolean trackIsCompositeWithSubtracks(struct track *track); /* Temporary function until all composite tracks point to their own children */ struct trackRef /* A reference to a track. */ { struct trackRef *next; /* Next in list. */ @@ -1229,23 +1232,39 @@ #define SMALLBUF 128 char *bbiNameFromTable(struct sqlConnection *conn, char *table); /* Return file name from little track table. */ char *trackUrl(char *mapName, char *chromName); /* Return hgTrackUi url; chromName is optional. */ void bedDetailCtMethods (struct track *tg, struct customTrack *ct); /* Load bedDetail track from custom tracks as bed or linked features */ void pgSnpCtMethods (struct track *tg); /* Load pgSnp track from custom tracks */ -#ifdef SUBTRACKS_HAVE_VIS void parentChildCartCleanup(struct track *trackList,struct cart *newCart,struct hash *oldVars); /* When composite/view settings changes, remove subtrack specific vis When superTrackChild is found and selected, shape superTrack to match. */ -#endif//def SUBTRACKS_HAVE_VIS + +void dontLoadItems(struct track *tg); +/* No-op loadItems when we aren't going to try. */ + +//#define REMOTE_TRACK_AJAX_CALLBACK +#ifdef REMOTE_TRACK_AJAX_CALLBACK +#define REMOTE_TRACK_HEIGHT (tl.fontHeight*2) + +boolean trackShouldUseAjaxRetrieval(struct track *track); +/* Tracks with remote data sources should berendered via an ajax callback */ + +#else//ifndef + +#define REMOTE_TRACK_HEIGHT 0 +#define trackShouldUseAjaxRetrieval(track) FALSE + +#endif//ndef REMOTE_TRACK_AJAX_CALLBACK + #endif /* HGTRACKS_H */