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
8747252f
Commit
8747252f
authored
18 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
changes so that window can hold it's own list of feature set names.
keeping up with clamping changes
parent
30e50183
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/zmapWindow.c
+35
-12
35 additions, 12 deletions
src/zmapWindow/zmapWindow.c
with
35 additions
and
12 deletions
src/zmapWindow/zmapWindow.c
+
35
−
12
View file @
8747252f
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: See ZMap/zmapWindow.h
* HISTORY:
* Last edited: Oct 1
1
1
0:16
2006 (
edgrif
)
* Last edited: Oct 1
6
1
2:01
2006 (
rds
)
* Created: Thu Jul 24 14:36:27 2003 (edgrif)
* CVS info: $Id: zmapWindow.c,v 1.14
4
2006-10-1
1 09:46:43 edgrif
Exp $
* CVS info: $Id: zmapWindow.c,v 1.14
5
2006-10-1
8 15:24:10 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -79,8 +79,11 @@ typedef struct _RealiseDataStruct
}
RealiseDataStruct
,
*
RealiseData
;
static
ZMapWindow
myWindowCreate
(
GtkWidget
*
parent_widget
,
char
*
sequence
,
void
*
app_data
,
GtkAdjustment
*
hadjustment
,
GtkAdjustment
*
vadjustment
)
;
static
ZMapWindow
myWindowCreate
(
GtkWidget
*
parent_widget
,
char
*
sequence
,
void
*
app_data
,
GList
*
feature_set_names
,
GtkAdjustment
*
hadjustment
,
GtkAdjustment
*
vadjustment
)
;
static
void
myWindowZoom
(
ZMapWindow
window
,
double
zoom_factor
,
double
curr_pos
)
;
static
void
myWindowMove
(
ZMapWindow
window
,
double
start
,
double
end
)
;
...
...
@@ -179,11 +182,15 @@ void zMapWindowInit(ZMapWindowCallbacks callbacks)
}
ZMapWindow
zMapWindowCreate
(
GtkWidget
*
parent_widget
,
char
*
sequence
,
void
*
app_data
)
ZMapWindow
zMapWindowCreate
(
GtkWidget
*
parent_widget
,
char
*
sequence
,
void
*
app_data
,
GList
*
feature_set_names
)
{
ZMapWindow
window
;
window
=
myWindowCreate
(
parent_widget
,
sequence
,
app_data
,
NULL
,
NULL
)
;
window
=
myWindowCreate
(
parent_widget
,
sequence
,
app_data
,
feature_set_names
,
NULL
,
NULL
)
;
return
window
;
}
...
...
@@ -214,7 +221,9 @@ ZMapWindow zMapWindowCopy(GtkWidget *parent_widget, char *sequence,
* reset the scroll to where it should be. */
foo_canvas_get_scroll_offsets
(
original_window
->
canvas
,
&
x
,
&
y
)
;
new_window
=
myWindowCreate
(
parent_widget
,
sequence
,
app_data
,
hadjustment
,
vadjustment
)
;
new_window
=
myWindowCreate
(
parent_widget
,
sequence
,
app_data
,
original_window
->
feature_set_names
,
hadjustment
,
vadjustment
)
;
zMapAssert
(
new_window
)
;
/* Lock windows together for scrolling/zooming if requested. */
...
...
@@ -699,6 +708,15 @@ void zMapWindowScrollToWindowPos(ZMapWindow window, int window_y_pos)
return
;
}
void
zMapWindowMergeInFeatureSetNames
(
ZMapWindow
window
,
GList
*
feature_set_names
)
{
/* This needs to do more that just concat!! ha, it'll break something down the line ... column ordering at least */
feature_set_names
=
g_list_copy
(
feature_set_names
);
window
->
feature_set_names
=
g_list_concat
(
window
->
feature_set_names
,
feature_set_names
);
return
;
}
void
zMapWindowDestroy
(
ZMapWindow
window
)
{
...
...
@@ -783,7 +801,7 @@ void zmapWindowScrollRegionTool(ZMapWindow window,
double
*
x1_inout
,
double
*
y1_inout
,
double
*
x2_inout
,
double
*
y2_inout
)
{
ZMap
Window
ClampType
clamp
=
ZMAP
_WINDOW
_CLAMP_INIT
;
ZMap
GUI
ClampType
clamp
=
ZMAP
GUI
_CLAMP_INIT
;
double
x1
,
x2
,
y1
,
y2
;
/* New region coordinates */
double
wx1
,
wx2
,
wy1
,
wy2
;
/* Current world coordinates */
...
...
@@ -843,8 +861,8 @@ void zmapWindowScrollRegionTool(ZMapWindow window,
zmapWindowLongItemCrop
(
window
->
long_items
,
x1
,
y1
,
x2
,
y2
);
clamp
=
zmapWindowClampedAtStartEnd
(
window
,
&
y1
,
&
y2
);
y1
-=
(
tmp_top
=
((
clamp
&
ZMAP
_WINDOW
_CLAMP_START
)
?
border
:
0
.
0
));
y2
+=
(
tmp_bot
=
((
clamp
&
ZMAP
_WINDOW
_CLAMP_END
)
?
border
:
0
.
0
));
y1
-=
(
tmp_top
=
((
clamp
&
ZMAP
GUI
_CLAMP_START
)
?
border
:
0
.
0
));
y2
+=
(
tmp_bot
=
((
clamp
&
ZMAP
GUI
_CLAMP_END
)
?
border
:
0
.
0
));
/* -----> and finally set the scroll region */
foo_canvas_set_scroll_region
(
FOO_CANVAS
(
window
->
canvas
),
/* OK */
...
...
@@ -1116,8 +1134,11 @@ static void panedResizeCB(gpointer data, gpointer userdata)
/* I think probably we should insist on being supplied with a sequence.... */
/* NOTE that not all fields are initialised here as some need to be done when we draw
* the actual features. */
static
ZMapWindow
myWindowCreate
(
GtkWidget
*
parent_widget
,
char
*
sequence
,
void
*
app_data
,
GtkAdjustment
*
hadjustment
,
GtkAdjustment
*
vadjustment
)
static
ZMapWindow
myWindowCreate
(
GtkWidget
*
parent_widget
,
char
*
sequence
,
void
*
app_data
,
GList
*
feature_set_names
,
GtkAdjustment
*
hadjustment
,
GtkAdjustment
*
vadjustment
)
{
ZMapWindow
window
;
GtkWidget
*
canvas
,
*
eventbox
;
...
...
@@ -1147,6 +1168,8 @@ static ZMapWindow myWindowCreate(GtkWidget *parent_widget, char *sequence, void
window
->
display_forward_coords
=
TRUE
;
window
->
origin
=
1
;
window
->
feature_set_names
=
g_list_copy
(
feature_set_names
);
window
->
toplevel
=
eventbox
=
gtk_event_box_new
();
window
->
pane
=
gtk_hpaned_new
();
...
...
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