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
4de4054f
Commit
4de4054f
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add new version of display mode setting code to fix bugs.
parent
34122cd5
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/zmapWindow/items/zmapWindowContainerFeatureSet.c
+60
-16
60 additions, 16 deletions
src/zmapWindow/items/zmapWindowContainerFeatureSet.c
src/zmapWindow/items/zmapWindowContainerFeatureSet.h
+9
-2
9 additions, 2 deletions
src/zmapWindow/items/zmapWindowContainerFeatureSet.h
with
69 additions
and
18 deletions
src/zmapWindow/items/zmapWindowContainerFeatureSet.c
+
60
−
16
View file @
4de4054f
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Oct 27 11:53
200
9
(edgrif)
* Last edited:
Jan 19 18:31
20
1
0 (edgrif)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowContainerFeatureSet.c,v 1.1
6
2010-01-19 1
2
:3
6
:5
3 mh17
Exp $
* CVS info: $Id: zmapWindowContainerFeatureSet.c,v 1.1
7
2010-01-19 1
8
:3
3
:5
7 edgrif
Exp $
*-------------------------------------------------------------------
*/
#include
<string.h>
/* memset */
...
...
@@ -82,6 +82,8 @@ typedef struct
ZMapFeature
feature
;
}
QueueFeatureStruct
,
*
QueueFeature
;
static
void
zmap_window_item_feature_set_class_init
(
ZMapWindowContainerFeatureSetClass
container_set_class
);
static
void
zmap_window_item_feature_set_init
(
ZMapWindowContainerFeatureSet
container_set
);
static
void
zmap_window_item_feature_set_set_property
(
GObject
*
gobject
,
...
...
@@ -109,16 +111,18 @@ static void zmap_g_queue_replace(GQueue *queue, gpointer old, gpointer new);
static
GObjectClass
*
parent_class_G
=
NULL
;
static
gboolean
debug_table_ids_G
=
FALSE
;
/*!
* \brief Get the GType for the ZMapWindowContainerFeatureSet GObjects
*
* \return GType corresponding to the GObject as registered by glib.
*/
GType
zmapWindowContainerFeatureSetGetType
(
void
)
{
static
GType
group_type
=
0
;
...
...
@@ -532,13 +536,13 @@ gboolean zmapWindowContainerFeatureSetGetMagValues(ZMapWindowContainerFeatureSet
/*!
* \brief Access the display state of a column.
* Functions to set/get display state of column, i.e. show, show_hide or hide. Complicated
* by having an overall state for the column and potentially sub-states for sub-features.
*
* \param The container to interrogate.
*
* \return The display state of the container.
*/
ZMapStyleColumnDisplayState
zmapWindowContainerFeatureSetGetDisplay
(
ZMapWindowContainerFeatureSet
container_set
)
{
ZMapStyleColumnDisplayState
display
=
ZMAPSTYLE_COLDISPLAY_SHOW
;
...
...
@@ -547,16 +551,19 @@ ZMapStyleColumnDisplayState zmapWindowContainerFeatureSetGetDisplay(ZMapWindowCo
ZMAPSTYLE_PROPERTY_DISPLAY_MODE
,
&
(
container_set
->
settings
.
display_state
),
NULL
);
display
=
container_set
->
settings
.
display_state
;
display
=
container_set
->
settings
.
display_state
;
return
display
;
return
display
;
}
/*!
* \brief Change the display state of the container.
/*! Sets the given state both on the column _and_ in all the styles for the features
* within that column.
*
* This function needs to update all the styles in the local cache of styles that the column holds.
* However this does not actually
take care of
the foo_canvas_show/hide of the column, as that is
* However this does not actually
do
the foo_canvas_show/hide of the column, as that is
* application logic that is held elsewhere.
*
* \param container The container to set.
...
...
@@ -564,11 +571,16 @@ ZMapStyleColumnDisplayState zmapWindowContainerFeatureSetGetDisplay(ZMapWindowCo
*
* \return void
*/
void
zmapWindowContainerFeatureSetDisplay
(
ZMapWindowContainerFeatureSet
container_set
,
ZMapStyleColumnDisplayState
state
)
void
zmapWindowContainerFeatureSetSetDisplay
(
ZMapWindowContainerFeatureSet
container_set
,
ZMapStyleColumnDisplayState
state
)
{
ItemFeatureValueDataStruct
value_data
=
{
NULL
};
GValue
value
=
{
0
};
g_object_set
(
G_OBJECT
(
container_set
),
ZMAPSTYLE_PROPERTY_DISPLAY_MODE
,
state
,
NULL
);
g_value_init
(
&
value
,
G_TYPE_UINT
);
g_value_set_uint
(
&
value
,
state
);
...
...
@@ -590,6 +602,9 @@ void zmapWindowContainerFeatureSetDisplay(ZMapWindowContainerFeatureSet containe
}
/*!
* \brief Example of how to change the setting in only one style.
*
...
...
@@ -652,6 +667,7 @@ gboolean zmapWindowContainerFeatureSetShowWhenEmpty(ZMapWindowContainerFeatureSe
return
show
;
}
/*!
* \brief Access the frame mode of a column.
*
...
...
@@ -659,7 +675,6 @@ gboolean zmapWindowContainerFeatureSetShowWhenEmpty(ZMapWindowContainerFeatureSe
*
* \return The frame mode of the container.
*/
ZMapStyle3FrameMode
zmapWindowContainerFeatureSetGetFrameMode
(
ZMapWindowContainerFeatureSet
container_set
)
{
ZMapStyle3FrameMode
frame_mode
=
ZMAPSTYLE_3_FRAME_INVALID
;
...
...
@@ -1101,7 +1116,7 @@ static void zmap_window_item_feature_set_class_init(ZMapWindowContainerFeatureSe
ZMAPSTYLE_COLDISPLAY_INVALID
,
ZMAPSTYLE_COLDISPLAY_SHOW
,
ZMAPSTYLE_COLDISPLAY_INVALID
,
ZMAP_PARAM_STATIC_R
O
));
ZMAP_PARAM_STATIC_R
W
));
/* bump mode */
g_object_class_install_property
(
gobject_class
,
...
...
@@ -1193,9 +1208,15 @@ static void zmap_window_item_feature_set_set_property(GObject *gobject,
const
GValue
*
value
,
GParamSpec
*
pspec
)
{
ZMapWindowContainerFeatureSet
container_feature_set
;
container_feature_set
=
ZMAP_CONTAINER_FEATURESET
(
gobject
);
switch
(
param_id
)
{
case
ITEM_FEATURE_SET_VISIBLE
:
container_feature_set
->
settings
.
display_state
=
g_value_get_uint
(
value
)
;
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
gobject
,
param_id
,
pspec
);
break
;
...
...
@@ -1394,7 +1415,6 @@ static void extract_value_from_style_table(gpointer key, gpointer value, gpointe
}
case
ITEM_FEATURE_SET_FRAME_MODE
:
case
ITEM_FEATURE_SET_VISIBLE
:
case
ITEM_FEATURE_SET_BUMP_MODE
:
case
ITEM_FEATURE_SET_DEFAULT_BUMP_MODE
:
{
...
...
@@ -1402,7 +1422,7 @@ static void extract_value_from_style_table(gpointer key, gpointer value, gpointe
current
=
g_value_get_uint
(
value_data
->
gvalue
);
if
(
!
current
)
if
(
!
current
)
{
g_object_get
(
G_OBJECT
(
style
),
value_data
->
spec_name
,
&
style_version
,
...
...
@@ -1411,8 +1431,30 @@ static void extract_value_from_style_table(gpointer key, gpointer value, gpointe
if
(
style_version
)
g_value_set_uint
(
value_data
->
gvalue
,
style_version
);
}
break
;
}
break
;
case
ITEM_FEATURE_SET_VISIBLE
:
{
guint
style_version
=
0
,
current
;
current
=
g_value_get_uint
(
value_data
->
gvalue
);
if
(
!
current
)
{
g_object_get
(
G_OBJECT
(
style
),
value_data
->
spec_name
,
&
style_version
,
NULL
);
if
(
style_version
)
g_value_set_uint
(
value_data
->
gvalue
,
style_version
);
}
break
;
}
case
ITEM_FEATURE_SET_JOIN_ALIGNS
:
{
guint
style_version
=
0
,
current
;
...
...
@@ -1598,3 +1640,5 @@ static void zmap_g_queue_replace(GQueue *queue, gpointer old, gpointer new)
return
;
}
This diff is collapsed.
Click to expand it.
src/zmapWindow/items/zmapWindowContainerFeatureSet.h
+
9
−
2
View file @
4de4054f
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Nov 6 17:5
9 200
9
(edgrif)
* Last edited:
Jan 17 11:0
9 20
1
0 (edgrif)
* Created: Wed Dec 3 08:21:03 2008 (rds)
* CVS info: $Id: zmapWindowContainerFeatureSet.h,v 1.
8
2010-01-19 1
2
:3
6
:5
3 mh17
Exp $
* CVS info: $Id: zmapWindowContainerFeatureSet.h,v 1.
9
2010-01-19 1
8
:3
3
:5
7 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -96,9 +96,16 @@ double zmapWindowContainerFeatureSetGetWidth(ZMapWindowContainerFeatureSet c
double
zmapWindowContainerFeatureGetBumpSpacing
(
ZMapWindowContainerFeatureSet
container_set
);
gboolean
zmapWindowContainerFeatureSetGetMagValues
(
ZMapWindowContainerFeatureSet
container_set
,
double
*
min_mag_out
,
double
*
max_mag_out
);
ZMapStyleColumnDisplayState
zmapWindowContainerFeatureSetGetDisplay
(
ZMapWindowContainerFeatureSet
container_set
);
void
zmapWindowContainerFeatureSetSetDisplay
(
ZMapWindowContainerFeatureSet
container_set
,
ZMapStyleColumnDisplayState
state
)
;
/* this one sets a style which is probably wrong.... */
void
zmapWindowContainerFeatureSetDisplay
(
ZMapWindowContainerFeatureSet
container_set
,
ZMapStyleColumnDisplayState
state
);
gboolean
zmapWindowContainerFeatureSetShowWhenEmpty
(
ZMapWindowContainerFeatureSet
container_set
);
ZMapStyle3FrameMode
zmapWindowContainerFeatureSetGetFrameMode
(
ZMapWindowContainerFeatureSet
container_set
);
gboolean
zmapWindowContainerFeatureSetIsFrameSpecific
(
ZMapWindowContainerFeatureSet
container_set
,
...
...
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