h00381 s 00057/00000/00000 d D 1.1 91/03/08 04:40:22 hopkins 1 0 c date and time created 91/03/08 04:40:22 by hopkins e u U f e 0 t T I 1 #include /******************************************************************** * Painting */ void PaintButton(boolean down) { setcolor(down ? BG2 : BG); rectpath(0,0,w,h); fill(); setcolor(FG); rectpath(insetstroke(0,[0,0,w,h])); stroke(); } void Paint() { PaintButton(false); } /******************************************************************** * Track button */ boolean trackinpath = false; void trackbutton() { boolean b = pointinpath(trackx,tracky); if (b != trackinpath) { trackinpath = b; gsave(); newpath(); Send PaintButton(b); grestore(); } } void OnSelect() { name t; path(); t = track(/trackbutton); if (trackinpath) { newpath(); if (t != /mouse_cancel) { Send PaintButton(false); action(); } } unpromote(/trackinpath); } E 1