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
a84ef572
Commit
a84ef572
authored
19 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add code to remove long items from long item list if they are removed from canvas.
parent
dc1b7eab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapWindow/zmapWindowUtils.c
+40
-30
40 additions, 30 deletions
src/zmapWindow/zmapWindowUtils.c
with
40 additions
and
30 deletions
src/zmapWindow/zmapWindowUtils.c
+
40
−
30
View file @
a84ef572
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapWindow.h
* HISTORY:
* Last edited: Oct 1
0
1
8:38
2005 (edgrif)
* Last edited: Oct 1
2
1
5:15
2005 (edgrif)
* Created: Thu Jan 20 14:43:12 2005 (edgrif)
* CVS info: $Id: zmapWindowUtils.c,v 1.2
2
2005-10-1
0
1
7
:3
9:29
edgrif Exp $
* CVS info: $Id: zmapWindowUtils.c,v 1.2
3
2005-10-1
3
1
3
:3
1:37
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -40,6 +40,7 @@
static
void
cropLongItem
(
gpointer
data
,
gpointer
user_data
)
;
static
void
freeLongItem
(
gpointer
data
,
gpointer
user_data_unused
)
;
gint
findLongItemCB
(
gconstpointer
data
,
gconstpointer
user_data
)
;
static
void
moveExonsIntrons
(
ZMapWindow
window
,
ZMapFeature
origFeature
,
...
...
@@ -204,34 +205,6 @@ ZMapWindowClampType zmapWindowClampSpan(ZMapWindow window, double *top_inout, do
}
/* Make a rectangle as big as its parent group, good for when you have one as a background
* to items in a group. */
void
zmapWindowMaximiseRectangle
(
FooCanvasItem
*
rectangle
)
{
FooCanvasGroup
*
parent_group
;
double
x1
,
y1
,
x2
,
y2
;
zMapAssert
(
FOO_IS_CANVAS_RE
(
rectangle
))
;
parent_group
=
FOO_CANVAS_GROUP
(
rectangle
->
parent
)
;
foo_canvas_item_get_bounds
(
FOO_CANVAS_ITEM
(
parent_group
),
&
x1
,
&
y1
,
&
x2
,
&
y2
)
;
zmapWindowExt2Zero
(
&
x1
,
&
x2
)
;
zmapWindowExt2Zero
(
&
y1
,
&
y2
)
;
foo_canvas_item_set
(
rectangle
,
"x1"
,
x1
,
"y1"
,
y1
,
"x2"
,
x2
,
"y2"
,
y2
,
NULL
)
;
return
;
}
/* The zmapWindowLongItemXXXXX() functions manage the cropping of canvas items that
* can exceed the X Windows size limit of 32k for graphical items. We have to do this
* because the foocanvas does not handle this. */
...
...
@@ -292,6 +265,28 @@ void zmapWindowLongItemCrop(ZMapWindow window)
return
;
}
/* Returns TRUE if the item was removed, FALSE if the item could not be
* found in the list. */
gboolean
zmapWindowLongItemRemove
(
GList
**
long_items
,
FooCanvasItem
*
item
)
{
gboolean
result
=
FALSE
;
GList
*
list_item
;
if
((
list_item
=
g_list_find_custom
(
*
long_items
,
item
,
findLongItemCB
)))
{
gpointer
data
=
list_item
->
data
;
*
long_items
=
g_list_remove
(
*
long_items
,
list_item
->
data
)
;
freeLongItem
(
data
,
NULL
)
;
result
=
TRUE
;
}
return
result
;
}
/* Free all the long items by freeing individual structs then the list itself. */
void
zmapWindowLongItemFree
(
GList
*
long_items
)
...
...
@@ -446,3 +441,18 @@ static void cropLongItem(gpointer data, gpointer user_data)
return
;
}
/* Compares canvas item supplied via user_data with canvas item held in data of list item
* and returns 0 if they are the same. */
gint
findLongItemCB
(
gconstpointer
data
,
gconstpointer
user_data
)
{
gint
result
=
-
1
;
FooCanvasItem
*
list_item
=
((
ZMapWindowLongItem
)
data
)
->
item
;
FooCanvasItem
*
item
=
(
FooCanvasItem
*
)
user_data
;
if
(
list_item
==
item
)
result
=
0
;
return
result
;
}
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