Update of /cvsroot/win32forth/win32forth/src/lib
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv11803
Modified Files:
FolderView.f
Log Message:
Minor mods. EAB
Index: FolderView.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/src/lib/FolderView.f,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FolderView.f 31 Jul 2010 06:38:12 -0000 1.5
--- FolderView.f 2 Dec 2010 05:25:32 -0000 1.6
***************
*** 146,152 ****
filespec-ext filebuf-ext compare-buf and ;
- 0 value hwndSmallIcons \ handle to imagelist for small icons
- 0 value hwndLargeIcons
-
:Class FolderItem <super Object
--- 146,149 ----
***************
*** 154,159 ****
int iconhandle
int itemhandle \ parent handle
- cell bytes index
-
\ save information for each individual file
Record: Win32_Find_Data
--- 151,154 ----
***************
*** 211,215 ****
0 to iconhandle
0 to itemhandle
- 0 index !
;M
--- 206,209 ----
***************
*** 269,272 ****
--- 263,268 ----
LV_ITEM LvItem
FolderListView TheView
+ int FolderList
+ int DirList
int itemindex
int ThisItem \ temp pointer to new item
***************
*** 283,294 ****
int hwndlabel \ handle to window to display path
int popup?
StatusBar ViewStatusBar
! 32 1024 * constant max-files
! max-files cell * Pointer FolderList \ 32k max files shown in a folder
! max-files cell * Pointer DirList \ 32k max directories shown, 64k total in a listing
max-path 1+ bytes Treepath
! path: thespecs
: rootdir? { pathstr cnt -- f } \ f = true if path is at root
--- 279,296 ----
int hwndlabel \ handle to window to display path
int popup?
+ int hwndSmallIcons \ handle to imagelist for small icons
+ int hwndLargeIcons
StatusBar ViewStatusBar
+ 32 bytes findspecs
+ max-path bytes fullpath$
! 32 1024 * constant max-files \ 32k max files shown in a folder
! max-files cell * constant buffersize
max-path 1+ bytes Treepath
! max-path 2 cells + bytes specbuffer
!
! : thespecs ( -- addr )
! specbuffer [ 2 cells ] literal + ;
: rootdir? { pathstr cnt -- f } \ f = true if path is at root
***************
*** 296,299 ****
--- 298,308 ----
pathstr cnt + 1- c@ ':' = ;
+ : releasebuffers ( -- )
+ FolderList ?dup
+ if release 0 to FolderList
+ then DirList ?dup
+ if release 0 to DirList
+ then ;
+
: list[] ( list ndx -- addr )
cell under+ cells+ ;
***************
*** 458,464 ****
:M Start: ( parent -- )
Start: super
FolderList off
! DirList off
! ;M
:M On_Init: ( -- )
--- 467,474 ----
:M Start: ( parent -- )
Start: super
+ buffersize malloc to FolderList
+ buffersize malloc to DirList
FolderList off
! DirList off ;M
:M On_Init: ( -- )
***************
*** 489,492 ****
--- 499,504 ----
0 to #dirs
0 to #fls
+ 0 to FolderList
+ 0 to DirList
0.0 2to total-size
0 to hwndlabel
***************
*** 495,498 ****
--- 507,511 ----
: DisposeTheList ( -- )
+ FolderList 0= ?exit
FolderList lcount cells bounds
?do i @ dispose
***************
*** 504,518 ****
:M ~: ( -- )
DisposeTheList
! ;M
:M Close: ( -- )
DisposeTheList
DestroyImageLists
;M
- \ max-path bytes findpath
- 32 bytes findspecs
- max-path bytes fullpath$
-
: FindFirstFile ( -- f )
TreePath count fullpath$ dup>r place
--- 517,528 ----
:M ~: ( -- )
DisposeTheList
! releasebuffers ;M
:M Close: ( -- )
DisposeTheList
+ releasebuffers
DestroyImageLists
;M
: FindFirstFile ( -- f )
TreePath count fullpath$ dup>r place
|