Skip to content
Snippets Groups Projects
Commit b9dfdb78 authored by edgrif's avatar edgrif
Browse files

add calls to get/set overlap mode in style + set style for feature set.

parent 891e60d1
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,9 @@
* Description: Data structures describing a sequence feature.
*
* HISTORY:
* Last edited: May 27 13:23 2006 (edgrif)
* Last edited: Jun 14 14:01 2006 (edgrif)
* Created: Fri Jun 11 08:37:19 2004 (edgrif)
* CVS info: $Id: zmapFeature.h,v 1.71 2006-05-27 13:39:56 edgrif Exp $
* CVS info: $Id: zmapFeature.h,v 1.72 2006-06-14 14:49:25 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_FEATURE_H
......@@ -418,6 +418,7 @@ typedef enum
/* Specifies how features in columns should be overlapped for compact display. */
typedef enum
{
ZMAPOVERLAP_START,
ZMAPOVERLAP_COMPLETE, /* draw on top - default */
ZMAPOVERLAP_OVERLAP, /* bump if feature coords overlap. */
ZMAPOVERLAP_POSITION, /* bump if features start at same coord. */
......@@ -425,7 +426,8 @@ typedef enum
ZMAPOVERLAP_COMPLEX, /* all features with same name in a
single column, several names in one
column but no overlaps. */
ZMAPOVERLAP_SIMPLE /* one column per feature, for testing... */
ZMAPOVERLAP_SIMPLE, /* one column per feature, for testing... */
ZMAPOVERLAP_END
} ZMapStyleOverlapMode ;
......@@ -614,7 +616,8 @@ gboolean zMapFeatureAddURL(ZMapFeature feature, char *url) ;
void zmapFeatureDestroy(ZMapFeature feature) ;
ZMapFeatureSet zMapFeatureSetCreate(char *source, GData *features) ;
ZMapFeatureSet zMapFeatureSetIDCreate(GQuark original_id, GQuark unique_id, GData *features) ;
ZMapFeatureSet zMapFeatureSetIDCreate(GQuark original_id, GQuark unique_id,
ZMapFeatureTypeStyle style, GData *features) ;
gboolean zMapFeatureSetAddFeature(ZMapFeatureSet feature_set, ZMapFeature feature) ;
gboolean zMapFeatureSetRemoveFeature(ZMapFeatureSet feature_set, ZMapFeature feature) ;
char *zMapFeatureSetGetName(ZMapFeatureSet feature_set) ;
......@@ -624,6 +627,8 @@ void zMapFeatureSetDestroy(ZMapFeatureSet feature_set, gboolean free_data) ;
ZMapFeatureAny zMapFeatureGetGroup(ZMapFeatureAny any_feature, ZMapFeatureStructType group_type) ;
gboolean zMapSetListEqualStyles(GList **feature_set_names, GList **styles) ;
/* Style functions. */
......@@ -644,7 +649,6 @@ void zMapStyleSetStrandAttrs(ZMapFeatureTypeStyle type,
void zMapStyleSetHideInitial(ZMapFeatureTypeStyle style, gboolean hide_initially) ;
gboolean zMapStyleGetHideInitial(ZMapFeatureTypeStyle style) ;
void zMapStyleSetEndStyle(ZMapFeatureTypeStyle style, gboolean directional);
void zMapStyleSetBump(ZMapFeatureTypeStyle type, char *bump) ;
void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style,
gboolean show_gaps,
gboolean parse_gaps);
......@@ -662,7 +666,12 @@ void zMapFeatureTypeGetColours(ZMapFeatureTypeStyle style,
GdkColor **foreground,
GdkColor **outline);
void zMapFeatureTypePrintAll(GData *type_set, char *user_string) ;
gboolean zMapSetListEqualStyles(GList **feature_set_names, GList **styles) ;
void zMapStyleSetBump(ZMapFeatureTypeStyle type, char *bump) ;
ZMapStyleOverlapMode zMapStyleGetOverlapMode(ZMapFeatureTypeStyle style) ;
void zMapStyleSetOverlapMode(ZMapFeatureTypeStyle style, ZMapStyleOverlapMode overlap_mode) ;
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See zmapView_P.h
* HISTORY:
* Last edited: May 19 13:11 2006 (edgrif)
* Last edited: Jun 14 14:08 2006 (edgrif)
* Created: Fri Jul 16 13:05:58 2004 (edgrif)
* CVS info: $Id: zmapFeature.c,v 1.34 2006-05-19 15:56:56 edgrif Exp $
* CVS info: $Id: zmapFeature.c,v 1.35 2006-06-14 14:49:24 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -506,7 +506,7 @@ ZMapFeatureSet zMapFeatureSetCreate(char *source, GData *features)
unique_id = zMapStyleCreateID(source) ;
original_id = g_quark_from_string(source) ;
feature_set = zMapFeatureSetIDCreate(original_id, unique_id, features) ;
feature_set = zMapFeatureSetIDCreate(original_id, unique_id, NULL, features) ;
return feature_set ;
}
......@@ -516,7 +516,8 @@ ZMapFeatureSet zMapFeatureSetCreate(char *source, GData *features)
* original_id the original name of the feature set
* unique_id some derivation of the original name or otherwise unique id to identify this
* feature set. */
ZMapFeatureSet zMapFeatureSetIDCreate(GQuark original_id, GQuark unique_id, GData *features)
ZMapFeatureSet zMapFeatureSetIDCreate(GQuark original_id, GQuark unique_id,
ZMapFeatureTypeStyle style, GData *features)
{
ZMapFeatureSet feature_set ;
......@@ -524,6 +525,7 @@ ZMapFeatureSet zMapFeatureSetIDCreate(GQuark original_id, GQuark unique_id, GDat
feature_set->struct_type = ZMAPFEATURE_STRUCT_FEATURESET ;
feature_set->unique_id = unique_id ;
feature_set->original_id = original_id ;
feature_set->style = style ;
if (!features)
g_datalist_init(&(feature_set->features)) ;
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See ZMap/zmapFeature.h
* HISTORY:
* Last edited: May 24 10:53 2006 (rds)
* Last edited: Jun 14 13:44 2006 (edgrif)
* Created: Tue Dec 14 13:15:11 2004 (edgrif)
* CVS info: $Id: zmapFeatureTypes.c,v 1.21 2006-05-26 18:03:18 rds Exp $
* CVS info: $Id: zmapFeatureTypes.c,v 1.22 2006-06-14 14:49:24 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -302,6 +302,24 @@ void zMapStyleSetBump(ZMapFeatureTypeStyle style, char *bump_str)
void zMapStyleSetOverlapMode(ZMapFeatureTypeStyle style, ZMapStyleOverlapMode overlap_mode)
{
zMapAssert(overlap_mode > ZMAPOVERLAP_START && overlap_mode < ZMAPOVERLAP_END) ;
style->overlap_mode = overlap_mode ;
return ;
}
ZMapStyleOverlapMode zMapStyleGetOverlapMode(ZMapFeatureTypeStyle style)
{
return style->overlap_mode ;
}
void zMapStyleSetGappedAligns(ZMapFeatureTypeStyle style,
gboolean show_gaps,
gboolean parse_gaps)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment