home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1996 May / PCDMAY.ISO / software / clarion / 3rdparty / tools / library / tooltip2.exe / TIP003.CLW < prev    next >
Encoding:
Text File  |  1995-06-02  |  2.1 KB  |  74 lines

  1.                      MEMBER('TIP.clw')            ! This is a MEMBER module
  2. tippee PROCEDURE
  3.  
  4. LocalRequest         LONG,AUTO
  5. OriginalRequest      LONG,AUTO
  6. LocalResponse        LONG,AUTO
  7. WindowOpened         LONG
  8. WindowInitialized    LONG
  9. ForceRefresh         LONG,AUTO
  10. CurrentSelected  LONG,AUTO
  11. tipwin               WINDOW,AT(109,42,97,45),TOOLBOX,GRAY,DOUBLE
  12.                        TEXT,AT(0,0,,),FONT('Arial',8,0800000H,FONT:regular),CURSOR(CURSOR:None),USE(tipmsg),DISABLE,FULL,LEFT,READONLY
  13.                      END
  14.   CODE
  15.   LocalRequest = GlobalRequest
  16.   OriginalRequest = GlobalRequest
  17.   LocalResponse = RequestCancelled
  18.   ForceRefresh = False
  19.   CLEAR(GlobalRequest)
  20.   CLEAR(GlobalResponse)
  21.   OPEN(tipwin)
  22.   WindowOpened=True
  23.   y=thread()
  24.   tipwin{prop:xpos}=gxpos
  25.   tipwin{prop:ypos}=gypos
  26.   
  27.   tipwin{prop:width}=len(clip(tipmsg))+10
  28.   tipwin{prop:height}=(len(clip(tipmsg))%32+1)*1.1
  29.     ACCEPT
  30.     CASE EVENT()
  31.     OF EVENT:OpenWindow
  32.       IF NOT WindowInitialized
  33.         DO InitializeWindow
  34.         WindowInitialized = True
  35.       END
  36.       SELECT(?tipmsg)
  37.     OF EVENT:GainFocus
  38.       IF NOT WindowInitialized
  39.         WindowInitialized = True
  40.         DO InitializeWindow
  41.       ELSE
  42.         ForceRefresh = True
  43.         DO RefreshWindow
  44.       END
  45.     END
  46.   END
  47.   DO ProcedureReturn
  48. !---------------------------------------------------------------------------
  49. ProcedureReturn ROUTINE
  50.   !y=0
  51.   IF WindowOpened
  52.     CLOSE(tipwin)
  53.   END
  54.   IF LocalResponse
  55.     GlobalResponse = LocalResponse
  56.   ELSE
  57.     GlobalResponse = RequestCancelled
  58.   END
  59.   RETURN
  60. !---------------------------------------------------------------------------
  61. InitializeWindow ROUTINE
  62.   DO RefreshWindow
  63. !---------------------------------------------------------------------------
  64. RefreshWindow ROUTINE
  65.   CurrentSelected = SELECTED()
  66.   DISPLAY()
  67.   ForceRefresh = False
  68.   IF SELECTED() <> CurrentSelected
  69.     SELECT(CurrentSelected)
  70.   END
  71. !---------------------------------------------------------------------------
  72. SyncWindow ROUTINE
  73. !---------------------------------------------------------------------------
  74.