~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to display/d.zoom/zoom.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <grass/gis.h>
2
 
#include <grass/display.h>
3
 
#include <grass/raster.h>
4
 
#include "local_proto.h"
5
 
#include <grass/glocale.h>
6
 
 
7
 
int zoomwindow(struct Cell_head *window, int quiet, double magnify)
8
 
{
9
 
    int screen_x, screen_y, button;
10
 
    int end = 0;
11
 
    int printmenu = 1;
12
 
 
13
 
    while (!end) {
14
 
        if (printmenu) {
15
 
            fprintf(stderr, _("\n\nButtons:\n"));
16
 
            fprintf(stderr, _("Left:   Zoom menu\n"));
17
 
            fprintf(stderr, _("Middle: Pan\n"));
18
 
            fprintf(stderr, _("Right:  Quit menu\n"));
19
 
            printmenu = 0;
20
 
        }
21
 
 
22
 
        R_get_location_with_pointer(&screen_x, &screen_y, &button);
23
 
 
24
 
        if (button == 1) {
25
 
            /* enter zoom menu */
26
 
            make_window_box(window, magnify, 1, 0);
27
 
            printmenu = 1;
28
 
        }
29
 
        else if (button == 2) {
30
 
            /* pan */
31
 
            pan_window(window, screen_x, screen_y);
32
 
        }
33
 
        else if (button == 3) {
34
 
            end = 1;
35
 
        }
36
 
    }
37
 
 
38
 
#ifdef QUIET
39
 
    if (!quiet) {
40
 
        fprintf(stderr, _("This region now saved as current region.\n\n"));
41
 
        fprintf(stderr,
42
 
                _("Note: run 'd.erase' for the new region to affect the graphics.\n"));
43
 
    }
44
 
#endif
45
 
    return (0);
46
 
}