Mapper
change_legend_display.c
Go to the documentation of this file.
1
2
#include "
prototypes.h
"
3
4
void
change_legend_display
(
int
win_x,
int
win_y)
5
6
{
7
8
extern
Pixmap
pixf
;
9
extern
int
legend_flag
;
10
extern
int
max_legends
;
11
extern
Window
window
;
12
extern
Widget
drawing_area
;
13
extern
int
rs
;
14
extern
int
legendysize
;
15
Dimension
width
,
height
;
16
Arg
args
[10];
17
int
legendystart
;
18
int
i
;
19
20
legendystart
=
legendysize
+10;
21
22
XtSetArg(
args
[0],XtNwidth,&
width
);
23
XtSetArg(
args
[1],XtNheight,&
height
);
24
XtGetValues(
drawing_area
,
args
,2);
25
26
if
(win_x <
width
-
rs
- 5)
27
return
;
28
29
for
(
i
=0;
i
<
max_legends
;
i
++) {
30
31
if
(win_y >= (
legendystart
+(
i
+1)*
rs
) &&
32
win_y < (
legendystart
+(
i
+2)*
rs
))
33
legend_flag
=
i
;
34
35
}
36
37
if
(
legend_flag
==0)
38
redraw_topo_legend
(
window
);
39
40
else
if
(
legend_flag
> 0)
41
redraw_legend
(
window
);
42
43
}
44
45
i
static int i
Definition:
get_apps_defaults.c:110
change_legend_display
void change_legend_display(int win_x, int win_y)
Definition:
change_legend_display.c:4
redraw_topo_legend
void redraw_topo_legend(Drawable)
Definition:
redraw_topo_legend.c:3
rs
int rs
Definition:
mapper.c:103
legendysize
int legendysize
Definition:
mapper.c:103
pixf
Pixmap pixf
Definition:
mapper.c:165
legend_flag
int legend_flag
Definition:
mapper.c:54
max_legends
int max_legends
Definition:
mapper.c:55
window
Window window
Definition:
mapper.c:190
legendystart
int legendystart
Definition:
mapper.c:103
redraw_legend
void redraw_legend(Drawable)
Definition:
redraw_legend.c:3
height
Dimension height
Definition:
plot_qpf_legend.c:22
width
Dimension width
Definition:
plot_qpf_legend.c:22
args
Arg args[10]
Definition:
plot_qpf_legend.c:23
drawing_area
Widget drawing_area
Definition:
mapper.c:185
prototypes.h
Generated by
1.9.1