FileSelectionList.st
changeset 338 9cbc51998a23
parent 330 56fcae58bcb5
child 350 e3512322cb87
equal deleted inserted replaced
337:b3920857d448 338:9cbc51998a23
   301     "return the shown directory"
   301     "return the shown directory"
   302 
   302 
   303     ^ directory
   303     ^ directory
   304 !
   304 !
   305 
   305 
   306 directoryChangeCheckBlock:aBlock
       
   307     "set the directoryChangeCheckBlock - if non-nil, it controls if
       
   308      a directory change is legal."
       
   309 
       
   310     directoryChangeCheckBlock := aBlock
       
   311 !
       
   312 
       
   313 directory:nameOrDirectory
   306 directory:nameOrDirectory
   314     "set the lists contents to the filenames in the directory.
   307     "set the lists contents to the filenames in the directory.
   315      This does not validate the change with any directoryChangeBlock."
   308      This does not validate the change with any directoryChangeBlock."
   316 
   309 
   317     |oldPath name|
   310     |oldPath name|
   337 	    self updateList
   330 	    self updateList
   338 	]
   331 	]
   339     ]
   332     ]
   340 !
   333 !
   341 
   334 
       
   335 directoryChangeCheckBlock:aBlock
       
   336     "set the directoryChangeCheckBlock - if non-nil, it controls if
       
   337      a directory change is legal."
       
   338 
       
   339     directoryChangeCheckBlock := aBlock
       
   340 !
       
   341 
       
   342 ignoreDirectories:aBoolean
       
   343     "set/clear the flag which controls if directories are ignored
       
   344      (i.e. hidden). The default is false (i.e. dirs are shown)"
       
   345 
       
   346     ignoreDirectories := aBoolean
       
   347 !
       
   348 
   342 ignoreParentDirectory:aBoolean
   349 ignoreParentDirectory:aBoolean
   343     "set/clear the flag which controls if the parent directory (..)
   350     "set/clear the flag which controls if the parent directory (..)
   344      is shown in the list. The default is false (i.e. show it)"
   351      is shown in the list. The default is false (i.e. show it)"
   345 
   352 
   346     ignoreParentDirectory := aBoolean
   353     ignoreParentDirectory := aBoolean
   347 !
       
   348 
       
   349 ignoreDirectories:aBoolean
       
   350     "set/clear the flag which controls if directories are ignored
       
   351      (i.e. hidden). The default is false (i.e. dirs are shown)"
       
   352 
       
   353     ignoreDirectories := aBoolean
       
   354 !
   354 !
   355 
   355 
   356 markDirectories:aBoolean
   356 markDirectories:aBoolean
   357     "turn on/off marking of directories with an arrow.
   357     "turn on/off marking of directories with an arrow.
   358      The default is on"
   358      The default is on"
   441 
   441 
   442 sizeChanged:how
   442 sizeChanged:how
   443     "redraw marks if any"
   443     "redraw marks if any"
   444 
   444 
   445     super sizeChanged:how.
   445     super sizeChanged:how.
   446     shown and:[markDirectories] ifTrue:[
   446     (shown and:[markDirectories]) ifTrue:[
   447         self redraw
   447         self redraw
   448     ]
   448     ]
   449 ! !
   449 ! !
   450 
   450 
   451 !FileSelectionList methodsFor:'initialization'!
   451 !FileSelectionList methodsFor:'initialization'!
   639 ! !
   639 ! !
   640 
   640 
   641 !FileSelectionList class methodsFor:'documentation'!
   641 !FileSelectionList class methodsFor:'documentation'!
   642 
   642 
   643 version
   643 version
   644     ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionList.st,v 1.22 1996-02-08 19:22:02 cg Exp $'
   644     ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionList.st,v 1.23 1996-02-09 12:48:15 ca Exp $'
   645 ! !
   645 ! !