1 /******************************************************************** 2 This file is part of the abs 0.907 distribution. abs is a spreadsheet 3 with graphical user interface. 4 5 Copyright (C) 1998-2001 Andr� Bertin (Andre.Bertin@ping.be) 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version if in the same spirit as version 2. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 21 Concact: abs@pi.be 22 http://home.pi.be/bertin/abs.shtml 23 24 *********************************************************************/ 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 #define CB_CELL 3 56 #define CB_GRAPH 4 57 #define CB_CREATE_GRAPH 12 58 #define CB_DRAWING 2 59 #define CB_LINE 0 60 #define CB_RECT 1 61 #define CB_ARC 25 62 #define CB_CIRCLE 9 63 #define CB_BUTTON 29 64 #define CB_DRAW 8 65 #define CB_SELAREA 11 66 #define CB_GRAP 10 67 68 #define UNDEFINE 0 69 #define UP 1 70 #define MOVE 2 71 #define DOWN 3 72 #define RIGHT 4 73 74 static int BTN1_STATE = UP; 75 static int BTN1_WHAT = -1; 76 77 static Widget TEXT_WIDGET; 78 static Widget DIALOG_WIDGET; 79 80 static int WHAT = -1; 81 static int xa, xb, ya, yb; 82 static int grx, gry, grh, grw; 83 84 85 86 87 88 89 90 static int plotx = 0; 91 static int ploty = 0; 92 static int ploth = 50; 93 static int plotw = 100; 94 static int left = 0; 95 96 97 static int ly; 98 static int lx; 99 static int cj; 100 static int li; 101 static int paint; 102 103 int downx, downy, movex, movey, upx, upy; 104 int absdownx, absdowny, absmovex, absmovey, absupx, absupy; 105 int downi, downj, movei, movej, upi, upj, lasti, lastj; 106 107 108