You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(38) |
Feb
(4) |
Mar
(11) |
Apr
(49) |
May
(81) |
Jun
(65) |
Jul
(36) |
Aug
(57) |
Sep
(63) |
Oct
(57) |
Nov
(49) |
Dec
(41) |
2006 |
Jan
(75) |
Feb
(80) |
Mar
(10) |
Apr
(13) |
May
(100) |
Jun
(100) |
Jul
(77) |
Aug
(87) |
Sep
(80) |
Oct
(124) |
Nov
(39) |
Dec
(41) |
2007 |
Jan
(20) |
Feb
(32) |
Mar
(32) |
Apr
(43) |
May
(146) |
Jun
(40) |
Jul
(49) |
Aug
(33) |
Sep
(25) |
Oct
(19) |
Nov
(11) |
Dec
(8) |
2008 |
Jan
(4) |
Feb
(11) |
Mar
(31) |
Apr
(40) |
May
(34) |
Jun
(24) |
Jul
(39) |
Aug
(104) |
Sep
(27) |
Oct
(35) |
Nov
(34) |
Dec
(97) |
2009 |
Jan
(75) |
Feb
(29) |
Mar
(45) |
Apr
(76) |
May
(121) |
Jun
(103) |
Jul
(67) |
Aug
(28) |
Sep
(22) |
Oct
(39) |
Nov
(9) |
Dec
(15) |
2010 |
Jan
(7) |
Feb
(39) |
Mar
(40) |
Apr
(57) |
May
(67) |
Jun
(69) |
Jul
(49) |
Aug
(68) |
Sep
(22) |
Oct
(7) |
Nov
(2) |
Dec
(10) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(4) |
May
(6) |
Jun
(10) |
Jul
(16) |
Aug
(23) |
Sep
(9) |
Oct
|
Nov
(28) |
Dec
(3) |
2012 |
Jan
(11) |
Feb
(10) |
Mar
(1) |
Apr
|
May
(4) |
Jun
(3) |
Jul
(3) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
(7) |
Mar
(30) |
Apr
(4) |
May
(4) |
Jun
(8) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(24) |
Dec
(13) |
2014 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(9) |
Jun
|
Jul
(3) |
Aug
(9) |
Sep
|
Oct
(2) |
Nov
|
Dec
(3) |
2015 |
Jan
(4) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
(7) |
Dec
(39) |
2016 |
Jan
(17) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2017 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jos v.d.V. <jo...@us...> - 2006-05-21 15:30:15
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23258/apps/Player4 Modified Files: PopupWindow.f Log Message: Jos: Reduced the size of the window to 1 pixel Index: PopupWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PopupWindow.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PopupWindow.f 16 May 2006 17:41:26 -0000 1.6 --- PopupWindow.f 21 May 2006 15:30:03 -0000 1.7 *************** *** 40,44 **** :M WindowStyle: ( -- style ) WS_POPUP ;M ! :M StartSize: ( -- width height ) 3 3 ;M :M StartPos: ( -- x y ) mousex mousey ;M :M WM_LBUTTONDOWN ( h m w l -- res ) CleanupClose ;M --- 40,44 ---- :M WindowStyle: ( -- style ) WS_POPUP ;M ! :M StartSize: ( -- width height ) 1 1 ;M :M StartPos: ( -- x y ) mousex mousey ;M :M WM_LBUTTONDOWN ( h m w l -- res ) CleanupClose ;M |
From: Jos v.d.V. <jo...@us...> - 2006-05-21 15:05:33
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13535/apps/Player4 Modified Files: PLAYER4.F Log Message: Jos: Remove my bug from Start/Resume and added CS_DBLCLKS in the main window to prevent a flickering catalog. Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** PLAYER4.F 21 May 2006 11:42:10 -0000 1.52 --- PLAYER4.F 21 May 2006 15:05:28 -0000 1.53 *************** *** 102,105 **** --- 102,108 ---- z" Player 4th" ;M + :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M + + :M DefaultIcon: ( -- hIcon ) \ return the default icon handle for window LoadAppIcon ;M *************** *** 288,297 **** : Stop/Next ( -- ) ! Playing?: Player4W if Close: Player4W then ; IDM_STOP_NEXT SetCommand ! \ if catalog-exist? ! \ if ( SetFocus: ControlCenter ) play-catalog-random: Player4W ! \ else Playing?: Player4W if Close: Player4W then ! \ then ! \ then ; IDM_STOP_NEXT SetCommand 5000 value step --- 291,299 ---- : Stop/Next ( -- ) ! catalog-exist? ! if SetFocus: ControlCenter play-catalog-random: Player4W ! else Playing?: Player4W if Close: Player4W then ! then ! ; IDM_STOP_NEXT SetCommand 5000 value step *************** *** 361,372 **** MENUBAR player4-Menu-bar POPUP "&File" ! MENUITEM "&Play file...\tCtrl+O" IDM_OPEN_FILE DoCommand ; ! MENUITEM "Play &folder...\tCtrl+F" IDM_OPEN_FOLDER DoCommand ; MENUITEM "&Play &list...\tShift+L" IDM_OPEN_PLAYLIST DoCommand ; MENUSEPARATOR ! MENUITEM "&Exit\tAlt+F4" IDM_QUIT DoCommand ; POPUP "&Catalog" ! MENUITEM "&Add file(s)...\tCtrl+M" IDM_ADD_FILES DoCommand ; MENUITEM "&Import directory tree...\tCtrl+I" IDM_IMPORT_FOLDER DoCommand ; MENUITEM "&Export the catalog to Player.csv" csv-catalog ; --- 363,374 ---- MENUBAR player4-Menu-bar POPUP "&File" ! MENUITEM "&Play file...\tCtrl+O" IDM_OPEN_FILE DoCommand ; ! MENUITEM "Play &folder...\tCtrl+F" IDM_OPEN_FOLDER DoCommand ; MENUITEM "&Play &list...\tShift+L" IDM_OPEN_PLAYLIST DoCommand ; MENUSEPARATOR ! MENUITEM "&Exit\tAlt+F4" IDM_QUIT DoCommand ; POPUP "&Catalog" ! MENUITEM "&Add file(s)...\tCtrl+M" IDM_ADD_FILES DoCommand ; MENUITEM "&Import directory tree...\tCtrl+I" IDM_IMPORT_FOLDER DoCommand ; MENUITEM "&Export the catalog to Player.csv" csv-catalog ; *************** *** 404,408 **** MENUITEM "&200%\tCtrl+2" IDM_VIEW_200 DoCommand ; MENUSEPARATOR ! MENUITEM "&FullScreen toggle\tCtrl+F" IDM_VIEW_FULLSCREEN DoCommand ; MENUSEPARATOR MENUITEM "&Audio on\tCtrl+A" IDM_AUDIO_ON DoCommand ; --- 406,410 ---- MENUITEM "&200%\tCtrl+2" IDM_VIEW_200 DoCommand ; MENUSEPARATOR ! MENUITEM "&FullScreen toggle\tCtrl+F" IDM_VIEW_FULLSCREEN DoCommand ; MENUSEPARATOR MENUITEM "&Audio on\tCtrl+A" IDM_AUDIO_ON DoCommand ; *************** *** 414,418 **** POPUP "&Help" ! MENUITEM "About Player 4th..." IDM_ABOUT DoCommand ; ENDBAR --- 416,420 ---- POPUP "&Help" ! MENUITEM "About Player 4th..." IDM_ABOUT DoCommand ; ENDBAR *************** *** 425,453 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Accelerator Table - support \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ AccelTable table ! \ falgs key-code command-id ! \ File menu ! FCONTROL 'O' IDM_OPEN_FILE ACCELENTRY ! FCONTROL 'F' IDM_OPEN_FOLDER ACCELENTRY ! FCONTROL 'L' IDM_OPEN_PLAYLIST ACCELENTRY ! FALT VK_F4 IDM_QUIT ACCELENTRY ! \ Catalog menu ! FCONTROL 'M' IDM_ADD_FILES ACCELENTRY ! FCONTROL 'I' IDM_IMPORT_FOLDER ACCELENTRY ! FCONTROL 'R' IDM_START/RESUME ACCELENTRY \ Options menu ! FCONTROL '5' IDM_VIEW_50 ACCELENTRY ! FCONTROL '1' IDM_VIEW_100 ACCELENTRY ! FCONTROL '2' IDM_VIEW_200 ACCELENTRY ! FCONTROL 'F' IDM_VIEW_FULLSCREEN ACCELENTRY ! FCONTROL 'A' IDM_AUDIO_ON ACCELENTRY ! FSHIFT 'A' IDM_AUDIO_OFF ACCELENTRY \ Help menu --- 427,455 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Accelerator Table - support \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ AccelTable table ! \ falgs key-code command-id ! \ File menu ! FCONTROL 'O' IDM_OPEN_FILE ACCELENTRY ! FCONTROL 'F' IDM_OPEN_FOLDER ACCELENTRY ! FCONTROL 'L' IDM_OPEN_PLAYLIST ACCELENTRY ! FALT VK_F4 IDM_QUIT ACCELENTRY ! \ Catalog menu ! FCONTROL 'M' IDM_ADD_FILES ACCELENTRY ! FCONTROL 'I' IDM_IMPORT_FOLDER ACCELENTRY ! FCONTROL 'R' IDM_START/RESUME ACCELENTRY \ Options menu ! FCONTROL '5' IDM_VIEW_50 ACCELENTRY ! FCONTROL '1' IDM_VIEW_100 ACCELENTRY ! FCONTROL '2' IDM_VIEW_200 ACCELENTRY ! FCONTROL 'F' IDM_VIEW_FULLSCREEN ACCELENTRY ! FCONTROL 'A' IDM_AUDIO_ON ACCELENTRY ! FSHIFT 'A' IDM_AUDIO_OFF ACCELENTRY \ Help menu *************** *** 455,460 **** \ other commands ! FCONTROL 'Q' IDM_STOP ACCELENTRY ! 0 VK_ESCAPE IDM_STOPPLAYER ACCELENTRY 0 VK_LEFT IDM_REWIND ACCELENTRY --- 457,462 ---- \ other commands ! FCONTROL 'Q' IDM_STOP ACCELENTRY ! 0 VK_ESCAPE IDM_STOPPLAYER ACCELENTRY 0 VK_LEFT IDM_REWIND ACCELENTRY |
From: Jos v.d.V. <jo...@us...> - 2006-05-21 14:19:32
|
Update of /cvsroot/win32forth/win32forth/Templates In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26793/Templates Added Files: TreeViewInSplitWindow.f Log Message: Jos: Added a template for a treeview in a splitter window --- NEW FILE: TreeViewInSplitWindow.f --- anew -TreeViewInSplitWindow.f Needs NoConsole.f Needs Resources.f Needs PopupWindow.f Needs Treeview.f false value turnkey? defer OnPosition ( window -- ) ' drop is OnPosition \ called when window panes are repositioned defer OnInit ( window -- ) ' drop is OnInit \ called during window On_init method :Class NewTVC <super TreeViewControl Font WinFont :M WindowStyle: ( -- style ) WindowStyle: super TVS_HASLINES or TVS_HASBUTTONS or TVS_DISABLEDRAGDROP or TVS_SHOWSELALWAYS or TVS_LINESATROOT or ;M int hRoot int hSon int hPrev : AddItem ( sztext hAfter hParent nChildren -- ) tvins /tvins erase tvitem /tvitem erase ( nChildren) to cChildren ( hParent) to hParent ( hAfter) to hInsertAfter to pszText TVIF_TEXT TVIF_CHILDREN or to mask tvitem->tvins tvins 0 TVM_INSERTITEMA hWnd Call SendMessage to hPrev ; : FillTreeView ( -- ) \ Application depended z" Root Item" TVI_LAST TVI_ROOT 1 AddItem hPrev to hRoot z" First son" hPrev hRoot 1 AddItem hPrev to hSon z" First Grandson" hPrev hSon 0 AddItem z" Second Grandson" hPrev hSon 0 AddItem z" Second son" hPrev hRoot 0 AddItem z" Third son" hPrev hRoot 1 AddItem hPrev to hSon z" Third Grandson" hPrev hSon 0 AddItem ; :M Start: ( Parent -- ) dup to parent Start: super 8 Width: WinFont 16 Height: WinFont s" Courier New" SetFaceName: WinFont Create: WinFont true Handle: WinFont WM_SETFONT hWnd CALL SendMessage drop \ activate a new font \ Insert items... FillTreeView ;M : StartPopupWindow ( -- ) hWnd get-mouse-xy GetWindowRect: Self 2drop rot + >r + r> Hwnd Start: PopupWindow ; :M On_SelChanged: { \ text$ -- f } \ Show text of selected item in message box maxstring LocalAlloc: text$ TVIF_TEXT to mask hItemNew to hItem text$ to pszText maxstring to cchTextMax tvitem 0 TVM_GETITEMA hWnd Call SendMessage drop \ text$ z" TreeView selection" MB_OK MessageBox: Parent drop StartPopupWindow false ;M :M On_RightClick: ( -- ) On_SelChanged: Self ;M ;Class \ ------------------------------------------------------------------------ \ Define the left part of the splitter window. \ ------------------------------------------------------------------------ :Object LeftPane <Super Child-Window int TreeView int EnableNotify? :M On_Init: ( -- ) On_Init: super New> NewTVC to TreeView 1001 SetId: TreeView self Start: TreeView true to EnableNotify? true to EnableNotify? ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M Start: ( Parent -- ) start: super ;M :M ExWindowStyle: ( -- style ) ExWindowStyle: Super WS_EX_CLIENTEDGE or ;M :M On_Paint: ( -- ) 0 0 Width Height WHITE FillArea: dc ;M :M On_Size: ( -- ) AutoSize: TreeView ;M :M RefreshTreeview: ( -- ) wait-cursor EnableNotify? false to EnableNotify? SW_HIDE Show: TreeView \ hide, FillTreeView: TreeView \ fill, SW_RESTORE Show: TreeView \ and show it. to EnableNotify? arrow-cursor ;M :M WM_NOTIFY ( h m w l -- f ) dup @ GetHandle: TreeView = if Handle_Notify: TreeView else false then ;M ;Object \ ------------------------------------------------------------------------ \ Define the right part of the splitter window. \ ------------------------------------------------------------------------ :Object RightPane <Super Child-Window :M On_Init: ( -- ) On_Init: super ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M Start: ( Parent -- ) start: super ;M :M ExWindowStyle: ( -- style ) ExWindowStyle: Super WS_EX_CLIENTEDGE or ;M :M On_Paint: ( -- ) 0 0 Width Height WHITE FillArea: dc ;M ;Object \ ------------------------------------------------------------------------ \ Define the line between the 2 panes. \ ------------------------------------------------------------------------ :Object Splitter <Super child-window :M WindowStyle: ( -- style ) WindowStyle: super [ WS_DISABLED WS_CLIPSIBLINGS or ] literal or ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M On_Paint: ( -- ) 0 0 Width Height LTGRAY FillArea: dc ;M ;Object variable LeftWidth 200 LeftWidth ! 2 value thickness \ ------------------------------------------------------------------------ \ Define the window that contains the 2 panes. \ ------------------------------------------------------------------------ :Object SplitterWindow <Super Window 0 value ToolBarHeight \ set to height of toolbar if any 0 value StatusBarHeight \ set to height of status bar if any int dragging? int mousedown? : LeftHeight ( -- n ) Height StatusBarHeight - ToolBarHeight - ; : RightHeight ( -- n ) Height StatusBarHeight - ToolBarHeight - ; : position-windows ( -- ) 0 ToolBarHeight LeftWidth @ LeftHeight Move: LeftPane LeftWidth @ thickness + ToolBarHeight Width LeftWidth @ thickness + - RightHeight Move: RightPane LeftWidth @ ToolBarHeight thickness LeftHeight Move: Splitter self OnPosition ; : InSplitter? ( -- f1 ) \ is cursor on splitter window hWnd get-mouse-xy 0 height within swap LeftWidth @ dup thickness + within and ; \ mouse click routines for Main Window to track the Splitter movement : DoSizing ( -- ) mousedown? dragging? or 0= ?EXIT mousex ( 1+ ) width min thickness 2/ - [ thickness 2* ] literal max width [ thickness 2* ] literal - min LeftWidth ! position-windows WINPAUSE ; : On_clicked ( -- ) mousedown? 0= IF hWnd Call SetCapture drop THEN true to mousedown? InSplitter? to dragging? DoSizing ; : On_unclicked ( -- ) mousedown? IF Call ReleaseCapture drop THEN false to mousedown? false to dragging? ; : On_DblClick ( -- ) false to mousedown? InSplitter? 0= ?EXIT LeftWidth @ 8 > IF 0 thickness 2/ - LeftWidth ! ELSE 132 Width 2/ min LeftWidth ! THEN position-windows ; :M WM_SETCURSOR ( h m w l -- ) hWnd get-mouse-xy ToolBarHeight dup LeftHeight + within swap 0 width within and IF InSplitter? IF SIZEWE-CURSOR ELSE arrow-cursor THEN 1 ELSE DefWindowProc: self THEN ;M :M On_Init: ( -- ) self Start: LeftPane self Start: RightPane self Start: Splitter self OnInit \ perform user function ;M :M Classinit: ( -- ) ClassInit: super \ init super class ['] On_clicked SetClickFunc: self ['] On_unclicked SetUnClickFunc: self ['] DoSizing SetTrackFunc: self ['] On_DblClick SetDblClickFunc: self ;M :M WindowStyle: ( -- style ) WindowStyle: Super WS_CLIPCHILDREN or ;M :M WindowHasMenu: ( -- f ) true ;M :M WindowTitle: ( -- ztitle ) z" Treeview template" ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M StartSize: ( -- w h ) screen-size >r 2/ r> 2/ ;M :M StartPos: ( -- x y ) CenterWindow: Self ;M :M On_Size: ( -- ) position-windows ;M :M ParentWindow: ( -- hwndParent | 0=NoParent ) parent ;M :M SetParent: ( hwndparent -- ) to parent ;M :M On_Done: ( h m w l -- res ) Close: self 0 call PostQuitMessage drop On_Done: super 0 ;M ;Object MENUBAR ApplicationBar POPUP "File" MENUITEM "Exit" Close: SplitterWindow ; ENDBAR : main ( -- ) Start: SplitterWindow ApplicationBar SetMenuBar: SplitterWindow turnkey? if MessageLoop bye then ; turnkey? [if] NoConsoleIO NoConsoleInImage ' main turnkey App.exe s" WIN32FOR.ICO" s" App.exe" AddAppIcon 1 pause-seconds bye [else] main [then] |
From: Jos v.d.V. <jo...@us...> - 2006-05-21 14:17:37
|
Update of /cvsroot/win32forth/win32forth/Templates In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26003/Templates Modified Files: PopupWindow.f Log Message: Jos: Needed some changes for the treeview Index: PopupWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/Templates/PopupWindow.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PopupWindow.f 20 May 2006 15:09:37 -0000 1.1 --- PopupWindow.f 21 May 2006 14:17:34 -0000 1.2 *************** *** 13,59 **** :Object PopupWindow <super Window - int focus - - :M ClassInit: ( -- ) - ClassInit: super - PopupOnItem SetPopupBar: Self - true to Focus - ;M - - \ The popupmenu needs a rbuttondown to do it right : StartPopup ( -- ) 0 WM_RBUTTONDOWN GetHandle: self Call PostMessage drop ; ! : CleanupClose ( h_m w_l - res ) 2drop 0 close: Self ; :M WindowStyle: ( -- style ) WS_POPUP ;M ! :M StartSize: ( -- width height ) 3 3 ;M :M StartPos: ( -- x y ) mousex mousey ;M :M WM_LBUTTONDOWN ( h m w l -- res ) CleanupClose ;M :M On_KillFocus: ( h m w l -- res ) CleanupClose ;M :M On_Done: ( h m w l -- res ) On_Done: super 0 ;M ! :M Start: ( mousex mousey -- ) to mousey to mousex Start: super ;M ! ! :noname ( - ) false to focus ! hwnd call DestroyWindow drop ! ; is ClosePopupWindow ! :M On_Paint: ( -- ) ! focus ! if hwnd start: PopupOnItem ! StartPopup ! then ! ;M ! ;Object ! \ Disable the following line in an application ! screen-size >r 2/ r> 2/ Start: PopupWindow \ to show how it looks ! (( A window of an application could defermine mousex mousey ! as follows: ! hWnd get-mouse-xy ! GetWindowRect: Self 2drop ! rot + >r + r> \ mousex mousey ! Start: PopupWindow \ then start the PopupWindow )) \s --- 13,48 ---- :Object PopupWindow <super Window : StartPopup ( -- ) 0 WM_RBUTTONDOWN GetHandle: self Call PostMessage drop ; ! :noname ( - ) Close: Self ; is ClosePopupWindow ! : CleanupClose ( h_m w_l - res ) 2drop ClosePopupWindow ; ! ! :M ClassInit: ( -- ) ClassInit: super PopupOnItem SetPopupBar: Self ;M :M WindowStyle: ( -- style ) WS_POPUP ;M ! :M StartSize: ( -- width height ) 1 1 ;M :M StartPos: ( -- x y ) mousex mousey ;M :M WM_LBUTTONDOWN ( h m w l -- res ) CleanupClose ;M :M On_KillFocus: ( h m w l -- res ) CleanupClose ;M :M On_Done: ( h m w l -- res ) On_Done: super 0 ;M ! :M SetParent: ( HwndParent -- ) to parent ;M ! :M On_Paint: ( -- ) hwnd start: PopupOnItem StartPopup ;M ! :M Start: ( mousex mousey HwndParent -- ) ! SetParent: Self ! to mousey to mousex ! Start: super ! ;M ! ;Object ! \ screen-size >r 2/ r> 2/ 0 Start: PopupWindow \ to show how it looks ! (( Use from an other window: ! : StartPopupWindow ( -- ) ! hWnd get-mouse-xy ! GetWindowRect: Self 2drop ! rot + >r + r> Hwnd Start: PopupWindow ! ; )) \s |
From: Dirk B. <db...@us...> - 2006-05-21 11:42:23
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29478/apps/Player4 Modified Files: CommandID.f Commands.f MCIWnd.f PLAYER4.F PLAYER4.frm Pl_MciWindow.f Pl_Version.f Log Message: Finished rewriting the command handling within Player4th. Index: Pl_Version.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_Version.f,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Pl_Version.f 26 Oct 2005 15:19:15 -0000 1.15 --- Pl_Version.f 21 May 2006 11:42:10 -0000 1.16 *************** *** 3,7 **** anew -Pl_Version.f ! 10121 value player_version# \ Version numbers: v.ww.rr --- 3,7 ---- anew -Pl_Version.f ! 10123 value player_version# \ Version numbers: v.ww.rr *************** *** 96,100 **** Jos May 2nd, 2005 - Made Refresh again faster ! (The Treeview was loaded 2 times when it was refreshed) - Added a freelist, delete and undelete --- 96,100 ---- Jos May 2nd, 2005 - Made Refresh again faster ! (The Treeview was loaded 2 times when it was refreshed) - Added a freelist, delete and undelete *************** *** 135,139 **** \ changes for Version 1.01.21 Jos October 26th, 2005 ! - Changed the shellsort and added more vieuws ! \s --- 135,144 ---- \ changes for Version 1.01.21 Jos October 26th, 2005 ! - Changed the shellsort and added more views ! \ changes for Version 1.01.22 ! - A lot of undocumented changes... ! ! \ changes for Version 1.01.23 ! dbu Sonntag, Mai 21 2006 ! - Rewritten the Command handling by using an accelerator-key-table. Index: MCIWnd.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/MCIWnd.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MCIWnd.f 16 May 2006 17:41:26 -0000 1.3 --- MCIWnd.f 21 May 2006 11:42:10 -0000 1.4 *************** *** 148,152 **** :class MciChildWindow <super child-window ! MciControl MCI int VideoSize --- 148,152 ---- :class MciChildWindow <super child-window ! int MCI int VideoSize *************** *** 160,163 **** --- 160,164 ---- :M Classinit: ( -- ) ClassInit: super + 0 to MCI 0 to VideoSize 0 to vWidth *************** *** 169,172 **** --- 170,177 ---- :M On_Init: ( -- ) On_Init: super \ initialize the class + + new> MciControl to MCI + self Start: MCI \ then startup child window + 100 to VideoSize 0 to vWidth *************** *** 174,178 **** false to FullScreen? false to Video? ! self Start: MCI \ then startup child window ;M --- 179,183 ---- false to FullScreen? false to Video? ! ;M Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** PLAYER4.F 16 May 2006 17:41:26 -0000 1.51 --- PLAYER4.F 21 May 2006 11:42:10 -0000 1.52 *************** *** 20,34 **** decimal ! false value turnkey? true value MciDebug? - defer PLAYER ' noop is PLAYER - defer RefreshCatalog ' noop is RefreshCatalog - defer SortCatalog ' noop is SortCatalog - defer RequestRecord ' noop is RequestRecord - defer MenuChecks ' noop is MenuChecks - defer KeyHandler ' noop is KeyHandler - defer StopPlayer ' noop is StopPlayer - needs NoConsole.f needs excontrols.f --- 20,26 ---- decimal ! true value turnkey? true value MciDebug? needs NoConsole.f needs excontrols.f *************** *** 39,42 **** --- 31,41 ---- needs Resources.f needs multiopen.f + needs AcceleratorTables.f + + defer PLAYER ' noop is PLAYER + defer RefreshCatalog ' noop is RefreshCatalog + defer SortCatalog ' noop is SortCatalog + defer RequestRecord ' noop is RequestRecord + defer MenuChecks ' noop is MenuChecks needs Pl_Toolset.f *************** *** 47,50 **** --- 46,51 ---- needs Player4.frm \ "Control center" dialog + AcceleratorTable AccelTable + \ ----------------------------------------------------------------------------- \ define the child window for the right part of the main window *************** *** 179,185 **** ; - :M WM_KEYDOWN ( key l -- res ) - drop KeyHandler 0 ;M - :M Classinit: ( -- ) ClassInit: super \ init super class --- 180,183 ---- *************** *** 206,221 **** :M On_Init: ( -- ) On_Init: super COLOR_BTNFACE 1+ GCL_HBRBACKGROUND hwnd Call SetClassLong drop InitFileNames check/resize-config-file - GetHandle: Self dup SetParent: ControlCenter - SetParent: ViewForm catalog-exist? if map-config-file map-database vadr-config ExitFailed- c@ ! if MciDebug? ! if cr ." REBUILD " ! then ! generate-index-file build-free-list ! then true vadr-config ExitFailed- c! MciDebug? --- 204,216 ---- :M On_Init: ( -- ) On_Init: super + AccelTable EnableAccelerators \ init the accelerator table COLOR_BTNFACE 1+ GCL_HBRBACKGROUND hwnd Call SetClassLong drop InitFileNames check/resize-config-file catalog-exist? if map-config-file map-database vadr-config ExitFailed- c@ ! if MciDebug? if cr ." REBUILD " then ! generate-index-file build-free-list ! then true vadr-config ExitFailed- c! MciDebug? *************** *** 223,229 **** ." freelist: " vadr-config #free-list @ . then ! else map-config-file ! then ! SortByFlags self Start: Catalog --- 218,226 ---- ." freelist: " vadr-config #free-list @ . then ! else map-config-file ! then SortByFlags ! ! GetHandle: Self SetParent: ControlCenter ! GetHandle: Self SetParent: ViewForm self Start: Catalog *************** *** 245,248 **** --- 242,246 ---- :M WM_CLOSE ( h m w l -- res ) + AccelTable DisableAccelerators \ free the accelerator table Close: self WM_CLOSE WM: Super *************** *** 290,308 **** : Stop/Next ( -- ) ! if catalog-exist? ! if SetFocus: ControlCenter play-catalog-random: Player4W ! else Playing?: Player4W ! if Close: Player4W ! then ! then ! then ; 5000 value step : Forward ( -- ) ! Playing?: Player4W if step Forward: Player4W then ; : Rewind ( -- ) ! Playing?: Player4W if step Rewind: Player4W then ; ' Pause/Resume SetFunc: PauseButton --- 288,305 ---- : Stop/Next ( -- ) ! Playing?: Player4W if Close: Player4W then ; IDM_STOP_NEXT SetCommand ! \ if catalog-exist? ! \ if ( SetFocus: ControlCenter ) play-catalog-random: Player4W ! \ else Playing?: Player4W if Close: Player4W then ! \ then ! \ then ; IDM_STOP_NEXT SetCommand 5000 value step : Forward ( -- ) ! Playing?: Player4W if step Forward: Player4W then ; IDM_FORWARD SetCommand : Rewind ( -- ) ! Playing?: Player4W if step Rewind: Player4W then ; IDM_REWIND SetCommand ' Pause/Resume SetFunc: PauseButton *************** *** 317,338 **** \ ----------------------------------------------------------------------------- - \ ----------------------------------------------------------------------------- - - \ : SortRandom ( -- ) \ sort the catalog - \ catalog-exist? - \ if sort_by_RandomLevel RefreshCatalog - \ then ; - - \ : SortLeastPlayed ( -- ) \ sort the catalog - \ catalog-exist? - \ if sort_by_leastPlayed RefreshCatalog - \ then ; - - \ : SortSize ( -- ) \ sort the catalog - \ catalog-exist? - \ if sort_by_size RefreshCatalog - \ then ; - - \ ----------------------------------------------------------------------------- \ Simple command line handling \ --- 314,317 ---- *************** *** 387,390 **** --- 366,370 ---- MENUSEPARATOR MENUITEM "&Exit\tAlt+F4" IDM_QUIT DoCommand ; + POPUP "&Catalog" MENUITEM "&Add file(s)...\tCtrl+M" IDM_ADD_FILES DoCommand ; *************** *** 434,486 **** POPUP "&Help" ! MENUITEM "About Player 4th..." AboutPlayer ; ENDBAR ! :Noname ( - ) ! vadr-config AutoStart- c@ Check: mAutostart ! vadr-config AutoMinimized- c@ Check: mTray ! vadr-config IgnoreRequests c@ Check: mHandelReq ! vadr-config KeepRequests c@ Check: mKeepReq ! ; is MenuChecks \ enable/disable the menu items ! \ ----------------------------------------------------------------------------- ! \ Accelerator table ! \ ----------------------------------------------------------------------------- ! 0x21 constant vk_pgdn ! 0x22 constant vk_down ! 0x25 constant vk_left ! 0x27 constant vk_right ! :Noname ( Vkey -- ) ! case ! BL of Pause/Resume endof ! 'O' of OpenFile: Player4W endof ! 'F' of OpenFolder: Player4W endof ! 'L' of OpenPlayList: Player4W endof ! 'S' of FullScreen endof ! 'Q' of QuitPlayer endof \ Q only ! VK_F1 of AboutPlayer endof ! VK_ESCAPE of StopPlayer endof ! 'A' of AudioOn: Player4W endof ! 'A' +k_shift of AudioOff: Player4W endof ! 'W' of 0 SetVideoSize: Player4W endof ! '5' of 50 SetVideoSize: Player4W endof ! '1' of 100 SetVideoSize: Player4W endof ! '2' of 200 SetVideoSize: Player4W endof ! VK_PGDN of Stop/Next endof \ 21 ! VK_DOWN of Stop/Next endof \ 22 ! VK_LEFT of Rewind endof \ 25 ! VK_RIGHT of Forward endof \ 27 ! 'R' of start/resume endof ! 'M' of AddFilesFromSelector: Player4W endof ! 'I' of Import-to-catalog: Player4W RefreshCatalog endof ! \ 'C' +k_control of PlayAudioCD: Player4W endof \ doesn't work on my system (dbu) ! endcase ! ; is KeyHandler \ ----------------------------------------------------------------------------- --- 414,467 ---- POPUP "&Help" ! MENUITEM "About Player 4th..." IDM_ABOUT DoCommand ; ENDBAR ! :Noname ( -- ) ! vadr-config AutoStart- c@ Check: mAutostart ! vadr-config AutoMinimized- c@ Check: mTray ! vadr-config IgnoreRequests c@ Check: mHandelReq ! vadr-config KeepRequests c@ Check: mKeepReq ! ; is MenuChecks \ enable/disable the menu items ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Accelerator Table - support ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! AccelTable table ! \ falgs key-code command-id ! \ File menu ! FCONTROL 'O' IDM_OPEN_FILE ACCELENTRY ! FCONTROL 'F' IDM_OPEN_FOLDER ACCELENTRY ! FCONTROL 'L' IDM_OPEN_PLAYLIST ACCELENTRY ! FALT VK_F4 IDM_QUIT ACCELENTRY ! \ Catalog menu ! FCONTROL 'M' IDM_ADD_FILES ACCELENTRY ! FCONTROL 'I' IDM_IMPORT_FOLDER ACCELENTRY ! FCONTROL 'R' IDM_START/RESUME ACCELENTRY ! \ Options menu ! FCONTROL '5' IDM_VIEW_50 ACCELENTRY ! FCONTROL '1' IDM_VIEW_100 ACCELENTRY ! FCONTROL '2' IDM_VIEW_200 ACCELENTRY ! FCONTROL 'F' IDM_VIEW_FULLSCREEN ACCELENTRY ! FCONTROL 'A' IDM_AUDIO_ON ACCELENTRY ! FSHIFT 'A' IDM_AUDIO_OFF ACCELENTRY ! \ Help menu ! 0 VK_F1 IDM_ABOUT ACCELENTRY ! ! \ other commands ! FCONTROL 'Q' IDM_STOP ACCELENTRY ! 0 VK_ESCAPE IDM_STOPPLAYER ACCELENTRY ! ! 0 VK_LEFT IDM_REWIND ACCELENTRY ! 0 VK_RIGHT IDM_FORWARD ACCELENTRY ! 0 VK_PRIOR IDM_STOP_NEXT ACCELENTRY \ page up ! 0 VK_NEXT IDM_STOP_NEXT ACCELENTRY \ page down ! ! MainWindow HandlesThem \ ----------------------------------------------------------------------------- *************** *** 498,513 **** :noname ( -- ) ! WINPAUSE 10 MS ! Playing: Player4W ; is PLAYER ! : PLAYER-LOOP ( -- ) ! BEGIN PLAYER AGAIN ; : PLAYER4 ( -- ) InitPlayer HandleCmdLine ! PLAYER-LOOP ! turnkey? IF MessageLoop bye THEN ; --- 479,493 ---- :noname ( -- ) ! WINPAUSE \ here the windows messages are handled !!! ! 10 MS Playing: Player4W ; is PLAYER ! : Player-Loop ( -- ) ! turnkey? if begin player again then ; : PLAYER4 ( -- ) InitPlayer HandleCmdLine ! Player-Loop ; Index: Pl_MciWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_MciWindow.f,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Pl_MciWindow.f 16 May 2006 17:41:26 -0000 1.19 --- Pl_MciWindow.f 21 May 2006 11:42:10 -0000 1.20 *************** *** 107,118 **** maxstring bytes string1$ - \ :M ExWindowStyle: ( -- style ) - \ ExWindowStyle: Super - \ [ WS_EX_CLIENTEDGE WS_EX_ACCEPTFILES or ] literal or ;M - \ - \ :M WndClassStyle: ( -- style ) - \ \ CS_DBLCLKS only to prevent flicker in window on sizing. - \ CS_DBLCLKS ;M - :M ExWindowStyle: ( -- style ) ExWindowStyle: Super WS_EX_ACCEPTFILES or ;M --- 107,110 ---- *************** *** 149,160 **** type-of-media >r GetShortPathName r> ! if SW_HIDE Show: MouseHandlerWindow ! OpenVideo: super ! else OpenAudio: super ! SW_SHOW Show: MouseHandlerWindow ! \ paint: MouseHandlerWindow ! then ! SW_SHOW Show: self ! ;M :M Play: ( n -- ) \ plays the current file from position n (ms) --- 141,150 ---- type-of-media >r GetShortPathName r> ! if SW_HIDE Show: MouseHandlerWindow ! OpenVideo: super ! else OpenAudio: super ! SW_SHOW Show: MouseHandlerWindow ! then \ SW_SHOW Show: self ! ;M :M Play: ( n -- ) \ plays the current file from position n (ms) *************** *** 169,178 **** 2dup file-status nip 0= ! if 2dup IsRealMedia? ! if 2drop \ don't play RealPlayer files, ! \ sometimes MCI crashes on my system, when trying (dbu) ! else \ 2dup ReTitle ! Open: self ! 0 Play: self then else 2drop --- 159,166 ---- 2dup file-status nip 0= ! if \ don't try play RealPlayer files, sometimes MCI crashes on my system, when trying (dbu) ! 2dup IsRealMedia? ! if 2drop ! else Open: self 0 Play: self then else 2drop *************** *** 211,215 **** if Iconic? 0= Audio?: self or if GetPosition: self GetLength: self >= ! if Close: self SW_HIDE Show: self then then then ; --- 199,203 ---- if Iconic? 0= Audio?: self or if GetPosition: self GetLength: self >= ! if Close: self ( SW_HIDE Show: self ) then then then ; *************** *** 288,335 **** database-mhndl #records-in-database vadr-config #free-list @ - 0> if AbortPlaying: self false to catalog-aborted? ! begin PLAYER catalog-aborted? #InCollection 0= or if exitm then ! Playing?: Self not ! if next-not-played dup -1 = ! if MciDebug? ! if cr cr ." All done. Reset randomlevel and shuffle..." ! then ! set-all-not-played random-shuffle ! else cr 2 spaces dup . 2 spaces n>record dup>r ! RecordDef File_name r@ Cnt_File_name c@ 2dup type-space ! r@ incr-#played ! r> mark-played ! PlayFile: Self ! then ! then again then ! ;M : add-to-catalog ( -- ) \ Delete the *.dat files to start a new catalog ! z" Folder(s) to catalog" ! vadr-config PathMediaFiles dup +null GetHandle: Self ! BrowseForFolder ! If vadr-config PathMediaFiles count GetLabel add_dir_tree ! then ! ; :M Import-to-catalog: ( -- ) ! add-to-catalog ! ;M ! :M AddFilesFromSelector: ( - ) \ add one or more files ! GetHandle: self Start: GetFilesDialog count nip 0> ! if vadr-config 0= ! if map-config-file ! then ! OpenAppendDatabase 0 GetFile: GetFilesDialog GetLabel ! #SelectedFiles: GetFilesDialog ! wait-cursor 0 ! do dup i GetFile: GetFilesDialog AddFile ! loop ! arrow-cursor CloseReMap RefreshCatalog ! then ! ;M \ ----------------------------------------------------------------------------- --- 276,313 ---- database-mhndl #records-in-database vadr-config #free-list @ - 0> if AbortPlaying: self false to catalog-aborted? ! begin catalog-aborted? #InCollection 0= or if exitm then ! Playing?: Self not ! if next-not-played dup -1 = ! if set-all-not-played random-shuffle ! else n>record dup>r ! RecordDef File_name r@ Cnt_File_name c@ 2dup type-space ! r@ incr-#played r> mark-played ! (PlayOneFile) ! then ! then again then ! ;M : add-to-catalog ( -- ) \ Delete the *.dat files to start a new catalog ! z" Folder(s) to catalog" ! vadr-config PathMediaFiles dup +null GetHandle: Self ! BrowseForFolder ! If vadr-config PathMediaFiles count GetLabel add_dir_tree ! then ; :M Import-to-catalog: ( -- ) ! add-to-catalog ;M :M AddFilesFromSelector: ( - ) \ add one or more files ! GetHandle: self Start: GetFilesDialog count nip 0> ! if vadr-config 0= if map-config-file then ! OpenAppendDatabase 0 GetFile: GetFilesDialog GetLabel ! #SelectedFiles: GetFilesDialog ! wait-cursor 0 ! do dup i GetFile: GetFilesDialog AddFile ! loop ! arrow-cursor CloseReMap RefreshCatalog ! then ;M \ ----------------------------------------------------------------------------- *************** *** 378,384 **** string1$ maxstring erase - \ 1 Setid: MouseHandlerWindow self Start: MouseHandlerWindow ! \ player4-popup-Bar SetPopupBar: MouseHandlerWindow ;M --- 356,361 ---- string1$ maxstring erase self Start: MouseHandlerWindow ! player4-popup-Bar SetPopupBar: MouseHandlerWindow ;M Index: CommandID.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/CommandID.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CommandID.f 16 May 2006 17:41:26 -0000 1.1 --- CommandID.f 21 May 2006 11:42:10 -0000 1.2 *************** *** 34,37 **** --- 34,45 ---- NewID IDM_AUDIO_OFF + \ Other commands + NewID IDM_STOP + NewID IDM_ABOUT + NewID IDM_STOPPLAYER + NewID IDM_REWIND + NewID IDM_FORWARD + NewID IDM_STOP_NEXT + IdCounter constant IDM_LAST Index: Commands.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Commands.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Commands.f 16 May 2006 17:41:26 -0000 1.1 --- Commands.f 21 May 2006 11:42:10 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- Close: MainWindow bye ; IDM_QUIT SetCommand + defer StopPlayer ( -- ) ' noop is StopPlayer + IDM_STOPPLAYER SetCommand + \ -------------------------------------------------------------------------- \ Catalog menu *************** *** 129,132 **** --- 132,150 ---- then ; + \ : SortRandom ( -- ) \ sort the catalog + \ catalog-exist? + \ if sort_by_RandomLevel RefreshCatalog + \ then ; + + \ : SortLeastPlayed ( -- ) \ sort the catalog + \ catalog-exist? + \ if sort_by_leastPlayed RefreshCatalog + \ then ; + + \ : SortSize ( -- ) \ sort the catalog + \ catalog-exist? + \ if sort_by_size RefreshCatalog + \ then ; + \ -------------------------------------------------------------------------- \ Options menu *************** *** 179,181 **** Start: AboutPlayer4 ResumeVideo ! On_Paint: MainWindow ; --- 197,199 ---- Start: AboutPlayer4 ResumeVideo ! On_Paint: MainWindow ; IDM_ABOUT SetCommand Index: PLAYER4.frm =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.frm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PLAYER4.frm 16 May 2006 17:41:26 -0000 1.5 --- PLAYER4.frm 21 May 2006 11:42:10 -0000 1.6 *************** *** 43,54 **** ;M - :M WM_KEYDOWN ( key l -- res ) - drop KeyHandler 0 ;M - - :M Close: ( -- ) - \ Insert your code here - Close: super - ;M - :M On_Init: ( -- ) s" MS Sans Serif" SetFaceName: WinFont --- 43,46 ---- *************** *** 85,91 **** over LOWORD ( ID ) self \ object address on stack WMCommand-Func ?dup \ must not be zero ! if SetFocus: Self execute ! else 2drop \ drop ID and object address ! then 0 ;M :M SetCommand: ( cfa -- ) \ set WMCommand function --- 77,83 ---- over LOWORD ( ID ) self \ object address on stack WMCommand-Func ?dup \ must not be zero ! if ( SetFocus: Self ) execute ! else 2drop \ drop ID and object address ! then 0 ;M :M SetCommand: ( cfa -- ) \ set WMCommand function *************** *** 103,105 **** --- 95,100 ---- ;M + \ :M On_SetFocus: + \ SetFocus: parent ;M + ;Object |
From: Rod O. <rod...@us...> - 2006-05-21 11:08:58
|
Update of /cvsroot/win32forth/win32forth In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22668 Modified Files: w32fConsole.dll Log Message: Rod: Removed flicker when sizing console Index: w32fConsole.dll =================================================================== RCS file: /cvsroot/win32forth/win32forth/w32fConsole.dll,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 Binary files /tmp/cvsSyFpdj and /tmp/cvs9y4bi2 differ |
From: Rod O. <rod...@us...> - 2006-05-21 11:05:34
|
Update of /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21248/extsrc/w32fConsole Modified Files: Term.cpp Log Message: Rod: Removed CS_HREDRAW and CS_VREDRAW, an extra character has to be output in Paint() to redraw part of character under the scrollbar. Index: Term.cpp =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Term.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Term.cpp 20 May 2006 08:06:03 -0000 1.7 --- Term.cpp 21 May 2006 11:05:21 -0000 1.8 *************** *** 490,494 **** // don't let us type under the scrollbar ! width -= GetSystemMetrics( SM_CXHSCROLL ); int newrows = min( max (height / charH, 1), maxrows ); --- 490,494 ---- // don't let us type under the scrollbar ! width -= ( GetSystemMetrics( SM_CXHSCROLL ) + 1 ); int newrows = min( max (height / charH, 1), maxrows ); *************** *** 788,792 **** { if (((i + rowoff) < hlstlin) || ((i + rowoff) > hledlin)) ! TextOut (hdc, 1, i * charH, screen + ((i + rowoff) * maxcols), cols); else { --- 788,792 ---- { if (((i + rowoff) < hlstlin) || ((i + rowoff) > hledlin)) ! TextOut (hdc, 1, i * charH, screen + ((i + rowoff) * maxcols), cols + 1); else { *************** *** 805,814 **** SetTextColor(hdc, theFg); TextOut (hdc, 1+(charW*hledcol), i * charH, screen + ! ((i + rowoff) * maxcols) + hledcol, cols-hledcol); } else // else put out remainder of starting line reversed { TextOut (hdc, 1+(charW*hlstcol), i * charH, screen + ! ((i + rowoff) * maxcols)+ hlstcol, cols-hlstcol); SetBkColor(hdc, theBg); SetTextColor(hdc, theFg); --- 805,814 ---- SetTextColor(hdc, theFg); TextOut (hdc, 1+(charW*hledcol), i * charH, screen + ! ((i + rowoff) * maxcols) + hledcol, cols-hledcol + 1); } else // else put out remainder of starting line reversed { TextOut (hdc, 1+(charW*hlstcol), i * charH, screen + ! ((i + rowoff) * maxcols)+ hlstcol, cols-hlstcol + 1); SetBkColor(hdc, theBg); SetTextColor(hdc, theFg); *************** *** 826,830 **** SetTextColor(hdc, theFg); TextOut (hdc, 1+(charW*hledcol), i * charH, screen + ! ((i + rowoff) * maxcols) + hledcol, cols-hledcol); } else // if not ending line either --- 826,830 ---- SetTextColor(hdc, theFg); TextOut (hdc, 1+(charW*hledcol), i * charH, screen + ! ((i + rowoff) * maxcols) + hledcol, cols-hledcol + 1); } else // if not ending line either *************** *** 833,837 **** SetTextColor(hdc, theBg); TextOut (hdc, 1, i * charH, screen + ! ((i + rowoff) * maxcols), cols); SetBkColor(hdc, theBg); SetTextColor(hdc, theFg); --- 833,837 ---- SetTextColor(hdc, theBg); TextOut (hdc, 1, i * charH, screen + ! ((i + rowoff) * maxcols), cols + 1); SetBkColor(hdc, theBg); SetTextColor(hdc, theFg); *************** *** 1331,1335 **** // Register console window class ! wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC; wndclass.lpfnWndProc = ConsoleWndProc; wndclass.cbClsExtra = 0; --- 1331,1335 ---- // Register console window class ! wndclass.style = CS_DBLCLKS | CS_OWNDC; wndclass.lpfnWndProc = ConsoleWndProc; wndclass.cbClsExtra = 0; *************** *** 1348,1352 **** hWndMain = CreateWindow( MainClassName, // window class name WindowTitle, // window caption ! WS_OVERLAPPEDWINDOW, // window style pos.left, // window x-position pos.top, // window y-position --- 1348,1352 ---- hWndMain = CreateWindow( MainClassName, // window class name WindowTitle, // window caption ! WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, // window style pos.left, // window x-position pos.top, // window y-position |
From: Dirk B. <db...@us...> - 2006-05-21 10:07:13
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22929/src/lib Modified Files: AcceleratorTables.f Log Message: Changed to call TranslateAccelerator() before any other functions within the message-loop. Index: AcceleratorTables.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/AcceleratorTables.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AcceleratorTables.f 13 Jan 2006 17:50:33 -0000 1.3 --- AcceleratorTables.f 21 May 2006 10:07:05 -0000 1.4 *************** *** 57,61 **** \ *G Close a table and assign it to the given window. \ adds the code in #DOES> to the message chain ! here DOVAR , CurrentTable , swap ( Window ) , dup msg-chain noop-chain-add ! #DOES> ( pMsg f pfa -- pMsg f ) 2@ @ swap @ 2>r \ handle of table and handle of Window that will process the commands --- 57,66 ---- \ *G Close a table and assign it to the given window. \ adds the code in #DOES> to the message chain ! ! \ Changed to add it on the start of the chain instead of the end, because ! \ accelerator keys bust be handled before any other things happen in the ! \ massage loop, to work correctly (Sonntag, Mai 21 2006 dbu). ! here DOVAR , CurrentTable , swap ( Window ) , dup msg-chain noop-chain-add-before ! ! #DOES> ( pMsg f pfa -- pMsg f ) 2@ @ swap @ 2>r \ handle of table and handle of Window that will process the commands *************** *** 67,78 **** : DisableAccelerators ( a -- ) \ W32F \ *G Destroys the Windows Accelerator Table. ! \ ** It does not matter trying to destroy a table more than once dup @ Call DestroyAcceleratorTable drop off ; : EnableAccelerators ( a -- ) \ W32F \ *G Creates the Windows Accelerator Table. ! \ ** It does not matter creating the same table again as long as it is destroyed first dup DisableAccelerators ! dup cell+ 2@ swap Call CreateAcceleratorTable swap ! ; MODULE --- 72,83 ---- : DisableAccelerators ( a -- ) \ W32F \ *G Destroys the Windows Accelerator Table. ! \ It does not matter trying to destroy a table more than once. dup @ Call DestroyAcceleratorTable drop off ; : EnableAccelerators ( a -- ) \ W32F \ *G Creates the Windows Accelerator Table. ! \ It does not matter creating the same table again as long as it is destroyed first. dup DisableAccelerators ! dup cell+ 2@ swap Call CreateAcceleratorTable swap ! ; MODULE |
From: Dirk B. <db...@us...> - 2006-05-21 10:05:08
|
Update of /cvsroot/win32forth/win32forth In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21554 Modified Files: fkernel.exe Log Message: NOOP-CHAIN-ADD-BEFORE added; same as NOOP-CHAIN-ADD but for reverse chains like BYE. Index: fkernel.exe =================================================================== RCS file: /cvsroot/win32forth/win32forth/fkernel.exe,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 Binary files /tmp/cvs699dAN and /tmp/cvskTeoTN differ |
From: Dirk B. <db...@us...> - 2006-05-21 10:05:08
|
Update of /cvsroot/win32forth/win32forth/src/kernel In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21554/src/kernel Modified Files: fkernel.f Log Message: NOOP-CHAIN-ADD-BEFORE added; same as NOOP-CHAIN-ADD but for reverse chains like BYE. Index: fkernel.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/kernel/fkernel.f,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** fkernel.f 13 May 2006 20:46:40 -0000 1.29 --- fkernel.f 21 May 2006 10:04:49 -0000 1.30 *************** *** 4491,4494 **** --- 4491,4495 ---- : new-chain ( -- ) + \ *G Create a new chain. create 0 , ['] noop compile, in-sys? if sys-chain-link else chain-link then *************** *** 4497,4500 **** --- 4498,4502 ---- : new-sys-chain ( -- ) + \ *G Create a new chain in the system space. >system new-chain *************** *** 4502,4531 **** ; ! |: ?sys-chain ( chain_address cfa -- chain_address cfa ) over sys-addr? 0= \ chain NOT in system space? over sys-addr? and \ and cfa in system space? sys-warning? and \ and we want warnings ! if ! WARN_SYSWORD WARNMSG ! then ; ! : noop-chain-add ( chain_address -- addr ) \ add chain item, ! \ return addr of cfa added begin dup @ while @ ! repeat here swap ! 0 , here ['] noop compile, ; ! : chain-add ( chain_address -<word_to_add>- ) \ for normal forward chains ! ' ?sys-chain >r ! noop-chain-add r> swap ! ; ! : chain-add-before ( chain_address -<word_to_add>- ) \ for reverse chains like BYE ' ?sys-chain >r ! here over @ , r> , swap ! ; in-application : do-chain ( chain_address -- ) begin @ ?dup while dup>r \ make sure stack is clean during --- 4504,4551 ---- ; ! |: ?sys-chain ( chain_address cfa -- chain_address cfa ) ! \ Warn the user about adding a word in system-space to a chain in application space. over sys-addr? 0= \ chain NOT in system space? over sys-addr? and \ and cfa in system space? sys-warning? and \ and we want warnings ! if WARN_SYSWORD WARNMSG ! then ; ! |: noop-compile ( -- addr ) ! here ['] noop compile, ; ! ! : noop-chain-add ( chain_address -- addr ) ! \ *G Add chain item, return addr of cfa added. ! \ ** For normal forward chains. begin dup @ while @ ! repeat here swap ! 0 , ! noop-compile ; ! : chain-add ( chain_address -<word_to_add>- ) ! \ *G Add chain item. ! \ ** For normal forward chains. ! ' ?sys-chain >r \ chain_addr | cfa_of_word_to_add ! noop-chain-add \ addr | cfa r> swap ! ; ! : noop-chain-add-before ( chain_address -- addr ) ! \ *G Add chain item, return addr of cfa added. ! \ ** For reverse chains like BYE ! here over @ , \ compile current head-chain-item ! swap ! \ store the addr of this chain-item in the chain-head ! noop-compile ; ! ! : chain-add-before ( chain_address -<word_to_add>- ) ! \ *G Add chain item ! \ ** For reverse chains like BYE ' ?sys-chain >r ! noop-chain-add-before ! r> swap ! ; in-application : do-chain ( chain_address -- ) + \ *G Execute all words in a chain. begin @ ?dup while dup>r \ make sure stack is clean during *************** *** 4545,4551 **** mov 0 [ebp], ecx \ save ecx for next time round mov eax, 4 [ecx] \ get the xt to execute ! xchg esp, ebp \ swap regs for call call callf \ call the forth word there ! xchg esp, ebp \ swap regs for call mov ecx, 0 [ebp] \ restore ecx mov ecx, 0 [ecx] \ get next strand --- 4565,4571 ---- mov 0 [ebp], ecx \ save ecx for next time round mov eax, 4 [ecx] \ get the xt to execute ! xchg esp, ebp \ swap regs for call call callf \ call the forth word there ! xchg esp, ebp \ swap regs for call mov ecx, 0 [ebp] \ restore ecx mov ecx, 0 [ecx] \ get next strand *************** *** 4562,4565 **** --- 4582,4587 ---- >body here over @ , r> , swap ! ; \ add in to chain + \ --------------------------------------------------------------------------- + : offset ( n1 <-name-> -- ) \ compiling ( n2 -- n3 ) \ runtime n3=n1+n2 |
From: Jos v.d.V. <jo...@us...> - 2006-05-20 20:23:52
|
Update of /cvsroot/win32forth/win32forth/Templates In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10677/Templates Added Files: SplitterWindow2.f Log Message: Jos: Added an empty splitterwindow with 2 panes and a menu --- NEW FILE: SplitterWindow2.f --- anew -SplitterWindow2.f Needs NoConsole.f Needs Resources.f false value turnkey? defer OnPosition ( window -- ) ' drop is OnPosition \ called when window panes are repositioned defer OnInit ( window -- ) ' drop is OnInit \ called during window On_init method \ ------------------------------------------------------------------------ \ Define the left part of the splitter window. \ ------------------------------------------------------------------------ \ Note: 2 panes do not always do the same thing. :Object LeftPane <Super Child-Window :M On_Init: ( -- ) On_Init: super ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M Start: ( Parent -- ) start: super ;M :M ExWindowStyle: ( -- style ) ExWindowStyle: Super WS_EX_CLIENTEDGE or ;M :M On_Paint: ( -- ) 0 0 Width Height WHITE FillArea: dc ;M ;Object \ ------------------------------------------------------------------------ \ Define the right part of the splitter window. \ ------------------------------------------------------------------------ :Object RightPane <Super Child-Window :M On_Init: ( -- ) On_Init: super ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M Start: ( Parent -- ) start: super ;M :M ExWindowStyle: ( -- style ) ExWindowStyle: Super WS_EX_CLIENTEDGE or ;M :M On_Paint: ( -- ) 0 0 Width Height WHITE FillArea: dc ;M ;Object \ ------------------------------------------------------------------------ \ Define the line between the 2 panes. \ ------------------------------------------------------------------------ :Object Splitter <Super child-window :M WindowStyle: ( -- style ) WindowStyle: super [ WS_DISABLED WS_CLIPSIBLINGS or ] literal or ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M On_Paint: ( -- ) 0 0 Width Height LTGRAY FillArea: dc ;M ;Object variable LeftWidth 200 LeftWidth ! 2 value thickness \ ------------------------------------------------------------------------ \ Define the window that contains the 2 panes. \ ------------------------------------------------------------------------ :Object SplitterWindow <Super Window 0 value ToolBarHeight \ set to height of toolbar if any 0 value StatusBarHeight \ set to height of status bar if any int dragging? int mousedown? : LeftHeight ( -- n ) Height StatusBarHeight - ToolBarHeight - ; : RightHeight ( -- n ) Height StatusBarHeight - ToolBarHeight - ; : position-windows ( -- ) 0 ToolBarHeight LeftWidth @ LeftHeight Move: LeftPane LeftWidth @ thickness + ToolBarHeight Width LeftWidth @ thickness + - RightHeight Move: RightPane LeftWidth @ ToolBarHeight thickness LeftHeight Move: Splitter self OnPosition ; : InSplitter? ( -- f1 ) \ is cursor on splitter window hWnd get-mouse-xy 0 height within swap LeftWidth @ dup thickness + within and ; \ mouse click routines for Main Window to track the Splitter movement : DoSizing ( -- ) mousedown? dragging? or 0= ?EXIT mousex ( 1+ ) width min thickness 2/ - [ thickness 2* ] literal max width [ thickness 2* ] literal - min LeftWidth ! position-windows WINPAUSE ; : On_clicked ( -- ) mousedown? 0= IF hWnd Call SetCapture drop THEN true to mousedown? InSplitter? to dragging? DoSizing ; : On_unclicked ( -- ) mousedown? IF Call ReleaseCapture drop THEN false to mousedown? false to dragging? ; : On_DblClick ( -- ) false to mousedown? InSplitter? 0= ?EXIT LeftWidth @ 8 > IF 0 thickness 2/ - LeftWidth ! ELSE 132 Width 2/ min LeftWidth ! THEN position-windows ; :M WM_SETCURSOR ( h m w l -- ) hWnd get-mouse-xy ToolBarHeight dup LeftHeight + within swap 0 width within and IF InSplitter? IF SIZEWE-CURSOR ELSE arrow-cursor THEN 1 ELSE DefWindowProc: self THEN ;M :M On_Init: ( -- ) self Start: LeftPane self Start: RightPane self Start: Splitter self OnInit \ perform user function ;M :M Classinit: ( -- ) ClassInit: super \ init super class ['] On_clicked SetClickFunc: self ['] On_unclicked SetUnClickFunc: self ['] DoSizing SetTrackFunc: self ['] On_DblClick SetDblClickFunc: self ;M :M WindowStyle: ( -- style ) WindowStyle: Super WS_CLIPCHILDREN or ;M :M WindowHasMenu: ( -- f ) true ;M :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M :M StartSize: ( -- w h ) screen-size >r 2/ r> 2/ ;M :M StartPos: ( -- x y ) CenterWindow: Self ;M :M On_Size: ( -- ) position-windows ;M :M ParentWindow: ( -- hwndParent | 0=NoParent ) parent ;M :M SetParent: ( hwndparent -- ) to parent ;M :M On_Done: ( h m w l -- res ) Close: self 0 call PostQuitMessage drop On_Done: super 0 ;M ;Object MENUBAR ApplicationBar POPUP "File" MENUITEM "Exit" Close: SplitterWindow ; ENDBAR : main ( -- ) Start: SplitterWindow ApplicationBar SetMenuBar: SplitterWindow turnkey? if MessageLoop bye then ; turnkey? [if] NoConsoleIO NoConsoleInImage ' main turnkey App.exe s" WIN32FOR.ICO" s" App.exe" AddAppIcon 1 pause-seconds bye [else] main [then] |
From: Jos v.d.V. <jo...@us...> - 2006-05-20 15:09:40
|
Update of /cvsroot/win32forth/win32forth/Templates In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19673/Templates Added Files: MinimalWindow.f PopupWindow.f Log Message: Jos: A start for the templates. --- NEW FILE: PopupWindow.f --- anew -PopupWindow.f \ Needed in a listview or treeview when you would like to have a popup menu. \ The popup window could be activated when there is a right click on an item. defer ClosePopupWindow ' noop is ClosePopupWindow POPUPBAR PopupOnItem \ Define the Popup bar for a window here. POPUP " " MENUITEM "Some action (Not yet defined)" ClosePopupWindow noop ; ENDBAR :Object PopupWindow <super Window int focus :M ClassInit: ( -- ) ClassInit: super PopupOnItem SetPopupBar: Self true to Focus ;M \ The popupmenu needs a rbuttondown to do it right : StartPopup ( -- ) 0 WM_RBUTTONDOWN GetHandle: self Call PostMessage drop ; : CleanupClose ( h_m w_l - res ) 2drop 0 close: Self ; :M WindowStyle: ( -- style ) WS_POPUP ;M :M StartSize: ( -- width height ) 3 3 ;M :M StartPos: ( -- x y ) mousex mousey ;M :M WM_LBUTTONDOWN ( h m w l -- res ) CleanupClose ;M :M On_KillFocus: ( h m w l -- res ) CleanupClose ;M :M On_Done: ( h m w l -- res ) On_Done: super 0 ;M :M Start: ( mousex mousey -- ) to mousey to mousex Start: super ;M :noname ( - ) false to focus hwnd call DestroyWindow drop ; is ClosePopupWindow :M On_Paint: ( -- ) focus if hwnd start: PopupOnItem StartPopup then ;M ;Object \ Disable the following line in an application screen-size >r 2/ r> 2/ Start: PopupWindow \ to show how it looks (( A window of an application could defermine mousex mousey as follows: hWnd get-mouse-xy GetWindowRect: Self 2drop rot + >r + r> \ mousex mousey Start: PopupWindow \ then start the PopupWindow )) \s --- NEW FILE: MinimalWindow.f --- Needs NoConsole.f Needs Resources.f Anew -MinimalWindow.f \ With a start of a menubar false value turnkey? :Object MinimalWindow <Super Window :M On_Init: ( -- ) On_Init: super ;M :M ClassInit: ( -- ) ClassInit: super ;M :M WindowStyle: ( -- style ) WindowStyle: Super WS_CLIPCHILDREN or ;M :M ParentWindow: ( -- hwndParent | 0=NoParent ) parent ;M :M SetParent: ( hwndparent -- ) to parent ;M :M WindowHasMenu: ( -- f ) true ;M :M WindowTitle: ( -- ztitle ) z" Minimal window" ;M :M StartSize: ( -- width height ) screen-size >r 2/ r> 2/ ;M :M StartPos: ( -- x y ) CenterWindow: Self ;M :M Close: ( -- ) Close: super ;M :M On_Done: ( -- ) Close: self 0 call PostQuitMessage drop On_Done: super 0 ;M :M msgBox: ( z$menu z$text - ) swap MB_OK MessageBox: Self drop ;M ;Object MENUBAR ApplicationBar POPUP "File" MENUITEM "Exit" Close: MinimalWindow ; POPUP "Help" MENUITEM "Info" z" Info" z" A template for a \nminimal window." msgBox: MinimalWindow ; ENDBAR : Minimal start: MinimalWindow ApplicationBar SetMenuBar: MinimalWindow turnkey? IF MessageLoop bye THEN ; turnkey? [if] NoConsoleIO NoConsoleInImage ' Minimal turnkey MinimalWindow.exe s" WIN32FOR.ICO" s" MinimalWindow.exe" AddAppIcon 1 pause-seconds bye [else] Minimal [then] \s |
From: Jos v.d.V. <jo...@us...> - 2006-05-20 15:08:32
|
Update of /cvsroot/win32forth/win32forth/Templates In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19228/Templates Log Message: Directory /cvsroot/win32forth/win32forth/Templates added to the repository |
From: George H. <geo...@us...> - 2006-05-20 12:02:10
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16545/win32forth/src/lib Modified Files: task.f Log Message: gah: Added locking to unique class name generation for thread safety. Index: task.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/task.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** task.f 4 Feb 2006 16:12:24 -0000 1.6 --- task.f 20 May 2006 12:02:06 -0000 1.7 *************** *** 233,254 **** \ of dialog linking and control subclasssing ! make-lock mem-lock \ to make mem allocation thread safe make-lock control-lock \ to make control subclassing thread safe ! make-lock dialog-lock \ to make linling dialogs thread safe ! : _memlock mem-lock lock ; \ for overriding defered lock memory word ! : _memunlock mem-lock unlock ; \ for overriding defered unlock memory word ! : _controllock control-lock lock ; \ for overriding deferred lock subclassing word ! : _controlunlock control-lock unlock ; \ for overriding deferred unlock subclassing word ! : _dialoglock dialog-lock lock ; \ for overriding deferred lock dialog linking word ! : _dialogunlock dialog-lock unlock ; \ for overriding deferred unlock dialog linking word ! : init-system-locks \ initialize system locks for multitasking ! ['] _memlock is (memlock) ! ['] _memunlock is (memunlock) ! ['] _controllock is (controllock) ! ['] _controlunlock is (controlunlock) ! ['] _dialoglock is (dialoglock) ! ['] _dialogunlock is (dialogunlock) ; init-system-locks --- 233,259 ---- \ of dialog linking and control subclasssing ! make-lock mem-lock \ to make memory allocation thread safe make-lock control-lock \ to make control subclassing thread safe ! make-lock dialog-lock \ to make linking dialogs thread safe ! make-lock classname-lock \ to make unique window class naming thread safe ! : _memlock ( -- ) mem-lock lock ; \ for overriding defered lock memory word ! : _memunlock ( -- ) mem-lock unlock ; \ for overriding defered unlock memory word ! : _controllock ( -- ) control-lock lock ; \ for overriding deferred lock subclassing word ! : _controlunlock ( -- ) control-lock unlock ; \ for overriding deferred unlock subclassing word ! : _dialoglock ( -- ) dialog-lock lock ; \ for overriding deferred lock dialog linking word ! : _dialogunlock ( -- ) dialog-lock unlock ; \ for overriding deferred unlock dialog linking word ! : _classnamelock ( -- ) classname-lock lock ; \ ! : _classnameunlock ( -- ) classname-lock unlock ; ! : init-system-locks ( -- ) \ initialize system locks for multitasking ! ['] _memlock is (memlock) ! ['] _memunlock is (memunlock) ! ['] _controllock is (controllock) ! ['] _controlunlock is (controlunlock) ! ['] _dialoglock is (dialoglock) ! ['] _dialogunlock is (dialogunlock) ! ['] _classnamelock is (classnamelock) ! ['] _classnameunlock is (classnameunlock) ; init-system-locks |
From: George H. <geo...@us...> - 2006-05-20 12:02:10
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16545/win32forth/src Modified Files: Primutil.f Window.f Log Message: gah: Added locking to unique class name generation for thread safety. Index: Window.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Window.f,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Window.f 14 May 2006 09:54:12 -0000 1.13 --- Window.f 20 May 2006 12:02:06 -0000 1.14 *************** *** 286,293 **** \ the Start: method is called no default class name will be set. WindowClassName c@ 0= ! if s" w32fWindow-" WindowClassName place ClassNameID (.) WindowClassName +place WindowClassName +null 1 +to ClassNameID then \ cr ." The WindowClassName is: " WindowClassName count type --- 286,295 ---- \ the Start: method is called no default class name will be set. WindowClassName c@ 0= ! if (classnamelock) ! s" w32fWindow-" WindowClassName place ClassNameID (.) WindowClassName +place WindowClassName +null 1 +to ClassNameID + (classnameunlock) then \ cr ." The WindowClassName is: " WindowClassName count type Index: Primutil.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Primutil.f,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Primutil.f 20 Oct 2005 15:07:18 -0000 1.13 --- Primutil.f 20 May 2006 12:02:06 -0000 1.14 *************** *** 869,876 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! defer (controllock) ' noop is (controllock) ! defer (controlunlock) ' noop is (controlunlock) ! defer (dialoglock) ' noop is (dialoglock) ! defer (dialogunlock) ' noop is (dialogunlock) \s --- 869,878 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! defer (controllock) ' noop is (controllock) ! defer (controlunlock) ' noop is (controlunlock) ! defer (dialoglock) ' noop is (dialoglock) ! defer (dialogunlock) ' noop is (dialogunlock) ! defer (classnamelock) ' noop is (classnamelock) ! defer (classnameunlock) ' noop is (classnameunlock) \s |
From: George H. <geo...@us...> - 2006-05-20 12:00:10
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15452/win32forth/doc Modified Files: p-float.htm Log Message: gah: Updated doc to match dexing.. Index: p-float.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-float.htm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** p-float.htm 21 Feb 2006 11:03:54 -0000 1.17 --- p-float.htm 20 May 2006 11:59:53 -0000 1.18 *************** *** 62,81 **** processor documentation. </p><p><b> WARNING! </b> do not alter the settings unless you know what you're doing. ! </p><pre><b><a name="0">code >fregs ( addr -- ) \ W32F Floating extra </a></b></pre><p>Restore x87 FPU State. ! </p><pre><b><a name="1">code >fregs> ( addr -- ) \ W32F Floating extra </a></b></pre><p>Save and Restore x87 FPU State. ! </p><pre><b><a name="2">code fpcw> ( -- n ) \ W32F Floating extra </a></b></pre><p>Get x87 FPU Control Word. ! </p><pre><b><a name="3">code >fpcw ( n -- ) \ W32F Floating extra </a></b></pre><p>Set x87 FPU Control Word. ! </p><pre><b><a name="4">code fpsw> ( -- n ) \ W32F Floating extra </a></b></pre><p>Get x87 FPU Status Word. ! </p><pre><b><a name="5"> 10 constant B/FLOAT ( -- n ) \ W32F Floating extra </a></b></pre><p>Number of bytes in a floating-point number. Note the default is 8 bytes. </p><pre><b><a name="6">value cells/float </a></b></pre><p>Number of cells in a floating-point number. If the number of bytes is not a multiple of 4 this is rounded up. ! </p><pre><b><a name="7">code finit ( -- ) \ W32F Floating extra </a></b></pre><p>Clears the floating-point stack & sets the appropriate byte mode. It is executed by the system on start-up and by the default exception handler. --- 62,83 ---- processor documentation. </p><p><b> WARNING! </b> do not alter the settings unless you know what you're doing. ! </p><pre><b><a name="0">code >fregs ( addr -- ) \ W32F Floating extra </a></b></pre><p>Restore x87 FPU State. ! </p><pre><b><a name="1">code >fregs> ( addr -- ) \ W32F Floating extra </a></b></pre><p>Save and Restore x87 FPU State. ! </p><pre><b><a name="2">code fpcw> ( -- n ) \ W32F Floating extra </a></b></pre><p>Get x87 FPU Control Word. ! </p><pre><b><a name="3">code >fpcw ( n -- ) \ W32F Floating extra </a></b></pre><p>Set x87 FPU Control Word. ! </p><pre><b><a name="4">code fpsw> ( -- n ) \ W32F Floating extra </a></b></pre><p>Get x87 FPU Status Word. ! </p><pre><b><a name="5"> 10 constant B/FLOAT ( -- n ) \ W32F Floating extra </a></b></pre><p>Number of bytes in a floating-point number. Note the default is 8 bytes. </p><pre><b><a name="6">value cells/float </a></b></pre><p>Number of cells in a floating-point number. If the number of bytes is not a multiple of 4 this is rounded up. ! </p><pre><b><a name="7">cell NEWUSER FLOATSP ( -- addr ) \ W32F Floating extra ! </a></b></pre><p>Address of floating point stack pointer in the user area. ! </p><pre><b><a name="8">code finit ( -- ) \ W32F Floating extra </a></b></pre><p>Clears the floating-point stack & sets the appropriate byte mode. It is executed by the system on start-up and by the default exception handler. *************** *** 85,113 **** </p><a name="Sec#2"></a> <h3>Memory Access ! </h3><pre><b><a name="8">code F@ ( addr -- ; fs: -- r ) \ ANSI Floating </a></b></pre><p>Fetch a float. ! </p><pre><b><a name="9">code SF@ ( addr -- ; fs: -- r ) \ ANSI Floating ext </a></b></pre><p>Fetch a 32 bit (short) float. ! </p><pre><b><a name="10">code DF@ ( addr -- ; fs: -- r ) \ ANSI Floating ext </a></b></pre><p>Fetch a 64 bit (double) float. ! </p><pre><b><a name="11">code F! ( addr -- ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Store a float. ! </p><pre><b><a name="12">code SF! ( addr -- ; fs: r -- ) \ ANSI Floating ext </a></b></pre><p>Store a 32 bit (short) float. ! </p><pre><b><a name="13">code DF! ( addr -- ; fs: r -- ) \ ANSI Floating ext </a></b></pre><p>Store a 64 bit (double) float. ! </p><pre><b><a name="14">code F+! ( addr -- ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Add the value to a float. ! </p><pre><b><a name="15">: FVARIABLE ( compiling -<name>- -- ; run-time -- addr) \ ANSI Floating </a></b></pre><p>Define a floating-point variable in the dictionary. The contents are undefined. ! </p><pre><b><a name="16">: FVALUE ( compiling -<name>- -- ; fs: r -- ; run-time FS: -- r ) \ W32F Floating extra </a></b></pre><p>Define a floating point value initialised from the FP stack. ! </p><pre><b><a name="17">: FTO \ W32F Floating extra ! </a></b></pre><p><b> Interpretation: ( -<fvalue>- -- FS: r -- ) <br /> Compilation: ( -<fvalue>- -- Run-time: FS: r -- ) </b> </p><p>Store r into -<fvalue>-. If -<fvalue>- is not defined with fvalue then memory may be corrupted; no checks are made so the user should take care. FTO should not be POSTPONEd. ! </p><pre><b><a name="18">: FCONSTANT ( -<name>- ; fs: r -- ) \ ANSI Floating </a></b></pre><p> <b> Interpretation: ( -<name>- ; fs: r -- ) </b> <br /> Define an FP constant. <br /> --- 87,117 ---- </p><a name="Sec#2"></a> <h3>Memory Access ! </h3><pre><b><a name="9">code F@ ( addr -- ; fs: -- r ) \ ANSI Floating </a></b></pre><p>Fetch a float. ! </p><pre><b><a name="10">code SF@ ( addr -- ; fs: -- r ) \ ANSI Floating ext </a></b></pre><p>Fetch a 32 bit (short) float. ! </p><pre><b><a name="11">code DF@ ( addr -- ; fs: -- r ) \ ANSI Floating ext </a></b></pre><p>Fetch a 64 bit (double) float. ! </p><pre><b><a name="12">code F! ( addr -- ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Store a float. ! </p><pre><b><a name="13">code SF! ( addr -- ; fs: r -- ) \ ANSI Floating ext </a></b></pre><p>Store a 32 bit (short) float. ! </p><pre><b><a name="14">code DF! ( addr -- ; fs: r -- ) \ ANSI Floating ext </a></b></pre><p>Store a 64 bit (double) float. ! </p><pre><b><a name="15">code F+! ( addr -- ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Add the value to a float. ! </p><pre><b><a name="16">: F, ( fs: r -- ) \ W32F Floating extra ! </a></b></pre><p>Compile a float into the dictionary. ! </p><pre><b><a name="17">: FVARIABLE ( compiling -<name>- -- ; run-time -- addr) \ ANSI Floating </a></b></pre><p>Define a floating-point variable in the dictionary. The contents are undefined. ! </p><pre><b><a name="18">: FVALUE ( compiling -<name>- -- ; fs: r -- ; run-time FS: -- r ) \ W32F Floating extra </a></b></pre><p>Define a floating point value initialised from the FP stack. ! </p><pre><b><a name="19">: FTO \ W32F Floating extra ! </a></b></pre><p><b> Interpretation: ( -<fvalue>- -- fs: r -- ) <br /> Compilation: ( -<fvalue>- -- Run-time: FS: r -- ) </b> </p><p>Store r into -<fvalue>-. If -<fvalue>- is not defined with fvalue then memory may be corrupted; no checks are made so the user should take care. FTO should not be POSTPONEd. ! </p><pre><b><a name="20">: FCONSTANT ( -<name>- ; fs: r -- ) \ ANSI Floating </a></b></pre><p> <b> Interpretation: ( -<name>- ; fs: r -- ) </b> <br /> Define an FP constant. <br /> *************** *** 116,120 **** <b> Run-time: ( fs: -- r ) </b> <br /> Place r on the floating-point stack. ! </p><pre><b><a name="19">: FLITERAL ( Compilation fs: r -- ; Runtime fs: -- r ) \ ANSI Floating </a></b></pre><p> <b> Interpretation: </b> <br /> Interpretation semantics for this word are undefined. <br /> --- 120,124 ---- <b> Run-time: ( fs: -- r ) </b> <br /> Place r on the floating-point stack. ! </p><pre><b><a name="21">: FLITERAL ( Compilation fs: r -- ; Runtime fs: -- r ) \ ANSI Floating </a></b></pre><p> <b> Interpretation: </b> <br /> Interpretation semantics for this word are undefined. <br /> *************** *** 125,141 **** </p><a name="Sec#3"></a> <h3>FP Stack operations ! </h3><pre><b><a name="20">code FDROP ( fs: r -- ) \ ANSI Floating </a></b></pre><p>Remove r from the floating-point stack. ! </p><pre><b><a name="21">code FDUP ( fs: r -- r r ) \ ANSI Floating </a></b></pre><p>Duplicate the top entry on the floating-point stack. ! </p><pre><b><a name="22">code FSWAP ( fs: r1 r2 -- r2 r1 ) \ ANSI Floating </a></b></pre><p>Exchange the top 2 FP numbers. ! </p><pre><b><a name="23">code FOVER ( fs: r1 r2 -- r1 r2 r1 ) \ ANSI Floating </a></b></pre><p>Copy the 2nd FP stack number to the top of the FP stack. ! </p><pre><b><a name="24">code FROT ( fs: r1 r2 r3 -- r2 r3 r1 ) \ ANSI Floating </a></b></pre><p>Rotate the top 3 FP stack numbers. ! </p><pre><b><a name="25">code FPICK ( n -- ; fs: -- r ) \ W32F Floating extra </a></b></pre><p>Copy the n'th number from the FP stack. ! </p><pre><b><a name="26">: FNIP ( fs: r1 r2 -- r2 ) \ W32F Floating extra </a></b></pre><p>Remove the 2nd FP stack entry. </p><a name="Sec#4"></a> --- 129,145 ---- </p><a name="Sec#3"></a> <h3>FP Stack operations ! </h3><pre><b><a name="22">code FDROP ( fs: r -- ) \ ANSI Floating </a></b></pre><p>Remove r from the floating-point stack. ! </p><pre><b><a name="23">code FDUP ( fs: r -- r r ) \ ANSI Floating </a></b></pre><p>Duplicate the top entry on the floating-point stack. ! </p><pre><b><a name="24">code FSWAP ( fs: r1 r2 -- r2 r1 ) \ ANSI Floating </a></b></pre><p>Exchange the top 2 FP numbers. ! </p><pre><b><a name="25">code FOVER ( fs: r1 r2 -- r1 r2 r1 ) \ ANSI Floating </a></b></pre><p>Copy the 2nd FP stack number to the top of the FP stack. ! </p><pre><b><a name="26">code FROT ( fs: r1 r2 r3 -- r2 r3 r1 ) \ ANSI Floating </a></b></pre><p>Rotate the top 3 FP stack numbers. ! </p><pre><b><a name="27">code FPICK ( n -- ; fs: -- r ) \ W32F Floating extra </a></b></pre><p>Copy the n'th number from the FP stack. ! </p><pre><b><a name="28">: FNIP ( fs: r1 r2 -- r2 ) \ W32F Floating extra </a></b></pre><p>Remove the 2nd FP stack entry. </p><a name="Sec#4"></a> *************** *** 143,275 **** </h3><p>The following words can be used for pairs of FP numbers and are useful for dealing with complex numbers or 2-dimensional vectors on the FP stack. ! </p><pre><b><a name="27">code F2DROP ( fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Remove the top 2 FP stack entries. ! </p><pre><b><a name="28">: F2DUP ( fs: r1 r2 -- r1 r2 r1 r2 ) \ W32F Floating extra </a></b></pre><p>Duplicate the top 2 FP stack entries. ! </p><pre><b><a name="29">: F2SWAP ( fs: r1 r2 r3 r4 -- r3 r4 r1 r2 ) \ W32F Floating extra </a></b></pre><p>Swap the top pair of floating-point numbers with the second pair. ! </p><pre><b><a name="30">: F2NIP ( fs: r1 r2 r3 r4 -- r3 r4 ) \ W32F Floating extra </a></b></pre><p>Remove the 2nd pair of FP stack entries. </p><a name="Sec#5"></a> <h3>FP Constants ! </h3><pre><b><a name="31">code fpi ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value 3.141596... on to the FP stack. ! </p><pre><b><a name="32">code f0.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push plus zero on to the FP stack. ! </p><pre><b><a name="33">code f1.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value 1.0 on to the FP stack. ! </p><pre><b><a name="34">code fL2t ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of log base 2 of 10. ! </p><pre><b><a name="35">code fL2e ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of log base 2 of e. ! </p><pre><b><a name="36">code fLog2 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of log base 10 of 2. ! </p><pre><b><a name="37">code fLn2 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of ln 2 (the natural logarithm). ! </p><pre><b><a name="38"> fconstant finf ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push plus infinity. ! </p><pre><b><a name="39">2e0 fconstant f2.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push floating-point 2.0. ! </p><pre><b><a name="40">10e0 fconstant f10.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push floating-point 10.0. ! </p><pre><b><a name="41">5e-1 fconstant f0.5 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push floating-point 0.5. ! </p><pre><b><a name="42"> f0.0 fconstant fbig ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the largest non-infinite floating-point number. ! </p><pre><b><a name="43"> f0.0 fconstant feps ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the smallest non-zero floating-point number. ! </p><pre><b><a name="44"> f1.0 fconstant fsmall ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the smallest non-denormalised floating-point number. </p><a name="Sec#6"></a> <h3>FP Variables ! </h3><pre><b><a name="45"> fvariable a2**63 ( -- addr ) \ W32F Floating extra </a></b></pre><p>Return the address of a float containing 2**63. ! </p><pre><b><a name="46"> fvariable sq2m1 ( -- addr ) \ W32F Floating extra </a></b></pre><p>Return the address of a float containing sqrt(2) - 1. ! </p><pre><b><a name="47"> fvariable sq2/2m1 ( -- addr ) \ W32F Floating extra </a></b></pre><p>Return the address of a float containing sqrt(2)/2 - 1. </p><a name="Sec#7"></a> <h3>Rounding functions ! </h3><pre><b><a name="48">code FLOOR ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Round r1 to an integral value using the round toward negative infinity rule, giving r2. ! </p><pre><b><a name="49">code FCEIL ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Round r1 to an integral value using the round toward positive infinity rule, giving r2. ! </p><pre><b><a name="50">code FTRUNC ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Round r1 to an integral value using the round toward zero rule, giving r2. ! </p><pre><b><a name="51">code FROUND ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Round r1 to an integral value using the round to nearest rule, giving r2. </p><a name="Sec#8"></a> <h3>Integer to float conversion ! </h3><pre><b><a name="52">code D>F ( d -- ; Fs: -- r ) \ ANSI Floating </a></b></pre><p>Convert double number to floating-point number. ! </p><pre><b><a name="53">code F>D ( -- d ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Convert floating-point number to double number, by rounding towards zero. If the result would be too large to fit in a double number then <br /> -9223372036854775808 is returned. ! </p><pre><b><a name="54">code ZF>D ( -- d ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Convert floating-point number to double number, using the current rounding mode (rounding towards nearest unless changed by the user). If the result would be too large to fit in a double number then <br /> -9223372036854775808 is returned. ! </p><pre><b><a name="55">: s>f ( n -- ; fs: -- r ) \ W32F Floating extra </a></b></pre><p>Convert the single number n to floating point number r. ! </p><pre><b><a name="56">: f>s ( -- n ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Convert the floating point number r to single number n. ! </p><pre><b><a name="57">code FS>DS ( -- dfloat fs: r -- ) \ W32F Floating extra </a></b></pre><p>Move floating point number bits to the data stack as a 64-bit float. This function is for passing floats to DLLs. ! </p><pre><b><a name="58">code SFS>DS ( -- float ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Push the top of the float stack onto the data stack as a 32-bit float. This function is for passing floats to DLLs. </p><a name="Sec#9"></a> <h3>FP Comparison operators ! </h3><pre><b><a name="59">: F0= ( -- f ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Return true if r equals ±0e0. Returns false for NAN. ! </p><pre><b><a name="60">: F0< ( -- f ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Return true if r is less than ±0e0. Returns false for NAN. ! </p><pre><b><a name="61">: f0> ( -- f ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Return true if r is greater than ±0e0. Returns false for NAN. ! </p><pre><b><a name="62">: f= ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 equals r2. Returns false if either number is a NAN. ! </p><pre><b><a name="63">: F< ( -- f ; fs: r1 r2 -- ) \ ANSI Floating </a></b></pre><p>Return true if r1 is less than r2. Returns false if either number is a NAN. ! </p><pre><b><a name="64">: f> ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 is greater than r2. Returns false if either number is a NAN. ! </p><pre><b><a name="65">: f<= ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 is less than or equal to r2. Returns true if either number is a NAN. ! </p><pre><b><a name="66">: f>= ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 is greater than or equal to r2. Returns true if either number is a NAN. ! </p><pre><b><a name="67">: FMAX ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Return r3 the maximum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN then r3=r1. ! </p><pre><b><a name="68">: FMIN ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Return r3 the minimum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN then r3=r1. </p><a name="Sec#10"></a> <h3>Arithmetic operators ! </h3><pre><b><a name="69">code F+ ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Add r1 to r2. ! </p><pre><b><a name="70">code F- ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Subtract r2 from r1. ! </p><pre><b><a name="71">code F* ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Multiply r1 by r2. ! </p><pre><b><a name="72">code F/ ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Divide r1 by r2. ! </p><pre><b><a name="73">code FNEGATE ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Reverse the sign of r1. ! </p><pre><b><a name="74">: 1/f ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>r2 is the reciprocal of r1. ! </p><pre><b><a name="75">code f2* ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Multiply by 2. ! </p><pre><b><a name="76">code f2/ ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Divide by 2. ! </p><pre><b><a name="77">code FABS ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the absolute value of r1. ! </p><pre><b><a name="78">code FSQRT ( fs: r1 -- r2 ) \ ANSI Floating ext ! </a></b></pre><p>r2 is the positive square root of r1. ! </p><pre><b><a name="79">: F~ ( -- flag ; fs: r1 r2 r3 -- ) \ ANSI Floating ext </a></b></pre><p>If r3 is positive, flag is true if the absolute value of (r1 minus r2) is less than r3. If r3 is zero, flag is true if the implementation-dependent encoding of r1 and --- 147,279 ---- </h3><p>The following words can be used for pairs of FP numbers and are useful for dealing with complex numbers or 2-dimensional vectors on the FP stack. ! </p><pre><b><a name="29">code F2DROP ( fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Remove the top 2 FP stack entries. ! </p><pre><b><a name="30">: F2DUP ( fs: r1 r2 -- r1 r2 r1 r2 ) \ W32F Floating extra </a></b></pre><p>Duplicate the top 2 FP stack entries. ! </p><pre><b><a name="31">: F2SWAP ( fs: r1 r2 r3 r4 -- r3 r4 r1 r2 ) \ W32F Floating extra </a></b></pre><p>Swap the top pair of floating-point numbers with the second pair. ! </p><pre><b><a name="32">: F2NIP ( fs: r1 r2 r3 r4 -- r3 r4 ) \ W32F Floating extra </a></b></pre><p>Remove the 2nd pair of FP stack entries. </p><a name="Sec#5"></a> <h3>FP Constants ! </h3><pre><b><a name="33">code fpi ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value 3.141596... on to the FP stack. ! </p><pre><b><a name="34">code f0.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push plus zero on to the FP stack. ! </p><pre><b><a name="35">code f1.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value 1.0 on to the FP stack. ! </p><pre><b><a name="36">code fL2t ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of log base 2 of 10. ! </p><pre><b><a name="37">code fL2e ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of log base 2 of e. ! </p><pre><b><a name="38">code fLog2 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of log base 10 of 2. ! </p><pre><b><a name="39">code fLn2 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of ln 2 (the natural logarithm). ! </p><pre><b><a name="40"> fconstant finf ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push plus infinity. ! </p><pre><b><a name="41">2e0 fconstant f2.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push floating-point 2.0. ! </p><pre><b><a name="42">10e0 fconstant f10.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push floating-point 10.0. ! </p><pre><b><a name="43">5e-1 fconstant f0.5 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push floating-point 0.5. ! </p><pre><b><a name="44"> f0.0 fconstant fbig ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the largest non-infinite floating-point number. ! </p><pre><b><a name="45"> f0.0 fconstant feps ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the smallest non-zero floating-point number. ! </p><pre><b><a name="46"> f1.0 fconstant fsmall ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the smallest non-denormalised floating-point number. </p><a name="Sec#6"></a> <h3>FP Variables ! </h3><pre><b><a name="47"> fvariable a2**63 ( -- addr ) \ W32F Floating extra </a></b></pre><p>Return the address of a float containing 2**63. ! </p><pre><b><a name="48"> fvariable sq2m1 ( -- addr ) \ W32F Floating extra </a></b></pre><p>Return the address of a float containing sqrt(2) - 1. ! </p><pre><b><a name="49"> fvariable sq2/2m1 ( -- addr ) \ W32F Floating extra </a></b></pre><p>Return the address of a float containing sqrt(2)/2 - 1. </p><a name="Sec#7"></a> <h3>Rounding functions ! </h3><pre><b><a name="50">code FLOOR ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Round r1 to an integral value using the round toward negative infinity rule, giving r2. ! </p><pre><b><a name="51">code FCEIL ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Round r1 to an integral value using the round toward positive infinity rule, giving r2. ! </p><pre><b><a name="52">code FTRUNC ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Round r1 to an integral value using the round toward zero rule, giving r2. ! </p><pre><b><a name="53">code FROUND ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Round r1 to an integral value using the round to nearest rule, giving r2. </p><a name="Sec#8"></a> <h3>Integer to float conversion ! </h3><pre><b><a name="54">code D>F ( d -- ; Fs: -- r ) \ ANSI Floating </a></b></pre><p>Convert double number to floating-point number. ! </p><pre><b><a name="55">code F>D ( -- d ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Convert floating-point number to double number, by rounding towards zero. If the result would be too large to fit in a double number then <br /> -9223372036854775808 is returned. ! </p><pre><b><a name="56">code ZF>D ( -- d ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Convert floating-point number to double number, using the current rounding mode (rounding towards nearest unless changed by the user). If the result would be too large to fit in a double number then <br /> -9223372036854775808 is returned. ! </p><pre><b><a name="57">: s>f ( n -- ; fs: -- r ) \ W32F Floating extra </a></b></pre><p>Convert the single number n to floating point number r. ! </p><pre><b><a name="58">: f>s ( -- n ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Convert the floating point number r to single number n. ! </p><pre><b><a name="59">code FS>DS ( -- dfloat fs: r -- ) \ W32F Floating extra </a></b></pre><p>Move floating point number bits to the data stack as a 64-bit float. This function is for passing floats to DLLs. ! </p><pre><b><a name="60">code SFS>DS ( -- float ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Push the top of the float stack onto the data stack as a 32-bit float. This function is for passing floats to DLLs. </p><a name="Sec#9"></a> <h3>FP Comparison operators ! </h3><pre><b><a name="61">: F0= ( -- f ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Return true if r equals ±0e0. Returns false for NAN. ! </p><pre><b><a name="62">: F0< ( -- f ; fs: r -- ) \ ANSI Floating </a></b></pre><p>Return true if r is less than ±0e0. Returns false for NAN. ! </p><pre><b><a name="63">: f0> ( -- f ; fs: r -- ) \ W32F Floating extra </a></b></pre><p>Return true if r is greater than ±0e0. Returns false for NAN. ! </p><pre><b><a name="64">: f= ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 equals r2. Returns false if either number is a NAN. ! </p><pre><b><a name="65">: F< ( -- f ; fs: r1 r2 -- ) \ ANSI Floating </a></b></pre><p>Return true if r1 is less than r2. Returns false if either number is a NAN. ! </p><pre><b><a name="66">: f> ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 is greater than r2. Returns false if either number is a NAN. ! </p><pre><b><a name="67">: f<= ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 is less than or equal to r2. Returns true if either number is a NAN. ! </p><pre><b><a name="68">: f>= ( -- f ; fs: r1 r2 -- ) \ W32F Floating extra </a></b></pre><p>Return true if r1 is greater than or equal to r2. Returns true if either number is a NAN. ! </p><pre><b><a name="69">: FMAX ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Return r3 the maximum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN then r3=r1. ! </p><pre><b><a name="70">: FMIN ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Return r3 the minimum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN then r3=r1. </p><a name="Sec#10"></a> <h3>Arithmetic operators ! </h3><pre><b><a name="71">code F+ ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Add r1 to r2. ! </p><pre><b><a name="72">code F- ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Subtract r2 from r1. ! </p><pre><b><a name="73">code F* ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Multiply r1 by r2. ! </p><pre><b><a name="74">code F/ ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Divide r1 by r2. ! </p><pre><b><a name="75">code FNEGATE ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Reverse the sign of r1. ! </p><pre><b><a name="76">: 1/f ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>r2 is the reciprocal of r1. ! </p><pre><b><a name="77">code f2* ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Multiply by 2. ! </p><pre><b><a name="78">code f2/ ( fs: r1 -- r2 ) \ W32F Floating extra </a></b></pre><p>Divide by 2. ! </p><pre><b><a name="79">code FABS ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the absolute value of r1. ! </p><pre><b><a name="80">code FSQRT ( fs: r1 -- r2 ) \ ANSI Floating ext ! </a></b></pre><p>r2 is the positive square root of r1. r2 is NAN for negative r1. ! </p><pre><b><a name="81">: F~ ( -- flag ; fs: r1 r2 r3 -- ) \ ANSI Floating ext </a></b></pre><p>If r3 is positive, flag is true if the absolute value of (r1 minus r2) is less than r3. If r3 is zero, flag is true if the implementation-dependent encoding of r1 and *************** *** 281,304 **** </p><a name="Sec#11"></a> <h3>Trigonometric functions ! </h3><pre><b><a name="80">: FSIN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the sine of r1 in radians. ! </p><pre><b><a name="81">: FCOS ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the cosine of r1 in radians. ! </p><pre><b><a name="82">: FSINCOS ( fs: r1 -- r2 r3 ) \ ANSI Floating ext </a></b></pre><p>r2 is the sine and r3 the cosine of r1 in radians. This function is more efficient than calling FSIN and FCOS separately. ! </p><pre><b><a name="83">: FTAN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the tangent of r1 in radians. </p><a name="Sec#12"></a> <h3>Inverse Trigonometric functions ! </h3><pre><b><a name="84">code FASIN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the radian angle whose sine is r1. The result for |x| =< 1 is between ±pi/2. The result for |x| > 1 is NAN. ! </p><pre><b><a name="85">code FACOS ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the radian angle whose cosine is r1. The result for |x| =< 1 is between 0 and pi. The result for |x| > 1 is NAN ! </p><pre><b><a name="86">code FATAN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the radian angle whose tangent is r1. The result is between ±pi/2. ! </p><pre><b><a name="87">code FATAN2 ( fs: r1 r2 -- r3 ) \ ANSI Floating ext </a></b></pre><p>r3 is the radian angle whose tangent is r1/r2. The result is between ±pi with the same sign as r2. If r1 and r2 are both zero then r3 is ±zero. --- 285,308 ---- </p><a name="Sec#11"></a> <h3>Trigonometric functions ! </h3><pre><b><a name="82">: FSIN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the sine of r1 in radians. ! </p><pre><b><a name="83">: FCOS ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the cosine of r1 in radians. ! </p><pre><b><a name="84">: FSINCOS ( fs: r1 -- r2 r3 ) \ ANSI Floating ext </a></b></pre><p>r2 is the sine and r3 the cosine of r1 in radians. This function is more efficient than calling FSIN and FCOS separately. ! </p><pre><b><a name="85">: FTAN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the tangent of r1 in radians. </p><a name="Sec#12"></a> <h3>Inverse Trigonometric functions ! </h3><pre><b><a name="86">code FASIN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the radian angle whose sine is r1. The result for |x| =< 1 is between ±pi/2. The result for |x| > 1 is NAN. ! </p><pre><b><a name="87">code FACOS ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the radian angle whose cosine is r1. The result for |x| =< 1 is between 0 and pi. The result for |x| > 1 is NAN ! </p><pre><b><a name="88">code FATAN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the radian angle whose tangent is r1. The result is between ±pi/2. ! </p><pre><b><a name="89">code FATAN2 ( fs: r1 r2 -- r3 ) \ ANSI Floating ext </a></b></pre><p>r3 is the radian angle whose tangent is r1/r2. The result is between ±pi with the same sign as r2. If r1 and r2 are both zero then r3 is ±zero. *************** *** 307,325 **** </p><a name="Sec#13"></a> <h3>Logarithmic functions ! </h3><pre><b><a name="88">code FLN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the natural logarithm of r1. If r1 is ±0 then r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. ! </p><pre><b><a name="89">code FLNP1 ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the natural logarithm of the quantity r1 plus one. If r1 is -1.0 then r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than -1.0 then r2 is a NAN. ! </p><pre><b><a name="90">code FLOG ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the logarithm to base 10 of r1. If r1 is ±0 then r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. </p><a name="Sec#14"></a> <h3>Exponential functions ! </h3><pre><b><a name="91">code FEXP ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>Raise e to the power r1, giving r2. ! </p><pre><b><a name="92">code FEXPM1 ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>Raise e to the power r1 and subtract one, giving r2. </p><p>This function allows accurate computation when its arguments are close to zero, and --- 311,329 ---- </p><a name="Sec#13"></a> <h3>Logarithmic functions ! </h3><pre><b><a name="90">code FLN ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the natural logarithm of r1. If r1 is ±0 then r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. ! </p><pre><b><a name="91">code FLNP1 ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the natural logarithm of the quantity r1 plus one. If r1 is -1.0 then r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than -1.0 then r2 is a NAN. ! </p><pre><b><a name="92">code FLOG ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the logarithm to base 10 of r1. If r1 is ±0 then r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. </p><a name="Sec#14"></a> <h3>Exponential functions ! </h3><pre><b><a name="93">code FEXP ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>Raise e to the power r1, giving r2. ! </p><pre><b><a name="94">code FEXPM1 ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>Raise e to the power r1 and subtract one, giving r2. </p><p>This function allows accurate computation when its arguments are close to zero, and *************** *** 327,353 **** such as cosh(x) can be efficiently and accurately implemented by using FEXPM1; accuracy is lost in this function for small values of x if the word FEXP is used. ! </p><pre><b><a name="93">: f** ( fs: r1 r2 -- r3 ) \ ANSI Floating ext </a></b></pre><p>Raise r1 to the power r2, giving the product r3. ! </p><pre><b><a name="94">: FALOG ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>Raise ten to the power r1, giving r2. </p><a name="Sec#15"></a> <h3>Hyperbolic functions ! </h3><pre><b><a name="95">: FSINH ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the hyperbolic sine of r1. ! </p><pre><b><a name="96">: FCOSH ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the hyperbolic cosine of r1. ! </p><pre><b><a name="97">: FTANH ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the hyperbolic tangent of r1, |r2| <= 1. </p><a name="Sec#16"></a> <h3>Inverse hyperbolic functions ! </h3><pre><b><a name="98">code FASINH ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>r2 is the number whose hyperbolic sine is r1. ! </p><pre><b><a name="99">code FACOSH ( fs: r1 -- r2 ) \ ANSI ... [truncated message content] |
From: Dirk B. <db...@us...> - 2006-05-20 08:06:14
|
Update of /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21471 Modified Files: Console.rc Term.cpp Log Message: Minor update of the w32fConsole.dll Index: Console.rc =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Console.rc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Console.rc 23 Apr 2005 12:42:56 -0000 1.6 --- Console.rc 20 May 2006 08:06:03 -0000 1.7 *************** *** 55,60 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 6,11,0,22 ! PRODUCTVERSION 6,11,0,22 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 55,60 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 6,11,0,23 ! PRODUCTVERSION 6,11,0,23 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 74,79 **** VALUE "CompanyName", "Win32Forth developer team\0" VALUE "FileDescription", "Win32Forth console\0" ! VALUE "FileVersion", "6, 11, 0, 22\0" ! VALUE "InternalName", "CONSOLE\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" --- 74,79 ---- VALUE "CompanyName", "Win32Forth developer team\0" VALUE "FileDescription", "Win32Forth console\0" ! VALUE "FileVersion", "6, 11, 0, 23\0" ! VALUE "InternalName", "W32FCONSOLE\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" *************** *** 81,85 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "Win32Forth\0" ! VALUE "ProductVersion", "6, 11, 0, 22\0" VALUE "SpecialBuild", "\0" END --- 81,85 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "Win32Forth\0" ! VALUE "ProductVersion", "6, 11, 0, 23\0" VALUE "SpecialBuild", "\0" END Index: Term.cpp =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Term.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Term.cpp 23 Apr 2005 12:42:56 -0000 1.6 --- Term.cpp 20 May 2006 08:06:03 -0000 1.7 *************** *** 22,26 **** HWND hWndMain = NULL; // handle to the main window, initially zero HWND hWndConsole = NULL; // handle to the console window, initially zero ! HDC hdc = NULL; // the DC of the window int winsize = 0; HINSTANCE g_hInstanceDll = NULL; --- 22,26 ---- HWND hWndMain = NULL; // handle to the main window, initially zero HWND hWndConsole = NULL; // handle to the console window, initially zero ! HDC hdc = NULL; // the DC of the console window int winsize = 0; HINSTANCE g_hInstanceDll = NULL; *************** *** 919,923 **** hWndConsole = CreateWindow( ConsoleClassName, // window class name "", // window caption ! WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_VISIBLE | WS_VSCROLL, // window style CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, // window size hwnd, // parent window handle --- 919,923 ---- hWndConsole = CreateWindow( ConsoleClassName, // window class name "", // window caption ! WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | WS_VSCROLL, // window style CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, // window size hwnd, // parent window handle *************** *** 1042,1047 **** LRESULT WINAPI ConsoleWndProc( HWND hwnd, UINT message, UINT wParam, LONG lParam ) { - PAINTSTRUCT ps ; - switch( message ) { --- 1042,1045 ---- *************** *** 1178,1183 **** case WM_PAINT: { hdc = BeginPaint( hwnd, &ps ); ! paint(); EndPaint( hwnd, &ps ); return 0; --- 1176,1183 ---- case WM_PAINT: { + PAINTSTRUCT ps; hdc = BeginPaint( hwnd, &ps ); ! if( hdc ) ! paint(); EndPaint( hwnd, &ps ); return 0; *************** *** 1316,1320 **** // Register main window class WNDCLASS wndclass; ! wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = MainWndProc; wndclass.cbClsExtra = 0; --- 1316,1320 ---- // Register main window class WNDCLASS wndclass; ! wndclass.style = 0; wndclass.lpfnWndProc = MainWndProc; wndclass.cbClsExtra = 0; *************** *** 1346,1360 **** // create console window ! hWndMain = CreateWindow( MainClassName, // window class name ! WindowTitle, // window caption ! WS_OVERLAPPEDWINDOW, // window style ! pos.left, // window x-position ! pos.top, // window y-position ! pos.right - pos.left, // window width ! pos.bottom - pos.top, // window height ! NULL, // parent window handle ! NULL, // window menu handle ! hInstance, // program instance handle ! NULL ); // creation parameters return (int)hWndMain; --- 1346,1360 ---- // create console window ! hWndMain = CreateWindow( MainClassName, // window class name ! WindowTitle, // window caption ! WS_OVERLAPPEDWINDOW, // window style ! pos.left, // window x-position ! pos.top, // window y-position ! pos.right - pos.left, // window width ! pos.bottom - pos.top, // window height ! NULL, // parent window handle ! NULL, // window menu handle ! hInstance, // program instance handle ! NULL ); // creation parameters return (int)hWndMain; |
From: Dirk B. <db...@us...> - 2006-05-20 08:04:14
|
Update of /cvsroot/win32forth/win32forth In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21013 Modified Files: w32fConsole.dll Log Message: Minor update of the w32fConsole.dll Index: w32fConsole.dll =================================================================== RCS file: /cvsroot/win32forth/win32forth/w32fConsole.dll,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvshIsoHn and /tmp/cvsSJW6LP differ |
From: Dirk B. <db...@us...> - 2006-05-20 07:41:14
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11154/src/console Modified Files: ConsoleStatbar.f Log Message: Fixed the permanent redraw of the console status bar. Index: ConsoleStatbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/ConsoleStatbar.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConsoleStatbar.f 14 May 2006 10:46:19 -0000 1.5 --- ConsoleStatbar.f 20 May 2006 07:41:05 -0000 1.6 *************** *** 29,56 **** :M Create: ( hParent -- ) Create: super ! \ 8 to display-depth ! MultiWidth 2 SetParts: self ! Show: self ! ;M :M SetSP: ( n -- ) ! to forth-sp ! ;M :M SetDepth: ( n -- ) ! to forth-depth ! ;M :M SetBase: ( n -- ) ! to forth-base ! ;M :M SetDisplayDepth: ( n -- ) ! to display-depth ! ;M :M SetText: ( a n -- ) \ set text a for part n ! swap dup +null 1+ swap SetText: super ! ;M :M Update: { \ buf$ buf1$ pad$ -- } --- 29,51 ---- :M Create: ( hParent -- ) Create: super ! GetHandle: self ! if MultiWidth 2 SetParts: self ! Show: self ! then ;M :M SetSP: ( n -- ) ! to forth-sp ;M :M SetDepth: ( n -- ) ! to forth-depth ;M :M SetBase: ( n -- ) ! to forth-base ;M :M SetDisplayDepth: ( n -- ) ! to display-depth ;M :M SetText: ( a n -- ) \ set text a for part n ! swap dup +null 1+ swap SetText: super ;M :M Update: { \ buf$ buf1$ pad$ -- } *************** *** 111,115 **** ;Object - \ ***************************************************************************** \ hook's for the interpreter --- 106,109 ---- *************** *** 117,125 **** : Update-Console-Statusbar ( -- ) \ update the status bar ! depth SetDepth: ConsoleStatusbar ! sp@ SetSP: ConsoleStatusbar ! base @ SetBase: ConsoleStatusbar ! source-id 0= ! if Update: ConsoleStatusbar then ; : Console-Statusbar-interpret ( -- ) \ hook for INTERPRET --- 111,121 ---- : Update-Console-Statusbar ( -- ) \ update the status bar ! GetHandle: ConsoleStatusbar ! if depth SetDepth: ConsoleStatusbar ! sp@ SetSP: ConsoleStatusbar ! base @ SetBase: ConsoleStatusbar ! source-id 0= ! if Update: ConsoleStatusbar then ! then ; : Console-Statusbar-interpret ( -- ) \ hook for INTERPRET *************** *** 143,156 **** \ ***************************************************************************** ! 0 value &Console-Window-Proc \ addr off org console window proc 4 Callback: Console-Statusbar-WindowProc ( hwnd msg wparam lparam -- res ) ! \ call org console window proc ! 4reverse &Console-Window-Proc Call CallWindowProc ! ! \ redraw our status bar ! Redraw: ConsoleStatusbar ; \ ***************************************************************************** --- 139,151 ---- \ ***************************************************************************** ! 0 value &Console-Window-Proc \ addr of the org console window proc 4 Callback: Console-Statusbar-WindowProc ( hwnd msg wparam lparam -- res ) ! \ redraw our status bar if needed ! 2 PICK WM_WINDOWPOSCHANGED = if Redraw: ConsoleStatusbar then + \ and call the org console window proc + 4reverse &Console-Window-Proc Call CallWindowProc ; \ ***************************************************************************** *************** *** 161,195 **** SetDisplayDepth: ConsoleStatusbar ; - \ ***************************************************************************** \ INIT-CONSOLE \ ***************************************************************************** ! : M_init_cons ( -- f ) ! _conHndl Create: ConsoleStatusbar ! ! \ hook into the interpreter ! ['] Console-Statusbar-interpret is interpret ! \ sublassing of the console window ! GWL_WNDPROC _conHndl Call GetWindowLong to &Console-Window-Proc ! &Console-Statusbar-WindowProc GWL_WNDPROC _conHndl Call SetWindowLong drop ! \ and update the status bar ! Update-Console-Statusbar ! ; : M_INIT-CONSOLE ( -- f ) \ create console window X_INIT-CONSOLE dup 0<> ! if \ create the status bar ! m_init_cons then ; ' M_INIT-CONSOLE is INIT-CONSOLE - \ force a paint?, rebuild the status bar - m_init_cons sw_hide show-window sw_show show-window Update: ConsoleStatusbar - MODULE --- 156,185 ---- SetDisplayDepth: ConsoleStatusbar ; \ ***************************************************************************** \ INIT-CONSOLE \ ***************************************************************************** ! : M_INIT_CONS ( -- ) ! _conHndl Create: ConsoleStatusbar ! GetHandle: ConsoleStatusbar ! if \ hook into the interpreter ! ['] Console-Statusbar-interpret is interpret ! \ sublassing of the console window ! &Console-Statusbar-WindowProc GWL_WNDPROC _conHndl ! Call SetWindowLong to &Console-Window-Proc ! \ and update the status bar ! Update-Console-Statusbar ! then ; : M_INIT-CONSOLE ( -- f ) \ create console window X_INIT-CONSOLE dup 0<> ! if M_INIT_CONS \ create the status bar then ; ' M_INIT-CONSOLE is INIT-CONSOLE MODULE |
From: George H. <geo...@us...> - 2006-05-19 15:46:19
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19532/win32forth/src Modified Files: FLOAT.F Log Message: gah: Removed stack checking from (fsin) (fcos) and (fsincos) since >a2**63_frem2pi will have already checked, plus finished off dexing (at loooong last). Index: FLOAT.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/FLOAT.F,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** FLOAT.F 25 Apr 2006 10:24:56 -0000 1.44 --- FLOAT.F 19 May 2006 15:46:14 -0000 1.45 *************** *** 1093,1097 **** code FSQRT ( fs: r1 -- r2 ) \ ANSI Floating ext ! \ *G r2 is the positive square root of r1. fstack-check_1 >FPU --- 1093,1097 ---- code FSQRT ( fs: r1 -- r2 ) \ ANSI Floating ext ! \ *G r2 is the positive square root of r1. r2 is NAN for negative r1. fstack-check_1 >FPU *************** *** 1169,1173 **** code (fsin) ( fs: r1 -- r2 ) - fstack-check_1 >FPU fsin --- 1169,1172 ---- *************** *** 1176,1180 **** code (fcos) ( fs: r1 -- r2 ) - fstack-check_1 >FPU fcos --- 1175,1178 ---- *************** *** 1183,1187 **** code (fsincos) ( fs: r1 -- r2 r3 ) - fstack-check_1 >FPU fsincos --- 1181,1184 ---- *************** *** 1192,1196 **** code frem2pi ( fs: r1 -- r2 ) - fstack-check_1 fld1 fldpi --- 1189,1192 ---- *************** *** 1244,1248 **** fld1 fsubpr st(1), st - fabs fsqrt fpatan --- 1240,1243 ---- *************** *** 1261,1265 **** fsubpr st(1), st fsqrt - fabs fxch st(1) fpatan --- 1256,1259 ---- *************** *** 1639,1646 **** cell newuser mantsign - \ cell newuser expsign \ seems to only be set to 0 ! cell newuser intcnt cell newuser fracnt - \ cell newuser expcnt \ seems to only be set to 0 ! cell newuser charcnt cell newuser zerochar --- 1633,1638 ---- *************** *** 1649,1653 **** 10 newuser fbcd-buf ! create $ftemp1 128 allot deprecated \ doesn't appear to be used! : 10**n ( fs: -- r ) ( n -- ) \ 10 raised to n --- 1641,1645 ---- 10 newuser fbcd-buf ! \ create $ftemp1 128 allot deprecated \ doesn't appear to be used! : 10**n ( fs: -- r ) ( n -- ) \ 10 raised to n *************** *** 2190,2214 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ display floating point stack - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - - 6 value show-fp-depth - - : f.s ( -- ) \ W32F Floating debug - \ *G Display floating point stack. - fdepth - IF fdepth cr ." {" 1 .r ." } " - show-fp-depth fdepth umin dup 1- swap 0 - DO 10 ?cr - dup i - fpick g. - LOOP drop - ELSE ." Empty fp stack " - THEN ; - - : .fdepth ( -- ) - ." Items; " fdepth . - ." Bytes: " FLOATSP @ . ; - - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 2182,2185 ---- *************** *** 2221,2226 **** : f^2 fdup f* ; - synonym fsqr fsqrt deprecated - : f>r r> rp@ b/float - rp! rp@ f! >r ; deprecated --- 2192,2195 ---- *************** *** 2239,2242 **** --- 2208,2237 ---- \ *N Debugging tools + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + \ display floating point stack + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + + 6 value show-fp-depth + + : f.s ( -- ) \ W32F Floating debug + \ *G Display floating point stack. + fdepth + IF fdepth cr ." {" 1 .r ." } " + show-fp-depth fdepth umin dup 1- swap 0 + DO 10 ?cr + dup i - fpick g. + LOOP drop + ELSE ." Empty fp stack " + THEN ; + + : .fdepth ( -- ) \ W32F Floating debug + \ *G Display depth of floating point stack. + ." Items; " fdepth . + ." Bytes: " FLOATSP @ . ; + + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + \ display state of FPU unit + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + internal *************** *** 2455,2477 **** \s - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - - (( - \ FCALL from Bill McCarthy <WJ...@po...> March 15th, 1999 - \ commented out as fcall uses wrong call -- should be assembler call? - code fcallret ( n1 -- ; fpu: r -- ; fs: -- r ) - mov ecx, FSP_MEMORY - fstp FSIZE FSTACK_MEMORY - add ecx, # B/FLOAT - mov FSP_MEMORY , ecx - pop ebx - next, - end-code - - \ Thanks to Andrew McKewan for the following idea: - : fcall postpone call s" fcallret" evaluate ; immediate - )) - \ *S Handling Errors --- 2450,2453 ---- |
From: Rod O. <rod...@us...> - 2006-05-17 20:13:36
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6488/src/console Modified Files: Statbar.f Log Message: Rod: Removed WS_BORDER Index: Statbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/Statbar.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Statbar.f 14 May 2006 10:46:19 -0000 1.4 --- Statbar.f 17 May 2006 20:13:33 -0000 1.5 *************** *** 39,43 **** :M DefStyle: ( -- style) \ default control style ! [ WS_BORDER WS_VISIBLE OR WS_CHILD OR ] literal ;M --- 39,43 ---- :M DefStyle: ( -- style) \ default control style ! [ WS_VISIBLE WS_CHILD OR ] literal ;M |
From: Rod O. <rod...@us...> - 2006-05-17 20:12:56
|
Update of /cvsroot/win32forth/win32forth/apps/SciEdit In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6122/apps/SciEdit Modified Files: EdStatusbar.f Log Message: Rod: Use StatusBar.f rather than ExControls.f Index: EdStatusbar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/SciEdit/EdStatusbar.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EdStatusbar.f 15 May 2006 19:33:41 -0000 1.6 --- EdStatusbar.f 17 May 2006 20:12:49 -0000 1.7 *************** *** 13,17 **** cr .( Loading Scintilla Statusbar...) ! needs ExControls.f \ ------------------------------------------------------------------------------ --- 13,17 ---- cr .( Loading Scintilla Statusbar...) ! needs StatusBar.f \ ------------------------------------------------------------------------------ *************** *** 40,45 **** ;M - :M WindowStyle: ( -- style) WS_CHILD WS_VISIBLE or ;M - :M Clear: ( -- ) z" " EdPart SetText: self --- 40,43 ---- |
From: Rod O. <rod...@us...> - 2006-05-17 20:11:45
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5734/src/lib Modified Files: excontrols.f Log Message: Rod: Put StatusBar control in separate file Index: excontrols.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/excontrols.f,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** excontrols.f 18 Feb 2006 04:19:33 -0000 1.14 --- excontrols.f 17 May 2006 20:11:33 -0000 1.15 *************** *** 18,24 **** --- 18,28 ---- needs sendmessage.f + needs StatusBar.f \ in separate file + internal external + + \ ------------------------------------------------------------------------ \ *W <a name="TextBox"></a> *************** *** 1607,1764 **** \ *G End of VTrackBar class - warning off - - \ ------------------------------------------------------------------------ - \ *W <a name="Statusbar"></a> - \ *S Statusbar class - \ ------------------------------------------------------------------------ - :Class Statusbar <Super Control - \ *G Status bar control - \ *P A status bar is a horizontal window at the bottom of a parent window in - \ ** which an application can display various kinds of status information. - \ *P This status bar control has only one part to display information. - - INT BorderStyle \ style of border to use - int style - - :M ClassInit: ( -- ) - \ *G Initialise the class. - ClassInit: super - 0 to style ;M - - :M AddStyle: ( n -- ) - \ *G Set any additional style of the control. Must be done before the control - \ ** is created. - to style ;M - - :M Start: ( Parent -- ) - \ *G Create the control. - to parent Z" msctls_statusbar32" create-control - 0 TRUE SB_SIMPLE SendMessage:Self DROP - ;M - - :M WindowStyle: ( -- style ) - \ *G Get the window style of the control. Default style is: WS_BORDER. - WindowStyle: super WS_BORDER OR style or ;M - - :M RaisedBorder: ( -- ) - \ *G The text is drawn with a border to appear lower than the plane of the - \ ** window (default). - 0 TO BorderStyle ;M - - :M NoBorder: ( -- ) - \ *G The text is drawn without borders. - SBT_NOBORDERS TO BorderStyle ;M - - :M SunkenBorder: ( -- ) - \ *G The text is drawn with a border to appear higher than the plane of the window. - SBT_POPOUT TO BorderStyle ;M - - :M ClassInit: ( -- ) - \ *G Initialise the class. - ClassInit: super - RaisedBorder: self - ;M - - :M MinHeight: ( #pixels -- ) - \ *G Sets the minimum height of the status window's drawing area. - \ *P The minimum height is the sum of #pixels and twice the width, in pixels, - \ ** of the vertical border of the status window. - \ *P An application must use the Redraw: method to redraw the window. - 0 SWAP SB_SETMINHEIGHT SendMessage:Self DROP ;M - - :M GetBorders: ( -- hWidth vWidth divWidth ) - \ *G Retrieves the current widths of the horizontal and vertical borders of - \ ** the status window. - \ *P \i hWidth \d is the width of the horizontal border. - \ *P \i vWidth \d is the width of the vertical border. - \ *P \i divWidth \d is the width of the border between rectangles. - - \ TODO: Don't use HERE here !!! - HERE 0 SB_GETBORDERS SendMessage:Self ?Win-Error - HERE DUP @ SWAP CELL+ DUP @ SWAP CELL+ @ - ;M - - :M Redraw: ( -- ) - \ *G Redraw the statusbar after changes (e.g. size). - 0 0 WM_SIZE SendMessage:Self DROP ;M - - :M SetText: ( szText -- ) - \ *G Sets the text in the status window. - \ *P Use \i RaisedBorder: \d, \i NoBorder: \d or \i SunkenBorder: \d to set - \ ** the the style how the text is drawn. - 255 BorderStyle OR SB_SETTEXTA SendMessage:Self ?Win-error ;M - - :M Clear: ( -- ) - \ *G clears text in the status window. - Z" " SetText: self ;M - - :M Setfont: ( handle -- ) - \ *G Set the font in the control. - 1 swap WM_SETFONT SendMessage:Self drop ;M - - :M Height: ( -- height ) - \ Get the height of the status window. - GetWindowRect: self - nip swap - nip ;M - ;Class - \ *G End of Statusbar class - - \ ------------------------------------------------------------------------ - \ *W <a name="MultiStatusbar"></a> - \ *S MultiStatusbar class - \ ------------------------------------------------------------------------ - :Class MultiStatusbar <Super Statusbar - \ *G Status bar control - \ *P A status bar is a horizontal window at the bottom of a parent window in - \ ** which an application can display various kinds of status information. - \ *P This status bar control can have multiple parts to display information. - - INT nParts \ number of parts in statusbar - INT aWidths \ address of widths table - - :M Start: ( Parent -- ) - \ *G Create the control. - Start: super - 0 FALSE SB_SIMPLE SendMessage:Self DROP - ;M - - :M SetParts: ( aWidths nParts -- ) - \ *G Sets the number of parts in the status window and the coordinate of the right - \ ** edge of each part. - \ *P \i nParts \d Number of parts to set (cannot be greater than 256). - \ *P \i aWidths \d is a pointer to an integer array. The number of elements is - \ ** specified in nParts. Each element specifies the position, in client coordinates, - \ ** of the right edge of the corresponding part. If an element is -1, the right edge - \ ** of the corresponding part extends to the border of the window. - \ *P Note: \i aWidths \d must be valid until SetParts: is used again! - TO nParts - TO aWidths - aWidths nParts SB_SETPARTS SendMessage:Self ?Win-error - ;M - - :M GetParts: ( -- aWidths nParts ) - \ *G Gets the number of parts in the status window and the coordinate of the right - \ ** edge of each part. - aWidths nParts ;M - - :M SetSimple: ( -- ) - \ *G Reset the status bar to show only one part. - 0 TRUE SB_SIMPLE SendMessage:Self DROP ;M - - :M SetMulti: ( -- ) - \ *G Set the status bar to show all parts set with \i SetParts: \d before. - 0 FALSE SB_SIMPLE SendMessage:Self DROP ;M - - :M SetText: ( szText n -- ) - \ *G Sets the text in the \i n'th \d part of status window. - \ *P Use \i RaisedBorder: \d, \i NoBorder: \d or \i SunkenBorder: \d to set - \ ** the the style how the text is drawn. - BorderStyle OR SB_SETTEXTA SendMessage:Self ?Win-Error ;M - - ;Class - \ *G End of MultiStatusbar class - - warning on \ ------------------------------------------------------------------------ --- 1611,1614 ---- |
From: Rod O. <rod...@us...> - 2006-05-17 20:10:23
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5383/src/lib Added Files: StatusBar.f Log Message: Rod: Put StatusBar control in separate file --- NEW FILE: StatusBar.f --- \ StatusBar.f \ Statusbar control separated from ExControls anew -StatusBar.f WinLibrary COMCTL32.DLL needs sendmessage.f INTERNAL EXTERNAL \ ------------------------------------------------------------------------ \ *W <a name="Statusbar"></a> \ *S Statusbar class \ ------------------------------------------------------------------------ :Class Statusbar <Super Control \ *G Status bar control \ *P A status bar is a horizontal window at the bottom of a parent window in \ ** which an application can display various kinds of status information. \ *P This status bar control has only one part to display information. INT BorderStyle \ style of border to use int style :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super 0 to style ;M :M AddStyle: ( n -- ) \ *G Set any additional style of the control. Must be done before the control \ ** is created. to style ;M :M Start: ( Parent -- ) \ *G Create the control. to parent Z" msctls_statusbar32" create-control 0 TRUE SB_SIMPLE SendMessage:Self DROP ;M :M WindowStyle: ( -- style ) \ *G Get the window style of the control. Default style is: WS_BORDER. WindowStyle: super style or ;M :M RaisedBorder: ( -- ) \ *G The text is drawn with a border to appear lower than the plane of the \ ** window (default). 0 TO BorderStyle ;M :M NoBorder: ( -- ) \ *G The text is drawn without borders. SBT_NOBORDERS TO BorderStyle ;M :M SunkenBorder: ( -- ) \ *G The text is drawn with a border to appear higher than the plane of the window. SBT_POPOUT TO BorderStyle ;M :M ClassInit: ( -- ) \ *G Initialise the class. ClassInit: super RaisedBorder: self ;M :M MinHeight: ( #pixels -- ) \ *G Sets the minimum height of the status window's drawing area. \ *P The minimum height is the sum of #pixels and twice the width, in pixels, \ ** of the vertical border of the status window. \ *P An application must use the Redraw: method to redraw the window. 0 SWAP SB_SETMINHEIGHT SendMessage:Self DROP ;M :M GetBorders: ( -- hWidth vWidth divWidth ) \ *G Retrieves the current widths of the horizontal and vertical borders of \ ** the status window. \ *P \i hWidth \d is the width of the horizontal border. \ *P \i vWidth \d is the width of the vertical border. \ *P \i divWidth \d is the width of the border between rectangles. \ TODO: Don't use HERE here !!! HERE 0 SB_GETBORDERS SendMessage:Self ?Win-Error HERE DUP @ SWAP CELL+ DUP @ SWAP CELL+ @ ;M :M Redraw: ( -- ) \ *G Redraw the statusbar after changes (e.g. size). 0 0 WM_SIZE SendMessage:Self DROP ;M :M SetText: ( szText -- ) \ *G Sets the text in the status window. \ *P Use \i RaisedBorder: \d, \i NoBorder: \d or \i SunkenBorder: \d to set \ ** the the style how the text is drawn. 255 BorderStyle OR SB_SETTEXTA SendMessage:Self ?Win-error ;M :M Clear: ( -- ) \ *G clears text in the status window. Z" " SetText: self ;M :M Setfont: ( handle -- ) \ *G Set the font in the control. 1 swap WM_SETFONT SendMessage:Self drop ;M :M Height: ( -- height ) \ Get the height of the status window. GetWindowRect: self nip swap - nip ;M ;Class \ *G End of Statusbar class \ ------------------------------------------------------------------------ \ *W <a name="MultiStatusbar"></a> \ *S MultiStatusbar class \ ------------------------------------------------------------------------ :Class MultiStatusbar <Super Statusbar \ *G Status bar control \ *P A status bar is a horizontal window at the bottom of a parent window in \ ** which an application can display various kinds of status information. \ *P This status bar control can have multiple parts to display information. INT nParts \ number of parts in statusbar INT aWidths \ address of widths table :M Start: ( Parent -- ) \ *G Create the control. Start: super 0 FALSE SB_SIMPLE SendMessage:Self DROP ;M :M SetParts: ( aWidths nParts -- ) \ *G Sets the number of parts in the status window and the coordinate of the right \ ** edge of each part. \ *P \i nParts \d Number of parts to set (cannot be greater than 256). \ *P \i aWidths \d is a pointer to an integer array. The number of elements is \ ** specified in nParts. Each element specifies the position, in client coordinates, \ ** of the right edge of the corresponding part. If an element is -1, the right edge \ ** of the corresponding part extends to the border of the window. \ *P Note: \i aWidths \d must be valid until SetParts: is used again! TO nParts TO aWidths aWidths nParts SB_SETPARTS SendMessage:Self ?Win-error ;M :M GetParts: ( -- aWidths nParts ) \ *G Gets the number of parts in the status window and the coordinate of the right \ ** edge of each part. aWidths nParts ;M :M SetSimple: ( -- ) \ *G Reset the status bar to show only one part. 0 TRUE SB_SIMPLE SendMessage:Self DROP ;M :M SetMulti: ( -- ) \ *G Set the status bar to show all parts set with \i SetParts: \d before. 0 FALSE SB_SIMPLE SendMessage:Self DROP ;M :M SetText: ( szText n -- ) \ *G Sets the text in the \i n'th \d part of status window. \ *P Use \i RaisedBorder: \d, \i NoBorder: \d or \i SunkenBorder: \d to set \ ** the the style how the text is drawn. BorderStyle OR SB_SETTEXTA SendMessage:Self ?Win-Error ;M ;Class \ *G End of MultiStatusbar class MODULE |
From: Dirk B. <db...@us...> - 2006-05-17 15:26:20
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1894/src/lib Modified Files: treeview.f Log Message: DeleteItem: method added. Index: treeview.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/treeview.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** treeview.f 14 Apr 2006 19:12:44 -0000 1.4 --- treeview.f 17 May 2006 15:26:17 -0000 1.5 *************** *** 246,263 **** :M ToggleExpandItem: ( hItem -- ) ! TVE_TOGGLE TVM_EXPAND hWnd Call SendMessage drop ! ;M :M ExpandItem: ( hItem -- ) ! TVE_EXPAND TVM_EXPAND hWnd Call SendMessage drop ! ;M :M CollapseItem: ( hItem -- ) ! TVE_COLLAPSE TVM_EXPAND hWnd Call SendMessage drop ! ;M :M SortChildren: ( hItem -- ) ! false TVM_SORTCHILDREN hWnd Call SendMessage drop ! ;M \ --------------------- Overridable methods ---------------------- --- 246,266 ---- :M ToggleExpandItem: ( hItem -- ) ! TVE_TOGGLE TVM_EXPAND hWnd Call SendMessage drop ;M :M ExpandItem: ( hItem -- ) ! TVE_EXPAND TVM_EXPAND hWnd Call SendMessage drop ;M :M CollapseItem: ( hItem -- ) ! TVE_COLLAPSE TVM_EXPAND hWnd Call SendMessage drop ;M :M SortChildren: ( hItem -- ) ! false TVM_SORTCHILDREN hWnd Call SendMessage drop ;M ! ! :M DeleteItem: ( hItem -- ) ! \ *G Removes an item and all its children from the tree view control. ! \ ** hItem is the handle of the item to delete. If hItem is set to TVI_ROOT, ! \ ** all items are deleted. ! 0 TVM_DELETEITEM hWnd Call SendMessage drop ;M ! \ --------------------- Overridable methods ---------------------- *************** *** 432,434 **** \ End of File \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - |