Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
541bd73b
Commit
541bd73b
authored
16 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
if enum property is set to XXX_INVALID this now resets the field_set.XXXX to FALSE now.
parent
41b21aa3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/ZMap/zmapStyle.h
+40
-41
40 additions, 41 deletions
src/include/ZMap/zmapStyle.h
src/zmapFeature/zmapStyle.c
+29
-13
29 additions, 13 deletions
src/zmapFeature/zmapStyle.c
with
69 additions
and
54 deletions
src/include/ZMap/zmapStyle.h
+
40
−
41
View file @
541bd73b
...
...
@@ -26,9 +26,9 @@
* Description: Style and Style set handling functions.
*
* HISTORY:
* Last edited: Nov 1
3
1
7:00
2008 (edgrif)
* Last edited: Nov 1
7
1
3:51
2008 (edgrif)
* Created: Mon Feb 26 09:28:26 2007 (edgrif)
* CVS info: $Id: zmapStyle.h,v 1.2
7
2008-11-1
3
17:
13:43
edgrif Exp $
* CVS info: $Id: zmapStyle.h,v 1.2
8
2008-11-1
7
17:
07:02
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_STYLE_H
...
...
@@ -121,8 +121,8 @@ _(ZMAPSTYLE_MODE_INVALID, , "invalid") /**< invalid mode */ \
_(ZMAPSTYLE_MODE_BASIC, , "basic")
/**< Basic box features */
\
_(ZMAPSTYLE_MODE_ALIGNMENT, , "alignment")
/**< Usual homology structure */
\
_(ZMAPSTYLE_MODE_TRANSCRIPT, , "transcript")
/**< Usual transcript like structure */
\
_(ZMAPSTYLE_MODE_RAW_SEQUENCE, , "raw
_
sequence")
/**< DNA Sequence */
\
_(ZMAPSTYLE_MODE_PEP_SEQUENCE, , "pep
_
sequence")
/**< Peptide Sequence */
\
_(ZMAPSTYLE_MODE_RAW_SEQUENCE, , "raw
-
sequence")
/**< DNA Sequence */
\
_(ZMAPSTYLE_MODE_PEP_SEQUENCE, , "pep
-
sequence")
/**< Peptide Sequence */
\
_(ZMAPSTYLE_MODE_TEXT, , "text")
/**< Text only display */
\
_(ZMAPSTYLE_MODE_GRAPH, , "graph")
/**< Graphs of various types */
\
_(ZMAPSTYLE_MODE_GLYPH, , "glyph")
/**< Meta object controlling other features */
\
...
...
@@ -134,18 +134,51 @@ ZMAP_DEFINE_ENUM(ZMapStyleMode, ZMAP_STYLE_MODE_LIST);
#define ZMAP_STYLE_COLUMN_DISPLAY_LIST(_) \
_(ZMAPSTYLE_COLDISPLAY_INVALID, , "invalid")
/**< invalid mode */
\
_(ZMAPSTYLE_COLDISPLAY_HIDE, , "hide")
/**< Never show. */
\
_(ZMAPSTYLE_COLDISPLAY_SHOW_HIDE, , "show
_
hide")
/**< Show according to zoom/mag, mark etc. */
\
_(ZMAPSTYLE_COLDISPLAY_SHOW_HIDE, , "show
-
hide")
/**< Show according to zoom/mag, mark etc. */
\
_(ZMAPSTYLE_COLDISPLAY_SHOW, , "show")
/**< Always show. */
ZMAP_DEFINE_ENUM
(
ZMapStyleColumnDisplayState
,
ZMAP_STYLE_COLUMN_DISPLAY_LIST
);
/* Specifies how features in columns should be overlapped for compact display. */
#define ZMAP_STYLE_OVERLAP_MODE_LIST(_) \
_(ZMAPOVERLAP_INVALID, , "invalid") \
_(ZMAPOVERLAP_COMPLETE, , "complete")
/* draw on top - default */
\
_(ZMAPOVERLAP_OVERLAP, , "overlap")
/* bump if feature coords overlap. */
\
_(ZMAPOVERLAP_POSITION, , "position")
/* bump if features start at same coord. */
\
_(ZMAPOVERLAP_NAME, , "name")
/* one column per homol target */
\
_(ZMAPOVERLAP_OSCILLATE, , "oscillate")
/* Oscillate between one column and another... \
Useful for displaying tile paths. */
\
_(ZMAPOVERLAP_ITEM_OVERLAP, , "item-overlap")
/* bump if item coords overlap in canvas space... */
\
_(ZMAPOVERLAP_SIMPLE, , "simple")
/* one column per feature, for testing... */
\
_(ZMAPOVERLAP_ENDS_RANGE, , "ends-range")
/* Sort by 5' and 3' best/biggest \
matches, one match per column, very \
fmap like but better... */
\
_(ZMAPOVERLAP_COMPLEX_INTERLEAVE, , "complex-interleave")
/* all features with same name in a \
single sub-column, several names in one \
column but no 2 features overlap. */
\
_(ZMAPOVERLAP_COMPLEX_NO_INTERLEAVE, , "complex-interleave")
/* as ZMAPOVERLAP_COMPLEX but no interleaving of \
features with different names. */
\
_(ZMAPOVERLAP_COMPLEX_RANGE, , "complex-range")
/* All features with same name in a \
single column if they overlap the \
'mark' range, all other features in \
a single column. */
\
_(ZMAPOVERLAP_COMPLEX_LIMIT, , "complex-limit")
/* As ZMAPOVERLAP_COMPLEX_RANGE but constrain matches \
to be colinear within range or are truncated. */
/* We should do this automatically or not at all..... */
#define ZMAPOVERLAP_START ZMAPOVERLAP_COMPLETE
#define ZMAPOVERLAP_END ZMAPOVERLAP_COMPLEX_LIMIT
ZMAP_DEFINE_ENUM
(
ZMapStyleOverlapMode
,
ZMAP_STYLE_OVERLAP_MODE_LIST
)
;
#define ZMAP_STYLE_3_FRAME_LIST(_) \
_(ZMAPSTYLE_3_FRAME_INVALID, , "invalid")
/**< invalid mode */
\
_(ZMAPSTYLE_3_FRAME_NEVER, , "never")
/**< Not frame sensitive. */
\
_(ZMAPSTYLE_3_FRAME_ALWAYS, , "always")
/**< Display normally and as 3 cols in 3 frame mode. */
\
_(ZMAPSTYLE_3_FRAME_ONLY_3, , "only
_
3")
/**< Only dislay in 3 frame mode as 3 cols. */
\
_(ZMAPSTYLE_3_FRAME_ONLY_1, , "only
_
1")
/**< Only display in 3 frame mode as 1 col. */
_(ZMAPSTYLE_3_FRAME_ONLY_3, , "only
-
3")
/**< Only dislay in 3 frame mode as 3 cols. */
\
_(ZMAPSTYLE_3_FRAME_ONLY_1, , "only
-
1")
/**< Only display in 3 frame mode as 1 col. */
ZMAP_DEFINE_ENUM
(
ZMapStyle3FrameMode
,
ZMAP_STYLE_3_FRAME_LIST
);
...
...
@@ -210,40 +243,6 @@ _(ZMAPSCORE_PERCENT, , "percent")
ZMAP_DEFINE_ENUM
(
ZMapStyleScoreMode
,
ZMAP_STYLE_SCORE_MODE_LIST
)
;
/* Specifies how features in columns should be overlapped for compact display. */
#define ZMAP_STYLE_OVERLAP_MODE_LIST(_) \
_(ZMAPOVERLAP_INVALID, , "invalid") \
_(ZMAPOVERLAP_COMPLETE, , "complete")
/* draw on top - default */
\
_(ZMAPOVERLAP_OVERLAP, , "overlap")
/* bump if feature coords overlap. */
\
_(ZMAPOVERLAP_POSITION, , "position")
/* bump if features start at same coord. */
\
_(ZMAPOVERLAP_NAME, , "name")
/* one column per homol target */
\
_(ZMAPOVERLAP_OSCILLATE, , "oscillate")
/* Oscillate between one column and another... \
Useful for displaying tile paths. */
\
_(ZMAPOVERLAP_ITEM_OVERLAP, , "item_overlap")
/* bump if item coords overlap in canvas space... */
\
_(ZMAPOVERLAP_SIMPLE, , "simple")
/* one column per feature, for testing... */
\
_(ZMAPOVERLAP_ENDS_RANGE, , "ends_range")
/* Sort by 5' and 3' best/biggest \
matches, one match per column, very \
fmap like but better... */
\
_(ZMAPOVERLAP_COMPLEX_INTERLEAVE, , "complex_interleave")
/* all features with same name in a \
single sub-column, several names in one \
column but no 2 features overlap. */
\
_(ZMAPOVERLAP_COMPLEX_NO_INTERLEAVE, , "complex_interleave")
/* as ZMAPOVERLAP_COMPLEX but no interleaving of \
features with different names. */
\
_(ZMAPOVERLAP_COMPLEX_RANGE, , "complex_range")
/* All features with same name in a \
single column if they overlap the \
'mark' range, all other features in \
a single column. */
\
_(ZMAPOVERLAP_COMPLEX_LIMIT, , "complex_limit")
/* As ZMAPOVERLAP_COMPLEX_RANGE but constrain matches \
to be colinear within range or are truncated. */
ZMAP_DEFINE_ENUM
(
ZMapStyleOverlapMode
,
ZMAP_STYLE_OVERLAP_MODE_LIST
)
;
/* We should do this automatically or not at all..... */
#define ZMAPOVERLAP_START ZMAPOVERLAP_COMPLETE
#define ZMAPOVERLAP_END ZMAPOVERLAP_COMPLEX_LIMIT
/* Note the naming here in the macros. ZMAP_TYPE_FEATURE_TYPE_STYLE seemed confusing... */
#define ZMAP_TYPE_FEATURE_STYLE (zMapFeatureTypeStyleGetType())
...
...
This diff is collapsed.
Click to expand it.
src/zmapFeature/zmapStyle.c
+
29
−
13
View file @
541bd73b
...
...
@@ -28,9 +28,9 @@
*
* Exported functions: See ZMap/zmapStyle.h
* HISTORY:
* Last edited: Nov 1
4 08:02
2008 (
rds
)
* Last edited: Nov 1
7 16:51
2008 (
edgrif
)
* Created: Mon Feb 26 09:12:18 2007 (edgrif)
* CVS info: $Id: zmapStyle.c,v 1.2
1
2008-11-1
4 08:02:36 rds
Exp $
* CVS info: $Id: zmapStyle.c,v 1.2
2
2008-11-1
7 17:07:02 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -108,6 +108,8 @@ enum
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
#define SETMODEFIELD(STYLE, COPY_STYLE, VALUE, FIELD_TYPE, FIELD_SET, FIELD) \
if (!COPY_STYLE || (COPY_STYLE)->FIELD_SET) \
{ \
...
...
@@ -119,6 +121,19 @@ enum
(STYLE)->FIELD_SET = TRUE ; \
} \
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
#define SETMODEFIELD(STYLE, COPY_STYLE, VALUE, FIELD_TYPE, FIELD_SET, FIELD) \
if (!COPY_STYLE || (COPY_STYLE)->FIELD_SET) \
{ \
if (((STYLE)->FIELD = g_value_get_uint((VALUE)))) \
(STYLE)->FIELD_SET = TRUE ; \
else \
(STYLE)->FIELD_SET = FALSE ; \
}
#define SETBOOLFIELD(STYLE, COPY_STYLE, VALUE, FIELD_SET, FIELD) \
if (!COPY_STYLE || (COPY_STYLE)->FIELD_SET) \
...
...
@@ -1925,9 +1940,9 @@ static void zmap_feature_type_style_class_init(ZMapFeatureTypeStyleClass style_c
STYLE_PROP_COLUMN_DISPLAY_MODE
,
g_param_spec_uint
(
ZMAPSTYLE_PROPERTY_DISPLAY_MODE
,
"display-mode"
,
"Display mode"
,
ZMAPSTYLE_COLDISPLAY_
H
ID
E
,
ZMAPSTYLE_COLDISPLAY_
INVAL
ID
,
ZMAPSTYLE_COLDISPLAY_SHOW
,
ZMAPSTYLE_COLDISPLAY_
SHOW_H
ID
E
,
ZMAPSTYLE_COLDISPLAY_
INVAL
ID
,
ZMAP_PARAM_STATIC_RW
));
...
...
@@ -1936,18 +1951,18 @@ static void zmap_feature_type_style_class_init(ZMapFeatureTypeStyleClass style_c
STYLE_PROP_OVERLAP_MODE
,
g_param_spec_uint
(
ZMAPSTYLE_PROPERTY_OVERLAP_MODE
,
"overlap-mode"
,
"The Overlap Mode"
,
ZMAPOVERLAP_
START
,
ZMAPOVERLAP_
INVALID
,
ZMAPOVERLAP_END
,
ZMAPOVERLAP_
START
,
ZMAPOVERLAP_
INVALID
,
ZMAP_PARAM_STATIC_RW
));
/* overlap default */
g_object_class_install_property
(
gobject_class
,
STYLE_PROP_OVERLAP_DEFAULT
,
g_param_spec_uint
(
ZMAPSTYLE_PROPERTY_DEFAULT_OVERLAP_MODE
,
"default-overlap-mode"
,
"The Default Overlap Mode"
,
ZMAPOVERLAP_
START
,
ZMAPOVERLAP_
INVALID
,
ZMAPOVERLAP_END
,
ZMAPOVERLAP_
START
,
ZMAPOVERLAP_
INVALID
,
ZMAP_PARAM_STATIC_RW
));
/* bump spacing */
g_object_class_install_property
(
gobject_class
,
...
...
@@ -1962,9 +1977,9 @@ static void zmap_feature_type_style_class_init(ZMapFeatureTypeStyleClass style_c
STYLE_PROP_FRAME_MODE
,
g_param_spec_uint
(
ZMAPSTYLE_PROPERTY_FRAME_MODE
,
"3 frame display mode"
,
"Defines frame sensitive display in 3 frame mode."
,
ZMAPSTYLE_3_FRAME_
NEVER
,
ZMAPSTYLE_3_FRAME_
INVALID
,
ZMAPSTYLE_3_FRAME_ONLY_1
,
ZMAPSTYLE_3_FRAME_
NEVER
,
ZMAPSTYLE_3_FRAME_
INVALID
,
ZMAP_PARAM_STATIC_RW
));
...
...
@@ -1995,9 +2010,9 @@ static void zmap_feature_type_style_class_init(ZMapFeatureTypeStyleClass style_c
STYLE_PROP_SCORE_MODE
,
g_param_spec_uint
(
ZMAPSTYLE_PROPERTY_SCORE_MODE
,
"score-mode"
,
"Score Mode"
,
ZMAPS
TYLE_GRAPH_LINE
,
ZMAPS
CORE_INVALID
,
ZMAPSCORE_PERCENT
,
ZMAPSCORE_
WIDTH
,
ZMAPSCORE_
INVALID
,
ZMAP_PARAM_STATIC_RW
));
/* min score */
g_object_class_install_property
(
gobject_class
,
...
...
@@ -2079,7 +2094,8 @@ static void zmap_feature_type_style_class_init(ZMapFeatureTypeStyleClass style_c
STYLE_PROP_GRAPH_MODE
,
g_param_spec_uint
(
ZMAPSTYLE_PROPERTY_GRAPH_MODE
,
"graph-mode"
,
"Graph Mode"
,
ZMAPSTYLE_GRAPH_INVALID
,
ZMAPSTYLE_GRAPH_HISTOGRAM
,
ZMAPSTYLE_GRAPH_INVALID
,
ZMAPSTYLE_GRAPH_HISTOGRAM
,
ZMAPSTYLE_GRAPH_INVALID
,
ZMAP_PARAM_STATIC_RW
));
/* Graph baseline value. */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment