home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 1.ddi / SNAV0111.ZIP / DEMO0.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-16  |  1.8 KB  |  60 lines

  1. //          ┌───────┐
  2. //    ─────────>│ AVNER │
  3. //    ─────────>│  BEN  │──────> Software Engineering Method
  4. //          └───────┘
  5. //    10 Dov-Hoz st. Tel-Aviv 63416 Israel tel. 972-3-221535
  6.  
  7. // The Screen NAVigator, ver 1.10 April 1990
  8. // Copyright (c) 1989 by Avner Ben
  9. // Snav is not, and never was, free software.
  10. // for conditions for use refer to file "copyrigh.txt"
  11.  
  12. // The Screen Navigator is an object-oriented device-independent
  13. // character-graphics driver package, written in the C++ language,
  14. // distributed in the form of C++ source code.
  15. // For further information refer to the documentation files.
  16.  
  17. // this simple example is intended as a template to be extended and modified
  18. // by the user, provided the above title and copyright notice are unchanged
  19. // and are not ommitted.
  20.  
  21. /***************************************************************************/
  22.  
  23. // demonstration part 0 - header.
  24. // simple facility for transparent screen-driver allocation,
  25. // in a multi-terminal environment.
  26.  
  27. // 14.3.90  - avner ben coded.
  28.  
  29. // site history (of this copy):
  30. // __.__.__: __________________
  31.  
  32. #ifndef DEMO0_H
  33. #define DEMO0_H
  34.  
  35. #ifndef DEMO1_H
  36. #include "demo1.hpp"
  37. #endif
  38. // insert here the header files of other drivers you may have...
  39.  
  40. panel * screen_driver_manager :: allocate(const square_pos &window, int typ)
  41. {
  42.     // default_screen (defined in snav2) may be used to change
  43.     // the default terminal of the installation dynamically.
  44.     // The default of the case construct will solve it, if default
  45.     // screen is 0 or out of range.
  46.  
  47.     if (!typ) typ=default_screen;
  48.  
  49.     switch (typ) {
  50.         case 1 : return new memory_mapped_pc_screen(&(square_pos)window);
  51.         // insert here other drivers you may have...
  52.         default: return new memory_mapped_pc_screen(&(square_pos)window);
  53.         // installation default
  54.     }
  55. }
  56.  
  57. #endif
  58.  
  59.  
  60.