home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / IDE / SOURCE / LIB.PRG < prev    next >
Text File  |  1994-05-31  |  1KB  |  61 lines

  1. // FiveWin LIB files management
  2. // FiveWin LIB tools
  3.  
  4. #include "FiveWin.ch"
  5.  
  6. //----------------------------------------------------------------------------//
  7.  
  8. function LibOpen( cLibName )
  9.  
  10.    local oIco, oWndLib, oBrw, oBar, oFont, oHand
  11.    local cNtxName, cAlias
  12.    local nType
  13.    local aModules := {}
  14.  
  15.    DEFAULT cLibName := cGetFile( "Library file ( *.lib ) | *.lib",;
  16.                                  "Select a Library" )
  17.  
  18.    if ! File( cLibName )
  19.       MsgStop( "I can't find " + cLibName )
  20.       return nil
  21.    endif
  22.  
  23.    CursorWait()
  24.    if lLibOpen( cLibName )
  25.       aModules = aLibModules()
  26.       lLibClose()
  27.       CursorHand()
  28.    endif
  29.  
  30.    DEFINE ICON oIco RESOURCE "Libs"
  31.  
  32.    DEFINE WINDOW oWndLib FROM 1, 1 TO 23, 33 ;
  33.       TITLE "Library: " + cNoPath( cNoExt( cLibName ) ) MDICHILD ;
  34.       ICON oIco
  35.  
  36.    DEFINE FONT oFont NAME "Arial" SIZE 6, 15 BOLD
  37.  
  38.    DEFINE CURSOR oHand RESOURCE "Hand"
  39.  
  40.    @  0, 0 LISTBOX oBrw FIELDS "" ;
  41.       HEADERS "Modules" ;
  42.       OF oWndLib ;
  43.       FONT oFont CURSOR oHand ;
  44.       SIZE 400, 400
  45.  
  46.    oBrw:bLine = { || { aModules[ oBrw:nAt ] } }
  47.    oBrw:SetArray( aModules )
  48.  
  49.    DEFINE BUTTONBAR oBar OF oWndLib
  50.  
  51.    DEFINE BUTTON OF oBar RESOURCE "New" ;
  52.       MESSAGE "Add a new item to the project"
  53.  
  54.    oWndLib:SetControl( oBrw )
  55.  
  56.    ACTIVATE WINDOW oWndLib
  57.  
  58. return nil
  59.  
  60. //----------------------------------------------------------------------------//
  61.