/* XSTEP 3.3 - Toolkit for X-Window System Copyright (C) 1996,1997,1998,1999 by Marcelo Samsoniuk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Please read the COPYING and README file!!! */ #include void draw(struct xtree *t) { XSetForeground(display,t->gc,rand()%256); XFillRectangle(display,t->win,t->gc, t->aw/2+rand()%t->aw/2-rand()%t->aw/2, t->ah/2+rand()%t->ah/2-rand()%t->ah/2, rand()%t->aw/4, rand()%t->ah/4); XSetForeground(display,t->gc,white); XDrawLine(display,t->win,t->gc, 0,0,t->aw,t->ah); XDrawLine(display,t->win,t->gc, 0,t->ah,t->aw,0); } void xmain(int i,char **p) { animate=1; window_create(0,0,400,300,"horizontal scrollbar"); xyscroll_create(8,8,-8,0,draw,gray,1024,0); }