Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25021/apps/Player4 Modified Files: MciInterface.f MciVideo.f Mediatree.f PLAYER4.F Pl_About.f Pl_MciWindow.f Pl_Toolset.f Pl_Version.f Added Files: MCIWnd.f Log Message: Replaced my MciClass with Rod's MCIControl class Index: Pl_About.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_About.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsmfMhxH and /tmp/cvsTAioHz differ Index: MciVideo.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/MciVideo.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MciVideo.f 5 May 2005 09:43:26 -0000 1.3 --- MciVideo.f 15 May 2005 17:21:52 -0000 1.4 *************** *** 44,48 **** : (MciSendString) ( n1 n2 n3 addr -- ) \ send a MCI-command string MciDebug? if cr ." MciVideo: " 4dup zcount type . . . then ! Call mciSendString drop ; \ ---------------------------------------------------------------------------- --- 44,48 ---- : (MciSendString) ( n1 n2 n3 addr -- ) \ send a MCI-command string MciDebug? if cr ." MciVideo: " 4dup zcount type . . . then ! call mciSendString drop ; \ ---------------------------------------------------------------------------- *************** *** 134,138 **** buf$ +null ! 0 255 buf1$ buf$ 1+ (MciSendString) --- 134,138 ---- buf$ +null ! 0 255 buf1$ buf$ 1+ (MciSendString) Index: MciInterface.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/MciInterface.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MciInterface.f 5 May 2005 09:43:26 -0000 1.4 --- MciInterface.f 15 May 2005 17:21:52 -0000 1.5 *************** *** 112,116 **** :M Height: ( -- height ) ! vheight ;M : GetStatus ( addr len -- n ) --- 112,116 ---- :M Height: ( -- height ) ! vHeight ;M : GetStatus ( addr len -- n ) Index: Mediatree.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Mediatree.f,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Mediatree.f 10 May 2005 15:48:45 -0000 1.9 --- Mediatree.f 15 May 2005 17:21:52 -0000 1.10 *************** *** 6,309 **** needs shell_r.f needs catalog.f ! ! (( TreeView.F A rudimentary TreeView class by Michael Hillerström ! mic...@us... ! ! ! This TreeView class hooks into Windows own library class. ! But be warned; this is a very 'stripped to the bone implementation' ! i.e. it has just what I need for DiaEdit... Some day (soon) I ! will try to correct this. ! ! Please note that this code needs a new version of WINCON.DLL ! (dated September 15, 1997 or later). ! ! An example is included last in this file... ! ! ! Any comments/suggestions to: mic...@us... ! ! ! ! Change log: ! November 23rd, 1997 - 21:59 MIH ! Added the line: WinLibrary COMCTL32.DLL to this source. ! ! September 16th, 1997 - 21:42 MIH ! Removed reference to COMMCTRL.F as Tom Zimmer has released an ! extended WINCON.DLL. Thanks, Tom! ! ! August 31st, 1997 - 23:15 MIH ! First attempt...(which is VERY bare bones...) ! Need to convince Tom Zimmer to include #define's from COMMCTRL.H ! in WINCON.DLL. For the time beeing, we'll have to cope with my ! FORTH constants in COMMCTRL.F. ! ! )) ! ! cr .( Loading TreeView Class...) ! ! ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Prerequisites... ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! ! WinLibrary COMCTL32.DLL \ Make sure that ComCtl32.dll is loaded... ! ! ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ TreeView Constants and their significance... ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! ! comment: ! ! A treeview can have a combination of the following styles: ! ! ! TVS_DISABLEDRAGDROP disables drag n' drop of tree-view items. ! ! TVS_LINESATROOT draws lines linking child items to the root of the hierarchy. ! ! TVS_HASLINES enhances the graphic representation of a tree-view by ! drawing lines that link child items to their parent item. ! To link items at the root of the hierarchy, you need to ! combine this and the TVS_LINESATROOT style. ! ! TVS_HASBUTTONS adds a button to the left side of each parent item. The ! user can click the button to expand or collapse the child ! items as an alternative to double-clicking the parent ! item. To add buttons to items at the root of the ! hierarchy, this style must be combined with TVS_HASLINES, ! and TVS_LINESATROOT. ! ! TVS_EDITLABELS makes it possible for the user to edit the labels of ! tree-view items. ! ! TVS_SHOWSELALWAYS causes a selected item to remain selected when the ! tree-view control loses focus. ! ! ! comment; ! ! ! ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ TreeView Class... ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! ! :Class TreeViewControl <super Child-Window ! ! Record: nmhdr ! int hWndFrom ! int idFrom ! int code ! ;RecordSize: /nmhdr ! ! Record: tvitem ! int mask ! int hItem ! int state ! int stateMask ! int pszText ! int cchTextMax ! int iImage ! int iSelectedImage ! int cChildren ! int lParam ! ;RecordSize: /tvitem ! ! Record: tvins ! int hParent ! int hInsertAfter ! \ TV_ITEM item ! /tvitem bytes item ! ;RecordSize: /tvins ! ! \ Record: tvdi ! \ NMHDR hdr ! \ TV_ITEM item ! \ ;Record ! ! ! Record: tvkd ! \ NMHDR hdr ! int wVKey ! int flags ! ;RecordSize: /tvkd ! ! ! Record: nmtv ! \ NMHDR hdr ! int action ! \ TV_ITEM itemOld ! int maskOld ! int hItemOld ! int stateOld ! int stateMaskOld ! int pszTextOld ! int cchTextMaxOld ! int iImageOld ! int iSelectedImageOld ! int cChildrenOld ! int lParamOld ! \ TV_ITEM itemNew ! int maskNew ! int hItemNew ! int stateNew ! int stateMaskNew ! int pszTextNew ! int cchTextMaxNew ! int iImageNew ! int iSelectedImageNew ! int cChildrenNew ! int lParamNew ! \ POINT ptDrag ! int x ! int y ! ;RecordSize: /nmtv ! ! ! : fill-nmhdr ( l -- ) ! nmhdr /nmhdr 2dup erase move ; ! ! : fill-tvkd ( l -- ) ! 3 cells+ ! tvkd /tvkd 2dup erase move ; ! ! : fill-tvitem ( l -- ) ! 3 cells+ ! tvitem /tvitem 2dup erase move ; ! ! : fill-nmtv ( addr -- ) ! 3 cells+ ! nmtv /nmtv 2dup erase move ; ! ! : tvitem->tvins ( -- ) ! tvitem item /tvitem move ; ! ! ! \ -------------------- Create Tree-View Control -------------------- ! ! create treeview-class z," SysTreeView32" \ Pre-registered class ! ! : create-treeview ( -- hWnd ) ! \ Make sure Common Controls are loaded ! Call InitCommonControls drop ! ! NULL \ Creation parameter ! appInst \ Instance handle ! id \ Child id ! Parent conhndl = ! if conhndl ! else GetHandle: Parent \ parent window handle ! then ! tempRect.AddrOf GetClientRect: Parent ! Bottom: tempRect Right: tempRect \ Size h,w ! 0 0 \ Position y,x ! WindowStyle: [ self ] \ Style ! NULL \ Window name ! treeview-class \ Pre-registered class ! 0 \ Extended style ! Call CreateWindowEx ! ; ! ! ! :M WindowStyle: ( -- style ) ! [ WS_CHILD WS_VISIBLE or ] literal ! ;M ! ! :M Start: ( Parent -- ) ! hWnd ! if drop ! SW_SHOWNOACTIVATE Show: self ! else ! to Parent ! create-treeview to hWnd ! then ! ;M ! ! :M AutoSize: ( -- ) ! tempRect.AddrOf GetClientRect: Parent ! 0 0 Right: tempRect Bottom: tempRect \ x,y,h,w ! Move: self ! ;M ! ! :M Handle_Notify: ( h m w l -- f ) ! dup fill-nmhdr ! code ! case ! TVN_BEGINDRAGA of fill-nmtv On_BeginDrag: [ self ] endof ! TVN_BEGINRDRAGA of fill-nmtv On_BeginRDrag: [ self ] endof ! TVN_BEGINLABELEDITA of fill-tvitem On_BeginLabelEdit: [ self ] endof ! TVN_DELETEITEMA of fill-nmtv On_DeleteItem: [ self ] endof ! TVN_ENDLABELEDITA of fill-tvitem On_EndLabelEdit: [ self ] endof ! TVN_GETDISPINFOA of fill-tvitem On_GetDispInfo: [ self ] endof ! TVN_ITEMEXPANDEDA of fill-nmtv On_ItemExpanded: [ self ] endof ! TVN_ITEMEXPANDINGA of fill-nmtv On_ItemExpanding: [ self ] endof ! TVN_KEYDOWN of fill-tvkd On_KeyDown: [ self ] endof ! TVN_SELCHANGEDA of fill-nmtv On_SelChanged: [ self ] endof ! TVN_SELCHANGINGA of fill-nmtv On_SelChanging: [ self ] endof ! TVN_SETDISPINFOA of fill-tvitem On_SetDispInfo: [ self ] endof ! false swap ( default) ! endcase ! ;M ! ! ! :M ToggleExpandItem: ( hItem -- ) ! TVE_TOGGLE TVM_EXPAND hWnd Call SendMessage drop ! ;M ! ! :M SortChildren: ( hItem -- ) ! false TVM_SORTCHILDREN hWnd Call SendMessage drop ! ;M ! ! :M DeleteItem: ( hItem -- ) \ takes time ! 0 TVM_DELETEITEM hWnd Call SendMessage drop ! ;M ! ! \ --------------------- Overridable methods ---------------------- ! ! :M On_BeginDrag: ( -- f ) ! false ! ;M ! :M On_BeginRDrag: ( -- f ) ! false ! ;M ! :M On_BeginLabelEdit: ( -- f ) \ f=true, cancel edit, f=false, ok edit ! false ! ;M ! :M On_DeleteItem: ( -- f ) ! false ! ;M ! :M On_EndLabelEdit: ( -- f ) ! false ! ;M ! :M On_GetDispInfo: ( -- f ) ! false ! ;M ! :M On_ItemExpanded: ( -- f ) ! false ! ;M ! :M On_ItemExpanding: ( -- f ) \ f=true, don't expand/collapse, f=false, ok go ahead ! false ! ;M ! :M On_KeyDown: ( -- f ) ! false ! ;M ! :M On_SelChanged: ( -- f ) ! false ! ;M ! :M On_SelChanging: ( -- f ) \ f=true, don't change, f=false, ok change ! false ! ;M ! :M On_SetDispInfo: ( -- f ) ! false ! ;M ! ;Class ! ! ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ End of Class definition(s) ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 0 value hItem-last-selected --- 6,10 ---- needs shell_r.f needs catalog.f ! needs TreeView.F 0 value hItem-last-selected *************** *** 313,345 **** \ *************************************************** ! ! :Class NewTVC <super TreeViewControl ! :M WindowStyle: ( -- style ) WindowStyle: super ! \ TVS_HASLINES or ! \ TVS_HASBUTTONS or ! TVS_DISABLEDRAGDROP or ! TVS_SHOWSELALWAYS or ! \ TVS_LINESATROOT or ;M : add-record ( n - ) \ Add when not deleted and found in a collection dup n>record dup Deleted- c@ 0= show-deleted = swap Excluded- c@ or ! if drop ! Else dup to lParam ! dup (l.int) InlineRecord place ! s" " InlineRecord +place ! n>record dup File_name swap Cnt_File_name c@ ! InlineRecord +place ! InlineRecord +null ! InlineRecord 1+ to pszText ! tvitem->tvins ! tvins 0 TVM_INSERTITEMA hWnd Call SendMessage ! to hInsertAfter ! then ! ; ! :M FillTreeView: ( -- ) --- 14,39 ---- \ *************************************************** ! :Class MediaTree <super TreeViewControl :M WindowStyle: ( -- style ) WindowStyle: super ! [ TVS_DISABLEDRAGDROP TVS_SHOWSELALWAYS or ] literal or ;M : add-record ( n - ) \ Add when not deleted and found in a collection dup n>record dup Deleted- c@ 0= show-deleted = swap Excluded- c@ or ! if drop ! Else dup to lParam ! dup (l.int) InlineRecord place ! s" " InlineRecord +place ! n>record dup File_name swap Cnt_File_name c@ ! InlineRecord +place ! InlineRecord +null ! InlineRecord 1+ to pszText ! tvitem->tvins ! tvins 0 TVM_INSERTITEMA hWnd Call SendMessage ! to hInsertAfter ! then ! ; :M FillTreeView: ( -- ) *************** *** 369,377 **** lParam to last-selected-rec ! last-selected-rec n>record dup>r File_name r@ Cnt_File_name c@ ! r@ incr-#played ! r> mark-played ! 2dup cr type-space ! PlayFile: PLAYER4W false ;M --- 63,71 ---- lParam to last-selected-rec ! last-selected-rec n>record dup>r File_name r@ Cnt_File_name c@ ! r@ incr-#played ! r> mark-played ! 2dup cr type-space ! PlayFile: PLAYER4W false ;M *************** *** 397,401 **** : CreateTreeView ( -- ) \ create a treeview window TreeView 0<> ?exit ! New> NewTVC to TreeView 1001 SetId: TreeView self Start: TreeView ; --- 91,95 ---- : CreateTreeView ( -- ) \ create a treeview window TreeView 0<> ?exit ! New> MediaTree to TreeView 1001 SetId: TreeView self Start: TreeView ; *************** *** 417,422 **** :M Refresh: ( -- ) MciDebug? ! if cr timer-reset ! then wait-cursor --- 111,116 ---- :M Refresh: ( -- ) MciDebug? ! if cr timer-reset ! then wait-cursor *************** *** 438,443 **** arrow-cursor MciDebug? ! if .elapsed ! then ;M --- 132,137 ---- arrow-cursor MciDebug? ! if .elapsed ! then ;M *************** *** 455,457 **** \s ! |