2 * $Id: mouse.h,v 1.18 2006/07/06 23:11:09 mikulik Exp $
5 /* GNUPLOT - mouse.h */
8 * Permission to use, copy, and distribute this software and its
9 * documentation for any purpose with or without fee is hereby granted,
10 * provided that the above copyright notice appear in all copies and
11 * that both that copyright notice and this permission notice appear
12 * in supporting documentation.
14 * Permission to modify the software is granted, but not the right to
15 * distribute the complete modified source code. Modifications are to
16 * be distributed as patches to the released version. Permission to
17 * distribute binaries produced by compiling modified sources is granted,
19 * 1. distribute the corresponding source modifications from the
20 * released version in the form of a patch file along with the binaries,
21 * 2. add special version identification to distinguish your version
22 * in addition to the base release version number,
23 * 3. provide your name and address as the primary contact for the
24 * support of your modified version, and
25 * 4. retain our contact information in regard to use of the base
27 * Permission to distribute the released version of the source code along
28 * with corresponding source modifications in the form of a patch file is
29 * granted with same provisions 2 through 4 for binary distributions.
31 * This software is provided "as is" without express or implied warranty
32 * to the extent permitted by applicable law.
38 * Original Software (October 1999 - January 2000):
39 * Pieter-Tjerk de Boer <ptdeboer@cs.utwente.nl>
40 * Petr Mikulik <mikulik@physics.muni.cz>
41 * Johannes Zellner <johannes@zellner.org>
55 double xmin, ymin, xmax, ymax;
56 double x2min, y2min, x2max, y2max;
58 struct t_zoom *prev, *next;
61 typedef struct mouse_setting_t {
63 int doubleclick; /* Button1 double / single click resolution */
64 int annotate_zoom_box; /* draw coordinates at zoom box */
65 int label; /* draw real gnuplot labels on Button 2 */
66 int polardistance; /* display dist. to ruler in polar coordinates */
67 int verbose; /* display ipc commands */
68 int warp_pointer; /* warp pointer after starting a zoom box */
69 char fmt[0xff]; /* fprintf format for printing numbers */
70 char labelopts[0xff]; /* label options */
73 extern mouse_setting_t mouse_setting;
76 /* enum of GP_ -keycodes has moved to mousecmn.h so that it can be
77 * accessed by standalone terminals too */
80 /* FIXME HBB 20010207: Codestyle violation, again. */
82 /* the following table must match exactly the
83 * enum's of GP_ and end with a NULL pointer! */
84 static char* special_keys[] = {
85 "GP_FIRST_KEY", /* keep this dummy there */
108 /* see KP_0 - KP_9 */
151 (char*) 0 /* must be the last line */
153 #endif /* _MOUSE_C */
156 MOUSE_COORDINATES_REAL = 0,
157 MOUSE_COORDINATES_REAL1, /* w/o brackets */
158 MOUSE_COORDINATES_FRACTIONAL,
160 MOUSE_COORDINATES_PIXELS,
161 MOUSE_COORDINATES_SCREEN,
163 MOUSE_COORDINATES_TIMEFMT,
164 MOUSE_COORDINATES_XDATE,
165 MOUSE_COORDINATES_XTIME,
166 MOUSE_COORDINATES_XDATETIME,
167 MOUSE_COORDINATES_ALT /* alternative format as specified by the user */
170 /* FIXME HBB 20010207: Codestyle violation: these should be in mouse.c! */
171 #if defined(_MOUSE_C)
172 long mouse_mode = MOUSE_COORDINATES_REAL;
173 long clipboard_mode = MOUSE_COORDINATES_REAL;
174 char* mouse_alt_string = (char*) 0;
175 char* clipboard_alt_string = (char*) 0;
177 extern long mouse_mode;
178 extern long clipboard_mode;
179 extern char* mouse_alt_string;
180 extern char* clipboard_alt_string;
184 void event_plotdone __PROTO((void));
185 void recalc_statusline __PROTO((void));
186 void update_ruler __PROTO((void));
187 void set_ruler __PROTO((TBOOLEAN on, int mx, int my));
188 void UpdateStatusline __PROTO((void));
189 void do_event __PROTO((struct gp_event_t *ge));
190 int plot_mode __PROTO((int mode));
191 void event_reset __PROTO((struct gp_event_t *ge));
193 /* bind prototype(s) */
195 void bind_process __PROTO((char* lhs, char* rhs, TBOOLEAN allwindows));
196 void bind_remove_all __PROTO((void));
198 #endif /* !_HAVE_MOUSE_H */