home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************/
- /* File Id. DEMO_E.C. */
- /* Author. Stan Milam. */
- /* */
- /* This demo function will open a window and scroll its con- */
- /* tents until a MOUSE or KEYBOARD key is pressed. */
- /* */
- /***************************************************************/
-
- #include <stdio.h>
- #include <pcwproto.h>
-
- int demo_e(void) {
-
- WNDPTR *wnd;
- int i,ch;
-
- if ( mpresent ) hide_mouse();
- setborder(SINGLEALL);
- bordercolor(WHITE,GREEN);
- titlecolor(WHITE,RED);
- wnd = wexplode(6,20,18,60,WHITE,GREEN);
- wtitle(wnd, TOP,LEFT, " Window Scrolling ");
- for (i=3;i<8;i++)
- wprints(wnd,i,CENTER,BLUE,GREEN," A sample window scrolling ");
- do {
- rest(9);
- wscroll(wnd,1,3);
- rest(9);
- wscroll(wnd,1,-3);
- } while ((ch = keypressed()) == 0);
- if ( ch != 3 ) keybrd_flush();
- wnd = wpop( wnd );
- return 0;
- }
-