1 /* 2 * @(#)pix.c 1.1 10/21/84 3 * 4 * Picture subwindow routines for the SUN Gremlin picture editor. 5 * 6 * Mark Opperman (opcode@monet.BERKELEY) 7 * 8 */ 9 10 #include <suntool/tool_hs.h> 11 #include "gremlin.h" 12 #include "icondata.h" 13 14 /* imports from graphics.c */ 15 16 extern GRCurrentSetOn(); 17 18 /* imports from text.c */ 19 20 extern TxMsgOK(); 21 22 /* imports from main.c */ 23 24 extern ELT *cset; 25 extern float PX, PY; 26 extern struct pixwin *pix_pw; 27 extern struct rect pix_size; 28 extern struct pixrect *cset_pr; 29 extern SUN_XORIGIN; 30 extern SUN_YORIGIN; 31 32 /* imports from help.c */ 33 34 extern pixsw_help(); 35 36 37 pix_left(ie) 38 register struct inputevent *ie; 39 { 40 TxMsgOK(); 41 PX = winx_to_db(ie->ie_locx); 42 PY = winy_to_db(ie->ie_locy); 43 LGPoint(); 44 } 45 46 47 pix_middle(ie) 48 register struct inputevent *ie; 49 { 50 TxMsgOK(); 51 LGDeletePoint(); 52 } 53 54 55 pix_right(ie) 56 register struct inputevent *ie; 57 { 58 TxMsgOK(); 59 pixsw_help(); 60 } 61 62 63 pix_winexit(ie) 64 register struct inputevent *ie; 65 { 66 if ((ie->ie_locx >= pix_size.r_width)||(ie->ie_locy >= pix_size.r_height)) 67 GRCurrentSetOn(); 68 } 69