home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / misc_programming / AGUL / WINDOW.ADS < prev    next >
Encoding:
Text File  |  1990-10-25  |  7.6 KB  |  134 lines

  1. --        ╔═════════════════════════════════════════════════════════════╗
  2. --        ║█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█║
  3. --        ║█                                                           █║
  4. --        ║█                 Meridian Software Systems                 █║
  5. --        ║█                                                           █║
  6. --        ║█                    Copyright (C)  1990                    █║
  7. --        ║█                                                           █║
  8. --        ║█                    ALL RIGHTS RESERVED                    █║
  9. --        ║█                                                           █║
  10. --        ║█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█║
  11. --        ╚═════════════════════════════════════════════════════════════╝
  12.  
  13. ------------------------------------------------------------------------------
  14. --
  15. --   Unit Name: Window            - package specification
  16. --
  17. --   Purpose of unit:   This package is called to define, select, reset window
  18. --                      and world coordinates.  The application programmer may
  19. --                      also use this package to save and load windows to and
  20. --                      from disk.
  21. --
  22. ------------------------------------------------------------------------------
  23.  
  24. with COMMON_GRAPHIC_TYPES, COMMON_DISPLAY_TYPES;
  25.  
  26. package WINDOW is 
  27.  
  28.   -- *************************************************************
  29.   --                                                             *
  30.   --   Procedure DEFINE_WINDOW is called to store a specified    *
  31.   --   window index and coordinates in a record.  This record    *
  32.   --   is then added to a link list of WDW_RECORD's.  If the     *
  33.   --   record already exists in the linked list it will be       *
  34.   --   overwritten.                                              *
  35.   --                                                             *
  36.   -- *************************************************************
  37.   procedure DEFINE_WINDOW (WINDOW_INDEX : in COMMON_GRAPHIC_TYPES.INDEX_NUMBER;
  38.                WDWUPX, WDWUPY, WDWLWRX, WDWLWRY : in integer);
  39.  
  40.   -- *************************************************************    
  41.   --                                                             *
  42.   --  Procedure SELECT_WINDOW is called to set the window index- *
  43.   --  ed by WDW_INDEX as the ACTIVE_WINDOW.  This procedure will *
  44.   --  also ensure that the window will fit in the current world  *
  45.   --  coordinates and if so draw it using the specified border   *
  46.   --  color and filling it in with the specified background      *
  47.   --  color and then setting the Foreground to the user spec-    *
  48.   --  ified color.  The global CLIP_ENABLE will be set to the    *
  49.   --  boolean value passed in ENABLE_CLIP.                       *
  50.   --                                                             *
  51.   -- *************************************************************
  52.   procedure SELECT_WINDOW (WINDOW_INDEX : in COMMON_GRAPHIC_TYPES.INDEX_NUMBER;
  53.                            BORDER_COLOR, 
  54.                            WINDOW_FORE_COLOR,  
  55.                            WINDOW_BACK_COLOR : in COMMON_DISPLAY_TYPES.COLOR;
  56.                ENABLE_CLIP : in boolean);
  57.  
  58.   -- *************************************************************
  59.   --                                                             *
  60.   --  Procedure RESET_WINDOW is called to dispose of the current *
  61.   --  linked list of WDW_RECORDS and initialize the current win- *
  62.   --  dow index to a 0. The coordinates will be set equal to the *
  63.   --  screen coordinates.  The above values initialize the data  *
  64.   --  contained in the COMMON_GRAPHIC_TYPES package.             *
  65.   --                                                             *
  66.   -- *************************************************************
  67.   procedure RESET_WINDOW;
  68.  
  69.   -- *************************************************************
  70.   --                                                             *
  71.   --  Procedure SAVE_WINDOW creates a file containing the value  *
  72.   --  of the pixels defined by the coordinates of a specified    *
  73.   --  window. The record containing the coordinates of the spec- *
  74.   --  ified window is passed to this procedure. The coordinates  *
  75.   --  of the pixels are calculated along with the offsets on     *
  76.   --  both the right and left sides of the window.  A mask is    *
  77.   --  defined to ensure only the window pixels are copied into   *
  78.   --  the file. If a specified file already exixts it will be    *
  79.   --  overwritten with the new file.                             *
  80.   --                                                             *
  81.   -- *************************************************************
  82.   procedure SAVE_WINDOW (WINDOW_INDEX : in COMMON_GRAPHIC_TYPES.INDEX_NUMBER;
  83.              FILENAME     : in string);
  84.  
  85.   -- *************************************************************
  86.   --                                                             *
  87.   --  Procedure LOAD_WINDOW is called to load a specified window *
  88.   --  indicated by WINDOW_INDEX to user specified position. If   *
  89.   --  either of the coordinates are out of bounds of the ACTIVE_ *
  90.   --  SCREEN then the default coordinates contained in the       *
  91.   --  window record will be used.  The ACTIVE_WINDOW will be     *
  92.   --  assigned the indexed value of the window being loaded. If  *
  93.   --  the file doesn't exist an error message will be displayed. *
  94.   --                                                             *
  95.   -- *************************************************************
  96.   procedure LOAD_WINDOW (WINDOW_INDEX : in COMMON_GRAPHIC_TYPES.INDEX_NUMBER;
  97.              FILENAME     : in string;
  98.              NEWX, NEWY   : in integer);
  99.  
  100.   -- *************************************************************
  101.   --                                                             *
  102.   --   Procedure WORLD_COORDINATE is called to store a specified *
  103.   --   world index and coordinates in a record.  This record     *
  104.   --   is then added to a link list of WLD_RECORD's.  If the     *
  105.   --   record already exists in the linked list it will be       *
  106.   --   overwritten.  Otherwise, the record will be added to the  *
  107.   --   linked list in it's numerical order.                      *
  108.   --                                                             *
  109.   -- *************************************************************
  110.   procedure WORLD_COORDINATES (WORLD_INDEX : in COMMON_GRAPHIC_TYPES.INDEX_NUMBER; 
  111.                    WLDLWRX, WLDLWRY : in integer);
  112.  
  113.   -- *************************************************************    
  114.   --                                                             *
  115.   --  Procedure SELECT_WORLD is called to set the world indexed  *
  116.   --  by WORLD_INDEX as the ACTIVE_WORLD.                        *
  117.   --                                                             *
  118.   -- *************************************************************
  119.   procedure WORLD_SELECT (WORLD_INDEX : in COMMON_GRAPHIC_TYPES.INDEX_NUMBER);
  120.  
  121.  
  122.   -- *************************************************************
  123.   --                                                             *
  124.   --  Procedure RESET_WORLD is called to dispose of the current  *
  125.   --  linked list of WLD_RECORDS and set the ACTIVE_WORLD to 0.  *
  126.   --  The world coordinates are set equal to the screen coordin- *
  127.   --  ates.  This procedure will also set the global world data  * 
  128.   --  values to the values mentioned above.                      *
  129.   --                                                             *
  130.   -- *************************************************************
  131.   procedure WORLD_RESET;
  132.  
  133. end WINDOW;
  134.