home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / clarion / library / memoed / me_scrn.cla < prev    next >
Text File  |  1992-02-15  |  4KB  |  123 lines

  1.  
  2. !═════════════════════════════════════════════════════════════════════════
  3. !
  4. !  %%keyword%% '%n'
  5. !  'ME_SCRN.CLA' - Display functions for MEMOEDIT
  6. !
  7. !  %%keyword%% '%v'
  8. !  Revision Number: '1'
  9. !  %%keyword%% '%d'
  10. !  Revision Date  : '15-Feb-92'
  11. !
  12. !  Copyright : Bobcat Systems (c) 1992
  13. !  Author    : Robert J. Pupazzoni
  14. !           CIS:[70441,204]
  15. !
  16. !  Compiler  : Clarion Professional Developer v. 2.1, Batch 2105
  17. !
  18. !
  19. !  DESCRIPTION
  20. !
  21. !    This module contains all functions related to updating the screen.
  22. !
  23. !═════════════════════════════════════════════════════════════════════════
  24.  
  25. ME_Scrn         MEMBER()
  26.  
  27. ! ═════════════════════════════════════════════════════════════════════════
  28. !              Display a Page Section
  29. ! ═════════════════════════════════════════════════════════════════════════
  30. Show_Page    PROCEDURE( tTable, ilRowTop, ibBegRow, ibEndRow )
  31.  
  32.          ! Parameters:
  33. tTable         EXTERNAL,TABLE             ! Edit buffer
  34. ilRowTop     LONG                 ! Top row index
  35. ibBegRow     BYTE                 ! Starting row to display
  36. ibEndRow     BYTE                 ! Ending row to display
  37.  
  38.          ! Locals:
  39. ibRow         BYTE
  40.  
  41.   CODE
  42.   LOOP ibRow = ibBegRow TO ibEndRow         ! Loop thru each row
  43.     Show_Line(tTable, ilRowTop+ibRow, ibRow)     !   Display line
  44.   .                         ! End loop
  45.  
  46.  
  47. ! ═════════════════════════════════════════════════════════════════════════
  48. !              Display a Specific Line
  49. ! ═════════════════════════════════════════════════════════════════════════
  50. Show_Line    PROCEDURE( tTable, ilTblNdx, ibRow )
  51.  
  52.          ! Parameters:
  53. tTable         EXTERNAL,TABLE             ! Edit buffer
  54. ilTblNdx     LONG                 ! Line index
  55. ibRow         BYTE                 ! Display row
  56.  
  57.          ! Locals:
  58. ibHiCol1     BYTE                 ! Block marking temps
  59. ibHiCol2     BYTE                 !
  60.  
  61.   CODE
  62.   GET(tTable, ilTblNdx)                 ! Get line
  63.   IF ERRORCODE() THEN CLEAR(tTable).         ! Clear if not found
  64.  
  65.   IF MED:bbShowCodes                 ! Remap format codes?
  66.     tTable = Str_ReMap(tTable, eHCRCode, eHCRSymbol)
  67.   .                         !
  68.  
  69.   SETHUE(MED:ibTextFore, MED:ibTextBack)     ! Show line
  70.   SHOW(MED:ibRowOfs+ibRow, MED:ibColOfs+1, SUB(tTable, 1, MED:ibCols))
  71.   SETHUE                     !
  72.  
  73.                          ! Show block marking?
  74.   IF INRANGE(ilTblNdx, MED:ilMarkBegRow, MED:ilMarkEndRow)
  75.     ibHiCol1 = MED:ibColOfs + 1             !
  76.     ibHiCol2 = MED:ibColOfs + MED:ibCols     !
  77.     IF ilTblNdx = MED:ilMarkBegRow         !
  78.       ibHiCol1 = MED:ibColOfs + MED:ibMarkBegCol !
  79.     .                         !
  80.     IF ilTblNdx = MED:ilMarkEndRow         !
  81.       ibHiCol2 = MED:ibColOfs + MED:ibMarkEndCol !
  82.     .                         !
  83.     SETHUE(MED:ibMarkFore, MED:ibMarkBack)     !
  84.     COLOR(MED:ibRowOfs+ibRow, ibHiCol1, 1, ibHiCol2-ibHiCol1+1)
  85.     SETHUE                     !
  86.   .                         !
  87.   RETURN                     !
  88.  
  89.  
  90. ! ═════════════════════════════════════════════════════════════════════════
  91. !                 Set Cursor Size
  92. ! ═════════════════════════════════════════════════════════════════════════
  93. Cursor_Size  PROCEDURE( bbInsertMode )
  94.  
  95.          ! Parameters:
  96. bbInsertMode BYTE                 ! Insert mode flag
  97.  
  98.          ! Locals:
  99. sCursorSize  STRING('<07><06><07><04>')         ! Cursor sizes
  100. aCursorSize  SHORT,DIM(2),OVER(sCursorSize)     !
  101.  
  102. gRegisters   GROUP                 ! CPU Registers
  103. isAX           SHORT                 !
  104. isBX           SHORT                 !
  105. isCX           SHORT                 !
  106. isDX           SHORT                 !
  107. isSI           SHORT                 !
  108. isDI           SHORT                 !
  109. isDS           SHORT                 !
  110. isES           SHORT                 !
  111. ibInt           BYTE                 !
  112. isFlags           SHORT                 !
  113.          .                     !
  114.  
  115.   CODE
  116.   CLEAR(gRegisters)                 ! Clear group
  117.   isAX    = 0100H                     ! Set Cursor Size request
  118.   isCX    = aCursorSize[1+bbInsertMode]         ! Select cursor size
  119.   ibInt = 10H                     ! ROM-BIOS Video Services
  120.   Interrupt(gRegisters)                 ! Call interrupt handler
  121.   RETURN                     !
  122.  
  123.