home *** CD-ROM | disk | FTP | other *** search
- < the╔══╗╔══╗╔ ╔
- ║ ╙╢ ╙╢ ║ █
- ║ ║ ║ ╔═══╗ ╠═ ╔═══╗╔ ╔═══╗║ ╔ ╔═══╗╔ ╔═══╗╔ ╓─╖ ╔═══╗╔ ╔═╗╔═╗╔
- ║ ║ ║ ║ ║ ║ ║ ╙╢ ║ ╙╢ ║ ║ ╙╢ ║ ╙╢ ║╓╜ ║ ╙╢ ║ ╙╢ ╙╢
- ║ ║ ║┌╫───╜ ║ ┌╢ ║┌╢ ║ ║┌╢ ║┌╢ ║ ║║ ┌╢ ║ ║ ║ ║
- ║ ║ ║│║ ╓─╢ │║ ╓╢│║ ╓╢ ║│║ ╓╢│║ ╓╢ ║║ │║ ╓╢ ║ ║ ║
- ╜ ╨ ╙┘╚═══╝ ╚═╛╚═══╝╙┘╚═══╝╙─╨┘╚═══╝╙┘╚═══╝║┌╜╙─┘╚═══╝╙─╜ ╨ ║
- ╓────╫┘ ║
- ╓─────────────────────────────────────────╚════╝──────────────────╜
- ╙─── architecture
-
- (software foundation)
- SNAV - demo documentation
- - 16.4.90 page 1 -
-
- ┌───────┐
- ─────────>│ AVNER │
- ─────────>│ BEN │──────> Software Engineering Method
- └───────┘
- 10 Dov-Hoz st. Tel-Aviv 63416 Israel tel. 972-3-221535
-
-
-
-
-
-
-
-
-
-
-
- ┌─────────────────────────────────────────────────┐
- │ "The Screen NAVigator" │
- │ │
- │ THE C++ IMPLEMENTATION │
- │ Demonstration Application │
- │ │
- │ Version 1.10, April 1990. │
- └─────────────────────────────────────────────────┘
-
- Copyright (c) 1990 by Avner Ben.
-
-
-
-
-
-
- Written by Avner Ben
- 15 April 1990.
- original written 28 November 1989.
- SNAV - demo documentation
- - 16.4.90 page 2 -
-
- EPREFACEF
- E───────────────────────────────────────────────────────────────────────F
-
- SNAV version 1.10 includes a sample application, compiled and ready to
- run on an IBM-PC or true compatible, called "demo.exe". The source
- code is supplied in the file "demo.cpp", and three source files
- accompanied by four header files, named demo0, demo1, demo2 and demo3.
-
- The demo files are enclosed as tutorial pieces only. No compatibility
- with (or its very inclusion in) future releases is promised for users
- who wish to extend it for their applications.
- SNAV - demo documentation
- - 16.4.90 page 3 -
-
- EDEMO - SAMPLE APPLICATIONF
- E───────────────────────────────────────────────────────────────────────F
-
- The demo program is a menu-driven application, showing some uses of
- the Snav software foundation, such as shape drawing, shape
- recognition, screen management, TypeWriter-Graphics conversion and a
- listing of the current semigraphic alphabet.
-
- The program divides the screen into three "panel" objects. The top
- line is occupied by a menu-bar, using an object of class "slide_menu".
- Lines 2 through 24 are for the drawing-board, using a plain "panel"
- object. It is enframed, using the panel's "enframe" facility. The
- bottom line is reserved for user-dialog, using an object of class
- "character_input". The line is also used for help messages by the
- bar-menu object.
- SNAV - demo documentation
- - 16.4.90 page 4 -
-
- EDEMO0 - SCREEN DRIVER ALLOCATORF
- E───────────────────────────────────────────────────────────────────────F
-
- Demo0 implements (inline) the generic screen-driver allocator class,
- declared in snav2. This is a stub implementation, recognizing only
- the one driver implementation supplied with the demo - a memory-mapped
- PC driver, and returning it by default. The case structure is
- supplied as a basis for extension by the user.
-
- Class screen_driver_manager's main method - "allocate" returns the a
- pointer to the desired screen type by number, or the implementation
- default. Its use frees the code of any device-specific references.
- SNAV - demo documentation
- - 16.4.90 page 5 -
-
- EDEMO1 - A PC SCREEN DRIVER IMPLEMENTATIONF
- E───────────────────────────────────────────────────────────────────────F
-
- Demo1 is a pc implementation of the generic panel device of snav2.
- All virtual methods are redefined, to suit pc architecture. The
- programming used is straightforward, addressing the hardware in a
- "quick and dirty" way, resulting in "misbehaved" code that may not run
- properly under a windowing or other multitasking system. This is
- sufficient for the demonstration. The user is expected to beautify
- and complicate the design, as fits the application.
-
- An obvious exercise for the non-pc user is to rewrite the driver to
- fit the architecture of his/her machine. A good exercise is to write
- an ANSI driver. (However, the pc implementation of ANSI has no
- console reading facilities, so that must remain hardware-dependent).
- PC users may try writing a non-memory-mapped driver, using the bios,
- ANSI (partially) or the compiler vendor's screen-driver library.
- Modifying the enclosed driver to work with the Zortech "display"
- library is really trivial (do not forget to call "disp_flush()" before
- each important move!)
- SNAV - demo documentation
- - 16.4.90 page 6 -
-
- EDEMO2 - FORMATTED INPUT USING THE SCREEN DRIVERF
- E───────────────────────────────────────────────────────────────────────F
-
- Demo2 defines some rudimentary formatted input facilities that are
- lacking in SNAV (being limited to formatted output). the file supplies
- some datatype-accepting routines, as methods of the class
- "character_input". Class character_input manages an object of class
- panel, for user dialog. This may be either supplied by the user, or
- allocated (and destroyed) by the class.
-
- Like class panel of snav2, character_input is a generic class,
- defining user-dialog facilities in general. Class pc_keyboard
- implements device specific attributes, such as identifying control
- characters and function keys. keyboard allocation is done by a
- "manager" class, similar to the panel_manager of demo0. This ensures
- that the code is free of device-specific references.
-
- Also supplied are a "slide_menu" object whose constructor chops the
- top line off the main window (which it receives as argument), and a
- "text_window" object, displaying the welcome screen succession (based
- upon the "enframe" facility of the panel).
- SNAV - demo documentation
- - 16.4.90 page 7 -
-
- EDEMO3 - SAMPLE SHAPESF
- E───────────────────────────────────────────────────────────────────────F
-
- demo3 supplies examples for some regular shapes, a dented curve, and
- "spiral" self-enclosing curve, for use in the demo program.
-