TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: All
from: Paul Edwards
date: 1995-05-28 15:42:40
subject: fsdemo.zip

Great news folks!  We now have a (relatively) easy windowing
library which you can use for your programs.  I wanted a
windowing library for another application (and eventually I
plan to use it on a commercial project too), so I spent today
attempting to rip out the windowing stuff from MSGED.  The
result is FSDEMO.ZIP, available for FREQ from 3:711/934, and
I will be hatching into the PDOMAIN TIC echo shortly.  The
windowing library operates identically under MSDOS & OS/2.

This is the chance you've been waiting for to chuck TCXL etc
in the bin once and for all!  I will be.  I have tested it
under Watcom + Borland for both DOS + OS/2.  Here is the
example program that the name comes from.  Don't you just DIG
that colour scheme?!

/*  fsdemo - Demo of using the windows functions from MSGED */
/*  Demo written by Paul Edwards and released to the public domain */
/*  Based on other PD work by Jim Nutt and John Dennis */

#include 

#include "winsys.h"
#include "menu.h"

static char *alist[] = { "John", "Fred",
"Mary", NULL };
static int maxy = 25;

static int getname(void);

int main(void)
{
    int x;

    TTopen();    
    x = getname();
    TTclose();
    printf("x is %d\n", x);
    return (0);
}

static int getname(void)
{
    WND   *hCurr, *hWnd;
    int    ret;
    int    wid, dep;

    wid      = 50;
    dep      = maxy - 6;
    
    hCurr = Wtop();
    hWnd = WPopUp(wid, dep, SBDR|SHADOW, RED|_YELLOW, BLUE|_RED);
    if (hWnd == NULL)
    {
        return (-1);
    }

    WTitle(" Select Name ", RED|_BLUE);
    WWriteStr(5,  0, BLUE|_RED, "Name");

    ret = SelBox(alist, 
                 1, 
                 dep - 2,
                 wid - 1, 
                 0,
                 hWnd->wid, 
                 GREEN|_BLACK, 
                 GREEN|_BLUE, 
                 2);

    WClose(hWnd);
    WCurr(hCurr);

    return (ret);
}
@EOT:

---
* Origin: P9 - Ten Minute Limit (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.