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...> - 2005-12-26 14:54:54
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7837/apps/Player4 Modified Files: Catalog.f PLAYER4.F Log Message: Jos: Improved the import of files. Filenames with more than one dot will not be cutoff any more. Made an auto-crash-recovery for the catalog. Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** PLAYER4.F 29 Nov 2005 17:12:08 -0000 1.32 --- PLAYER4.F 26 Dec 2005 14:54:44 -0000 1.33 *************** *** 229,233 **** SetParent: ViewForm catalog-exist? ! if map-config-file map-database MciDebug? if database-mhndl #records-in-database . ." records, " --- 229,239 ---- SetParent: ViewForm catalog-exist? ! if map-config-file map-database vadr-config ExitFailed- c@ ! if MciDebug? ! if cr ." REBUILD " ! then ! generate-index-file ! then ! true vadr-config ExitFailed- c! MciDebug? if database-mhndl #records-in-database . ." records, " *************** *** 262,265 **** --- 268,272 ---- unmap-database unmap-configuration + false vadr-config ExitFailed- c! bye 0 ;M *************** *** 557,559 **** PLAYER4 [then] ! --- 564,566 ---- PLAYER4 [then] ! Index: Catalog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Catalog.f,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Catalog.f 3 Dec 2005 12:31:50 -0000 1.21 --- Catalog.f 26 Dec 2005 14:54:44 -0000 1.22 *************** *** 43,46 **** --- 43,47 ---- BYTE l_Filename- BYTE l_Record- + BYTE ExitFailed- ;struct *************** *** 190,195 **** ; ! : generate-index-file ! unmap-database map-database-file database-mhndl #records-in-database create-index-file --- 191,195 ---- ; ! : _generate-index-file ( - ) map-database-file database-mhndl #records-in-database create-index-file *************** *** 197,200 **** --- 197,202 ---- rebuild-index-hdrs ; + + : generate-index-file ( - ) unmap-database _generate-index-file ; \ ==== Part that depends on a record definition *************** *** 425,433 **** struct, InlineRecord RecordDef FileSize ! ! >r dup r@ + r@ ascii \ -scan 2dup r@ swap - swap 1+ dup rot \ adr Title ! dup>r ascii . scan nip r> swap - dup \ count Title struct, InlineRecord RecordDef Cnt_Title c! struct, InlineRecord RecordDef Title swap cmove \ move Title ! >r 1- dup r> ascii \ -scan >r 2dup - >r 1+ r@ struct, InlineRecord RecordDef Cnt_Album c! --- 427,436 ---- struct, InlineRecord RecordDef FileSize ! ! >r dup r@ + 1- dup r@ ascii \ -scan \ adr Title ! rot over ascii . -scan \ count Title ! drop 2 pick 1+ 2dup - dup \ 0< if cr .s ." file" abort then dup struct, InlineRecord RecordDef Cnt_Title c! struct, InlineRecord RecordDef Title swap cmove \ move Title ! drop >r 1- dup r> ascii \ -scan >r 2dup - >r 1+ r@ struct, InlineRecord RecordDef Cnt_Album c! *************** *** 495,499 **** database$ count file-exist? and \ database-mhndl map-file-open? or ! DataBaseFilled? and [defined] MciDebug? [if] MciDebug? --- 498,506 ---- database$ count file-exist? and \ database-mhndl map-file-open? or ! DataBaseFilled? and dup ! if index$ count file-exist? not ! if _generate-index-file ! then ! then [defined] MciDebug? [if] MciDebug? *************** *** 501,505 **** then [then] ! ; \ -------------------------------------------------------------------------- \ add a directory tree to the catalog --- 508,513 ---- then [then] ! ; ! \ -------------------------------------------------------------------------- \ add a directory tree to the catalog *************** *** 508,515 **** : select_tree ( - path count file-spec count flag-subdir ) ! vadr-config PathMediaFiles count s" *.*" true ; ! : proc_fileinfo_sdir ( wHndl - wHndl ) name-buf count add-file ; --- 516,526 ---- : select_tree ( - path count file-spec count flag-subdir ) ! vadr-config PathMediaFiles dup 0= ! if drop s" \" ! else count ! then s" *.wma" true ; ! : proc_fileinfo_sdir ( - ) name-buf count add-file ; *************** *** 534,537 **** --- 545,550 ---- ; + \ s" F:\Data\geript" s" *.*" true sdir .s + \ -------------------------------------------------------------------------- \ search in the catalog |
From: Dirk B. <db...@us...> - 2005-12-26 09:28:32
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26322/doc/classes Modified Files: Generic.htm Window.htm gdiBase.htm gdiPen.htm gdiStruct.htm Added Files: Control.htm Dialog.htm gdiBitmap.htm gdiBrush.htm gdiDC.htm gdiFont.htm gdiMetafile.htm gdiMetafileDC.htm gdiWindowDc.htm Log Message: More documentation added. --- NEW FILE: Dialog.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: Dialog.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>Dialog -- Class for dialog boxes. </h1><hr /><hr><p>Document $Id: Dialog.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiMetafile.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiMetafile.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiMetafile -- Metafile class </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><pre><b><a name="0">:class gdiMetafile <super gdiObject </a></b></pre><p>Metafile class. This class only support's enhanced metafiles (emf) ! </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiMetafile class </p><hr><p>Document $Id: gdiMetafile.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiWindowDc.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiWindowDc.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiWindowDc -- Window device context class </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><pre><b><a name="0">:class gdiWindowDC <super gdiDC </a></b></pre><p>Window device context class </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiWindowDC class </p><hr><p>Document $Id: gdiWindowDc.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> Index: gdiBase.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/gdiBase.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiBase.htm 24 Dec 2005 11:59:25 -0000 1.2 --- gdiBase.htm 26 Dec 2005 09:28:23 -0000 1.3 *************** *** 16,44 **** <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> ! <hr /><h1>GdiObject -- Base class for GDI objects </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch ! </p><p>GdiObject is the base class for all GDI objects. This class contains a single ivar, hObject, that is the (MS Windows) handle for the ! GDI object. <br /> ! There will be the following subclasses of GdiObject: ! </p><pre>gdiPen Class for cosmetic pen's ! gdiGeometricPen Class for geometric pen's ! gdiSolidBrush Solid brush class ! gdiHatchBrush Hatch brush class ! gdiPatternBrush Pattern brush class ! gdiDIBPatternBrush DIBPattern brush class ! GdiFont Class for windows fonts ! gdiBitmap Class for bitmaps ! gdiMetafile Class for enhanced metafiles ! gdiDC Base device context class ! gdiWindowDC Device context class for windows ! gdiMetafileDC Device context class for enhanced metafiles ! </pre><p>Since GdiObject is a generic class it should not be used to create ! any instances. <br /> </p><h2>Glossary ! </h2><pre><b><a name="0">:class GdiObject <super object ! </a></b></pre><p>GdiObject is the base class for all GDI Object classes. </p><pre><b><a name="0">:M ZeroHandle: ( -- ) </a></b></pre><p>Clear the handle of the object. <br /> --- 16,76 ---- <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> ! <hr /><h1>gdiObject -- Base class for GDI objects </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch ! </p><p>gdiObject is the base class for all GDI objects. This class contains a single ivar, hObject, that is the (MS Windows) handle for the ! GDI object. Since GdiObject is a generic class it should not be used to create ! any instances. There will be the following subclasses of gdiObject: ! </p><ul> ! <li><a href="gdiPen.htm#gdiPen">gdiPen</a> Class for cosmetic pen's</li> ! <li><a href="gdiPen.htm#gdiGeometricPen">gdiGeometricPen</a> Class for geometric pen's</li> ! <li><a href="gdiBrush.htm#gdiSolidBrush">gdiSolidBrush</a> Solid brush class</li> ! <li><a href="gdiBrush.htm#gdiHatchBrush">gdiHatchBrush</a> Hatch brush class</li> ! <li><a href="gdiBrush.htm#gdiPatternBrush">gdiPatternBrush</a> Pattern brush class</li> ! <li><a href="gdiBrush.htm#gdiDIBPatternBrush">gdiDIBPatternBrush</a> DIBPattern brush class</li> ! <li><a href="gdiFont.htm">gdiFont</a> Class for windows fonts</li> ! <li><a href="gdiBitmap.htm">gdiBitmap</a> Class for bitmaps</li> ! <li><a href="gdiMetafile.htm">gdiMetafile</a> Class for enhanced metafiles</li> ! <li><a href="gdiDC.htm">gdiDC</a> Base device context class</li> ! <li><a href="gdiWindowDC.htm">gdiWindowDC</a> Device context class for windows</li> ! <li><a href="gdiMetafileDC.htm">gdiMetafileDC</a> Device context class for enhanced metafiles</li> ! </ul> ! <p>There are some other (old) classes in Win32Forth that are dealing with the GDI: ! </p><table border="1"><tr><td>ColorObject ! </td> ! <td>Class for color objects ! </td> ! </tr> ! <tr><td>ExtColorObject ! </td> ! <td>Class for extended color objects ! </td> ! </tr> ! <tr><td>HatchColorObject ! </td> ! <td>Class for hatch color objects ! </td> ! </tr> ! <tr><td>Font ! </td> ! <td>Class for fonts ! </td> ! </tr> ! <tr><td>WinDC ! </td> ! <td>Device context class for windows ! </td> ! </tr> ! <tr><td>WinPrinter ! </td> ! <td>Device context class for printing ! </td> ! </tr> ! </table><p>All old classes are rewritten to use the GDI class library. </p><h2>Glossary ! </h2><pre><b><a name="0">:class gdiObject <super object ! </a></b></pre><p>gdiObject is the base class for all GDI Object classes. </p><pre><b><a name="0">:M ZeroHandle: ( -- ) </a></b></pre><p>Clear the handle of the object. <br /> --- NEW FILE: gdiMetafileDC.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiMetafileDC.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiMetafileDC -- Metafile device context class </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><pre><b><a name="0">:class gdiMetafileDC <super gdiDC </a></b></pre><p>Metafile device context class </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiMetafileDC class </p><hr><p>Document $Id: gdiMetafileDC.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiDC.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiDC.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiDC -- Base device context class </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><pre><b><a name="0">:class gdiDC <super gdiObject </a></b></pre><p>Base device context class </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiDC class </p><hr><p>Document $Id: gdiDC.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiBrush.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiBrush.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>GdiBrush -- Classes for GDI Brushes. </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><h2>Glossary </h2><a name="gdiBrush"></a> <pre><b><a name="0">:class gdiBrush <super gdiObject </a></b></pre><p>Base class for all brush objects. <br /> This is an internal class of the GDI Class library. Don't use it yourself. </p><pre><b><a name="0">:M SetOrigin: { xOrg yOrg hdc -- } </a></b></pre><p>Set the brush origin that GDI assigns to the next brush an application selects into the specified device context. <br /> Note: hdc can be the address of a gdiDC class instance or a DC handle. <br /> A brush is a bitmap that the system uses to paint the interiors of filled shapes. <br /> The brush origin is a pair of coordinates specifying the location of one pixel in the bitmap. The default brush origin coordinates are (0,0). For horizontal coordinates, the value 0 corresponds to the leftmost column of pixels; the width corresponds to the rightmost column. For vertical coordinates, the value 0 corresponds to the uppermost row of pixels; the height corresponds to the lowermost row. <br /> The system automatically tracks the origin of all window-managed device contexts and adjusts their brushes as necessary to maintain an alignment of patterns on the surface. The brush origin that is set with this call is relative to the upper-left corner of the client area. <br /> An application should call SetOrigin: after setting the bitmap stretching mode to HALFTONE by using SetStretchBltMode. This must be done to avoid brush misalignment. <br /> Windows NT/ 2000: The system automatically tracks the origin of all window-managed device contexts and adjusts their brushes as necessary to maintain an alignment of patterns on the surface. <br /> Windows 95/98: Automatic tracking of the brush origin is not supported. Applications must use the UnrealizeObject, SetBrushOrgEx, and SelectObject functions to align the brush before using it. <br /> </p><pre><b><a name="0">:M GetOrigin: ( hdc -- xOrg yOrg ) </a></b></pre><p>Get the current brush origin for the specified device context. </p><pre><b><a name="0">:M Create: ( lplb -- f ) </a></b></pre><p>The Create function creates a logical brush that has the specified style, color, and pattern. lplb Pointer to a LOGBRUSH structure that contains information about the brush. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiBrush class </p><a name="gdiSolidBrush"></a> <pre><b><a name="0">:class gdiSolidBrush <super gdiBrush </a></b></pre><p>Solid brush class </p><pre><b><a name="0">:M SetRValue: ( r -- ) </a></b></pre><p>Set the red component of the brush color. </p><pre><b><a name="0">:M SetGValue: ( g -- ) </a></b></pre><p>Set the green component of the brush color. </p><pre><b><a name="0">:M SetBValue: ( b -- ) </a></b></pre><p>Set the blue component of the brush color. </p><pre><b><a name="0">:M SetRGB: ( r g b -- ) </a></b></pre><p>Set the red, green and blue component of the brush color. </p><pre><b><a name="0">:M SetColor: ( colorref -- ) </a></b></pre><p>Set color of the brush. </p><pre><b><a name="0">:M SetSysColor: ( n -- ) </a></b></pre><p>Set the color of the brush to a system color. </p><pre><b><a name="0">:M ChooseColor: ( hWnd -- f ) </a></b></pre><p>Open a dialog to choose the color of the brush. </p><pre><b><a name="0">:M GetRValue: ( -- r ) </a></b></pre><p>Get the red component of the brush color. </p><pre><b><a name="0">:M GetGValue: ( -- g ) </a></b></pre><p>Get the green component of the brush color. </p><pre><b><a name="0">:M GetBValue: ( -- b ) </a></b></pre><p>Get the blue component of the brush color. </p><pre><b><a name="0">:M GetColor: ( -- colorref ) </a></b></pre><p>Get the color of the brush as a windows COLORREF value. </p><pre><b><a name="0">:M Create: ( -- f ) </a></b></pre><p>Create the brush with the current color. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiSolidBrush class </p><a name="gdiHatchBrush"></a> <pre><b><a name="0">:class gdiHatchBrush <super gdiSolidBrush </a></b></pre><p>Hatch brush class </p><pre><b><a name="0">:M SetStyle: ( style -- ) </a></b></pre><p>Set the style of the brush. Possible values are: </p><table border="1"><tr><td>HS_BDIAGONAL </td> <td>45-degree downward left-to-right hatch </td> </tr> <tr><td>HS_CROSS </td> <td>Horizontal and vertical crosshatch </td> </tr> <tr><td>HS_DIAGCROSS </td> <td>45-degree crosshatch </td> </tr> <tr><td>HS_FDIAGONAL </td> <td>45-degree upward left-to-right hatch </td> </tr> <tr><td>HS_HORIZONTAL </td> <td>Horizontal hatch </td> </tr> <tr><td>HS_VERTICAL </td> <td>Vertical hatch </td> </tr> </table><pre><b><a name="0">:M GetStyle: ( -- style ) </a></b></pre><p>Get the style of the brush. Possible return values are: </p><table border="1"><tr><td>HS_BDIAGONAL </td> <td>45-degree downward left-to-right hatch </td> </tr> <tr><td>HS_CROSS </td> <td>Horizontal and vertical crosshatch </td> </tr> <tr><td>HS_DIAGCROSS </td> <td>45-degree crosshatch </td> </tr> <tr><td>HS_FDIAGONAL </td> <td>45-degree upward left-to-right hatch </td> </tr> <tr><td>HS_HORIZONTAL </td> <td>Horizontal hatch </td> </tr> <tr><td>HS_VERTICAL </td> <td>Vertical hatch </td> </tr> </table><pre><b><a name="0">:M Create: ( -- f ) </a></b></pre><p>Create the brush with the current style and color. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiHatchBrush class </p><a name="gdiPatternBrush"></a> <pre><b><a name="0">:class gdiPatternBrush <super gdiBrush </a></b></pre><p>Pattern brush class. <br /> </p><pre><b><a name="0">:M SetBitmap: ( Bitmap -- ) </a></b></pre><p>Set the Bitmap for the PatternBrush. The Bitmap can be a DIB section bitmap, which is created by the CreateDIBSection function. </p><pre><b><a name="0">:M GetBitmap: ( -- Bitmap ) </a></b></pre><p>Get the Bitmap for the PatternBrush. </p><pre><b><a name="0">:M Create: ( -- f ) </a></b></pre><p>Creates a logical brush with the specified bitmap pattern. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiPatternBrush class </p><a name="gdiHatchBrush"></a> <pre><b><a name="0">:class gdiDIBPatternBrush <super gdiBrush </a></b></pre><p>DIBPattern brush class </p><pre><b><a name="0">:M Create: ( lpPackedDIB iUsage -- f ) </a></b></pre><p>The Create function creates a logical brush that has the pattern specified by the device-independent bitmap (DIB). <br /> lpPackedDIB Pointer to a packed DIB consisting of a BITMAPINFO structure immediately followed by an array of bytes defining the pixels of the bitmap. <br /> Windows 95: Creating brushes from bitmaps or DIBs larger than 8 by 8 pixels is not supported. If a larger bitmap is specified, only a portion of the bitmap is used. <br /> Windows NT/ 2000 and Windows 98: Brushes can be created from bitmaps or DIBs larger than 8 by 8 pixels. <br /> iUsage Specifies whether the bmiColors member of the BITMAPINFO structure contains a valid color table and, if so, whether the entries in this color table contain explicit red, green, blue (RGB) values or palette indexes. The iUsage parameter must be one of the following values. </p><table border="1"><tr><td>DIB_PAL_COLORS </td> <td>A color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the brush is to be selected. </td> </tr> <tr><td>DIB_RGB_COLORS </td> <td>A color table is provided and contains literal RGB values. </td> </tr> </table><pre><b><a name="0">;class </a></b></pre><p>End of gdiDIBPatternBrush class </p><hr><p>Document $Id: gdiBrush.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiFont.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiFont.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiFont -- Class for GDI Fonts. </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><h2>Glossary </h2><a name="gdiFont"></a> <pre><b><a name="0">:Class gdiFont <Super GdiObject </a></b></pre><p>GDI Font class </p><pre><b><a name="0">:M SetHeight: ( n1 -- ) </a></b></pre><p>Set the height, in logical units, of the font's character cell or character. The character height value (also known as the em height) is the character cell height value minus the internal-leading value. The font mapper interprets the value specified in lfHeight in the following manner. </p><table border="1"><tr><td>> 0 </td> <td>The font mapper transforms this value into device units and matches it against the cell height of the available fonts. </td> </tr> <tr><td>0 </td> <td>The font mapper uses a default height value when it searches for a match. </td> </tr> <tr><td>< 0 </td> <td>The font mapper transforms this value into device units and matches its absolute value against the character height of the available fonts. </td> </tr> </table><p>For all height comparisons, the font mapper looks for the largest font that does not exceed the requested size. This mapping occurs when the font is used for the first time. </p><pre><b><a name="0">:M SetWidth: ( n1 -- ) </a></b></pre><p>Specifies the average width, in logical units, of characters in the font. If lfWidth is zero, the aspect ratio of the device is matched against the digitization aspect ratio of the available fonts to find the closest match, determined by the absolute value of the difference. </p><pre><b><a name="0">:M SetEscapement: ( n1 -- ) </a></b></pre><p>Set the angle, in tenths of degrees, between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text. <br /> Windows NT/ 2000: When the graphics mode is set to GM_ADVANCED, you can specify the escapement angle of the string independently of the orientation angle of the string's characters. <br /> When the graphics mode is set to GM_COMPATIBLE, lfEscapement specifies both the escapement and orientation. You should set lfEscapement and lfOrientation to the same value. <br /> Windows 95: The lfEscapement member specifies both the escapement and orientation. You should set lfEscapement and lfOrientation to the same value. </p><pre><b><a name="0">:M SetOrientation: ( n1 -- ) </a></b></pre><p>Set the angle, in tenths of degrees, between each character's base line and the x-axis of the device. </p><pre><b><a name="0">:M SetWeight: ( n1 -- ) </a></b></pre><p>Specifies the weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is bold. If this value is zero, a default weight is used. The following values are defined for convenience. </p><table border="1"><tr><td>FW_DONTCARE </td> <td>0 </td> </tr> <tr><td>FW_THIN </td> <td>100 </td> </tr> <tr><td>FW_EXTRALIGHT </td> <td>200 </td> </tr> <tr><td>FW_ULTRALIGHT </td> <td>200 </td> </tr> <tr><td>FW_LIGHT </td> <td>300 </td> </tr> <tr><td>FW_NORMAL </td> <td>400 </td> </tr> <tr><td>FW_REGULAR </td> <td>400 </td> </tr> <tr><td>FW_MEDIUM </td> <td>500 </td> </tr> <tr><td>FW_SEMIBOLD </td> <td>600 </td> </tr> <tr><td>FW_DEMIBOLD </td> <td>600 </td> </tr> <tr><td>FW_BOLD </td> <td>700 </td> </tr> <tr><td>FW_EXTRABOLD </td> <td>800 </td> </tr> <tr><td>FW_ULTRABOLD </td> <td>800 </td> </tr> <tr><td>FW_HEAVY </td> <td>900 </td> </tr> <tr><td>FW_BLACK </td> <td>900 </td> </tr> </table><pre><b><a name="0">:M SetItalic: ( f1 -- ) </a></b></pre><p>Specifies an italic font if set to TRUE. </p><pre><b><a name="0">:M SetUnderline: ( f1 -- ) </a></b></pre><p>Specifies an underlined font if set to TRUE. </p><pre><b><a name="0">:M SetStrikeOut: ( f1 -- ) </a></b></pre><p>Specifies a strikeout font if set to TRUE. </p><pre><b><a name="0">:M SetCharSet: ( n1 -- ) </a></b></pre><p>Specifies the character set. The following values are predefined. </p><table border="1"><tr><td>ANSI_CHARSET </td> </tr> <tr><td>BALTIC_CHARSET </td> </tr> <tr><td>CHINESEBIG5_CHARSET </td> </tr> <tr><td>DEFAULT_CHARSET </td> </tr> <tr><td>EASTEUROPE_CHARSET </td> </tr> <tr><td>GB2312_CHARSET </td> </tr> <tr><td>GREEK_CHARSET </td> </tr> <tr><td>HANGUL_CHARSET </td> </tr> <tr><td>MAC_CHARSET </td> </tr> <tr><td>OEM_CHARSET </td> </tr> <tr><td>RUSSIAN_CHARSET </td> </tr> <tr><td>SHIFTJIS_CHARSET </td> </tr> <tr><td>SYMBOL_CHARSET </td> </tr> <tr><td>TURKISH_CHARSET </td> </tr> </table><p>Windows NT/ 2000 or Middle-Eastern Windows 3.1 or later: </p><table border="1"><tr><td>HEBREW_CHARSET </td> </tr> <tr><td>ARABIC_CHARSET </td> </tr> </table><p>Windows NT/ 2000 or Thai Windows 3.1 or later: </p><table border="1"><tr><td>THAI_CHARSET </td> </tr> </table><p>The OEM_CHARSET value specifies a character set that is operating-system dependent. Windows 95/98: You can use the DEFAULT_CHARSET value to allow the name and size of a font to fully describe the logical font. If the specified font name does not exist, a font from any character set can be substituted for the specified font, so you should use DEFAULT_CHARSET sparingly to avoid unexpected results. <br /> Windows NT/ 2000: DEFAULT_CHARSET is set to a value based on the current system locale. For example, when the system locale is English (United States), it is set as ANSI_CHARSET. <br /> Fonts with other character sets may exist in the operating system. If an application uses a font with an unknown character set, it should not attempt to translate or interpret strings that are rendered with that font. <br /> This parameter is important in the font mapping process. To ensure consistent results, specify a specific character set. If you specify a typeface name in the lfFaceName member, make sure that the lfCharSet value matches the character set of the typeface specified in lfFaceName. </p><pre><b><a name="0">:M SetOutPrecision: ( n1 -- ) </a></b></pre><p>Specifies the output precision. The output precision defines how closely the output must match the requested font's height, width, character orientation, escapement, pitch, and font type. It can be one of the following values. </p><table border="1"><tr><td>OUT_CHARACTER_PRECIS Not used </td> </tr> <tr><td>OUT_DEFAULT_PRECIS </td> <td>Specifies the default font mapper behavior. </td> </tr> <tr><td>OUT_DEVICE_PRECIS </td> <td>Instructs the font mapper to choose a Device font when the system contains multiple fonts with the same name. </td> </tr> <tr><td>OUT_OUTLINE_PRECIS </td> <td>Windows NT/ 2000: This value instructs the font mapper to choose from TrueType and other outline-based fonts. </td> </tr> <tr><td>OUT_RASTER_PRECIS </td> <td>Instructs the font mapper to choose a raster font when the system contains multiple fonts with the same name. </td> </tr> <tr><td>OUT_TT_ONLY_PRECIS </td> <td>Instructs the font mapper to choose from only TrueType fonts. If there are no TrueType fonts installed in the system, the font mapper returns to default behavior. </td> </tr> <tr><td>OUT_TT_PRECIS </td> <td>Instructs the font mapper to choose a TrueType font when the system contains multiple fonts with the same name. </td> </tr> </table><p>Applications can use the OUT_DEVICE_PRECIS, OUT_RASTER_PRECIS, and OUT_TT_PRECIS values to control how the font mapper chooses a font when the operating system contains more than one font with a specified name. For example, if an operating system contains a font named Symbol in raster and TrueType form, specifying OUT_TT_PRECIS forces the font mapper to choose the TrueType version. Specifying OUT_TT_ONLY_PRECIS forces the font mapper to choose a TrueType font, even if it must substitute a TrueType font of another name. </p><pre><b><a name="0">:M SetClipPrecision: ( n1 -- ) </a></b></pre><p>Specifies the clipping precision. The clipping precision defines how to clip characters that are partially outside the clipping region. It can be one or more of the following values. </p><table border="1"><tr><td>CLIP_DEFAULT_PRECIS Specifies default clipping behavior. </td> </tr> <tr><td>CLIP_CHARACTER_PRECIS Not used. </td> </tr> <tr><td>CLIP_EMBEDDED You must specify this flag to use an embedded read-only font. </td> </tr> <tr><td>CLIP_LH_ANGLES When this value is used, the rotation for all fonts depends on whether the orientation of the coordinate system is left-handed or right-handed. If not used, device fonts always rotate counterclockwise, but the rotation of other fonts is dependent on the orientation of the coordinate system. </td> </tr> </table><p>For more information about the orientation of coordinate systems, see the description of the nOrientation parameter | </p><pre><b><a name="0">:M SetQuality: ( n1 -- ) </a></b></pre><p>Specifies the output quality. The output quality defines how carefully the graphics device interface (GDI) must attempt to match the logical-font attributes to those of an actual physical font. It can be one of the following values. </p><table border="1"><tr><td>ANTIALIASED_QUALITY </td> <td>Font is always antialiased if the font supports it and the size of the font is not too small or too large. </td> </tr> <tr><td>DEFAULT_QUALITY </td> <td>Appearance of the font does not matter. </td> </tr> <tr><td>DRAFT_QUALITY </td> <td>Appearance of the font is less important than when PROOF_QUALITY is used. For GDI raster fonts, scaling is enabled, which means that more font sizes are available, but the quality may be lower. Bold, italic, underline, and strikeout fonts are synthesized if necessary. </td> </tr> <tr><td>NONANTIALIASED_QUALITY </td> <td>Font is never antialiased. </td> </tr> <tr><td>PROOF_QUALITY </td> <td>Character quality of the font is more important than exact matching of the logical-font attributes. For GDI raster fonts, scaling is disabled and the font closest in size is chosen. Although the chosen font size may not be mapped exactly when PROOF_QUALITY is used, the quality of the font is high and there is no distortion of appearance. Bold, italic, underline, and strikeout fonts are synthesized if necessary. </td> </tr> </table><p>If neither ANTIALIASED_QUALITY nor NONANTIALIASED_QUALITY is selected, the font is antialiased only if the user chooses smooth screen fonts in Control Panel. </p><pre><b><a name="0">:M SetPitchAndFamily: ( n1 -- ) </a></b></pre><p>Specifies the pitch and family of the font. The two low-order bits specify the pitch of the font and can be one of the following values. </p><table border="1"><tr><td>DEFAULT_PITCH </td> </tr> <tr><td>FIXED_PITCH </td> </tr> <tr><td>VARIABLE_PITCH </td> </tr> </table><p>Bits 4 through 7 of the member specify the font family and can be one of the following values. </p><table border="1"><tr><td>FF_DECORATIV </td> </tr> <tr><td>FF_DONTCAR </td> </tr> <tr><td>FF_MODER </td> </tr> <tr><td>FF_ROMA </td> </tr> <tr><td>FF_SCRIP </td> </tr> <tr><td>FF_SWIS </td> </tr> </table><p>The proper value can be obtained by using the Boolean OR operator to join one pitch constant with one family constant. </p><p>Font families describe the look of a font in a general way. They are intended for specifying fonts when the exact typeface desired is not available. The values for font families are as follows. </p><table border="1"><tr><td>FF_DECORATIVE </td> <td>Novelty fonts. Old English is an example. </td> </tr> <tr><td>FF_DONTCARE </td> <td>Don't care or don't know. </td> </tr> <tr><td>FF_MODERN </td> <td>Fonts with constant stroke width (monospace), with or without serifs. Monospace fonts are usually modern. Pica, Elite, and CourierNew® are examples. </td> </tr> <tr><td>FF_ROMAN </td> <td>Fonts with variable stroke width (proportional) and with serifs. MS® Serif is an example. </td> </tr> <tr><td>FF_SCRIPT </td> <td>Fonts designed to look like handwriting. Script and Cursive are examples. </td> </tr> <tr><td>FF_SWISS </td> <td>Fonts with variable stroke width (proportional) and without serifs. MS® Sans Serif is an example. </td> </tr> </table><pre><b><a name="0">:M SetFaceName: ( a1 n1 -- ) </a></b></pre><p>Specifies the typeface name of the font. The length of this string must not exceed 32 characters, including the null terminator. The EnumFontFamilies function can be used to enumerate the typeface names of all currently available fonts. If lfFaceName is an empty string, GDI uses the first font that matches the other specified attributes. </p><pre><b><a name="0">:M GetHeight: ( -- n1 ) </a></b></pre><p>Fet the height, in logical units, of the font's character cell or character </p><pre><b><a name="0">:M GetWidth: ( -- n1 ) </a></b></pre><p>Get the average width, in logical units, of characters in the font </p><pre><b><a name="0">:M GetEscapement: ( -- n1 ) </a></b></pre><p>Get the angle, in tenths of degrees, between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text. </p><pre><b><a name="0">:M GetOrientation: ( -- n1 ) </a></b></pre><p>Get the angle, in tenths of degrees, between each character's base line and the x-axis of the device. </p><pre><b><a name="0">:M GetWeight: ( -- n1 ) </a></b></pre><p>Get the weight of the font </p><pre><b><a name="0">:M GetItalic: ( -- f1 ) </a></b></pre><p>TRUE if it's an italic font. </p><pre><b><a name="0">:M GetUnderline: ( -- f1 ) </a></b></pre><p>TRUE if it's a underlined font. </p><pre><b><a name="0">:M GetStrikeOut: ( -- f1 ) </a></b></pre><p>TRUE if it's a strikeout font. </p><pre><b><a name="0">:M GetCharSet: ( -- n1 ) </a></b></pre><p>Get the character set. </p><pre><b><a name="0">:M GetOutPrecision: ( -- n1 ) </a></b></pre><p>Get the output precision. </p><pre><b><a name="0">:M GetClipPrecision: ( -- n1 ) </a></b></pre><p>Get the clipping precision </p><pre><b><a name="0">:M GetQuality: ( -- n1 ) </a></b></pre><p>Get the output quality. </p><pre><b><a name="0">:M GetPitchAndFamily: ( -- n1 ) </a></b></pre><p>Get the pitch and family of the font. </p><pre><b><a name="0">:M GetFaceName: ( -- a1 n1 ) </a></b></pre><p>Get the typeface name of the font. </p><pre><b><a name="0">:M GetLogfont: ( -- n1 ) </a></b></pre><p>Get the address of the LOGFONT structure </p><pre><b><a name="0">:M Create: ( -- f ) </a></b></pre><p>Create a new font. If the current font handle is valid, the font will be destroyed. </p><pre><b><a name="0">:M Choose: ( hWnd -- f ) </a></b></pre><p>Open a dialog to choose a Screen font. If the dialog is closed with OK, the font will be created. </p><pre><b><a name="0">:M ChoosePrinter: ( hWnd hDC -- f ) </a></b></pre><p>Open a dialog to choose a Printer font for the PrinterDC hDC. If the dialog is closed with OK, the fontwill be created. </p><pre><b><a name="0">;Class </a></b></pre><p>End of gdiFont class </p><hr><p>Document $Id: gdiFont.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: Control.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: Control.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>Control -- Class for child controls with subclassing. </h1><hr /><hr><p>Document $Id: Control.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiBitmap.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiBitmap.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiBitmap -- GDI Bitmap class. </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><h2>Glossary </h2><a name="gdiBitmap"></a> <pre><b><a name="0">:class gdiBitmap <super gdiObject </a></b></pre><p>Bitmap class </p><pre><b><a name="0">:M CreateBitmap: ( Width Height Planes BitsPerPel pBits -- f ) </a></b></pre><p>The CreateBitmap function creates a bitmap with the specified width, height, and color format (color planes and bits-per-pixel). <br /> <br /> Width Specifies the bitmap width, in pixels. <br /> Height Specifies the bitmap height, in pixels. <br /> Planes Specifies the number of color planes used by the device. <br /> BitsPerPel Specifies the number of bits required to identify the color of a single pixel. <br /> pBits Pointer to an array of color data used to set the colors in a rectangle of pixels. Each scan line in the rectangle must be word aligned (scan lines that are not word aligned must be padded with zeros). If this parameter is NULL, the contents of the new bitmap is undefined. <br /> <br /> After a bitmap is created, it can be selected into a device context by calling the SelectObject function. The CreateBitmap function can be used to create color bitmaps. However, for performance reasons applications should use CreateBitmap to create monochrome bitmaps and CreateCompatibleBitmap to create color bitmaps. When a color bitmap returned from CreateBitmap is selected into a device context, the system must ensure that the bitmap matches the format of the device context it is being selected into. Since CreateCompatibleBitmap takes a device context, it returns a bitmap that has the same format as the specified device context. Because of this, subsequent calls to SelectObject are faster than with a color bitmap returned from CreateBitmap. <br /> <br /> If the bitmap is monochrome, zeros represent the foreground color and ones represent the background color for the destination device context. <br /> <br /> If an application sets the nWidth or nHeight parameters to zero, CreateBitmap returns the handle to a 1-by-1 pixel, monochrome bitmap. <br /> <br /> When you no longer need the bitmap, call the Destroy: method to delete it. <br /> <br /> Windows 95/98: The created bitmap cannot exceed 16MB in size </p><pre><b><a name="0">:M CreateBitmapIndirect: ( pBitmap -- f ) </a></b></pre><p>The CreateBitmapIndirect function creates a bitmap with the specified width, height, and color format (color planes and bits-per-pixel). pBitmap Pointer to a BITMAP structure that contains information about the bitmap. If an application sets the bmWidth or bmHeight members to zero, CreateBitmapIndirect returns the handle to a 1-by-1 pixel, monochrome bitmap. </p><pre><b><a name="0">:M CreateCompatibleBitmap: ( Width Height hDC -- f ) </a></b></pre><p>The CreateCompatibleBitmap function creates a bitmap compatible with the device that is associated with the specified device context. <br /> <br /> The color format of the bitmap created by the CreateCompatibleBitmap function matches the color format of the device identified by the hdc parameter. This bitmap can be selected into any memory device context that is compatible with the original device. <br /> <br /> Because memory device contexts allow both color and monochrome bitmaps, the format of the bitmap returned by the CreateCompatibleBitmap function differs when the specified device context is a memory device context. However, a compatible bitmap that was created for a nonmemory device context always possesses the same color format and uses the same color palette as the specified device context. <br /> <br /> Note: When a memory device context is created, it initially has a 1-by-1 monochrome bitmap selected into it. If this memory device context is used in CreateCompatibleBitmap, the bitmap that is created is a monochrome bitmap. To create a color bitmap, use the hDC that was used to create the memory device context, as shown in the following code: <br /> <br /> HDC memDC = CreateCompatibleDC ( hDC ); <br /> HBITMAP memBM = CreateCompatibleBitmap ( hDC ); <br /> SelectObject ( memDC, memBM ); <br /> <br /> If an application sets the nWidth or nHeight parameters to zero, CreateCompatibleBitmap returns the handle to a 1-by-1 pixel, monochrome bitmap. <br /> <br /> If a DIB section, which is a bitmap created by the CreateDIBSection function, is selected into the device context identified by the hdc parameter, CreateCompatibleBitmap creates a DIB section. <br /> <br /> When you no longer need the bitmap, call the DeleteObject function to delete it. <br /> <br /> Windows 95/98: The created bitmap cannot exceed 16MB in size. </p><pre><b><a name="0">:M CreateDIBitmap: ( pbmih fdwInit pbInit pbmi fuUsage hdc -- f ) </a></b></pre><p>The CreateDIBitmap function creates a device-dependent bitmap (DDB) from a DIB and, optionally, sets the bitmap bits. <br /> lpbmih Pointer to a bitmap information header structure, which may be one of those shown in the following table. </p><table border="1"><tr><td>Operating system </td> <td>Bitmap information heade </td> </tr> <tr><td>Windows NT 3.51 and earlier </td> <td>BITMAPINFOHEADER </td> </tr> <tr><td>Windows NT 4.0 and Windows 95 </td> <td>BITMAPV4HEADER (NOT SUPPORTED !!!) </td> </tr> <tr><td>Windows 2000 and Windows 98 </td> <td>BITMAPV5HEADER (NOT SUPPORTED !!!) </td> </tr> </table><p>If fdwInit is CBM_INIT, the function uses the bitmap information header structure to obtain the desired width and height of the bitmap as well as other information. Note that a positive value for the height indicates a bottom-up DIB while a negative value for the height indicates a top-down DIB. Calling CreateDIBitmap with fdwInit as CBM_INIT is equivalent to calling the CreateCompatibleBitmap function to create a DDB in the format of the device and then calling the SetDIBits function to translate the DIB bits to the DDB. <br /> fdwInit Specifies how the system initializes the bitmap bits. The following values is defined. Value Meaning CBM_INIT If this flag is set, the system uses the data pointed to by the lpbInit and lpbmi parameters to initialize the bitmap's bits. If this flag is clear, the data pointed to by those parameters is not used. <br /> If fdwInit is zero, the system does not initialize the bitmap's bits. <br /> lpbInit Pointer to an array of bytes containing the initial bitmap data. The format of the data depends on the biBitCount member of the BITMAPINFO structure to which the lpbmi parameter points. <br /> lpbmi Pointer to a BITMAPINFO structure that describes the dimensions and color format of the array pointed to by the lpbInit parameter. <br /> fuUsage Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or palette indexes. The fuUsage parameter must be one of the following values. </p><table border="1"><tr><td>DIB_PAL_COLORS </td> <td>A color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the bitmap is to be selected. </td> </tr> <tr><td>DIB_RGB_COLORS </td> <td>A color table is provided and contains literal RGB values. </td> </tr> </table><pre><b><a name="0">:M CreateDIBSection: ( pbmi iUsage ppvBits hSection dwOffset hdc -- f ) </a></b></pre><p>The CreateDIBSection function creates a DIB that applications can write to directly. The function gives you a pointer to the location of the bitmap's bit values. You can supply a handle to a file-mapping object that the function will use to create the bitmap, or you can let the system allocate the memory for the bitmap. <br /> hdc Handle to a device context. If the value of iUsage is DIB_PAL_COLORS, the function uses this device context's logical palette to initialize the DIB's colors. <br /> pbmi Pointer to a BITMAPINFO structure that specifies various attributes of the DIB, including the bitmap's dimensions and colors. <br /> iUsage Specifies the type of data contained in the bmiColors array member of the BITMAPINFO structure pointed to by pbmi (either logical palette indexes or literal RGB values). The following values are defined. </p><table border="1"><tr><td>DIB_PAL_COLORS </td> <td>The bmiColors member is an array of 16-bit indexes into the logical palette of the device context specified by hdc. </td> </tr> <tr><td>DIB_RGB_COLORS </td> <td>The BITMAPINFO structure contains an array of literal RGB values. </td> </tr> </table><p>ppvBits Pointer to a variable that receives a pointer to the location of the DIB's bit values. <br /> hSection Handle to a file-mapping object that the function will use to create the DIB. This parameter can be NULL. If hSection is not NULL, it must be a handle to a file-mapping object created by calling the CreateFileMapping function with the PAGE_READWRITE or PAGE_WRITECOPY flag. Read-only DIB sections are not supported. Handles created by other means will cause CreateDIBSection to fail. If hSection is not NULL, the CreateDIBSection function locates the bitmap's bit values at offset dwOffset in the file-mapping object referred to by hSection. An application can later retrieve the hSection handle by calling the GetObject function with the HBITMAP returned by CreateDIBSection. If hSection is NULL, the system allocates memory for the DIB. In this case, the CreateDIBSection function ignores the dwOffset parameter. An application cannot later obtain a handle to this memory. The dshSection member of the DIBSECTION structure filled in by calling the GetObject function will be NULL. <br /> dwOffset Specifies the offset from the beginning of the file-mapping object referenced by hSection where storage for the bitmap's bit values is to begin. This value is ignored if hSection is NULL. The bitmap's bit values are aligned on doubleword boundaries, so dwOffset must be a multiple of the size of a DWORD. </p><pre><b><a name="0">:M SetBitmapDimension: ( width height -- oldwidth oldheight ) </a></b></pre><p>The SetBitmapDimension function assigns preferred dimensions to a bitmap. These dimensions can be used by applications; however, they are not used by the system. <br /> Width Specifies the width, in 0.1-millimeter units, of the bitmap. <br /> Height Specifies the height, in 0.1-millimeter units, of the bitmap. <br /> An application can retrieve the dimensions assigned to a bitmap with the SetBitmapDimensionEx function by calling the GetBitmapDimension function. <br /> The bitmap identified by hBitmap cannot be a DIB section, which is a bitmap created by the CreateDIBSection function. If the bitmap is a DIB section, the SetBitmapDimension function fails. </p><pre><b><a name="0">:M GetBitmapDimension: ( -- width height ) </a></b></pre><p>The GetBitmapDimension function retrieves the dimensions of a bitmap. The retrieved dimensions must have been set by the SetBitmapDimension function. The function returns the height and width of the bitmap, in .01-mm units. </p><pre><b><a name="0">:M SetDIBits ;M </a></b></pre><p>not implemented, yet. </p><pre><b><a name="0">:M GetDIBits ;M </a></b></pre><p>not implemented, yet. </p><pre><b><a name="0">:M LoadBitmap ;M </a></b></pre><p>not implemented, yet. </p><pre><b><a name="0">:M MaskBlt ;M </a></b></pre><p>not implemented, yet. </p><pre><b><a name="0">:M PlgBlt ;M </a></b></pre><p>not implemented, yet. </p><pre><b><a name="0">;class </a></b></pre><p>End of Bitmap class </p><hr><p>Document $Id: gdiBitmap.htm,v 1.1 2005/12/26 09:28:23 dbu_de Exp $</p> </body></html> Index: Generic.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Generic.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Generic.htm 24 Dec 2005 11:59:25 -0000 1.2 --- Generic.htm 26 Dec 2005 09:28:23 -0000 1.3 *************** *** 20,32 **** contains a single ivar, hWnd, that is the (MS Windows) handle for the window. This class encapsulates all the Win32 API calls that specify a ! window handle. There will be 3 subclasses of Generic-Window: ! </p><pre> Window Adds a device context and the ablility ! to display text and graphics output. ! ! Control Adds support for the standard Win32 controls ! with subclassing. ! ! Dialog Support for dialog boxes ! </pre><p>Since Generic-Window is a generic class it should not be used to create any instances. <br /> The Global Rectangle objects wRect and WndRect ( originally --- 20,30 ---- contains a single ivar, hWnd, that is the (MS Windows) handle for the window. This class encapsulates all the Win32 API calls that specify a ! window handle. There will be the following subclasses of Generic-Window: ! </p><ul> ! <li><a href="Window.htm">Window</a> Adds a device context and the ablility to display text and graphics output.</li> ! <li><a href="Dialog.htm">Dialog</a> Support for dialog boxes</li> ! <li><a href="Control.htm">Control</a> Adds support for the standard Win32 controls with subclassing.</li> ! </ul> ! <p>Since Generic-Window is a generic class it should not be used to create any instances. <br /> The Global Rectangle objects wRect and WndRect ( originally *************** *** 501,505 **** <tr><td>bErase </td> ! <td>Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. If this parameter is FALSE, the background remains unchanged. </td> </tr> --- 499,503 ---- <tr><td>bErase </td> ! <td>Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. </td> </tr> |
Update of /cvsroot/win32forth/win32forth/src/gdi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26322/src/gdi Modified Files: gdiBase.f gdiBitmap.f gdiBrush.f gdiDC.f gdiFont.f gdiMetafile.f gdiMetafileDc.f gdiPen.f gdiWindowDc.f Log Message: More documentation added. Index: gdiMetafile.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiMetafile.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gdiMetafile.f 5 Nov 2005 14:08:13 -0000 1.3 --- gdiMetafile.f 26 Dec 2005 09:28:23 -0000 1.4 *************** *** 1,7 **** ! \ gdiMetafile.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain cr .( Loading GDI class library - Metafile...) --- 1,8 ---- ! \ *D doc\classes\ ! \ *! gdiMetafile ! \ *T gdiMetafile -- Metafile class ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch cr .( Loading GDI class library - Metafile...) *************** *** 14,20 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ Metafile class - This class only support's enhanced metafiles (emf) ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiMetafile <super gdiObject rectangle RECT --- 15,21 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiMetafile <super gdiObject + \ *G Metafile class. This class only support's enhanced metafiles (emf) ! rectangle RECT *************** *** 112,115 **** --- 113,119 ---- ;class + \ *G End of gdiMetafile class module + + \ *Z Index: gdiBitmap.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBitmap.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gdiBitmap.f 1 Nov 2005 12:21:40 -0000 1.1 --- gdiBitmap.f 26 Dec 2005 09:28:23 -0000 1.2 *************** *** 1,7 **** ! \ gdiBitmap.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain cr .( Loading GDI class library - Bitmap...) --- 1,9 ---- ! \ *D doc\classes\ ! \ *! gdiBitmap ! \ *T gdiBitmap -- GDI Bitmap class. ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch ! \ *S Glossary cr .( Loading GDI class library - Bitmap...) *************** *** 16,20 **** --- 18,24 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + \ *W <a name="gdiBitmap"></a> :class gdiBitmap <super gdiObject + \ *G Bitmap class gdiSize SIZE *************** *** 24,215 **** ;M - \ The CreateBitmap function creates a bitmap with the specified width, height, - \ and color format (color planes and bits-per-pixel). - \ - \ Width Specifies the bitmap width, in pixels. - \ Height Specifies the bitmap height, in pixels. - \ Planes Specifies the number of color planes used by the device. - \ BitsPerPel Specifies the number of bits required to identify the color of a - \ single pixel. - \ pBits Pointer to an array of color data used to set the colors in a rectangle - \ of pixels. Each scan line in the rectangle must be word aligned (scan - \ lines that are not word aligned must be padded with zeros). If this - \ parameter is NULL, the contents of the new bitmap is undefined. - \ - \ After a bitmap is created, it can be selected into a device context by calling - \ the SelectObject function. The CreateBitmap function can be used to create color - \ bitmaps. However, for performance reasons applications should use CreateBitmap - \ to create monochrome bitmaps and CreateCompatibleBitmap to create color bitmaps. - \ When a color bitmap returned from CreateBitmap is selected into a device context, - \ the system must ensure that the bitmap matches the format of the device context - \ it is being selected into. Since CreateCompatibleBitmap takes a device context, - \ it returns a bitmap that has the same format as the specified device context. - \ Because of this, subsequent calls to SelectObject are faster than with a color - \ bitmap returned from CreateBitmap. - \ - \ If the bitmap is monochrome, zeros represent the foreground color and ones represent - \ the background color for the destination device context. - \ - \ If an application sets the nWidth or nHeight parameters to zero, CreateBitmap - \ returns the handle to a 1-by-1 pixel, monochrome bitmap. - \ - \ When you no longer need the bitmap, call the Destroy: method to delete it. - \ - \ Windows 95/98: The created bitmap cannot exceed 16MB in size :M CreateBitmap: ( Width Height Planes BitsPerPel pBits -- f ) 5reverse call CreateBitmap SetHandle: super Valid?: super ;M - \ The CreateBitmapIndirect function creates a bitmap with the specified width, - \ height, and color format (color planes and bits-per-pixel). - \ pBitmap Pointer to a BITMAP structure that contains information about the - \ bitmap. If an application sets the bmWidth or bmHeight members to zero, - \ CreateBitmapIndirect returns the handle to a 1-by-1 pixel, monochrome bitmap. :M CreateBitmapIndirect: ( pBitmap -- f ) call CreateBitmapIndirect SetHandle: super Valid?: super ;M - \ The CreateCompatibleBitmap function creates a bitmap compatible with the device - \ that is associated with the specified device context. - \ - \ The color format of the bitmap created by the CreateCompatibleBitmap function - \ matches the color format of the device identified by the hdc parameter. This - \ bitmap can be selected into any memory device context that is compatible with - \ the original device. - \ - \ Because memory device contexts allow both color and monochrome bitmaps, the format - \ of the bitmap returned by the CreateCompatibleBitmap function differs when the - \ specified device context is a memory device context. However, a compatible bitmap - \ that was created for a nonmemory device context always possesses the same color - \ format and uses the same color palette as the specified device context. - \ - \ Note: When a memory device context is created, it initially has a 1-by-1 monochrome - \ bitmap selected into it. If this memory device context is used in CreateCompatibleBitmap, - \ the bitmap that is created is a monochrome bitmap. To create a color bitmap, use the - \ hDC that was used to create the memory device context, as shown in the following code: - \ - \ HDC memDC = CreateCompatibleDC ( hDC ); - \ HBITMAP memBM = CreateCompatibleBitmap ( hDC ); - \ SelectObject ( memDC, memBM ); - \ - \ If an application sets the nWidth or nHeight parameters to zero, CreateCompatibleBitmap - \ returns the handle to a 1-by-1 pixel, monochrome bitmap. - \ - \ If a DIB section, which is a bitmap created by the CreateDIBSection function, is selected - \ into the device context identified by the hdc parameter, CreateCompatibleBitmap creates a - \ DIB section. - \ - \ When you no longer need the bitmap, call the DeleteObject function to delete it. - \ - \ Windows 95/98: The created bitmap cannot exceed 16MB in size. :M CreateCompatibleBitmap: ( Width Height hDC -- f ) GetGdiObjectHandle >r swap r> call CreateCompatibleBitmap SetHandle: super Valid?: super ;M - \ The CreateDIBitmap function creates a device-dependent bitmap (DDB) from a DIB and, - \ optionally, sets the bitmap bits. - \ - \ lpbmih Pointer to a bitmap information header structure, which may be one of those - \ shown in the following table. Operating system Bitmap information header - \ Windows NT 3.51 and earlier BITMAPINFOHEADER - \ Windows NT 4.0 and Windows 95 BITMAPV4HEADER NOT SUPPORTED !!! - \ Windows 2000 and Windows 98 BITMAPV5HEADER NOT SUPPORTED !!! - \ - \ If fdwInit is CBM_INIT, the function uses the bitmap information header structure to - \ obtain the desired width and height of the bitmap as well as other information. Note - \ that a positive value for the height indicates a bottom-up DIB while a negative value - \ for the height indicates a top-down DIB. Calling CreateDIBitmap with fdwInit as CBM_INIT - \ is equivalent to calling the CreateCompatibleBitmap function to create a DDB in the format - \ of the device and then calling the SetDIBits function to translate the DIB bits to the DDB. - \ - \ fdwInit Specifies how the system initializes the bitmap bits. The following values is defined. - \ Value Meaning CBM_INIT If this flag is set, the system uses the data pointed to by the lpbInit - \ and lpbmi parameters to initialize the bitmap's bits. If this flag is clear, the data pointed - \ to by those parameters is not used. - \ - \ If fdwInit is zero, the system does not initialize the bitmap's bits. - \ - \ lpbInit Pointer to an array of bytes containing the initial bitmap data. The format of the data - \ depends on the biBitCount member of the BITMAPINFO structure to which the lpbmi parameter points. - \ - \ lpbmi Pointer to a BITMAPINFO structure that describes the dimensions and color format of the - \ array pointed to by the lpbInit parameter. - \ - \ fuUsage Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, - \ if so, whether bmiColors contains explicit red, green, blue (RGB) values or palette indexes. - \ The fuUsage parameter must be one of the following values. Value Meaning - \ DIB_PAL_COLORS A color table is provided and consists of an array of 16-bit indexes into the - \ logical palette of the device context into which the bitmap is to be selected. - \ DIB_RGB_COLORS A color table is provided and contains literal RGB values. :M CreateDIBitmap: ( pbmih fdwInit pbInit pbmi fuUsage hdc -- f ) GetGdiObjectHandle >r 5reverse r> call CreateDIBitmap SetHandle: super Valid?: super ;M - \ The CreateDIBSection function creates a DIB that applications can write to directly. The function - \ gives you a pointer to the location of the bitmap's bit values. You can supply a handle to a - \ file-mapping object that the function will use to create the bitmap, or you can let the system - \ allocate the memory for the bitmap. - \ - \ hdc Handle to a device context. If the value of iUsage is DIB_PAL_COLORS, the function uses - \ this device context's logical palette to initialize the DIB's colors. - \ - \ pbmi Pointer to a BITMAPINFO structure that specifies various attributes of the DIB, including - \ the bitmap's dimensions and colors. - \ - \ iUsage Specifies the type of data contained in the bmiColors array member of the BITMAPINFO - \ structure pointed to by pbmi (either logical palette indexes or literal RGB values). The - \ following values are defined. Value Meaning - \ DIB_PAL_COLORS The bmiColors member is an array of 16-bit indexes into the logical palette of - \ the device context specified by hdc. - \ DIB_RGB_COLORS The BITMAPINFO structure contains an array of literal RGB values. - \ - \ ppvBits Pointer to a variable that receives a pointer to the location of the DIB's bit values. - \ - \ hSection Handle to a file-mapping object that the function will use to create the DIB. This - \ parameter can be NULL. If hSection is not NULL, it must be a handle to a file-mapping object - \ created by calling the CreateFileMapping function with the PAGE_READWRITE or PAGE_WRITECOPY flag. - \ Read-only DIB sections are not supported. Handles created by other means will cause CreateDIBSection - \ to fail. If hSection is not NULL, the CreateDIBSection function locates the bitmap's bit values at - \ offset dwOffset in the file-mapping object referred to by hSection. An application can later retrieve - \ the hSection handle by calling the GetObject function with the HBITMAP returned by CreateDIBSection. - \ If hSection is NULL, the system allocates memory for the DIB. In this case, the CreateDIBSection - \ function ignores the dwOffset parameter. An application cannot later obtain a handle to this memory. - \ The dshSection member of the DIBSECTION structure filled in by calling the GetObject function will - \ be NULL. - \ - \ dwOffset Specifies the offset from the beginning of the file-mapping object referenced by hSection - \ where storage for the bitmap's bit values is to begin. This value is ignored if hSection is NULL. - \ The bitmap's bit values are aligned on doubleword boundaries, so dwOffset must be a multiple of the - \ size of a DWORD. :M CreateDIBSection: ( pbmi iUsage ppvBits hSection dwOffset hdc -- f ) GetGdiObjectHandle >r 5reverse r> call CreateDIBSection SetHandle: super Valid?: super ;M - \ The SetBitmapDimension function assigns preferred dimensions to a bitmap. These dimensions can be - \ used by applications; however, they are not used by the system. - \ Width Specifies the width, in 0.1-millimeter units, of the bitmap. - \ Height Specifies the height, in 0.1-millimeter units, of the bitmap. - \ An application can retrieve the dimensions assigned to a bitmap with the SetBitmapDimensionEx function - \ by calling the GetBitmapDimension function. - \ The bitmap identified by hBitmap cannot be a DIB section, which is a bitmap created by the - \ CreateDIBSection function. If the bitmap is a DIB section, the SetBitmapDimension function fails. :M SetBitmapDimension: ( width height -- oldwidth oldheight ) Addr: SIZE 3reverse hObject call SetBitmapDimensionEx ?win-error GetX: SIZE GetY: SIZE ;M - \ The GetBitmapDimension function retrieves the dimensions of a bitmap. The retrieved dimensions must - \ have been set by the SetBitmapDimension function. - \ The function returns the height and width of the bitmap, in .01-mm units. :M GetBitmapDimension: ( -- width height ) Addr: SIZE hObject call GetBitmapDimensionEx ?win-error GetX: SIZE GetY: SIZE ;M ! \ SetDIBits ! \ GetDIBits ! \ LoadBitmap ! \ MaskBlt ! \ PlgBlt ;class module --- 28,216 ---- ;M :M CreateBitmap: ( Width Height Planes BitsPerPel pBits -- f ) + \ *G The CreateBitmap function creates a bitmap with the specified width, height, + \ ** and color format (color planes and bits-per-pixel). \n + \ ** \n + \ ** Width Specifies the bitmap width, in pixels. \n + \ ** Height Specifies the bitmap height, in pixels. \n + \ ** Planes Specifies the number of color planes used by the device. \n + \ ** BitsPerPel Specifies the number of bits required to identify the color of a + \ ** single pixel. \n + \ ** pBits Pointer to an array of color data used to set the colors in a rectangle + \ ** of pixels. Each scan line in the rectangle must be word aligned (scan + \ ** lines that are not word aligned must be padded with zeros). If this + \ ** parameter is NULL, the contents of the new bitmap is undefined. \n + \ ** \n + \ ** After a bitmap is created, it can be selected into a device context by calling + \ ** the SelectObject function. The CreateBitmap function can be used to create color + \ ** bitmaps. However, for performance reasons applications should use CreateBitmap + \ ** to create monochrome bitmaps and CreateCompatibleBitmap to create color bitmaps. + \ ** When a color bitmap returned from CreateBitmap is selected into a device context, + \ ** the system must ensure that the bitmap matches the format of the device context + \ ** it is being selected into. Since CreateCompatibleBitmap takes a device context, + \ ** it returns a bitmap that has the same format as the specified device context. + \ ** Because of this, subsequent calls to SelectObject are faster than with a color + \ ** bitmap returned from CreateBitmap. \n + \ ** \n + \ ** If the bitmap is monochrome, zeros represent the foreground color and ones represent + \ ** the background color for the destination device context. \n + \ ** \n + \ ** If an application sets the nWidth or nHeight parameters to zero, CreateBitmap + \ ** returns the handle to a 1-by-1 pixel, monochrome bitmap. \n + \ ** \n + \ ** When you no longer need the bitmap, call the Destroy: method to delete it. \n + \ ** \n + \ ** Windows 95/98: The created bitmap cannot exceed 16MB in size 5reverse call CreateBitmap SetHandle: super Valid?: super ;M :M CreateBitmapIndirect: ( pBitmap -- f ) + \ *G The CreateBitmapIndirect function creates a bitmap with the specified width, + \ ** height, and color format (color planes and bits-per-pixel). + \ ** pBitmap Pointer to a BITMAP structure that contains information about the + \ ** bitmap. If an application sets the bmWidth or bmHeight members to zero, + \ ** CreateBitmapIndirect returns the handle to a 1-by-1 pixel, monochrome bitmap. call CreateBitmapIndirect SetHandle: super Valid?: super ;M :M CreateCompatibleBitmap: ( Width Height hDC -- f ) + \ *G The CreateCompatibleBitmap function creates a bitmap compatible with the device + \ ** that is associated with the specified device context. \n + \ ** \n + \ ** The color format of the bitmap created by the CreateCompatibleBitmap function + \ ** matches the color format of the device identified by the hdc parameter. This + \ ** bitmap can be selected into any memory device context that is compatible with + \ ** the original device. \n + \ ** \n + \ ** Because memory device contexts allow both color and monochrome bitmaps, the format + \ ** of the bitmap returned by the CreateCompatibleBitmap function differs when the + \ ** specified device context is a memory device context. However, a compatible bitmap + \ ** that was created for a nonmemory device context always possesses the same color + \ ** format and uses the same color palette as the specified device context. \n + \ ** \n + \ ** Note: When a memory device context is created, it initially has a 1-by-1 monochrome + \ ** bitmap selected into it. If this memory device context is used in CreateCompatibleBitmap, + \ ** the bitmap that is created is a monochrome bitmap. To create a color bitmap, use the + \ ** hDC that was used to create the memory device context, as shown in the following code: \n + \ ** \n + \ ** HDC memDC = CreateCompatibleDC ( hDC ); \n + \ ** HBITMAP memBM = CreateCompatibleBitmap ( hDC ); \n + \ ** SelectObject ( memDC, memBM ); \n + \ ** \n + \ ** If an application sets the nWidth or nHeight parameters to zero, CreateCompatibleBitmap + \ ** returns the handle to a 1-by-1 pixel, monochrome bitmap. \n + \ ** \n + \ ** If a DIB section, which is a bitmap created by the CreateDIBSection function, is selected + \ ** into the device context identified by the hdc parameter, CreateCompatibleBitmap creates a + \ ** DIB section. \n + \ ** \n + \ ** When you no longer need the bitmap, call the DeleteObject function to delete it. \n + \ ** \n + \ ** Windows 95/98: The created bitmap cannot exceed 16MB in size. GetGdiObjectHandle >r swap r> call CreateCompatibleBitmap SetHandle: super Valid?: super ;M :M CreateDIBitmap: ( pbmih fdwInit pbInit pbmi fuUsage hdc -- f ) + \ *G The CreateDIBitmap function creates a device-dependent bitmap (DDB) from a DIB and, + \ ** optionally, sets the bitmap bits. \n + \ ** lpbmih Pointer to a bitmap information header structure, which may be one of those + \ ** shown in the following table. + \ *L + \ *| Operating system | Bitmap information header + \ *| Windows NT 3.51 and earlier | BITMAPINFOHEADER | + \ *| Windows NT 4.0 and Windows 95 | BITMAPV4HEADER (NOT SUPPORTED !!!) | + \ *| Windows 2000 and Windows 98 | BITMAPV5HEADER (NOT SUPPORTED !!!) | + \ *P If fdwInit is CBM_INIT, the function uses the bitmap information header structure to + \ ** obtain the desired width and height of the bitmap as well as other information. Note + \ ** that a positive value for the height indicates a bottom-up DIB while a negative value + \ ** for the height indicates a top-down DIB. Calling CreateDIBitmap with fdwInit as CBM_INIT + \ ** is equivalent to calling the CreateCompatibleBitmap function to create a DDB in the format + \ ** of the device and then calling the SetDIBits function to translate the DIB bits to the DDB. \n + \ ** fdwInit Specifies how the system initializes the bitmap bits. The following values is defined. + \ ** Value Meaning CBM_INIT If this flag is set, the system uses the data pointed to by the lpbInit + \ ** and lpbmi parameters to initialize the bitmap's bits. If this flag is clear, the data pointed + \ ** to by those parameters is not used. \n + \ ** If fdwInit is zero, the system does not initialize the bitmap's bits. \n + \ ** lpbInit Pointer to an array of bytes containing the initial bitmap data. The format of the data + \ ** depends on the biBitCount member of the BITMAPINFO structure to which the lpbmi parameter points. \n + \ ** lpbmi Pointer to a BITMAPINFO structure that describes the dimensions and color format of the + \ ** array pointed to by the lpbInit parameter. \n + \ ** fuUsage Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, + \ ** if so, whether bmiColors contains explicit red, green, blue (RGB) values or palette indexes. + \ ** The fuUsage parameter must be one of the following values. + \ *L + \ *| DIB_PAL_COLORS | A color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the bitmap is to be selected. | + \ *| DIB_RGB_COLORS | A color table is provided and contains literal RGB values. | GetGdiObjectHandle >r 5reverse r> call CreateDIBitmap SetHandle: super Valid?: super ;M :M CreateDIBSection: ( pbmi iUsage ppvBits hSection dwOffset hdc -- f ) + \ *G The CreateDIBSection function creates a DIB that applications can write to directly. The function + \ ** gives you a pointer to the location of the bitmap's bit values. You can supply a handle to a + \ ** file-mapping object that the function will use to create the bitmap, or you can let the system + \ ** allocate the memory for the bitmap. \n + \ ** hdc Handle to a device context. If the value of iUsage is DIB_PAL_COLORS, the function uses + \ ** this device context's logical palette to initialize the DIB's colors. \n + \ ** pbmi Pointer to a BITMAPINFO structure that specifies various attributes of the DIB, including + \ ** the bitmap's dimensions and colors. \n + \ ** iUsage Specifies the type of data contained in the bmiColors array member of the BITMAPINFO + \ ** structure pointed to by pbmi (either logical palette indexes or literal RGB values). The + \ ** following values are defined. + \ *L + \ *| DIB_PAL_COLORS | The bmiColors member is an array of 16-bit indexes into the logical palette of the device context specified by hdc. | + \ *| DIB_RGB_COLORS | The BITMAPINFO structure contains an array of literal RGB values. | + \ *P ppvBits Pointer to a variable that receives a pointer to the location of the DIB's bit values. \n + \ ** hSection Handle to a file-mapping object that the function will use to create the DIB. This + \ ** parameter can be NULL. If hSection is not NULL, it must be a handle to a file-mapping object + \ ** created by calling the CreateFileMapping function with the PAGE_READWRITE or PAGE_WRITECOPY flag. + \ ** Read-only DIB sections are not supported. Handles created by other means will cause CreateDIBSection + \ ** to fail. If hSection is not NULL, the CreateDIBSection function locates the bitmap's bit values at + \ ** offset dwOffset in the file-mapping object referred to by hSection. An application can later retrieve + \ ** the hSection handle by calling the GetObject function with the HBITMAP returned by CreateDIBSection. + \ ** If hSection is NULL, the system allocates memory for the DIB. In this case, the CreateDIBSection + \ ** function ignores the dwOffset parameter. An application cannot later obtain a handle to this memory. + \ ** The dshSection member of the DIBSECTION structure filled in by calling the GetObject function will + \ ** be NULL. \n + \ ** dwOffset Specifies the offset from the beginning of the file-mapping object referenced by hSection + \ ** where storage for the bitmap's bit values is to begin. This value is ignored if hSection is NULL. + \ ** The bitmap's bit values are aligned on doubleword boundaries, so dwOffset must be a multiple of the + \ ** size of a DWORD. GetGdiObjectHandle >r 5reverse r> call CreateDIBSection SetHandle: super Valid?: super ;M :M SetBitmapDimension: ( width height -- oldwidth oldheight ) + \ *G The SetBitmapDimension function assigns preferred dimensions to a bitmap. These dimensions can be + \ ** used by applications; however, they are not used by the system. \n + \ ** Width Specifies the width, in 0.1-millimeter units, of the bitmap. \n + \ ** Height Specifies the height, in 0.1-millimeter units, of the bitmap. \n + \ ** An application can retrieve the dimensions assigned to a bitmap with the SetBitmapDimensionEx function + \ ** by calling the GetBitmapDimension function. \n + \ ** The bitmap identified by hBitmap cannot be a DIB section, which is a bitmap created by the + \ ** CreateDIBSection function. If the bitmap is a DIB section, the SetBitmapDimension function fails. Addr: SIZE 3reverse hObject call SetBitmapDimensionEx ?win-error GetX: SIZE GetY: SIZE ;M :M GetBitmapDimension: ( -- width height ) + \ *G The GetBitmapDimension function retrieves the dimensions of a bitmap. The retrieved dimensions must + \ ** have been set by the SetBitmapDimension function. + \ ** The function returns the height and width of the bitmap, in .01-mm units. Addr: SIZE hObject call GetBitmapDimensionEx ?win-error GetX: SIZE GetY: SIZE ;M ! :M SetDIBits: ;M ! \ *G not implemented, yet. ! :M GetDIBits: ;M ! \ *G not implemented, yet. ! :M LoadBitmap: ;M ! \ *G not implemented, yet. ! :M MaskBlt: ;M ! \ *G not implemented, yet. ! :M PlgBlt: ;M ! \ *G not implemented, yet. ;class + \ *G End of Bitmap class module + + \ *Z Index: gdiBrush.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBrush.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiBrush.f 17 Dec 2005 15:11:19 -0000 1.2 --- gdiBrush.f 26 Dec 2005 09:28:23 -0000 1.3 *************** *** 1,2 **** --- 1,3 ---- + \ *D doc\classes\ \ *! gdiBrush \ *T GdiBrush -- Classes for GDI Brushes. *************** *** 17,22 **** internal :class gdiBrush <super gdiObject ! \ *G Base class for all brush objects gdiPoint origin --- 18,25 ---- internal + \ *W <a name="gdiBrush"></a> :class gdiBrush <super gdiObject ! \ *G Base class for all brush objects. \n ! \ ** This is an internal class of the GDI Class library. Don't use it yourself. gdiPoint origin *************** *** 27,33 **** --- 30,58 ---- :M SetOrigin: { xOrg yOrg hdc -- } + \ *G Set the brush origin that GDI assigns to the next brush an application selects + \ ** into the specified device context. \n + \ ** Note: hdc can be the address of a gdiDC class instance or a DC handle. \n + \ ** A brush is a bitmap that the system uses to paint the interiors of filled shapes. \n + \ ** The brush origin is a pair of coordinates specifying the location of one pixel in + \ ** the bitmap. The default brush origin coordinates are (0,0). For horizontal coordinates, + \ ** the value 0 corresponds to the leftmost column of pixels; the width corresponds to the + \ ** rightmost column. For vertical coordinates, the value 0 corresponds to the uppermost + \ ** row of pixels; the height corresponds to the lowermost row. \n + \ ** The system automatically tracks the origin of all window-managed device contexts and + \ ** adjusts their brushes as necessary to maintain an alignment of patterns on the surface. + \ ** The brush origin that is set with this call is relative to the upper-left corner of the + \ ** client area. \n + \ ** An application should call SetOrigin: after setting the bitmap stretching mode to + \ ** HALFTONE by using SetStretchBltMode. This must be done to avoid brush misalignment. \n + \ ** Windows NT/ 2000: The system automatically tracks the origin of all window-managed device + \ ** contexts and adjusts their brushes as necessary to maintain an alignment of patterns on + \ ** the surface. \n + \ ** Windows 95/98: Automatic tracking of the brush origin is not supported. Applications must + \ ** use the UnrealizeObject, SetBrushOrgEx, and SelectObject functions to align the brush before + \ ** using it. \n NULL yOrg xOrg hdc GetGdiObjectHandle call SetBrushOrgEx ?win-error ;M :M GetOrigin: ( hdc -- xOrg yOrg ) + \ *G Get the current brush origin for the specified device context. Addr: origin call GetBrushOrgEx 0= if -1 -1 \ error *************** *** 35,47 **** then ;M - \ The Create function creates a logical brush that has the specified style, - \ color, and pattern. - \ lplb Pointer to a LOGBRUSH structure that contains information about the - \ brush. :M Create: ( lplb -- f ) call CreateBrushIndirect SetHandle: super Valid?: super ;M ;class external --- 60,71 ---- then ;M :M Create: ( lplb -- f ) + \ *G The Create function creates a logical brush that has the specified style, color, and pattern. + \ ** lplb Pointer to a LOGBRUSH structure that contains information about the brush. call CreateBrushIndirect SetHandle: super Valid?: super ;M ;class + \ *G End of gdiBrush class external *************** *** 49,52 **** --- 73,77 ---- \ ---------------------------------------------------------------------- \ ---------------------------------------------------------------------- + \ *W <a name="gdiSolidBrush"></a> :class gdiSolidBrush <super gdiBrush \ *G Solid brush class *************** *** 109,115 **** --- 134,142 ---- ;class + \ *G End of gdiSolidBrush class \ ---------------------------------------------------------------------- \ ---------------------------------------------------------------------- + \ *W <a name="gdiHatchBrush"></a> :class gdiHatchBrush <super gdiSolidBrush \ *G Hatch brush class *************** *** 131,135 **** :M SetStyle: ( style -- ) \ *G Set the style of the brush. Possible values are: ! \ *L HS_BDIAGONAL | 45-degree downward left-to-right hatch | \ *| HS_CROSS | Horizontal and vertical crosshatch | \ *| HS_DIAGCROSS | 45-degree crosshatch | --- 158,163 ---- :M SetStyle: ( style -- ) \ *G Set the style of the brush. Possible values are: ! \ *L ! \ *| HS_BDIAGONAL | 45-degree downward left-to-right hatch | \ *| HS_CROSS | Horizontal and vertical crosshatch | \ *| HS_DIAGCROSS | 45-degree crosshatch | *************** *** 141,145 **** :M GetStyle: ( -- style ) \ *G Get the style of the brush. Possible return values are: ! \ *L HS_BDIAGONAL | 45-degree downward left-to-right hatch | \ *| HS_CROSS | Horizontal and vertical crosshatch | \ *| HS_DIAGCROSS | 45-degree crosshatch | --- 169,174 ---- :M GetStyle: ( -- style ) \ *G Get the style of the brush. Possible return values are: ! \ *L ! \ *| HS_BDIAGONAL | 45-degree downward left-to-right hatch | \ *| HS_CROSS | Horizontal and vertical crosshatch | \ *| HS_DIAGCROSS | 45-degree crosshatch | *************** *** 155,163 **** ;class \ ---------------------------------------------------------------------- \ ---------------------------------------------------------------------- :class gdiPatternBrush <super gdiBrush ! \ *G Pattern brush class \ Bitmap of the brush. --- 184,194 ---- ;class + \ *G End of gdiHatchBrush class \ ---------------------------------------------------------------------- \ ---------------------------------------------------------------------- + \ *W <a name="gdiPatternBrush"></a> :class gdiPatternBrush <super gdiBrush ! \ *G Pattern brush class. \n \ Bitmap of the brush. *************** *** 170,187 **** --- 201,224 ---- :M SetBitmap: ( Bitmap -- ) + \ *G Set the Bitmap for the PatternBrush. The Bitmap can be a DIB section bitmap, + \ ** which is created by the CreateDIBSection function. to Bitmap ;M :M GetBitmap: ( -- Bitmap ) + \ *G Get the Bitmap for the PatternBrush. Bitmap ;M :M Create: ( -- f ) + \ *G Creates a logical brush with the specified bitmap pattern. Bitmap ?dup if call CreatePatternBrush SetHandle: super then Valid?: super ;M ;class + \ *G End of gdiPatternBrush class \ ---------------------------------------------------------------------- \ DIBPattern brush class \ ---------------------------------------------------------------------- + \ *W <a name="gdiHatchBrush"></a> :class gdiDIBPatternBrush <super gdiBrush \ *G DIBPattern brush class *************** *** 205,214 **** \ ** explicit red, green, blue (RGB) values or palette indexes. The iUsage parameter \ ** must be one of the following values. ! \ *L DIB_PAL_COLORS | A color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the brush is to be selected. | ! \ ** DIB_RGB_COLORS | A color table is provided and contains literal RGB values. | call CreateDIBPatternBrushPt SetHandle: super Valid?: super ;M ;class module --- 242,253 ---- \ ** explicit red, green, blue (RGB) values or palette indexes. The iUsage parameter \ ** must be one of the following values. ! \ *L ! \ *| DIB_PAL_COLORS | A color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the brush is to be selected. | ! \ *| DIB_RGB_COLORS | A color table is provided and contains literal RGB values. | call CreateDIBPatternBrushPt SetHandle: super Valid?: super ;M ;class + \ *G End of gdiDIBPatternBrush class module Index: gdiDC.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiDC.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gdiDC.f 19 Nov 2005 11:13:09 -0000 1.5 --- gdiDC.f 26 Dec 2005 09:28:23 -0000 1.6 *************** *** 1,8 **** ! \ gdiDC.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain ! \ \ Missing: - WorldTransform support --- 1,9 ---- ! \ *D doc\classes\ ! \ *! gdiDC ! \ *T gdiDC -- Base device context class ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch ! \ Missing: - WorldTransform support *************** *** 12,16 **** internal - external --- 13,16 ---- *************** *** 19,25 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ Base device context class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiDC <super gdiObject gdiSIZE SIZE --- 19,25 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiDC <super gdiObject + \ *G Base device context class gdiSIZE SIZE *************** *** 1289,1292 **** --- 1289,1295 ---- ;class + \ *G End of gdiDC class module + + \ *Z Index: gdiPen.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiPen.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gdiPen.f 24 Dec 2005 11:58:00 -0000 1.3 --- gdiPen.f 26 Dec 2005 09:28:23 -0000 1.4 *************** *** 20,24 **** \ ---------------------------------------------------------------------- \ *W <a name="gdiPen"></a> - :class gdiPen <super gdiObject \ *G Class for cosmetic pen's --- 20,23 ---- Index: gdiWindowDc.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiWindowDc.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiWindowDc.f 5 Nov 2005 13:22:16 -0000 1.2 --- gdiWindowDc.f 26 Dec 2005 09:28:23 -0000 1.3 *************** *** 1,7 **** ! \ gdiWindowDc.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain cr .( Loading GDI class library - Window device context...) --- 1,8 ---- ! \ *D doc\classes\ ! \ *! gdiWindowDc ! \ *T gdiWindowDc -- Window device context class ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch cr .( Loading GDI class library - Window device context...) *************** *** 13,19 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ Window device context class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiWindowDC <super gdiDC int hWnd \ handle of the window in which this device context is used --- 14,20 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiWindowDC <super gdiDC + \ *G Window device context class int hWnd \ handle of the window in which this device context is used *************** *** 123,126 **** --- 124,130 ---- ;class + \ *G End of gdiWindowDC class module + + \ *Z Index: gdiBase.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBase.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gdiBase.f 24 Dec 2005 11:58:00 -0000 1.5 --- gdiBase.f 26 Dec 2005 09:28:23 -0000 1.6 *************** *** 1,30 **** - \ *D doc\classes\ \ *! gdiBase ! \ *T GdiObject -- Base class for GDI objects \ *Q Version 1.0 \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch ! \ *P GdiObject is the base class for all GDI objects. This class \ ** contains a single ivar, hObject, that is the (MS Windows) handle for the ! \ ** GDI object. \n ! \ ** There will be the following subclasses of GdiObject: ! \ *E gdiPen Class for cosmetic pen's ! \ ** gdiGeometricPen Class for geometric pen's ! \ ** gdiSolidBrush Solid brush class ! \ ** gdiHatchBrush Hatch brush class ! \ ** gdiPatternBrush Pattern brush class ! \ ** gdiDIBPatternBrush DIBPattern brush class ! \ ** GdiFont Class for windows fonts ! \ ** gdiBitmap Class for bitmaps ! \ ** gdiMetafile Class for enhanced metafiles ! \ ** gdiDC Base device context class ! \ ** gdiWindowDC Device context class for windows ! \ ** gdiMetafileDC Device context class for enhanced metafiles ! \ *P Since GdiObject is a generic class it should not be used to create ! \ ** any instances. \n \ *S Glossary --- 1,44 ---- \ *D doc\classes\ \ *! gdiBase ! \ *T gdiObject -- Base class for GDI objects \ *Q Version 1.0 \ ** This GDI class library was written and placed in the Public Domain \ ** in 2005 by Dirk Busch ! \ *P gdiObject is the base class for all GDI objects. This class \ ** contains a single ivar, hObject, that is the (MS Windows) handle for the ! \ ** GDI object. Since GdiObject is a generic class it should not be used to create ! \ ** any instances. There will be the following subclasses of gdiObject: ! \ *W <ul> ! \ *W <li><a href="gdiPen.htm#gdiPen">gdiPen</a> Class for cosmetic pen's</li> ! \ *W <li><a href="gdiPen.htm#gdiGeometricPen">gdiGeometricPen</a> Class for geometric pen's</li> ! \ *W <li><a href="gdiBrush.htm#gdiSolidBrush">gdiSolidBrush</a> Solid brush class</li> ! \ *W <li><a href="gdiBrush.htm#gdiHatchBrush">gdiHatchBrush</a> Hatch brush class</li> ! \ *W <li><a href="gdiBrush.htm#gdiPatternBrush">gdiPatternBrush</a> Pattern brush class</li> ! \ *W <li><a href="gdiBrush.htm#gdiDIBPatternBrush">gdiDIBPatternBrush</a> DIBPattern brush class</li> ! ! \ *W <li><a href="gdiFont.htm">gdiFont</a> Class for windows fonts</li> ! ! \ *W <li><a href="gdiBitmap.htm">gdiBitmap</a> Class for bitmaps</li> ! \ *W <li><a href="gdiMetafile.htm">gdiMetafile</a> Class for enhanced metafiles</li> ! ! \ *W <li><a href="gdiDC.htm">gdiDC</a> Base device context class</li> ! \ *W <li><a href="gdiWindowDC.htm">gdiWindowDC</a> Device context class for windows</li> ! \ *W <li><a href="gdiMetafileDC.htm">gdiMetafileDC</a> Device context class for enhanced metafiles</li> ! ! \ *W </ul> ! ! \ *P There are some other (old) classes in Win32Forth that are dealing with the GDI: ! \ *L ! \ *| ColorObject | Class for color objects | ! \ *| ExtColorObject | Class for extended color objects | ! \ *| HatchColorObject | Class for hatch color objects | ! \ *| Font | Class for fonts | ! \ *| WinDC | Device context class for windows | ! \ *| WinPrinter | Device context class for printing | ! ! \ *P All old classes are rewritten to use the GDI class library. \ *S Glossary *************** *** 51,56 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :class GdiObject <super object ! \ *G GdiObject is the base class for all GDI Object classes. int hObject \ handle of the GDI object --- 65,70 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :class gdiObject <super object ! \ *G gdiObject is the base class for all GDI Object classes. int hObject \ handle of the GDI object Index: gdiMetafileDc.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiMetafileDc.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gdiMetafileDc.f 1 Nov 2005 12:21:40 -0000 1.1 --- gdiMetafileDc.f 26 Dec 2005 09:28:23 -0000 1.2 *************** *** 1,7 **** ! \ gdiMetafileDC.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain cr .( Loading GDI class library - Metafile device context...) --- 1,8 ---- ! \ *D doc\classes\ ! \ *! gdiMetafileDC ! \ *T gdiMetafileDC -- Metafile device context class ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch cr .( Loading GDI class library - Metafile device context...) *************** *** 14,20 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ Metafile device context class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiMetafileDC <super gdiDC RECTANGLE MetaRect --- 15,21 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiMetafileDC <super gdiDC + \ *G Metafile device context class RECTANGLE MetaRect *************** *** 109,112 **** --- 110,116 ---- Metafile ;M ;class + \ *G End of gdiMetafileDC class module + + \ *Z Index: gdiFont.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiFont.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiFont.f 12 Nov 2005 09:52:17 -0000 1.2 --- gdiFont.f 26 Dec 2005 09:28:23 -0000 1.3 *************** *** 1,7 **** ! \ gdiFont.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain cr .( Loading GDI class library - Font...) --- 1,9 ---- ! \ *D doc\classes\ ! \ *! gdiFont ! \ *T gdiFont -- Class for GDI Fonts. ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch ! \ *S Glossary cr .( Loading GDI class library - Font...) *************** *** 13,19 **** \ ---------------------------------------------------------------------- - \ Font class \ ---------------------------------------------------------------------- ! :Class GdiFont <Super GdiObject Record: LOGFONT --- 15,22 ---- \ ---------------------------------------------------------------------- \ ---------------------------------------------------------------------- ! \ *W <a name="gdiFont"></a> ! :Class gdiFont <Super GdiObject ! \ *G GDI Font class Record: LOGFONT *************** *** 92,133 **** ;M ! :M SetHeight: ( n1 -- ) to lfHeight ;M ! :M SetWidth: ( n1 -- ) to lfWidth ;M ! :M SetEscapement: ( n1 -- ) to lfEscapement ;M ! :M SetOrientation: ( n1 -- ) to lfOrientation ;M \ 10th/degree increments ! :M SetWeight: ( n1 -- ) to lfWeight ;M ! :M SetItalic: ( f1 -- ) to lfItalic ;M \ TRUE/FALSE ! :M SetUnderline: ( f1 -- ) to lfUnderline ;M \ TRUE/FALSE ! :M SetStrikeOut: ( f1 -- ) to lfStrikeOut ;M \ TRUE/FALSE ! :M SetCharSet: ( n1 -- ) to lfCharSet ;M ! :M SetOutPrecision: ( n1 -- ) to lfOutPrecision ;M ! :M SetClipPrecision: ( n1 -- ) to lfClipPrecision ;M ! :M SetQuality: ( n1 -- ) to lfQuality ;M ! :M SetPitchAndFamily: ( n1 -- ) to lfPitchAndFamily ;M :M SetFaceName: ( a1 n1 -- ) lfFaceName LF_FACESIZE erase LF_FACESIZE 1- min lfFaceName swap move ;M ! :M GetHeight: ( -- n1 ) lfHeight ;M ! :M GetWidth: ( -- n1 ) lfWidth ;M ! :M GetEscapement: ( -- n1 ) lfEscapement ;M ! :M GetOrientation: ( -- n1 ) lfOrientation ;M \ 10th/degree increments ! :M GetWeight: ( -- n1 ) lfWeight ;M ! :M GetItalic: ( -- f1 ) lfItalic ;M \ TRUE/FALSE ! :M GetUnderline: ( -- f1 ) lfUnderline ;M \ TRUE/FALSE ! :M GetStrikeOut: ( -- f1 ) lfStrikeOut ;M \ TRUE/FALSE ! :M GetCharSet: ( -- n1 ) lfCharSet ;M ! :M GetOutPrecision: ( -- n1 ) lfOutPrecision ;M ! :M GetClipPrecision: ( -- n1 ) lfClipPrecision ;M ! :M GetQuality: ( -- n1 ) lfQuality ;M ! :M GetPitchAndFamily: ( -- n1 ) lfPitchAndFamily ;M ! :M GetLogfont: ( -- n1 ) LOGFONT ;M :M GetFaceName: ( -- a1 n1 ) lfFaceName LF_FACESIZE 2dup 0 scan nip - ;M :M Create: ( -- f ) LOGFONT Call CreateFontIndirect SetHandle: super Valid?: super ;M --- 95,349 ---- ;M ! :M SetHeight: ( n1 -- ) ! \ *G Set the height, in logical units, of the font's character cell or character. The character ! \ ** height value (also known as the em height) is the character cell height value minus the ! \ ** internal-leading value. The font mapper interprets the value specified in lfHeight in the ! \ ** following manner. ! \ *L ! \ *| > 0 | The font mapper transforms this value into device units and matches it against the cell height of the available fonts. | ! \ *| 0 | The font mapper uses a default height value when it searches for a match. | ! \ *| < 0 | The font mapper transforms this value into device units and matches its absolute value against the character height of the available fonts. | ! \ *P For all height comparisons, the font mapper looks for the largest font that does not exceed ! \ ** the requested size. This mapping occurs when the font is used for the first time. ! to lfHeight ;M ! ! :M SetWidth: ( n1 -- ) ! \ *G Specifies the average width, in logical units, of characters in the font. If lfWidth is zero, ! \ ** the aspect ratio of the device is matched against the digitization aspect ratio of the available ! \ ** fonts to find the closest match, determined by the absolute value of the difference. ! to lfWidth ;M ! ! :M SetEscapement: ( n1 -- ) ! \ *G Set the angle, in tenths of degrees, between the escapement vector and the x-axis of the device. ! \ ** The escapement vector is parallel to the base line of a row of text. \n ! \ ** Windows NT/ 2000: When the graphics mode is set to GM_ADVANCED, you can specify the escapement ! \ ** angle of the string independently of the orientation angle of the string's characters. \n ! \ ** When the graphics mode is set to GM_COMPATIBLE, lfEscapement specifies both the escapement and ! \ ** orientation. You should set lfEscapement and lfOrientation to the same value. \n ! \ ** Windows 95: The lfEscapement member specifies both the escapement and orientation. You should set ! \ ** lfEscapement and lfOrientation to the same value. ! to lfEscapement ;M ! ! :M SetOrientation: ( n1 -- ) ! \ *G Set the angle, in tenths of degrees, between each character's base line and the x-axis of the device. ! to lfOrientation ;M \ 10th/degree increments ! ! :M SetWeight: ( n1 -- ) ! \ *G Specifies the weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is bold. ! \ ** If this value is zero, a default weight is used. The following values are defined for convenience. ! \ *L ! \ *| FW_DONTCARE | 0 | ! \ *| FW_THIN | 100 | ! \ *| FW_EXTRALIGHT | 200 | ! \ *| FW_ULTRALIGHT | 200 | ! \ *| FW_LIGHT | 300 | ! \ *| FW_NORMAL | 400 | ! \ *| FW_REGULAR | 400 | ! \ *| FW_MEDIUM | 500 | ! \ *| FW_SEMIBOLD | 600 | ! \ *| FW_DEMIBOLD | 600 | ! \ *| FW_BOLD | 700 | ! \ *| FW_EXTRABOLD | 800 | ! \ *| FW_ULTRABOLD | 800 | ! \ *| FW_HEAVY | 900 | ! \ *| FW_BLACK | 900 | ! to lfWeight ;M ! ! :M SetItalic: ( f1 -- ) ! \ *G Specifies an italic font if set to TRUE. ! to lfItalic ;M ! ! :M SetUnderline: ( f1 -- ) ! \ *G Specifies an underlined font if set to TRUE. ! to lfUnderline ;M ! ! :M SetStrikeOut: ( f1 -- ) ! \ *G Specifies a strikeout font if set to TRUE. ! to lfStrikeOut ;M ! ! :M SetCharSet: ( n1 -- ) ! \ *G Specifies the character set. The following values are predefined. ! \ *L ! \ *| ANSI_CHARSET | ! \ *| BALTIC_CHARSET | ! \ *| CHINESEBIG5_CHARSET | ! \ *| DEFAULT_CHARSET | ! \ *| EASTEUROPE_CHARSET | ! \ *| GB2312_CHARSET | ! \ *| GREEK_CHARSET | ! \ *| HANGUL_CHARSET | ! \ *| MAC_CHARSET | ! \ *| OEM_CHARSET | ! \ *| RUSSIAN_CHARSET | ! \ *| SHIFTJIS_CHARSET | ! \ *| SYMBOL_CHARSET | ! \ *| TURKISH_CHARSET | ! \ *P Windows NT/ 2000 or Middle-Eastern Windows 3.1 or later: ! \ *L ! \ *| HEBREW_CHARSET | ! \ *| ARABIC_CHARSET | ! \ *P Windows NT/ 2000 or Thai Windows 3.1 or later: ! \ *L ! \ *| THAI_CHARSET | ! \ *P The OEM_CHARSET value specifies a character set that is operating-system dependent. ! \ ** Windows 95/98: You can use the DEFAULT_CHARSET value to allow the name and size of a font ! \ ** to fully describe the logical font. If the specified font name does not exist, a font from ! \ ** any character set can be substituted for the specified font, so you should use DEFAULT_CHARSET ! \ ** sparingly to avoid unexpected results. \n ! \ ** Windows NT/ 2000: DEFAULT_CHARSET is set to a value based on the current system locale. For ! \ ** example, when the system locale is English (United States), it is set as ANSI_CHARSET. \n ! \ ** Fonts with other character sets may exist in the operating system. If an application uses a ! \ ** font with an unknown character set, it should not attempt to translate or interpret strings ! \ ** that are rendered with that font. \n ! \ ** This parameter is important in the font mapping process. To ensure consistent results, specify ! \ ** a specific character set. If you specify a typeface name in the lfFaceName member, make sure ! \ ** that the lfCharSet value matches the character set of the typeface specified in lfFaceName. ! to lfCharSet ;M ! ! :M SetOutPrecision: ( n1 -- ) ! \ *G Specifies the output precision. The output precision defines how closely the output must match ! \ ** the requested font's height, width, character orientation, escapement, pitch, and font type. It can ! \ ** be one of the following values. ! \ *L ! \ *| OUT_CHARACTER_PRECIS Not used. ! \ *| OUT_DEFAULT_PRECIS | Specifies the default font mapper behavior. | ! \ *| OUT_DEVICE_PRECIS | Instructs the font mapper to choose a Device font when the system contains multiple fonts with the same name. | ! \ *| OUT_OUTLINE_PRECIS | Windows NT/ 2000: This value instructs the font mapper to choose from TrueType and other outline-based fonts. | ! \ *| OUT_RASTER_PRECIS | Instructs the font mapper to choose a raster font when the system contains multiple fonts with the same name. | ! \ *| OUT_TT_ONLY_PRECIS | Instructs the font mapper to choose from only TrueType fonts. If there are no TrueType fonts installed in the system, the font mapper returns to default behavior. | ! \ *| OUT_TT_PRECIS | Instructs the font mapper to choose a TrueType font when the system contains multiple fonts with the same name. | ! \ *P Applications can use the OUT_DEVICE_PRECIS, OUT_RASTER_PRECIS, and OUT_TT_PRECIS values to control ! \ ** how the font mapper chooses a font when the operating system contains more than one font with a ! \ ** specified name. For example, if an operating system contains a font named Symbol in raster and TrueType ! \ ** form, specifying OUT_TT_PRECIS forces the font mapper to choose the TrueType version. Specifying ! \ ** OUT_TT_ONLY_PRECIS forces the font mapper to choose a TrueType font, even if it must substitute a TrueType ! \ ** font of another name. ! to lfOutPrecision ;M ! ! :M SetClipPrecision: ( n1 -- ) ! \ *G Specifies the clipping precision. The clipping precision defines how to clip characters that are partially ! \ ** outside the clipping region. It can be one or more of the following values. ! \ *L ! \ *| CLIP_DEFAULT_PRECIS | Specifies default clipping behavior. | ! \ *| CLIP_CHARACTER_PRECIS | Not used. | ! \ *| CLIP_EMBEDDED | You must specify this flag to use an embedded read-only font. | ! \ *| CLIP_LH_ANGLES | When this value is used, the rotation for all fonts depends on whether the orientation of the coordinate system is left-handed or right-handed. ! \ *P For more information about the orientation of coordinate systems, see the description of the nOrientation parameter | ! to lfClipPrecision ;M ! ! :M SetQuality: ( n1 -- ) ! \ *G Specifies the output quality. The output quality defines how carefully the graphics device interface (GDI) must ! \ ** attempt to match the logical-font attributes to those of an actual physical font. It can be one of the following ! \ ** values. ! \ *L ! \ *| ANTIALIASED_QUALITY | Font is always antialiased if the font supports it and the size of the font is not too small or too large. | ! \ *| DEFAULT_QUALITY | Appearance of the font does not matter. | ! \ *| DRAFT_QUALITY | Appearance of the font is less important than when PROOF_QUALITY is used. For GDI raster fonts, scaling is enabled, which means that more font sizes are available, but the quality may be lower. < ! \ *| NONANTIALIASED_QUALITY | Font is never antialiased. | ! \ *| PROOF_QUALITY | Character quality of the font is more important than exact matching of the logical-font attributes. | ! \ *P If neither ANTIALIASED_QUALITY nor NONANTIALIASED_QUALITY is selected, the font is antialiased only if the user chooses ! \ ** smooth screen fonts in Control Panel. ! to lfQuality ;M ! ! :M SetPitchAndFamily: ( n1 -- ) ! \ *G Specifies the pitch and family of the font. The two low-order bits specify the pitch of the font and can ! \ ** be one of the following values. ! \ *L ! \ *| DEFAULT_PITCH | ! \ *| FIXED_PITCH | ! \ *| VARIABLE_PITCH | ! \ *P Bits 4 through 7 of the member specify the font family and can be one of the following values. ! \ *L ! \ *| FF_DECORATIVE ! \ *| FF_DONTCARE ! \ *| FF_MODERN ! \ *| FF_ROMAN ! \ *| FF_SCRIPT ! \ *| FF_SWISS ! \ *P The proper value can be obtained by using the Boolean OR operator to join one pitch constant with one ! \ ** family constant. ! \ *P Font families describe the look of a font in a general way. They are intended for specifying fonts ! \ ** when the exact typeface desired is not available. The values for font families are as follows. ! \ *L ! \ *| FF_DECORATIVE | Novelty fonts. Old English is an example. | ! \ *| FF_DONTCARE | Don't care or don't know. | ! \ *| FF_MODERN | Fonts with constant stroke width (monospace), with or without serifs. Monospace fonts are usually modern. Pica, Elite, and CourierNew® are examples. | ! \ *| FF_ROMAN | Fonts with variable stroke width (proportional) and with serifs. MS® Serif is an example. | ! \ *| FF_SCRIPT | Fonts designed to look like handwriting. Script and Cursive are examples. | ! \ *| FF_SWISS | Fonts with variable stroke width (proportional) and without serifs. MS® Sans Serif is an example. | ! to lfPitchAndFamily ;M :M SetFaceName: ( a1 n1 -- ) + \ *G Specifies the typeface name of the font. The length of this string must not exceed 32 characters, including + \ ** the null terminator. The EnumFontFamilies function can be used to enumerate the typeface names of all + \ ** currently available fonts. If lfFaceName is an empty string, GDI uses the first font that matches the other + \ ** specified attributes. lfFaceName LF_FACESIZE erase LF_FACESIZE 1- min lfFaceName swap move ;M ! :M GetHeight: ( -- n1 ) ! \ *G Fet the height, in logical units, of the font's character cell or character ! lfHeight ;M ! ! :M GetWidth: ( -- n1 ) ! \ *G Get the average width, in logical units, of characters in the font ! lfWidth ;M ! ! :M GetEscapement: ( -- n1 ) ! \ *G Get the angle, in tenths of degrees, between the escapement vector and the x-axis of ! \ ** the device. The escapement vector is parallel to the base line of a row of text. ! lfEscapement ;M ! ! :M GetOrientation: ( -- n1 ) ! \ *G Get the angle, in tenths of degrees, between each character's base line and the x-axis of the device. ! lfOrientation ;M ! ! :M GetWeight: ( -- n1 ) ! \ *G Get the weight of the font ! lfWeight ;M ! ! :M GetItalic: ( -- f1 ) ! \ *G TRUE if it's an italic font. ! lfItalic ;M ! ! :M GetUnderline: ( -- f1 ) ! \ *G TRUE if it's a underlined font. ! lfUnderline ;M ! ! :M GetStrikeOut: ( -- f1 ) ! \ *G TRUE if it's a strikeout font. ! lfStrikeOut ;M ! ! :M GetCharSet: ( -- n1 ) ! \ *G Get the character set. ! lfCharSet ;M ! ! :M GetOutPrecision: ( -- n1 ) ! \ *G Get the output precision. ! lfOutPrecision ;M ! ! :M GetClipPrecision: ( -- n1 ) ! \ *G Get the clipping precision ! lfClipPrecision ;M ! ! :M GetQuality: ( -- n1 ) ! \ *G Get the output quality. ! lfQuality ;M ! ! :M GetPitchAndFamily: ( -- n1 ) ! \ *G Get the pitch and family of the font. ! lfPitchAndFamily ;M :M GetFaceName: ( -- a1 n1 ) + \ *G Get the typeface name of the font. lfFaceName LF_FACESIZE 2dup 0 scan nip - ;M + :M GetLogfont: ( -- n1 ) + \ *G Get the address of the LOGFONT structure + LOGFONT ;M + :M Create: ( -- f ) + \ *G Create a new font. If the current font handle is valid, the font will be destroyed. LOGFONT Call CreateFontIndirect SetHandle: super Valid?: super ;M *************** *** 140,155 **** then ; - \ let the user choose a Screen font :M Choose: ( hWnd -- f ) NULL to hDC [ CF_SCREENFONTS CF_INITTOLOGFONTSTRUCT or ] literal to Flags Choose ;M - \ let the user choose a Printer font for the PrinterDC hDC :M ChoosePrinter: ( hWnd hDC -- f ) G... [truncated message content] |
From: Dirk B. <db...@us...> - 2005-12-26 09:28:32
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26322/src Modified Files: CONTROL.F Dialog.f GENERIC.F Log Message: More documentation added. Index: Dialog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Dialog.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Dialog.f 28 Apr 2005 16:01:25 -0000 1.2 --- Dialog.f 26 Dec 2005 09:28:23 -0000 1.3 *************** *** 1,4 **** --- 1,8 ---- \ $Id$ + \ *D doc\classes\ + \ *! Dialog + \ *T Dialog -- Class for dialog boxes. + cr .( Loading Dialog Box...) *************** *** 266,271 **** :M WM_CLOSE ( -- ) ! DestroyWindow: Self ;M ! :M ~: ( -- ) -dialoglist ;M --- 270,275 ---- :M WM_CLOSE ( -- ) ! DestroyWindow: Self ;M ! :M ~: ( -- ) -dialoglist ;M *************** *** 273,279 **** ;Class - |
From: Dirk B. <db...@us...> - 2005-12-26 09:28:32
|
Update of /cvsroot/win32forth/win32forth/demos/GdiDemo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26322/demos/GdiDemo Modified Files: Metafile.f Log Message: More documentation added. Index: Metafile.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/demos/GdiDemo/Metafile.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Metafile.f 5 Nov 2005 13:22:16 -0000 1.3 --- Metafile.f 26 Dec 2005 09:28:23 -0000 1.4 *************** *** 1,4 **** \ File: GdiDemo.f ! \ Purpose: Demo application fpr the GDI class library \ Written: Sonntag, Oktober 30 2005 by Dirk Busch \ Licence: Public Domain --- 1,4 ---- \ File: GdiDemo.f ! \ Purpose: Demo application for the GDI class library \ Written: Sonntag, Oktober 30 2005 by Dirk Busch \ Licence: Public Domain *************** *** 10,14 **** needs gdi/gdi.f \ the GDI class library ! 1 value create-tunkey? \ ---------------------------------------------------------------------- --- 10,14 ---- needs gdi/gdi.f \ the GDI class library ! 0 value create-tunkey? \ ---------------------------------------------------------------------- |
From: Dirk B. <db...@us...> - 2005-12-26 09:28:32
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26322/src/tools Modified Files: DexH-CreateDocs.f Log Message: More documentation added. Index: DexH-CreateDocs.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/DexH-CreateDocs.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DexH-CreateDocs.f 24 Dec 2005 11:55:38 -0000 1.1 --- DexH-CreateDocs.f 26 Dec 2005 09:28:23 -0000 1.2 *************** *** 12,21 **** : create-class-docs ( -- ) W32FClassDocs - s" src\generic.f" create-doc - s" src\window.f" create-doc ! s" src\gdi\gdiStruct.f" create-doc ! s" src\gdi\gdiBase.f" create-doc ! s" src\gdi\gdiPen.f" create-doc ; --- 12,33 ---- : create-class-docs ( -- ) W32FClassDocs ! \ Windows, dialogs and controls ! s" src\generic.f" create-doc ! s" src\window.f" create-doc ! s" src\dialog.f" create-doc ! s" src\control.f" create-doc ! ! \ GDI class library ! s" src\gdi\gdiStruct.f" create-doc ! s" src\gdi\gdiBase.f" create-doc ! s" src\gdi\gdiPen.f" create-doc ! s" src\gdi\gdiBrush.f" create-doc ! s" src\gdi\gdiBitmap.f" create-doc ! s" src\gdi\gdiFont.f" create-doc ! s" src\gdi\gdiMetafile.f" create-doc ! s" src\gdi\gdiDC.f" create-doc ! s" src\gdi\gdiWindowDC.f" create-doc ! s" src\gdi\gdiMetafileDC.f" create-doc ; |
From: Dirk B. <db...@us...> - 2005-12-24 11:59:37
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12879/doc/classes Modified Files: Generic.htm Window.htm gdiBase.htm gdiPen.htm Added Files: gdiStruct.htm Log Message: More documentation added. Index: Generic.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/Generic.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Generic.htm 17 Dec 2005 15:18:00 -0000 1.1 --- Generic.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 64,69 **** </p><pre><b><a name="0">:M Paint: ( -- ) </a></b></pre><p>force window repaint ! </p><pre><b><a name="0">:M SetAlign: ( flag id -- ) \ hold over from the past </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead </p><pre><b><a name="0">;CLASS </a></b></pre><p>End of generic-window class --- 64,611 ---- </p><pre><b><a name="0">:M Paint: ( -- ) </a></b></pre><p>force window repaint ! </p><pre><b><a name="0">:M Show: ( state -- ) \ use words like SW_SHOWNORMAL ! </a></b></pre><p>The ShowWindow function sets the specified window's show state. <br /> ! Possible values for state are: ! </p><table border="1"><tr><td>SW_FORCEMINIMIZE ! </td> ! <td>Windows 2000: Minimizes a window, even if the thread that owns the window is hung. This flag should only be used when minimizing windows from a different thread. ! </td> ! </tr> ! <tr><td>SW_HIDE ! </td> ! <td>Hides the window and activates another window. ! </td> ! </tr> ! <tr><td>SW_MAXIMIZE ! </td> ! <td>Maximizes the specified window. ! </td> ! </tr> ! <tr><td>SW_MINIMIZE ! </td> ! <td>Minimizes the specified window and activates the next top-level window in the Z order. ! </td> ! </tr> ! <tr><td>SW_RESTORE ! </td> ! <td>Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window. ! </td> ! </tr> ! <tr><td>SW_SHOW ! </td> ! <td>Activates the window and displays it in its current size and position. ! </td> ! </tr> ! <tr><td>SW_SHOWDEFAULT ! </td> ! <td>Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. ! </td> ! </tr> ! <tr><td>SW_SHOWMAXIMIZED ! </td> ! <td>Activates the window and displays it as a maximized window. ! </td> ! </tr> ! <tr><td>SW_SHOWMINIMIZED ! </td> ! <td>Activates the window and displays it as a minimized window. ! </td> ! </tr> ! <tr><td>SW_SHOWMINNOACTIVE ! </td> ! <td>Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except the window is not activated. ! </td> ! </tr> ! <tr><td>SW_SHOWNA ! </td> ! <td>Displays the window in its current size and position. This value is similar to SW_SHOW, except the window is not activated. ! </td> ! </tr> ! <tr><td>SW_SHOWNOACTIVATE ! </td> ! <td>Displays a window in its most recent size and position. This value is similar to SW_SHOWNORMAL, except the window is not actived. ! </td> ! </tr> ! <tr><td>SW_SHOWNORMAL ! </td> ! <td>Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GDIFlush: ( -- ) ! </a></b></pre><p>The GdiFlush function flushes the calling thread's current batch. ! </p><pre><b><a name="0">:M Update: ( -- ) ! </a></b></pre><p>The UpdateWindow function updates the client area of the window by sending ! a WM_PAINT message to the window if the window's update region is not empty. The ! function sends a WM_PAINT message directly to the window procedure of the window, ! bypassing the application queue. If the update region is empty, no message is sent. ! </p><pre><b><a name="0">:M Scroll: { x y -- } ! </a></b></pre><p>The ScrollWindow function scrolls the contents of the specified window's client area. ! </p><pre><b><a name="0">:M Move: { x y w h -- } ! </a></b></pre><p>The MoveWindow function changes the position and dimensions of window. ! For a top-level window, the position and dimensions are relative to the upper-left corner ! of the screen. For a child window, they are relative to the upper-left corner of the parent ! window's client area. ! </p><pre><b><a name="0">:M SetWindowPos: { x y -- } ! </a></b></pre><p>The SetWindowPos function changes the position of a child, pop-up, or top-level window. <br /> ! X Specifies the new position of the left side of the window, in client coordinates. <br /> ! Y Specifies the new position of the top of the window, in client coordinates. ! </p><pre><b><a name="0">:M SetMenu: ( MenuHandle -- ) ! </a></b></pre><p>The SetMenu function assigns a new menu to the window. ! If MenuHandle is NULL, the window's current menu is removed. ! </p><pre><b><a name="0">:M SetText: { addr len \ text$ -- } ! </a></b></pre><p>The SetWindowText function changes the text of the window's title bar (if it has one). ! If the window is a control, the text of the control is changed. ! </p><pre><b><a name="0">:M GetText: ( -- addr len ) ! </a></b></pre><p>The GetWindowText function copies the text of the window's title bar (if it has one) ! into a buffer. If the window is a control, the text of the control is copied. ! </p><pre><b><a name="0">:M SetTextAlign: ( flag -- ) ! </a></b></pre><p>Set the text-alignment for the window. <br /> ! The current position is updated after each text output call. ! The current position is used as the reference point. ! Possible values for flag are: ! </p><table border="1"><tr><td>0 ! </td> ! <td>The reference point will be on the left edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>1 ! </td> ! <td>The reference point will be on the right edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>2 ! </td> ! <td>The reference point will be aligned horizontally with the center of the bounding rectangle. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GetDC: ( -- hdc ) ! </a></b></pre><p>The GetDC function retrieves a handle to a display device context (DC) ! for the client area of the window. <br /> ! You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="0">:M GetWindowDC: ( -- hdc ) ! </a></b></pre><p>The GetWindowDC function retrieves the device context (DC) for the entire ! window, including title bar, menus, and scroll bars. A window device context ! permits painting anywhere in a window, because the origin of the device context ! is the upper-left corner of the window instead of the client area. <br /> ! GetWindowDC assigns default attributes to the window device context each time it ! retrieves the device context. Previous attributes are lost. <br /> ! You have to call ReleaseDC when the DC isn't needed any longer. ! </p><pre><b><a name="0">:M ReleaseDC: ( hdc -- ) ! </a></b></pre><p>The ReleaseDC function releases the device context (DC) of the window. <br /> ! Call only after GetDC or GetWindowDC. ! </p><pre><b><a name="0">:M BeginPaint: ( ps -- hdc ) ! </a></b></pre><p>The BeginPaint function prepares the window for painting and fills a ! PAINTSTRUCT (ps) structure with information about the painting. ! </p><pre><b><a name="0">:M EndPaint: ( ps -- ) ! </a></b></pre><p>The EndPaint function marks the end of painting in the window. This function is ! required for each call to the BeginPaint function, but only after painting is complete. ! </p><pre><b><a name="0">:M GetClientRect: ( rect -- ) ! </a></b></pre><p>The GetClientRect function retrieves the coordinates of the window's client area. The ! client coordinates specify the upper-left and lower-right corners of the client area. ! Because client coordinates are relative to the upper-left corner of a window's client ! area, the coordinates of the upper-left corner are (0,0). ! </p><pre><b><a name="0">:M GetWindowLong: ( index -- value ) ! </a></b></pre><p>The GetWindowLong function retrieves information about the window. The function ! also retrieves the 32-bit (long) value at the specified offset into the extra ! window memory. <br /> ! Index Specifies the zero-based offset to the value to be retrieved. Valid values are ! in the range zero through the number of bytes of extra window memory, minus four; for ! example, if you specified 12 or more bytes of extra memory, a value of 8 would be an ! index to the third 32-bit integer. To retrieve any other value, specify one of the ! following values. ! </p><table border="1"><tr><td>GWL_EXSTYLE ! </td> ! <td>Retrieves the extended window styles. For more information, see CreateWindowEx. ! </td> ! </tr> ! <tr><td>GWL_STYLE ! </td> ! <td>Retrieves the window styles. ! </td> ! </tr> ! <tr><td>GWL_WNDPROC ! </td> ! <td>Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure. ! </td> ! </tr> ! <tr><td>GWL_HINSTANCE ! </td> ! <td>Retrieves a handle to the application instance. ! </td> ! </tr> ! <tr><td>GWL_HWNDPARENT ! </td> ! <td>Retrieves a handle to the parent window, if any. ! </td> ! </tr> ! <tr><td>GWL_ID ! </td> ! <td>Retrieves the identifier of the window. ! </td> ! </tr> ! <tr><td>GWL_USERDATA ! </td> ! <td>Retrieves the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. This value is initially zero. ! </td> ! </tr> ! </table><pre><b><a name="0">:M SetWindowLong: ( value index -- oldval ) ! </a></b></pre><p>The SetWindowLong function changes an attribute of the window. The function also sets the ! 32-bit (long) value at the specified offset into the extra window memory. ! </p><table border="1"><tr><td>GWL_EXSTYLE ! </td> ! <td>Sets a new extended window style. For more information, see CreateWindowEx. ! </td> ! </tr> ! <tr><td>GWL_STYLE ! </td> ! <td>Sets a new window style. ! </td> ! </tr> ! <tr><td>GWL_WNDPROC ! </td> ! <td>Sets a new address for the window procedure. Windows NT/2000: You cannot change this attribute if the window does not belong to the same process as the calling thread. ! </td> ! </tr> ! <tr><td>GWL_HINSTANCE ! </td> ! <td>Sets a new application instance handle. ! </td> ! </tr> ! <tr><td>GWL_ID ! </td> ! <td>Sets a new identifier of the window. ! </td> ! </tr> ! <tr><td>GWL_USERDATA ! </td> ! <td>Sets the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. This value is initially zero. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GetStyle: ( -- style ) ! </a></b></pre><p>Retrieves the window styles. ! </p><pre><b><a name="0">:M SetStyle: ( style -- ) ! </a></b></pre><p>Sets a new window style. ! </p><pre><b><a name="0">:M +Style: ( style -- ) ! </a></b></pre><p>Add a window style. ! </p><pre><b><a name="0">:M -Style: ( style -- ) ! </a></b></pre><p>Remove a window style. ! </p><pre><b><a name="0">:M SetFocus: ( -- ) ! </a></b></pre><p>The SetFocus function sets the keyboard focus to the window. The window must be ! attached to the calling thread's message queue. ! </p><pre><b><a name="0">:M SetForegroundWindow: ( -- ) ! </a></b></pre><p>The SetForegroundWindow function puts the thread that created the specified window ! into the foreground and activates the window. Keyboard input is directed to the window, ! and various visual cues are changed for the user. The system assigns a slightly higher ! priority to the thread that created the foreground window than it does to other threads. <br /> ! The foreground window is the window at the top of the Z order. It is the window that the ! user is working with. In a preemptive multitasking environment, you should generally let the ! user control which window is the foreground window. }n ! Windows 98, Windows 2000: The system restricts which processes can set the foreground window. ! A process can set the foreground window only if one of the following conditions is true: <br /> ! - The process is the foreground process. <br /> ! - The process was started by the foreground process. <br /> ! - The process received the last input event. <br /> ! - There is no foreground process. <br /> ! - The foreground process is being debugged. <br /> ! - The foreground is not locked (see LockSetForegroundWindow). <br /> ! - The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). <br /> ! - Windows 2000: No menus are active. <br /> ! With this change, an application cannot force a window to the foreground while the user is ! working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) ! and call the FlashWindowEx function to notify the user. For more information, see Foreground and ! Background Windows. <br /> ! A process that can set the foreground window can enable another process to set the foreground window by ! calling the AllowSetForegroundWindow function. The process specified by dwProcessId loses the ability to ! set the foreground window the next time the user generates input, unless the input is directed at that ! process, or the next time a process calls AllowSetForegroundWindow, unless that process is specified. <br /> ! The foreground process can disable calls to SetForegroundWindow by calling the LockSetForegroundWindow function. ! </p><pre><b><a name="0">:M SetActiveWindow: ( -- ) ! </a></b></pre><p>The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue. <br /> ! The SetActiveWindow function activates a window, but not if the application is in the background. The window will be ! brought into the foreground (top of Z order) if its application is in the foreground when the system activates the window. <br /> ! If the window identified by the hWnd parameter was created by the calling thread, the active window status of the calling ! thread is set to hWnd. Otherwise, the active window status of the calling thread is set to NULL. <br /> ! By using the AttachThreadInput function, a thread can attach its input processing to another thread. ! This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue. ! </p><pre><b><a name="0">:M MessageBox: ( szText szTitle style -- result ) ! </a></b></pre><p>The MessageBox function creates, displays, and operates a message box. The message box contains an ! application-defined message and title, plus any combination of predefined icons and push buttons. ! </p><table border="1"><tr><td>szText ! </td> ! <td>Pointer to a null-terminated string that contains the message to be displayed. \ ! </td> ! </tr> ! <tr><td>szTitle ! </td> ! <td>Pointer to a null-terminated string that contains the dialog box title. If this parameter is NULL, the default title Error is used. \ ! </td> ! </tr> ! <tr><td>Type ! </td> ! <td>Specifies the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags ! </td> ! </tr> ! </table><p>To indicate the buttons displayed in the message box, specify one of the following values. ! </p><table border="1"><tr><td>MB_ABORTRETRYIGNORE ! </td> ! <td>The message box contains three push buttons: Abort, Retry, and Ignore. ! </td> ! </tr> ! <tr><td>MB_CANCELTRYCONTINUE ! </td> ! <td>Windows 2000: The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE. ! </td> ! </tr> ! <tr><td>MB_HELP ! </td> ! <td>Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner. ! </td> ! </tr> ! <tr><td>MB_OK ! </td> ! <td>The message box contains one push button: OK. This is the default. ! </td> ! </tr> ! <tr><td>MB_OKCANCEL ! </td> ! <td>The message box contains two push buttons: OK and Cancel. ! </td> ! </tr> ! <tr><td>MB_RETRYCANCEL ! </td> ! <td>The message box contains two push buttons: Retry and Cancel. ! </td> ! </tr> ! <tr><td>MB_YESNO ! </td> ! <td>The message box contains two push buttons: Yes and No. ! </td> ! </tr> ! <tr><td>MB_YESNOCANCEL ! </td> ! <td>The message box contains three push buttons: Yes, No, and Cancel. ! </td> ! </tr> ! </table><p>To display an icon in the message box, specify one of the following values. ! </p><table border="1"><tr><td>MB_ICONEXCLAMATION, MB_ICONWARNING ! </td> ! <td>An exclamation-point icon appears in the message box. ! </td> ! </tr> ! <tr><td>MB_ICONINFORMATION, MB_ICONASTERISK ! </td> ! <td>An icon consisting of a lowercase letter i in a circle appears in the message box. ! </td> ! </tr> ! <tr><td>MB_ICONQUESTION ! </td> ! <td>A question-mark icon appears in the message box. ! </td> ! </tr> ! <tr><td>MB_ICONSTOP, MB_ICONERROR, MB_ICONHAND ! </td> ! <td>A stop-sign icon appears in the message box. ! </td> ! </tr> ! </table><p>To indicate the default button, specify one of the following values. ! </p><table border="1"><tr><td>MB_DEFBUTTON1 ! </td> ! <td>The first button is the default button. MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified ! </td> ! </tr> ! <tr><td>MB_DEFBUTTON2 ! </td> ! <td>The second button is the default button. ! </td> ! </tr> ! <tr><td>MB_DEFBUTTON3 ! </td> ! <td>The third button is the default button. ! </td> ! </tr> ! <tr><td>MB_DEFBUTTON4 ! </td> ! <td>The fourth button is the default button. ! </td> ! </tr> ! </table><p>To specify other options, use one or more of the following values. ! </p><table border="1"><tr><td>MB_RIGHT ! </td> ! <td>The text is right-justified. ! </td> ! </tr> ! <tr><td>MB_SETFOREGROUND ! </td> ! <td>The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. ! </td> ! </tr> ! <tr><td>MB_TOPMOST ! </td> ! <td>The message box is created with the WS_EX_TOPMOST window style. ! </td> ! </tr> ! </table><p>If the function succeeds, the return value is one of the following menu-item values. ! </p><table border="1"><tr><td>IDABORT ! </td> ! <td>Abort button was selected. ! </td> ! </tr> ! <tr><td>IDCANCEL ! </td> ! <td>Cancel button was selected. ! </td> ! </tr> ! <tr><td>IDCONTINUE ! </td> ! <td>Continue button was selected. ! </td> ! </tr> ! <tr><td>IDIGNORE ! </td> ! <td>Ignore button was selected. ! </td> ! </tr> ! <tr><td>IDNO No ! </td> ! <td>button was selected. ! </td> ! </tr> ! <tr><td>IDOK OK ! </td> ! <td>button was selected. ! </td> ! </tr> ! <tr><td>IDRETRY ! </td> ! <td>Retry button was selected. ! </td> ! </tr> ! <tr><td>IDTRYAGAIN ! </td> ! <td>Try Again button was selected. ! </td> ! </tr> ! <tr><td>IDYES ! </td> ! <td>Yes button was selected. ! </td> ! </tr> ! </table><pre><b><a name="0">:M InvalidateRect: ( bgflag rectangle -- ) ! </a></b></pre><p>The InvalidateRect function adds a rectangle to the window's update region. ! The update region represents the portion of the window's client area that must be redrawn. ! </p><table border="1"><tr><td>lpRect ! </td> ! <td>Pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region. ! </td> ! </tr> ! <tr><td>bErase ! </td> ! <td>Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. If this parameter is FALSE, the background remains unchanged. ! </td> ! </tr> ! </table><pre><b><a name="0">:M GetDlgItem: ( id -- handle ) ! </a></b></pre><p>The GetDlgItem function retrieves a handle of the control (id) in the window. ! </p><pre><b><a name="0">:M GetDlgItemText: ( addr len id -- len ) ! </a></b></pre><p>The GetDlgItemText function retrieves the title or text associated with a control in the window. ! </p><pre><b><a name="0">:M SetDlgItemText: ( addr len id -- ) ! </a></b></pre><p>The SetDlgItemText function sets the title or text of a control in then window. ! </p><pre><b><a name="0">:M SetDlgItemFocus: ( id -- ) ! </a></b></pre><p>Set the focus to the control (id) in the window ! </p><pre><b><a name="0">:M SelectDlgItemAll: ( id -- ) ! </a></b></pre><p>Selects all characters in the edit control (id). You can use this forn an edit control ! or a rich edit control. ! </p><pre><b><a name="0">:M IsDlgButtonChecked: ( id -- f1 ) ! </a></b></pre><p>The IsDlgButtonChecked function determines whether a button control has a check mark next to ! it or whether a three-state button control is grayed, checked, or neither. ! </p><pre><b><a name="0">:M CheckDlgButton: ( uCheck id -- ) ! </a></b></pre><p>The CheckDlgButton function changes the check state of a button control. ! Possible values for uCheck are: ! </p><table border="1"><tr><td>BST_CHECKED ! </td> ! <td>Sets the button state to checked. ! </td> ! </tr> ! <tr><td>BST_INDETERMINATE ! </td> ! <td>Sets the button state to grayed, indicating an indeterminate state. Use this value only if the button has the BS_3STATE or BS_AUTO3STATE style. ! </td> ! </tr> ! <tr><td>BST_UNCHECKED ! </td> ! <td>Sets the button state to cleared ! </td> ! </tr> ! </table><pre><b><a name="0">:M SetDlgItemAlign: ( flag id -- ) ! </a></b></pre><p>Set the text-alignment for a control (id) in the window. <br /> ! The current position is updated after each text output call. ! The current position is used as the reference point. ! Possible values for flag are: ! </p><table border="1"><tr><td>0 ! </td> ! <td>The reference point will be on the left edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>1 ! </td> ! <td>The reference point will be on the right edge of the bounding rectangle. ! </td> ! </tr> ! <tr><td>2 ! </td> ! <td>The reference point will be aligned horizontally with the center of the bounding rectangle. ! </td> ! </tr> ! </table><pre><b><a name="0">:M SetAlign: ( flag id -- ) \ DEPRECATED </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead + </p><pre><b><a name="0">:M EnableDlgItem: ( flag id -- ) + </a></b></pre><p>Enable or disable a control (id) in the window. + Possible values for flag are: + </p><table border="1"><tr><td>0 + </td> + <td>disable + </td> + </tr> + <tr><td>1 + </td> + <td>enable + </td> + </tr> + </table><pre><b><a name="0">:M ShowDlgItem: ( flag id -- ) + </a></b></pre><p>Hide or show a control (id) in the window. + Possible values for flag are: + </p><table border="1"><tr><td>0 + </td> + <td>hide + </td> + </tr> + <tr><td>1 + </td> + <td>show + </td> + </tr> + </table><pre><b><a name="0">:M CheckRadioButton: ( check_id first_id last_id -- ) + </a></b></pre><p>The CheckRadioButton function adds a check mark to (checks) a specified radio button + in a group and removes a check mark from (clears) all other radio buttons in the group. + </p><table border="1"><tr><td>check_id + </td> + <td>Specifies the identifier of the radio button to select. + </td> + </tr> + <tr><td>first_id + </td> + <td>Specifies the identifier of the first radio button in the group. + </td> + </tr> + <tr><td>last_id + </td> + <td>Specifies the identifier of the last radio button in the group. + </td> + </tr> + </table><pre><b><a name="0">:M SendDlgItemMessage: ( lParam wParam message id -- long ) + </a></b></pre><p>Send a message to the control (id) in the window. + </p><pre><b><a name="0">:M SetDlgItemFont: ( FontObject id -- ) + </a></b></pre><p>Specify the font that the control (id) is to use when drawing text. <br /> + FontObject must be the HANDLE of a font. If this parameter is NULL, the control uses the + default system font to draw text. </p><pre><b><a name="0">;CLASS </a></b></pre><p>End of generic-window class --- NEW FILE: gdiStruct.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiStruct.htm,v 1.1 2005/12/24 11:59:25 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>gdiStruct -- Wrapper classes for GDI structs. </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><h2>Glossary </h2><a name="gdiPOINT"></a> <pre><b><a name="0">:class gdiPOINT <super object </a></b></pre><p>Wrapper class for a POINT struct. </p><pre><b><a name="0">:M GetX: ( -- x ) </a></b></pre><p>Get the x value of the point. </p><pre><b><a name="0">:M GetY: ( -- y ) </a></b></pre><p>Get the y value of the point. </p><pre><b><a name="0">:M SetX: ( x -- ) </a></b></pre><p>Set the x value of the point. </p><pre><b><a name="0">:M SetY: ( y -- ) </a></b></pre><p>Get the y value of the point. </p><pre><b><a name="0">:M Addr: ( -- addr ) </a></b></pre><p>Get the address of the point struct. </p><pre><b><a name="0">:M Size: ( -- size ) </a></b></pre><p>Get the site of the point struct </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiPOINT class </p><a name="gdiCOLORREF"></a> <pre><b><a name="0">:class gdiCOLORREF <super object </a></b></pre><p>Wrapper class for a COLORREF struct. <br /> A COLORREF value is used to specify an RGB color. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form: 0x00bbggrr <br /> The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. </p><pre><b><a name="0">:M SetRValue: ( r -- ) </a></b></pre><p>Set the red value of the color </p><pre><b><a name="0">:M SetGValue: ( g -- ) </a></b></pre><p>Set the green value of the color </p><pre><b><a name="0">:M SetBValue: ( b -- ) </a></b></pre><p>Set the blue value of the color </p><pre><b><a name="0">:M GetRValue: ( -- r ) </a></b></pre><p>Get the red value of the color </p><pre><b><a name="0">:M GetGValue: ( -- g ) </a></b></pre><p>Get the green value of the color </p><pre><b><a name="0">:M GetBValue: ( -- b ) </a></b></pre><p>Get the blue value of the color </p><pre><b><a name="0">:M SetColor: ( colorref -- ) </a></b></pre><p>Set the color </p><pre><b><a name="0">:M SetSysColor: ( n -- ) </a></b></pre><p>Set a system color. Possible values are: </p><table border="1"><tr><td>COLOR_3DDKSHADOW </td> <td>Dark shadow for three-dimensional display elements. </td> </tr> <tr><td>COLOR_3DFACE, COLOR_BTNFACE </td> <td>Face color for three-dimensional display elements and for dialog box backgrounds. </td> </tr> <tr><td>COLOR_3DHILIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_3DHIGHLIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_BTNHILIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_BTNHIGHLIGHT </td> <td>Highlight color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_3DLIGHT </td> <td>Light color for three-dimensional display elements (for edges facing the light source.) </td> </tr> <tr><td>COLOR_3DSHADOW, COLOR_BTNSHADOW </td> <td>Shadow color for three-dimensional display elements (for edges facing away from the light source). </td> </tr> <tr><td>COLOR_ACTIVEBORDER </td> <td>Active window border. </td> </tr> <tr><td>COLOR_ACTIVECAPTION </td> <td>Active window title bar. Windows 98, Windows 2000: Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled. </td> </tr> <tr><td>COLOR_APPWORKSPACE </td> <td>Background color of multiple document interface (MDI) applications. </td> </tr> <tr><td>COLOR_BACKGROUND, COLOR_DESKTOP </td> <td>Desktop. </td> </tr> <tr><td>COLOR_BTNTEXT </td> <td>Text on push buttons. </td> </tr> <tr><td>COLOR_CAPTIONTEXT </td> <td>Text in caption, size box, and scroll bar arrow box. </td> </tr> <tr><td>COLOR_GRADIENTACTIVECAPTION </td> <td>Windows 98, Windows 2000: Right side color in the color gradient of an active window's title bar </td> </tr> <tr><td>COLOR_ACTIVECAPTION </td> <td>Windows 98, Windows 2000: specifies the left side color </td> </tr> <tr><td>COLOR_GRADIENTINACTIVECAPTION </td> <td>Windows 98, Windows 2000: Right side color in the color gradient of an inactive window's title bar </td> </tr> <tr><td>COLOR_INACTIVECAPTION </td> <td>Windows 98, Windows 2000: specifies the left side color. </td> </tr> <tr><td>COLOR_GRAYTEXT </td> <td>Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color. </td> </tr> <tr><td>COLOR_HIGHLIGHT </td> <td>Item(s) selected in a control. </td> </tr> <tr><td>COLOR_HIGHLIGHTTEXT </td> <td>Text of item(s) selected in a control. </td> </tr> <tr><td>COLOR_HOTLIGHT </td> <td>Windows 98, Windows 2000: Color for a hot-tracked item. Single clicking a hot-tracked item executes the item. </td> </tr> <tr><td>COLOR_INACTIVEBORDER </td> <td>Inactive window border. </td> </tr> <tr><td>COLOR_INACTIVECAPTION </td> <td>Inactive window caption. Windows 98, Windows 2000: Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled. </td> </tr> <tr><td>COLOR_INACTIVECAPTIONTEXT </td> <td>Color of text in an inactive caption. </td> </tr> <tr><td>COLOR_INFOBK </td> <td>Background color for tooltip controls. </td> </tr> <tr><td>COLOR_INFOTEXT </td> <td>Text color for tooltip controls. </td> </tr> <tr><td>COLOR_MENU </td> <td>Menu background. </td> </tr> <tr><td>COLOR_MENUTEXT </td> <td>Text in menus. </td> </tr> <tr><td>COLOR_SCROLLBAR </td> <td>Scroll bar gray area. </td> </tr> <tr><td>COLOR_WINDOW </td> <td>Window background. </td> </tr> <tr><td>COLOR_WINDOWFRAME </td> <td>Window frame. </td> </tr> <tr><td>COLOR_WINDOWTEXT </td> <td>Text in windows. </td> </tr> </table><pre><b><a name="0">:M GetColor: ( -- colorref ) </a></b></pre><p>Get the color </p><pre><b><a name="0">:M SetRGB: ( r g b -- ) </a></b></pre><p>Set the red, green and blue values of the color </p><pre><b><a name="0">:M Addr: ( -- addr ) </a></b></pre><p>Get the address of the COLORREF struct </p><pre><b><a name="0">:M Size: ( -- size ) </a></b></pre><p>Get the size of the COLORREF struct </p><pre><b><a name="0">:M Choose: ( hWnd -- f ) </a></b></pre><p>Open the windows dialog for choosing a color. </p><pre><b><a name="0">:M CustomColors: ( -- addr len ) </a></b></pre><p>Get the address and length (in cells) of the CustomColors array used by Choose: </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiCOLORREF class </p><a name="gdiRGBQUAD"></a> <pre><b><a name="0">:class gdiRGBQUAD <super gdiCOLORREF </a></b></pre><p>Wrapper class for a RGBQUAD struct <br /> The RGBQUAD structure describes a color consisting of relative intensities of red, green, and blue. <br /> The bmiColors member of the BITMAPINFO structure consists of an array of RGBQUAD structures. <br /> Note: This class doesn't have any private methods. For a description of the methods see the gdiCOLORREF class. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiRGBQUAD class </p><a name="gdiSIZE"></a> <pre><b><a name="0">:class gdiSIZE <super object </a></b></pre><p>Wrapper class for a SIZE struct </p><pre><b><a name="0">:M GetX: ( -- x ) </a></b></pre><p>Get the x value </p><pre><b><a name="0">:M GetY: ( -- y ) </a></b></pre><p>Get the y value </p><pre><b><a name="0">:M SetX: ( x -- ) </a></b></pre><p>Set the x value </p><pre><b><a name="0">:M SetY: ( y -- ) </a></b></pre><p>Set the y value </p><pre><b><a name="0">:M Addr: ( -- addr ) </a></b></pre><p>Get the address of the SIZE struct </p><pre><b><a name="0">:M Size: ( -- size ) </a></b></pre><p>Get the size of the SIZE struct </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiSIZE class </p><a name="gdiTEXTMETRIC"></a> <pre><b><a name="0">:class gdiTEXTMETRIC <super object </a></b></pre><p>Wrapper class for a TEXTMETRIC struct </p><pre><b><a name="0">:M Addr: ( -- addr ) &TEXTMETRIC ;M </a></b></pre><p>Get the address of the TEXTMETRIC struct. </p><pre><b><a name="0">:M Size: ( -- size ) sizeof(TEXTMETRIC) ;M </a></b></pre><p>Get the size of the TEXTMETRIC struct. </p><pre><b><a name="0">;class </a></b></pre><p>End of gdiTEXTMETRIC class </p><hr><p>Document $Id: gdiStruct.htm,v 1.1 2005/12/24 11:59:25 dbu_de Exp $</p> </body></html> Index: gdiBase.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/gdiBase.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gdiBase.htm 17 Dec 2005 15:18:00 -0000 1.1 --- gdiBase.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 47,51 **** </a></b></pre><p>Get the type of the object. <br /> Possible return values are: ! </p><table border="1"><tr><td>OBJ_BRUSH </td> <td>Brush --- 47,56 ---- </a></b></pre><p>Get the type of the object. <br /> Possible return values are: ! </p><table border="1"><tr><td>OBJ_BITMAP ! </td> ! <td>Bitmap ! </td> ! </tr> ! <tr><td>OBJ_BRUSH </td> <td>Brush Index: gdiPen.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/classes/gdiPen.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gdiPen.htm 17 Dec 2005 15:18:00 -0000 1.1 --- gdiPen.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 28,32 **** </p><pre><b><a name="0">:M SetStyle: ( style -- ) </a></b></pre><p>Set Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. --- 28,37 ---- </p><pre><b><a name="0">:M SetStyle: ( style -- ) </a></b></pre><p>Set Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_SOLID ! </td> ! <td>The pen is solid. ! </td> ! </tr> ! <tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. *************** *** 55,59 **** <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> --- 60,64 ---- <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. Only for geometric pens. </td> </tr> *************** *** 77,81 **** </p><pre><b><a name="0">:M GetStyle: ( -- style ) </a></b></pre><p>Get Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. --- 82,91 ---- </p><pre><b><a name="0">:M GetStyle: ( -- style ) </a></b></pre><p>Get Syle of the pen. Possible values are: ! </p><table border="1"><tr><td>PS_SOLID ! </td> ! <td>The pen is solid. ! </td> ! </tr> ! <tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. *************** *** 104,108 **** <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> --- 114,118 ---- <tr><td>PS_INSIDEFRAME </td> ! <td>The pen is solid. When this pen is used the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> |
From: Dirk B. <db...@us...> - 2005-12-24 11:59:35
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12879/doc Modified Files: p-classes.htm Log Message: More documentation added. Index: p-classes.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-classes.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-classes.htm 17 Dec 2005 15:18:00 -0000 1.1 --- p-classes.htm 24 Dec 2005 11:59:25 -0000 1.2 *************** *** 27,38 **** <h2>Windows, Dialogs and Controls</h2> ! <a href="./classes/Generic.htm">Generic-Window</a> Base class for all window objects.<br> ! <a href="./classes/Window.htm">Window</a> Class for window objects. <h2>GDI</h2> ! <a href="./classes/gdiBase.htm">gdiBase</a> Base class for GDI objects.<br> ! <a href="./classes/gdiPen.htm#gdiPen">gdiPen</a> Class for cosmetic pen's.<br> ! <a href="./classes/gdiPen.htm#gdiGeometricPen">gdiGeometricPen</a> Class for geometric pen's. ! <hr> --- 27,46 ---- <h2>Windows, Dialogs and Controls</h2> ! <ul> ! <li><a href="./classes/Generic.htm">Generic-Window</a> Base class for all window objects.</li> ! <li><a href="./classes/Window.htm">Window</a> Class for window objects.</li> ! </ul> <h2>GDI</h2> ! <ul> ! <li><a href="./classes/gdiStruct.htm#gdiPOINT">gdiPOINT</a> Wrapper class for a POINT struct.</li> ! <li><a href="./classes/gdiStruct.htm#gdiCOLORREF">gdiCOLORREF</a> Wrapper class for a COLORREF struct.</li> ! <li><a href="./classes/gdiStruct.htm#gdiRGBQUAD">gdiRGBQUAD</a> Wrapper class for a RGBQUAD struct.</li> ! <li><a href="./classes/gdiStruct.htm#gdiSIZE">gdiSIZE</a> Wrapper class for a SIZE struct.</li> ! <li><a href="./classes/gdiStruct.htm#gdiTEXTMETRIC">gdiTEXTMETRIC</a> Wrapper class for a TEXTMETRIC struct.</li> ! <li><a href="./classes/gdiBase.htm">gdiBase</a> Base class for GDI objects.</li> ! <li><a href="./classes/gdiPen.htm#gdiPen">gdiPen</a> Class for cosmetic pen's.</li> ! <li><a href="./classes/gdiPen.htm#gdiGeometricPen">gdiGeometricPen</a> Class for geometric pen's.</li> ! </ul> <hr> |
From: Dirk B. <db...@us...> - 2005-12-24 11:58:13
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12709/src/console Modified Files: Console2.f Log Message: DexH style documention added. Index: Console2.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/Console2.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Console2.f 30 Aug 2005 14:08:15 -0000 1.3 --- Console2.f 24 Dec 2005 11:57:59 -0000 1.4 *************** *** 300,311 **** \ r@ call SelectObject drop \ selects the object \ r> conHndl call ReleaseDC drop ! ; DEPRECATED \ : _>bold ( -- ) \ OEM_FIXED_FONT set-font ; ! \ \ : _>norm ( -- ) \ ANSI_FIXED_FONT set-font ; ! \ \ ' _>bold is >bold \ ' _>norm is >norm --- 300,311 ---- \ r@ call SelectObject drop \ selects the object \ r> conHndl call ReleaseDC drop ! ; DEPRECATED \ : _>bold ( -- ) \ OEM_FIXED_FONT set-font ; ! \ \ : _>norm ( -- ) \ ANSI_FIXED_FONT set-font ; ! \ \ ' _>bold is >bold \ ' _>norm is >norm *************** *** 355,362 **** then 3drop ; ! : (SetForegroundWindow) ( hwnd -- ) ['] SetForegroundWindow (SetWindow) ; : (SetActiveWindow) ( hWnd -- ) ['] SetActiveWindow (SetWindow) ; --- 355,395 ---- then 3drop ; ! : (SetForegroundWindow) ( hwnd -- ) \ w32f ! \ *G The SetForegroundWindow function puts the thread that created the specified window ! \ ** into the foreground and activates the window. Keyboard input is directed to the window, ! \ ** and various visual cues are changed for the user. The system assigns a slightly higher ! \ ** priority to the thread that created the foreground window than it does to other threads. \n ! \ ** The foreground window is the window at the top of the Z order. It is the window that the ! \ ** user is working with. In a preemptive multitasking environment, you should generally let the ! \ ** user control which window is the foreground window. }n ! \ ** Windows 98, Windows 2000: The system restricts which processes can set the foreground window. ! \ ** A process can set the foreground window only if one of the following conditions is true: \n ! \ ** The process is the foreground process. \n ! \ ** The process was started by the foreground process. \n ! \ ** The process received the last input event. \n ! \ ** There is no foreground process. \n ! \ ** The foreground process is being debugged. \n ! \ ** The foreground is not locked (see LockSetForegroundWindow). \n ! \ ** The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). \n ! \ ** Windows 2000: No menus are active. \n ! \ ** With this change, an application cannot force a window to the foreground while the user is ! \ ** working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) ! \ ** and call the FlashWindowEx function to notify the user. For more information, see Foreground and ! \ ** Background Windows. \n ! \ ** A process that can set the foreground window can enable another process to set the foreground window by ! \ ** calling the AllowSetForegroundWindow function. The process specified by dwProcessId loses the ability to ! \ ** set the foreground window the next time the user generates input, unless the input is directed at that ! \ ** process, or the next time a process calls AllowSetForegroundWindow, unless that process is specified. \n ! \ ** The foreground process can disable calls to SetForegroundWindow by calling the LockSetForegroundWindow function. ['] SetForegroundWindow (SetWindow) ; : (SetActiveWindow) ( hWnd -- ) + \ *G The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue. \n + \ ** The SetActiveWindow function activates a window, but not if the application is in the background. The window will be + \ ** brought into the foreground (top of Z order) if its application is in the foreground when the system activates the window. \n + \ ** If the window identified by the hWnd parameter was created by the calling thread, the active window status of the calling + \ ** thread is set to hWnd. Otherwise, the active window status of the calling thread is set to NULL. \n + \ ** By using the AttachThreadInput function, a thread can attach its input processing to another thread. + \ ** This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue. ['] SetActiveWindow (SetWindow) ; |
From: Dirk B. <db...@us...> - 2005-12-24 11:58:13
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12709/src Modified Files: GENERIC.F Window.f Log Message: DexH style documention added. Index: Window.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Window.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Window.f 17 Dec 2005 15:11:59 -0000 1.7 --- Window.f 24 Dec 2005 11:57:59 -0000 1.8 *************** *** 1,4 **** --- 1,5 ---- \ $Id$ + \ *D doc\classes\ \ *! Window \ *T Window -- Class for window objects. Index: GENERIC.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/GENERIC.F,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GENERIC.F 17 Dec 2005 15:11:59 -0000 1.4 --- GENERIC.F 24 Dec 2005 11:57:59 -0000 1.5 *************** *** 1,4 **** --- 1,5 ---- \ $Id$ + \ *D doc\classes\ \ *! Generic \ *T Generic-Window -- Base class for all window objects. *************** *** 41,47 **** --- 42,50 ---- in-application + \ Linked list, to hold all window objects VARIABLE windows-link windows-link OFF + \ Linked list, to hold all dialog objects VARIABLE dialog-link dialog-link OFF *************** *** 92,99 **** self app-origin sys-here between ; ! : link-window ! static-window? \ only link in static windows ! if windows-link link, \ link into list ! self , then ; --- 95,102 ---- self app-origin sys-here between ; ! : link-window ( -- ) ! static-window? \ only link in static windows ! if windows-link link, \ link into list ! self , then ; *************** *** 103,108 **** forget-chain chain-add trim-windows ! : trim-dialogs ( nfa -- nfa ) ! dup Dialog-link full-trim ; forget-chain chain-add trim-dialogs --- 106,111 ---- forget-chain chain-add trim-windows ! : trim-dialogs ( nfa -- nfa ) ! dup Dialog-link full-trim ; forget-chain chain-add trim-dialogs *************** *** 151,183 **** :M Show: ( state -- ) \ use words like SW_SHOWNORMAL hWnd if hWnd Call ShowWindow ! then drop ! ;M :M GDIFlush: ( -- ) ! Call GdiFlush ?win-error ! ;M :M Update: ( -- ) hWnd ! if hWnd Call UpdateWindow ?win-error ! then ! ;M :M Scroll: { x y -- } hWnd ! if 0 0 y x hWnd Call ScrollWindow drop ! then ! ;M :M Move: { x y w h -- } hWnd ! if 1 ( repaint flag ) h w y x ! hWnd Call MoveWindow ?win-error ! then ! ;M :M SetWindowPos: { x y -- } hWnd if [ SWP_NOSIZE SWP_SHOWWINDOW or SWP_NOZORDER or ] literal --- 154,210 ---- :M Show: ( state -- ) \ use words like SW_SHOWNORMAL + \ *G The ShowWindow function sets the specified window's show state. \n + \ ** Possible values for state are: + \ *L + \ *| SW_FORCEMINIMIZE | Windows 2000: Minimizes a window, even if the thread that owns the window is hung. This flag should only be used when minimizing windows from a different thread. | + \ *| SW_HIDE | Hides the window and activates another window. | + \ *| SW_MAXIMIZE | Maximizes the specified window. | + \ *| SW_MINIMIZE | Minimizes the specified window and activates the next top-level window in the Z order. | + \ *| SW_RESTORE | Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window. | + \ *| SW_SHOW | Activates the window and displays it in its current size and position. | + \ *| SW_SHOWDEFAULT | Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. | + \ *| SW_SHOWMAXIMIZED | Activates the window and displays it as a maximized window. | + \ *| SW_SHOWMINIMIZED | Activates the window and displays it as a minimized window. | + \ *| SW_SHOWMINNOACTIVE | Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except the window is not activated. | + \ *| SW_SHOWNA | Displays the window in its current size and position. This value is similar to SW_SHOW, except the window is not activated. | + \ *| SW_SHOWNOACTIVATE | Displays a window in its most recent size and position. This value is similar to SW_SHOWNORMAL, except the window is not actived. | + \ *| SW_SHOWNORMAL | Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time. | hWnd if hWnd Call ShowWindow ! then drop ;M :M GDIFlush: ( -- ) ! \ *G The GdiFlush function flushes the calling thread's current batch. ! Call GdiFlush ?win-error ;M :M Update: ( -- ) + \ *G The UpdateWindow function updates the client area of the window by sending + \ ** a WM_PAINT message to the window if the window's update region is not empty. The + \ ** function sends a WM_PAINT message directly to the window procedure of the window, + \ ** bypassing the application queue. If the update region is empty, no message is sent. hWnd ! if hWnd Call UpdateWindow ?win-error ! then ;M :M Scroll: { x y -- } + \ *G The ScrollWindow function scrolls the contents of the specified window's client area. hWnd ! if 0 0 y x hWnd Call ScrollWindow drop ! then ;M :M Move: { x y w h -- } + \ *G The MoveWindow function changes the position and dimensions of window. + \ ** For a top-level window, the position and dimensions are relative to the upper-left corner + \ ** of the screen. For a child window, they are relative to the upper-left corner of the parent + \ ** window's client area. hWnd ! if 1 ( repaint flag ) h w y x ! hWnd Call MoveWindow ?win-error ! then ;M :M SetWindowPos: { x y -- } + \ *G The SetWindowPos function changes the position of a child, pop-up, or top-level window. \n + \ ** X Specifies the new position of the left side of the window, in client coordinates. \n + \ ** Y Specifies the new position of the top of the window, in client coordinates. hWnd if [ SWP_NOSIZE SWP_SHOWWINDOW or SWP_NOZORDER or ] literal *************** *** 202,222 **** )) ! :M SetMenu: ( menuhandle -- ) hWnd -if Call SetMenu ?win-error else 2drop then ;M :M SetText: { addr len \ text$ -- } hWnd ! if MAXSTRING localAlloc: text$ ! addr len text$ place ! text$ +NULL ! text$ 1+ hWnd Call SetWindowText ?win-error ! then ! ;M : (SetTextAlign) ( flag hwnd -- ) dup>r Call GetDC >r ! ( flag ) case 1 of [ TA_RIGHT TA_UPDATECP or ] literal endof ! 2 of [ TA_CENTER TA_UPDATECP or ] literal endof ! [ TA_LEFT TA_UPDATECP or ] literal swap endcase r@ Call SetTextAlign --- 229,260 ---- )) ! :M SetMenu: ( MenuHandle -- ) ! \ *G The SetMenu function assigns a new menu to the window. ! \ ** If MenuHandle is NULL, the window's current menu is removed. hWnd -if Call SetMenu ?win-error else 2drop then ;M :M SetText: { addr len \ text$ -- } + \ *G The SetWindowText function changes the text of the window's title bar (if it has one). + \ ** If the window is a control, the text of the control is changed. hWnd ! if MAXSTRING localAlloc: text$ ! addr len text$ place text$ +NULL ! text$ 1+ hWnd Call SetWindowText ?win-error ! then ;M ! ! named-new$ gettext$ ! ! :M GetText: ( -- addr len ) ! \ *G The GetWindowText function copies the text of the window's title bar (if it has one) ! \ ** into a buffer. If the window is a control, the text of the control is copied. ! gettext$ hWnd ! -if over MAXCOUNTED 3reverse Call GetWindowText ! then ;M : (SetTextAlign) ( flag hwnd -- ) dup>r Call GetDC >r ! ( flag ) case 1 of [ TA_RIGHT TA_UPDATECP or ] literal endof ! 2 of [ TA_CENTER TA_UPDATECP or ] literal endof ! [ TA_LEFT TA_UPDATECP or ] literal swap endcase r@ Call SetTextAlign *************** *** 224,343 **** :M SetTextAlign: ( flag -- ) ! hwnd (SetTextAlign) ! ;M ! named-new$ gettext$ ! :M GetText: ( -- addr len ) ! gettext$ hWnd ! -if over MAXCOUNTED 3reverse Call GetWindowText ! then ! ;M ! :M GetDC: ( -- hdc ) hWnd Call GetDC ;M ! :M GetWindowDC: ( -- hdc ) hWnd Call GetWindowDC ;M ! :M ReleaseDC: ( hdc -- ) hWnd Call ReleaseDC ?win-error ;M ! :M BeginPaint: ( ps -- hdc ) hWnd Call BeginPaint ;M ! :M EndPaint: ( ps -- ) hWnd Call EndPaint drop ;M ! :M GetClientRect: ( rect -- ) hWnd Call GetClientRect ?win-error ;M ! :M GetWindowLong: ( index -- value ) hWnd Call GetWindowLong ;M ! :M SetWindowLong: ( value index -- oldval ) hWnd Call SetWindowLong ;M ! :M GetStyle: ( -- style ) GWL_STYLE GetWindowLong: self ;M ! :M SetStyle: ( style -- ) GWL_STYLE SetWindowLong: self drop ;M ! :M +Style: ( style -- ) GetStyle: self OR SetStyle: self ;M ! :M -Style: ( style -- ) INVERT GetStyle: self AND SetStyle: self ;M ! :M SetFocus: ( -- ) hWnd Call SetFocus drop ;M :M SetForegroundWindow: ( -- ) ! hWnd (SetForegroundWindow) ! ;M :M SetActiveWindow: ( -- ) ! hWnd (SetActiveWindow) ! ;M :M MessageBox: ( szText szTitle style -- result ) ! MB_TASKMODAL or 3reverse ! ( hWnd ) NULL Call MessageBox ! ;M :M InvalidateRect: ( bgflag rectangle -- ) ! hWnd call InvalidateRect ?win-error ! ;M ! :M GetDlgItem: ( id -- handle ) ! hWnd Call GetDlgItem ! ;M :M GetDlgItemText: ( addr len id -- len ) ! >r swap r> hWnd Call GetDlgItemText ! ;M :M SetDlgItemText: ( addr len id -- ) ! >r asciiz r> hWnd Call SetDlgItemText drop ! ;M :M SetDlgItemFocus: ( id -- ) ! GetDlgItem: self ! Call SetFocus drop ! ;M :M SelectDlgItemAll: ( id -- ) ! >r -1 0 EM_SETSEL r> hWnd Call SendDlgItemMessage drop ! ;M :M IsDlgButtonChecked: ( id -- f1 ) ! hWnd Call IsDlgButtonChecked ! ;M ! :M CheckDlgButton: ( u1 id -- ) \ 0=clear, 1=checked, 2=grayed ! hWnd Call CheckDlgButton drop ! ;M :M SetDlgItemAlign: ( flag id -- ) ! GetDlgItem: self ! (SetTextAlign) ! ;M ! :M SetAlign: ( flag id -- ) \ hold over from the past \ *G Obsolescent Method use SetDlgItemAlign: instead ! SetDlgItemAlign: self ;M ! ! :M EnableDlgItem: ( flag id -- ) \ 0=disable, 1=enable ! GetDlgItem: self ! Call EnableWindow drop ! ;M ! :M ShowDlgItem: ( flag id -- ) \ 0=hide item, 1=show item ! swap ! if SW_SHOWNORMAL ! else SW_HIDE ! then ! swap GetDlgItem: self ! Call ShowWindow drop ! ;M ! \ control a range of radio buttons, clearing all, and checking one :M CheckRadioButton: ( check_id first_id last_id -- ) ! swap hWnd Call CheckRadioButton drop ! ;M ! ! \ See SDK help for "Messages to List Boxes" :M SendDlgItemMessage: ( lParam wParam message id -- long ) ! hWnd Call SendDlgItemMessage ! ;M :M SetDlgItemFont: ( FontObject id -- ) ! 1 -rot WM_SETFONT swap SendDlgItemMessage: self ! ;M (( --- 262,544 ---- :M SetTextAlign: ( flag -- ) ! \ *G Set the text-alignment for the window. \n ! \ ** The current position is updated after each text output call. ! \ ** The current position is used as the reference point. ! \ ** Possible values for flag are: ! \ *L ! \ *| 0 | The reference point will be on the left edge of the bounding rectangle. | ! \ *| 1 | The reference point will be on the right edge of the bounding rectangle. | ! \ *| 2 | The reference point will be aligned horizontally with the center of the bounding rectangle. | ! hwnd (SetTextAlign) ;M ! :M GetDC: ( -- hdc ) ! \ *G The GetDC function retrieves a handle to a display device context (DC) ! \ ** for the client area of the window. \n ! \ ** You have to call ReleaseDC when the DC isn't needed any longer. ! hWnd Call GetDC ;M ! :M GetWindowDC: ( -- hdc ) ! \ *G The GetWindowDC function retrieves the device context (DC) for the entire ! \ ** window, including title bar, menus, and scroll bars. A window device context ! \ ** permits painting anywhere in a window, because the origin of the device context ! \ ** is the upper-left corner of the window instead of the client area. \n ! \ ** GetWindowDC assigns default attributes to the window device context each time it ! \ ** retrieves the device context. Previous attributes are lost. \n ! \ ** You have to call ReleaseDC when the DC isn't needed any longer. ! hWnd Call GetWindowDC ;M + :M ReleaseDC: ( hdc -- ) + \ *G The ReleaseDC function releases the device context (DC) of the window. \n + \ ** Call only after GetDC or GetWindowDC. + hWnd Call ReleaseDC ?win-error ;M ! :M BeginPaint: ( ps -- hdc ) ! \ *G The BeginPaint function prepares the window for painting and fills a ! \ ** PAINTSTRUCT (ps) structure with information about the painting. ! hWnd Call BeginPaint ;M ! :M EndPaint: ( ps -- ) ! \ *G The EndPaint function marks the end of painting in the window. This function is ! \ ** required for each call to the BeginPaint function, but only after painting is complete. ! hWnd Call EndPaint drop ;M ! :M GetClientRect: ( rect -- ) ! \ *G The GetClientRect function retrieves the coordinates of the window's client area. The ! \ ** client coordinates specify the upper-left and lower-right corners of the client area. ! \ ** Because client coordinates are relative to the upper-left corner of a window's client ! \ ** area, the coordinates of the upper-left corner are (0,0). ! hWnd Call GetClientRect ?win-error ;M ! :M GetWindowLong: ( index -- value ) ! \ *G The GetWindowLong function retrieves information about the window. The function ! \ ** also retrieves the 32-bit (long) value at the specified offset into the extra ! \ ** window memory. \n ! \ ** Index Specifies the zero-based offset to the value to be retrieved. Valid values are ! \ ** in the range zero through the number of bytes of extra window memory, minus four; for ! \ ** example, if you specified 12 or more bytes of extra memory, a value of 8 would be an ! \ ** index to the third 32-bit integer. To retrieve any other value, specify one of the ! \ ** following values. ! \ *L ! \ *| GWL_EXSTYLE | Retrieves the extended window styles. For more information, see CreateWindowEx. | ! \ *| GWL_STYLE | Retrieves the window styles. | ! \ *| GWL_WNDPROC | Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure. | ! \ *| GWL_HINSTANCE | Retrieves a handle to the application instance. | ! \ *| GWL_HWNDPARENT | Retrieves a handle to the parent window, if any. | ! \ *| GWL_ID | Retrieves the identifier of the window. | ! \ *| GWL_USERDATA | Retrieves the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. This value is initially zero. | ! hWnd Call GetWindowLong ;M ! :M SetWindowLong: ( value index -- oldval ) ! \ *G The SetWindowLong function changes an attribute of the window. The function also sets the ! \ ** 32-bit (long) value at the specified offset into the extra window memory. ! \ *L ! \ *| GWL_EXSTYLE | Sets a new extended window style. For more information, see CreateWindowEx. | ! \ *| GWL_STYLE | Sets a new window style. | ! \ *| GWL_WNDPROC | Sets a new address for the window procedure. Windows NT/2000: You cannot change this attribute if the window does not belong to the same process as the calling thread. | ! \ *| GWL_HINSTANCE | Sets a new application instance handle. | ! \ *| GWL_ID | Sets a new identifier of the window. | ! \ *| GWL_USERDATA | Sets the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window. This value is initially zero. | ! hWnd Call SetWindowLong ;M ! :M GetStyle: ( -- style ) ! \ *G Retrieves the window styles. ! GWL_STYLE GetWindowLong: self ;M ! ! :M SetStyle: ( style -- ) ! \ *G Sets a new window style. ! GWL_STYLE SetWindowLong: self drop ;M ! ! :M +Style: ( style -- ) ! \ *G Add a window style. ! GetStyle: self OR SetStyle: self ;M ! ! :M -Style: ( style -- ) ! \ *G Remove a window style. ! INVERT GetStyle: self AND SetStyle: self ;M ! ! :M SetFocus: ( -- ) ! \ *G The SetFocus function sets the keyboard focus to the window. The window must be ! \ ** attached to the calling thread's message queue. ! hWnd Call SetFocus drop ;M :M SetForegroundWindow: ( -- ) ! \ *G The SetForegroundWindow function puts the thread that created the specified window ! \ ** into the foreground and activates the window. Keyboard input is directed to the window, ! \ ** and various visual cues are changed for the user. The system assigns a slightly higher ! \ ** priority to the thread that created the foreground window than it does to other threads. \n ! \ ** The foreground window is the window at the top of the Z order. It is the window that the ! \ ** user is working with. In a preemptive multitasking environment, you should generally let the ! \ ** user control which window is the foreground window. }n ! \ ** Windows 98, Windows 2000: The system restricts which processes can set the foreground window. ! \ ** A process can set the foreground window only if one of the following conditions is true: \n ! \ ** - The process is the foreground process. \n ! \ ** - The process was started by the foreground process. \n ! \ ** - The process received the last input event. \n ! \ ** - There is no foreground process. \n ! \ ** - The foreground process is being debugged. \n ! \ ** - The foreground is not locked (see LockSetForegroundWindow). \n ! \ ** - The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). \n ! \ ** - Windows 2000: No menus are active. \n ! \ ** With this change, an application cannot force a window to the foreground while the user is ! \ ** working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) ! \ ** and call the FlashWindowEx function to notify the user. For more information, see Foreground and ! \ ** Background Windows. \n ! \ ** A process that can set the foreground window can enable another process to set the foreground window by ! \ ** calling the AllowSetForegroundWindow function. The process specified by dwProcessId loses the ability to ! \ ** set the foreground window the next time the user generates input, unless the input is directed at that ! \ ** process, or the next time a process calls AllowSetForegroundWindow, unless that process is specified. \n ! \ ** The foreground process can disable calls to SetForegroundWindow by calling the LockSetForegroundWindow function. ! hWnd (SetForegroundWindow) ;M :M SetActiveWindow: ( -- ) ! \ *G The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue. \n ! \ ** The SetActiveWindow function activates a window, but not if the application is in the background. The window will be ! \ ** brought into the foreground (top of Z order) if its application is in the foreground when the system activates the window. \n ! \ ** If the window identified by the hWnd parameter was created by the calling thread, the active window status of the calling ! \ ** thread is set to hWnd. Otherwise, the active window status of the calling thread is set to NULL. \n ! \ ** By using the AttachThreadInput function, a thread can attach its input processing to another thread. ! \ ** This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue. ! hWnd (SetActiveWindow) ;M :M MessageBox: ( szText szTitle style -- result ) ! \ *G The MessageBox function creates, displays, and operates a message box. The message box contains an ! \ ** application-defined message and title, plus any combination of predefined icons and push buttons. ! \ *L ! \ *| szText | Pointer to a null-terminated string that contains the message to be displayed. \n ! \ *| szTitle | Pointer to a null-terminated string that contains the dialog box title. If this parameter is NULL, the default title Error is used. \n ! \ *| Type | Specifies the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags. ! \ *P To indicate the buttons displayed in the message box, specify one of the following values. ! \ *L ! \ *| MB_ABORTRETRYIGNORE | The message box contains three push buttons: Abort, Retry, and Ignore. | ! \ *| MB_CANCELTRYCONTINUE | Windows 2000: The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE. | ! \ *| MB_HELP | Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner. | ! \ *| MB_OK | The message box contains one push button: OK. This is the default. | ! \ *| MB_OKCANCEL | The message box contains two push buttons: OK and Cancel. | ! \ *| MB_RETRYCANCEL | The message box contains two push buttons: Retry and Cancel. | ! \ *| MB_YESNO | The message box contains two push buttons: Yes and No. | ! \ *| MB_YESNOCANCEL | The message box contains three push buttons: Yes, No, and Cancel. | ! \ *P To display an icon in the message box, specify one of the following values. ! \ *L ! \ *| MB_ICONEXCLAMATION, MB_ICONWARNING | An exclamation-point icon appears in the message box. | ! \ *| MB_ICONINFORMATION, MB_ICONASTERISK | An icon consisting of a lowercase letter i in a circle appears in the message box. | ! \ *| MB_ICONQUESTION | A question-mark icon appears in the message box. | ! \ *| MB_ICONSTOP, MB_ICONERROR, MB_ICONHAND | A stop-sign icon appears in the message box. | ! \ *P To indicate the default button, specify one of the following values. ! \ *L ! \ *| MB_DEFBUTTON1 | The first button is the default button. MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. ! \ *| MB_DEFBUTTON2 | The second button is the default button. | ! \ *| MB_DEFBUTTON3 | The third button is the default button. | ! \ *| MB_DEFBUTTON4 | The fourth button is the default button. | ! \ *P To specify other options, use one or more of the following values. ! \ *L ! \ *| MB_RIGHT | The text is right-justified. | ! \ *| MB_SETFOREGROUND | The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. | ! \ *| MB_TOPMOST | The message box is created with the WS_EX_TOPMOST window style. | ! \ *P If the function succeeds, the return value is one of the following menu-item values. ! \ *L ! \ *| IDABORT | Abort button was selected. | ! \ *| IDCANCEL | Cancel button was selected. | ! \ *| IDCONTINUE | Continue button was selected. | ! \ *| IDIGNORE | Ignore button was selected. | ! \ *| IDNO No | button was selected. | ! \ *| IDOK OK | button was selected. | ! \ *| IDRETRY | Retry button was selected. | ! \ *| IDTRYAGAIN | Try Again button was selected. | ! \ *| IDYES | Yes button was selected. | ! 3reverse hWnd Call MessageBox ;M :M InvalidateRect: ( bgflag rectangle -- ) ! \ *G The InvalidateRect function adds a rectangle to the window's update region. ! \ ** The update region represents the portion of the window's client area that must be redrawn. ! \ *L ! \ *| lpRect | Pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region. | ! \ *| bErase | Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. | ! hWnd call InvalidateRect ?win-error ;M :M GetDlgItem: ( id -- handle ) ! \ *G The GetDlgItem function retrieves a handle of the control (id) in the window. ! hWnd Call GetDlgItem ;M :M GetDlgItemText: ( addr len id -- len ) ! \ *G The GetDlgItemText function retrieves the title or text associated with a control in the window. ! >r swap r> hWnd Call GetDlgItemText ;M :M SetDlgItemText: ( addr len id -- ) ! \ *G The SetDlgItemText function sets the title or text of a control in then window. ! >r asciiz r> hWnd Call SetDlgItemText drop ;M :M SetDlgItemFocus: ( id -- ) ! \ *G Set the focus to the control (id) in the window ! GetDlgItem: self Call SetFocus drop ;M :M SelectDlgItemAll: ( id -- ) ! \ *G Selects all characters in the edit control (id). You can use this forn an edit control ! \ ** or a rich edit control. ! >r -1 0 EM_SETSEL r> hWnd Call SendDlgItemMessage drop ;M :M IsDlgButtonChecked: ( id -- f1 ) ! \ *G The IsDlgButtonChecked function determines whether a button control has a check mark next to ! \ ** it or whether a three-state button control is grayed, checked, or neither. ! hWnd Call IsDlgButtonChecked ;M ! :M CheckDlgButton: ( uCheck id -- ) ! \ *G The CheckDlgButton function changes the check state of a button control. ! \ ** Possible values for uCheck are: ! \ *L ! \ *| BST_CHECKED | Sets the button state to checked. | ! \ *| BST_INDETERMINATE | Sets the button state to grayed, indicating an indeterminate state. Use this value only if the button has the BS_3STATE or BS_AUTO3STATE style. | ! \ *| BST_UNCHECKED | Sets the button state to cleared | ! hWnd Call CheckDlgButton drop ;M :M SetDlgItemAlign: ( flag id -- ) ! \ *G Set the text-alignment for a control (id) in the window. \n ! \ ** The current position is updated after each text output call. ! \ ** The current position is used as the reference point. ! \ ** Possible values for flag are: ! \ *L ! \ *| 0 | The reference point will be on the left edge of the bounding rectangle. | ! \ *| 1 | The reference point will be on the right edge of the bounding rectangle. | ! \ *| 2 | The reference point will be aligned horizontally with the center of the bounding rectangle. | ! GetDlgItem: self (SetTextAlign) ;M ! :M SetAlign: ( flag id -- ) \ DEPRECATED \ *G Obsolescent Method use SetDlgItemAlign: instead ! SetDlgItemAlign: self ;M DEPRECATED ! :M EnableDlgItem: ( flag id -- ) ! \ *G Enable or disable a control (id) in the window. ! \ ** Possible values for flag are: ! \ *L ! \ *| 0 | disable | ! \ *| 1 | enable | ! GetDlgItem: self Call EnableWindow drop ;M ! :M ShowDlgItem: ( flag id -- ) ! \ *G Hide or show a control (id) in the window. ! \ ** Possible values for flag are: ! \ *L ! \ *| 0 | hide | ! \ *| 1 | show | ! swap if SW_SHOWNORMAL else SW_HIDE ! then swap GetDlgItem: self Call ShowWindow drop ;M :M CheckRadioButton: ( check_id first_id last_id -- ) ! \ *G The CheckRadioButton function adds a check mark to (checks) a specified radio button ! \ ** in a group and removes a check mark from (clears) all other radio buttons in the group. ! \ *L ! \ *| check_id | Specifies the identifier of the radio button to select. | ! \ *| first_id | Specifies the identifier of the first radio button in the group. | ! \ *| last_id | Specifies the identifier of the last radio button in the group. | ! swap hWnd Call CheckRadioButton drop ;M :M SendDlgItemMessage: ( lParam wParam message id -- long ) ! \ *G Send a message to the control (id) in the window. ! hWnd Call SendDlgItemMessage ;M :M SetDlgItemFont: ( FontObject id -- ) ! \ *G Specify the font that the control (id) is to use when drawing text. \n ! \ ** FontObject must be the HANDLE of a font. If this parameter is NULL, the control uses the ! \ ** default system font to draw text. ! 1 -rot WM_SETFONT swap SendDlgItemMessage: self ;M (( |
From: Dirk B. <db...@us...> - 2005-12-24 11:58:13
|
Update of /cvsroot/win32forth/win32forth/src/gdi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12709/src/gdi Modified Files: gdiBase.f gdiPen.f gdiStruct.f Log Message: DexH style documention added. Index: gdiBase.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiBase.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gdiBase.f 17 Dec 2005 15:11:19 -0000 1.4 --- gdiBase.f 24 Dec 2005 11:58:00 -0000 1.5 *************** *** 1,2 **** --- 1,4 ---- + + \ *D doc\classes\ \ *! gdiBase \ *T GdiObject -- Base class for GDI objects *************** *** 71,75 **** \ *G Get the type of the object. \n \ ** Possible return values are: ! \ *L OBJ_BITMAP | Bitmap | \ *| OBJ_BRUSH | Brush | \ *| OBJ_COLORSPACE | Color space | --- 73,78 ---- \ *G Get the type of the object. \n \ ** Possible return values are: ! \ *L ! \ *| OBJ_BITMAP | Bitmap | \ *| OBJ_BRUSH | Brush | \ *| OBJ_COLORSPACE | Color space | Index: gdiStruct.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiStruct.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiStruct.f 6 Nov 2005 09:09:27 -0000 1.2 --- gdiStruct.f 24 Dec 2005 11:58:00 -0000 1.3 *************** *** 1,7 **** ! \ gdiStruct.f ! \ ! \ Written by Dirk Busch ! \ Sonntag, Oktober 09 2005 ! \ Licence: Public Domain cr .( Loading GDI class library - Structs...) --- 1,10 ---- ! ! \ *D doc\classes\ ! \ *! gdiStruct ! \ *T gdiStruct -- Wrapper classes for GDI structs. ! \ *Q Version 1.0 ! \ ** This GDI class library was written and placed in the Public Domain ! \ ** in 2005 by Dirk Busch ! \ *S Glossary cr .( Loading GDI class library - Structs...) *************** *** 24,30 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Wrapper class for a POINT-Struct ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :class gdiPOINT <super object Record: &POINT --- 27,34 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ *W <a name="gdiPOINT"></a> :class gdiPOINT <super object + \ *G Wrapper class for a POINT struct. + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Record: &POINT *************** *** 40,58 **** ;M ! :M GetX: ( -- x ) x ;M ! :M GetY: ( -- y ) y ;M ! :M SetX: ( x -- ) to x ;M ! :M SetY: ( y -- ) to y ;M ! :M Addr: ( -- addr ) &POINT ;M ! :M Size: ( -- size ) sizeof(POINT) ;M ;class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Wrapper class for a COLOREF-Struct ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :class gdiCOLORREF <super object Record: &COLORREF --- 44,86 ---- ;M ! :M GetX: ( -- x ) ! \ *G Get the x value of the point. ! x ;M ! :M GetY: ( -- y ) ! \ *G Get the y value of the point. ! y ;M ! ! :M SetX: ( x -- ) ! \ *G Set the x value of the point. ! to x ;M ! ! :M SetY: ( y -- ) ! \ *G Get the y value of the point. ! to y ;M ! ! :M Addr: ( -- addr ) ! \ *G Get the address of the point struct. ! &POINT ;M ! ! :M Size: ( -- size ) ! \ *G Get the site of the point struct ! sizeof(POINT) ;M ;class + \ *G End of gdiPOINT class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ *W <a name="gdiCOLORREF"></a> :class gdiCOLORREF <super object + \ *G Wrapper class for a COLORREF struct. \n + \ ** A COLORREF value is used to specify an RGB color. + \ ** When specifying an explicit RGB color, the COLORREF value has the following + \ ** hexadecimal form: 0x00bbggrr \n + \ ** The low-order byte contains a value for the relative intensity of red; + \ ** the second byte contains a value for green; and the third byte contains a + \ ** value for blue. The high-order byte must be zero. The maximum value for a + \ ** single byte is 0xFF. + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Record: &COLORREF *************** *** 60,64 **** byte g byte b ! byte alpha ;RecordSize: sizeof(COLORREF) --- 88,92 ---- byte g byte b ! byte reserved ;RecordSize: sizeof(COLORREF) *************** *** 82,86 **** 0 to g 0 to b ! 0 to alpha \ init &CHOOSECOLOR record --- 110,114 ---- 0 to g 0 to b ! 0 to reserved \ init &CHOOSECOLOR record *************** *** 97,117 **** ;M ! :M SetAlpha: ( alpha -- ) to alpha ;M ! :M SetRValue: ( r -- ) to r ;M ! :M SetGValue: ( g -- ) to g ;M ! :M SetBValue: ( b -- ) to b ;M ! :M GetAlpha: ( alpha -- ) alpha ;M ! :M GetRValue: ( -- r ) r ;M ! :M GetGValue: ( -- g ) g ;M ! :M GetBValue: ( -- b ) b ;M ! :M SetColor: ( colorref -- ) 0x00ffffff and &COLORREF ! ;M ! :M SetSysColor: ( n -- ) call GetSysColor &COLORREF ! ;M ! :M GetColor: ( -- colorref ) &COLORREF @ 0x00ffffff and ;M ! :M SetRGB: ( r g b -- ) SetBValue: self SetGValue: self SetRValue: self ;M ! :M Addr: ( -- addr ) &COLORREF ;M ! :M Size: ( -- size ) sizeof(COLORREF) ;M :M Choose: ( hWnd -- f ) to hwndOwner GetColor: self to rgbResult --- 125,212 ---- ;M ! :M SetRValue: ( r -- ) ! \ *G Set the red value of the color ! to r ;M ! :M SetGValue: ( g -- ) ! \ *G Set the green value of the color ! to g ;M ! ! :M SetBValue: ( b -- ) ! \ *G Set the blue value of the color ! to b ;M ! ! :M GetRValue: ( -- r ) ! \ *G Get the red value of the color ! r ;M ! ! :M GetGValue: ( -- g ) ! \ *G Get the green value of the color ! g ;M ! ! :M GetBValue: ( -- b ) ! \ *G Get the blue value of the color ! b ;M ! ! :M SetColor: ( colorref -- ) ! \ *G Set the color ! 0x00ffffff and &COLORREF ! ;M ! ! :M SetSysColor: ( n -- ) ! \ *G Set a system color. Possible values are: ! \ *L ! \ *| COLOR_3DDKSHADOW | Dark shadow for three-dimensional display elements. | ! \ *| COLOR_3DFACE, COLOR_BTNFACE | Face color for three-dimensional display elements and for dialog box backgrounds. | ! \ *| COLOR_3DHILIGHT | Highlight color for three-dimensional display elements (for edges facing the light source.) | ! \ *| COLOR_3DHIGHLIGHT | Highlight color for three-dimensional display elements (for edges facing the light source.) | ! \ *| COLOR_BTNHILIGHT | Highlight color for three-dimensional display elements (for edges facing the light source.) | ! \ *| COLOR_BTNHIGHLIGHT | Highlight color for three-dimensional display elements (for edges facing the light source.) | ! \ *| COLOR_3DLIGHT | Light color for three-dimensional display elements (for edges facing the light source.) | ! \ *| COLOR_3DSHADOW, COLOR_BTNSHADOW | Shadow color for three-dimensional display elements (for edges facing away from the light source). | ! \ *| COLOR_ACTIVEBORDER | Active window border. | ! \ *| COLOR_ACTIVECAPTION | Active window title bar. Windows 98, Windows 2000: Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled. | ! \ *| COLOR_APPWORKSPACE | Background color of multiple document interface (MDI) applications. | ! \ *| COLOR_BACKGROUND, COLOR_DESKTOP | Desktop. | ! \ *| COLOR_BTNTEXT | Text on push buttons. | ! \ *| COLOR_CAPTIONTEXT | Text in caption, size box, and scroll bar arrow box. | ! \ *| COLOR_GRADIENTACTIVECAPTION | Windows 98, Windows 2000: Right side color in the color gradient of an active window's title bar. ! \ *| COLOR_ACTIVECAPTION | Windows 98, Windows 2000: specifies the left side color. ! \ *| COLOR_GRADIENTINACTIVECAPTION | Windows 98, Windows 2000: Right side color in the color gradient of an inactive window's title bar. ! \ *| COLOR_INACTIVECAPTION | Windows 98, Windows 2000: specifies the left side color. | ! \ *| COLOR_GRAYTEXT | Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color. | ! \ *| COLOR_HIGHLIGHT | Item(s) selected in a control. | ! \ *| COLOR_HIGHLIGHTTEXT | Text of item(s) selected in a control. | ! \ *| COLOR_HOTLIGHT | Windows 98, Windows 2000: Color for a hot-tracked item. Single clicking a hot-tracked item executes the item. | ! \ *| COLOR_INACTIVEBORDER | Inactive window border. | ! \ *| COLOR_INACTIVECAPTION | Inactive window caption. Windows 98, Windows 2000: Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled. | ! \ *| COLOR_INACTIVECAPTIONTEXT | Color of text in an inactive caption. | ! \ *| COLOR_INFOBK | Background color for tooltip controls. | ! \ *| COLOR_INFOTEXT | Text color for tooltip controls. | ! \ *| COLOR_MENU | Menu background. | ! \ *| COLOR_MENUTEXT | Text in menus. | ! \ *| COLOR_SCROLLBAR | Scroll bar gray area. | ! \ *| COLOR_WINDOW | Window background. | ! \ *| COLOR_WINDOWFRAME | Window frame. | ! \ *| COLOR_WINDOWTEXT | Text in windows. | ! call GetSysColor &COLORREF ! ;M ! ! :M GetColor: ( -- colorref ) ! \ *G Get the color ! &COLORREF @ ;M ! ! :M SetRGB: ( r g b -- ) ! \ *G Set the red, green and blue values of the color ! SetBValue: self SetGValue: self SetRValue: self ;M ! ! :M Addr: ( -- addr ) ! \ *G Get the address of the COLORREF struct ! &COLORREF ;M ! ! :M Size: ( -- size ) ! \ *G Get the size of the COLORREF struct ! sizeof(COLORREF) ;M :M Choose: ( hWnd -- f ) + \ *G Open the windows dialog for choosing a color. to hwndOwner GetColor: self to rgbResult *************** *** 123,149 **** \ return address and length of the user defined custom colors :M CustomColors: ( -- addr len ) CustomColors 64 ;M ;class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Wrapper class for a RGBQUAD-Struct ! \ ! \ The RGBQUAD structure describes a color consisting of relative intensities ! \ of red, green, and blue. ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :class gdiRGBQUAD <super gdiCOLORREF ! :M SetAlpha: ( alpha -- ) drop ;M ! :M GetAlpha: ( -- alpha ) 0 ;M ;class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Wrapper class for a SIZE-struct ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :class gdiSIZE <super object Record: &SIZE --- 218,252 ---- \ return address and length of the user defined custom colors :M CustomColors: ( -- addr len ) + \ *G Get the address and length (in cells) of the CustomColors array + \ ** used by Choose: CustomColors 64 ;M ;class + \ *G End of gdiCOLORREF class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ *W <a name="gdiRGBQUAD"></a> :class gdiRGBQUAD <super gdiCOLORREF + \ *G Wrapper class for a RGBQUAD struct \n + \ ** The RGBQUAD structure describes a color consisting of relative + \ ** intensities of red, green, and blue. \n + \ ** The bmiColors member of the BITMAPINFO structure consists of an array + \ ** of RGBQUAD structures. \n + \ ** Note: This class doesn't have any private methods. For a description + \ ** of the methods see the gdiCOLORREF class. + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :M ClassInit: ( -- ) ! ClassInit: super ! ;M ;class + \ *G End of gdiRGBQUAD class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ *W <a name="gdiSIZE"></a> :class gdiSIZE <super object + \ *G Wrapper class for a SIZE struct + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Record: &SIZE *************** *** 159,177 **** ;M ! :M GetX: ( -- x ) cx ;M ! :M GetY: ( -- y ) cy ;M ! :M SetX: ( x -- ) to cx ;M ! :M SetY: ( y -- ) to cy ;M ! :M Addr: ( -- addr ) &SIZE ;M ! :M Size: ( -- size ) sizeof(SIZE) ;M ;class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Wrapper class for a TEXTMETRIC-struct ! \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! :class gdiTEXTMETRIC <super object Record: &TEXTMETRIC --- 262,297 ---- ;M ! :M GetX: ( -- x ) ! \ *G Get the x value ! cx ;M ! :M GetY: ( -- y ) ! \ *G Get the y value ! cy ;M ! ! :M SetX: ( x -- ) ! \ *G Set the x value ! to cx ;M ! ! :M SetY: ( y -- ) ! \ *G Set the y value ! to cy ;M ! ! :M Addr: ( -- addr ) ! \ *G Get the address of the SIZE struct ! &SIZE ;M ! ! :M Size: ( -- size ) ! \ *G Get the size of the SIZE struct ! sizeof(SIZE) ;M ;class + \ *G End of gdiSIZE class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ *W <a name="gdiTEXTMETRIC"></a> :class gdiTEXTMETRIC <super object + \ *G Wrapper class for a TEXTMETRIC struct + \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Record: &TEXTMETRIC *************** *** 246,252 **** --- 366,376 ---- :M Addr: ( -- addr ) &TEXTMETRIC ;M + \ *G Get the address of the TEXTMETRIC struct. + :M Size: ( -- size ) sizeof(TEXTMETRIC) ;M + \ *G Get the size of the TEXTMETRIC struct. ;class + \ *G End of gdiTEXTMETRIC class \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 349,350 **** --- 473,476 ---- module + + \ *Z Index: gdiPen.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/gdi/gdiPen.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gdiPen.f 17 Dec 2005 15:11:19 -0000 1.2 --- gdiPen.f 24 Dec 2005 11:58:00 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + + \ *D doc\classes\ \ *! gdiPen \ *T GdiPen -- Class for GDI Pens *************** *** 42,46 **** :M SetStyle: ( style -- ) \ *G Set Syle of the pen. Possible values are: ! \ *L PS_SOLID | The pen is solid. | \ *| PS_DASH | The pen is dashed. This style is valid only when the pen width is one or less in device units. | \ *| PS_DOT | The pen is dotted. This style is valid only when the pen width is one or less in device units. | --- 44,49 ---- :M SetStyle: ( style -- ) \ *G Set Syle of the pen. Possible values are: ! \ *L ! \ *| PS_SOLID | The pen is solid. | \ *| PS_DASH | The pen is dashed. This style is valid only when the pen width is one or less in device units. | \ *| PS_DOT | The pen is dotted. This style is valid only when the pen width is one or less in device units. | *************** *** 48,52 **** \ *| PS_DASHDOTDOT | The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. | \ *| PS_NULL | The pen is invisible. | ! \ *| PS_INSIDEFRAME | The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. | to style ;M --- 51,55 ---- \ *| PS_DASHDOTDOT | The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. | \ *| PS_NULL | The pen is invisible. | ! \ *| PS_INSIDEFRAME | The pen is solid. When this pen is used the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. Only for geometric pens. | to style ;M *************** *** 86,90 **** :M GetStyle: ( -- style ) \ *G Get Syle of the pen. Possible values are: ! \ *L PS_SOLID | The pen is solid. | \ *| PS_DASH | The pen is dashed. This style is valid only when the pen width is one or less in device units. | \ *| PS_DOT | The pen is dotted. This style is valid only when the pen width is one or less in device units. | --- 89,94 ---- :M GetStyle: ( -- style ) \ *G Get Syle of the pen. Possible values are: ! \ *L ! \ *| PS_SOLID | The pen is solid. | \ *| PS_DASH | The pen is dashed. This style is valid only when the pen width is one or less in device units. | \ *| PS_DOT | The pen is dotted. This style is valid only when the pen width is one or less in device units. | *************** *** 92,96 **** \ *| PS_DASHDOTDOT | The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. | \ *| PS_NULL | The pen is invisible. | ! \ *| PS_INSIDEFRAME | The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. | style ;M --- 96,100 ---- \ *| PS_DASHDOTDOT | The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. | \ *| PS_NULL | The pen is invisible. | ! \ *| PS_INSIDEFRAME | The pen is solid. When this pen is used the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. | style ;M |
From: Dirk B. <db...@us...> - 2005-12-24 11:55:46
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12434/src/tools Added Files: DexH-CreateDocs.f Log Message: Started a (very simple) tool, to rebuild all DexH style documention. --- NEW FILE: DexH-CreateDocs.f --- anew DexH-CreateDocs.f needs tools/w32fdexh.f internal : create-doc ( addr len -- ) Prepend<home>\ (dex) ; external : create-class-docs ( -- ) W32FClassDocs s" src\generic.f" create-doc s" src\window.f" create-doc s" src\gdi\gdiStruct.f" create-doc s" src\gdi\gdiBase.f" create-doc s" src\gdi\gdiPen.f" create-doc ; module cls create-class-docs |
From: Dirk B. <db...@us...> - 2005-12-24 11:53:45
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12285/src/tools Modified Files: DexH.f Log Message: *D command added, to set the current output folder for *.htm files. Index: DexH.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/DexH.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DexH.f 20 Dec 2005 18:00:50 -0000 1.1 --- DexH.f 24 Dec 2005 11:53:35 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- \ *Q Version 3 \ ** Primary contributors: Brad Eckert br...@SP... + \ ** Modified for use in Win32Forth by George Hubert and Dirk Busch ( *Q Abstract ) ( ** DexH is a simple literate programming tool inspired by MPE's DOCGEN. DexH ) *************** *** 21,24 **** --- 22,26 ---- ( *| Command | Effect | ) ( *| ** | continuation of G, E or P | ) + ( *| *D | Select a new output folder | ) \ dbu ( *| *! | create and select a new output file | ) ( *| *> | select an existing file to add text to | ) *************** *** 248,260 **** 0 value #gl-ancor ! : switchfile ( -- $other $name io ) end closeout line BL _parse \ get filename (minus extension) >R XPAD R@ MOVE S" .htm" XPAD R@ CHARS + SWAP MOVE \ add file extension ! ! xpad R@ 4 CHARS + $infile lplace \ save file name 0 to #gl-ancor \ reset ancor - XPAD R> 4 CHARS + w/o ; --- 250,266 ---- 0 value #gl-ancor ! : switchfolder ( -- ) \ Set new output folder ! end closeout line ! BL _parse \ get folder ! Prepend<home>\ "chdir \ set current directory ! 2drop ; ! ! : switchfile ( -- $other $name io ) \ Set new output file end closeout line BL _parse \ get filename (minus extension) >R XPAD R@ MOVE S" .htm" XPAD R@ CHARS + SWAP MOVE \ add file extension ! xpad R@ 4 CHARS + $infile lplace \ save file name 0 to #gl-ancor \ reset ancor XPAD R> 4 CHARS + w/o ; *************** *** 300,304 **** : gl-entry ( addr len -- ) ! cr 2dup type 2dup gl-get-type if $line lplace --- 306,310 ---- : gl-entry ( addr len -- ) ! \ cr 2dup type 2dup gl-get-type if $line lplace *************** *** 347,350 **** --- 353,357 ---- [CHAR] | OF S" <tr>" out table| S" </tr>" outln ENDOF [CHAR] Z OF end HTMLtrailer boiler ENDOF + [CHAR] D OF switchfolder ENDOF \ dbu ENDCASE ; *************** *** 363,374 **** ( *S Glossary ) ! :noname ( <filename> -- ) ( *G Convert a file or files to HTML. Output filenames are included in the ) ( ** source file. ) 0 TO testing \ output to file 0 TO echoing 0 TO plain 0 TO mode \ reset modes 0 escape ! - BL PARSE - 2dup cr ." Processing file: " type R/O OPEN-FILE ABORT" Missing input file" TO infile gl-open --- 370,380 ---- ( *S Glossary ) ! : (dex) ( addr len -- ) ( *G Convert a file or files to HTML. Output filenames are included in the ) ( ** source file. ) + 2dup cr ." Processing file: " type 0 TO testing \ output to file 0 TO echoing 0 TO plain 0 TO mode \ reset modes 0 escape ! R/O OPEN-FILE ABORT" Missing input file" TO infile gl-open *************** *** 385,391 **** REPEAT DROP closeout infile CLOSE-FILE DROP \ close files ! \in-system-ok gl-close ; is dexh ! ' dexh alias dex : q ( <string> -- ) --- 391,404 ---- REPEAT DROP closeout infile CLOSE-FILE DROP \ close files ! gl-close ; ! : DEX ( <filename> -- ) ! ( *G Convert a file or files to HTML. Output filenames are included in the ) ! ( ** source file. ) ! BL PARSE (dex) ; ! ! [defined] dexh [if] ! ' DEX is dexh \ link into w32f console menu ! [then] : q ( <string> -- ) |
From: Dirk B. <db...@us...> - 2005-12-24 11:52:18
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12123/src Modified Files: paths.f Log Message: Changed MakeAbsolutePath to add a termination 0 byte to the path string. Index: paths.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/paths.f,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** paths.f 1 Nov 2005 12:21:40 -0000 1.6 --- paths.f 24 Dec 2005 11:52:08 -0000 1.7 *************** *** 195,199 **** THEN else DROP <AbsRelPath$> PLACE ! then <AbsRelPath$> ; : IsPathRelativeTo? { a1 n1 a2 n2 -- f } \ return true if path a1 n1 is relative to path a2 n2 --- 195,199 ---- THEN else DROP <AbsRelPath$> PLACE ! then <AbsRelPath$> dup +null ; : IsPathRelativeTo? { a1 n1 a2 n2 -- f } \ return true if path a1 n1 is relative to path a2 n2 |
From: George H. <geo...@us...> - 2005-12-22 11:05:39
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10806/win32forth/doc Added Files: p-task.htm Log Message: gah: Added documentation for task --- NEW FILE: p-task.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> W32F Task</title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: p-task.htm,v 1.1 2005/12/22 11:04:40 georgeahubert Exp $"> <img border="0" src="TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>Using the Task Wordset </h1><hr /><p>Multi-tasking in Win32Forth is accomplished by using the Windows<sub>® </sub> multi-tasker. This is a pre-emptive multi-tasker. </p><h2>Glossary </h2><pre><b><a name="0">cell field+ task>parm ( task-block -- addr ) \ W32F Task </a></b></pre><p>Convert the task-block address into the address of the thread parameter </p><pre><b><a name="0">cell field+ task>id ( task-block -- addr ) \ W32F Task </a></b></pre><p>Convert the task-block address into the address of the thread id </p><pre><b><a name="0">cell field+ task>handle ( task-block -- addr ) \ W32F Task </a></b></pre><p>Convert the task-block address into the address of the thread handle </p><pre><b><a name="0">cell field+ task>stop ( task-block -- addr ) \ W32F Task </a></b></pre><p>Convert the task-block address into the address of the the stop flag </p><pre><b><a name="0">: task>parm@ ( task-block -- parm ) \ W32F Task </a></b></pre><p>Fetch the parameter from the task-block. </p><pre><b><a name="0">1 proc ExitThread as exit-task ( n -- ) \ W32F Task </a></b></pre><p>Exit the current task returning the value n to the operating system, which can be retrieved by calling GetExitCodeThread. The stacks and user area for the thread are freed and DLLs are detatched. If the thread is the last active thread of the process then the process is terminated. </p><pre><b><a name="0">: create-task ( task-block -- flag ) \ W32F Task </a></b></pre><p>Create a new task which is suspended. Flag is true if successful. </p><pre><b><a name="0">: run-task ( task-block -- flag ) \ W32F Task </a></b></pre><p>Create a new task and run it. Flag is true if successful. </p><pre><b><a name="0">: suspend-task ( task-block -- flag ) \ W32F Task </a></b></pre><p>Suspend a task. Flag is true if successful. </p><pre><b><a name="0">: resume-task ( task-block -- flag ) \ W32F Task </a></b></pre><p>Resume a task. Flag is true if successful. </p><pre><b><a name="0">: stop-task ( task-block -- ) \ W32F Task </a></b></pre><p>Set the stop flag of the task block to true. </p><pre><b><a name="0">: task-sleep ( n -- ) \ W32F Task </a></b></pre><p>Suspend the current task for at least n msec. If n is INFINITE (-1) the task is suspended forever. </p><pre><b><a name="0">: (task-block) ( parm cfa-task addr -- len ) \ W32F Task </a></b></pre><p>Build a task block at the supplied address, initialise the parameter and xt and return the size of the task block. </p><pre><b><a name="0">: task-block ( parm cfa-task -- addr ) \ W32F Task </a></b></pre><p>Build a task block in the dictionary, initialise the parameter and xt and return the address of the block. </p><pre><b><a name="0">: task-stop? ( task-block -- flag ) \ W32F Task </a></b></pre><p>Flag is true if stop-task has been set by another task. In this case the task should do any necessary clean-up and exit. </p><h2>Locking Resources </h2><p>Since the multi-tasker is pre-emptive it is sometimes necessary to restrict access to resources to a single task to prevent inteference between different tasks. Win32Forth provides a set of words for efficiently locking sections of code. The system also contains some locks used internally that are transparent to the user. </p><h2>Glossary </h2><pre><b><a name="0">: lock ( lock -- ) \ W32F Lock </a></b></pre><p>If another thread owns the lock wait until it's free, then if the lock is free claim it for this thread, then increment the lock count. </p><pre><b><a name="0">: unlock ( lock -- ) \ W32F Lock </a></b></pre><p>Decrement the lock count and free the lock if the resultant count is zero. </p><pre><b><a name="0">: trylock ( lock -- fl ) \ W32F Lock </a></b></pre><p><b> For NT 2000 and XP; </b> If the lock is owned by another thread return false. <br /> If the lock is free claim it for this thread, then increment the lock count and return true. <br /> <b> For Win9x; </b> Perform the action of LOCK and return true. </p><pre><b><a name="0">: make-lock ( compiling: -<name>- -- runtime: -- lock ) \ W32F Lock </a></b></pre><p>Create a new lock. When executed the lock returns it's identifier. </p><h2>WARNING </h2><p>Before using FORGET or executing MARKER words unlock any locks which are about to be forgotten to avoid memory leaks AND exit any threads which will be forgotten to avoid <b> CRASHING !! YOU HAVE BEEN WARNED </b> </p><hr><p>Document $Id: p-task.htm,v 1.1 2005/12/22 11:04:40 georgeahubert Exp $</p> </body></html> |
From: George H. <geo...@us...> - 2005-12-22 11:02:58
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10424/win32forth/doc Modified Files: p-index.htm p-module.htm Log Message: gah: Added documentation for dexh to task.f and minor spelling correction Index: p-module.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-module.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-module.htm 14 Dec 2005 13:49:30 -0000 1.1 --- p-module.htm 22 Dec 2005 11:02:28 -0000 1.2 *************** *** 6,10 **** <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> ! W32F modules</title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> --- 6,10 ---- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> ! W32F module</title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> *************** *** 16,26 **** <img border="0" src="FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> ! <hr /> ! <h1> ! Using the Module Wordset ! </h1> ! <hr /> ! <p> ! Win32Forth implements the ANSI search-order wordset and extensions as well as it's own set of words for constructing modules. Since the module wordset works by manipulating the search order then care should be taken when using the module wordset and search order --- 16,21 ---- <img border="0" src="FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> ! <hr /><h1>Using the Module Wordset ! </h1><hr /><p>Win32Forth implements the ANSI search-order wordset and extensions as well as it's own set of words for constructing modules. Since the module wordset works by manipulating the search order then care should be taken when using the module wordset and search order *************** *** 31,83 **** EXTERNAL and MODULE should not be executed within a CLASS or OBJECT although they can be used before and after the CLASS or OBJECT. ! </p> ! <h2> ! Error Handling ! </h2> ! <p> ! If an uncaught error occurs while building a module then the default error handler resets the state of the module wordset as though the module had been finished correctly. ! </p> ! <h2> ! Glossary ! </h2> ! <pre><b> ! : (PRIVATE) ( xt-of-voc -- ) ! </b></pre> ! <p> ! Set the vocabulary for internal definitions for the next module to be built. This is a non-parsing version of the word PRIVATE. ! </p> ! <pre><b> ! : PRIVATE ( -<voc>- ) ! </b></pre> ! <p> ! Set the vocabulary for internal definitions for the next module to be built. This is a parsing version of the word (PRIVATE). ! </p> ! <pre><b> ! : INTERNAL ( -- ) ! </b></pre> ! <p> ! If a module hasn't yet been started or the internal vocabulary isn't the context vocabulary add the internal vocabulary to the search order and save the current vocabulary as the external vocabulary, then make the current vocabulary the internal vocabulary. If a module is already being built then make the current vocabulary the internal vocabulary. ! </p> ! <pre><b> ! : EXTERNAL ( -- ) ! </b></pre> ! <p> ! Make the external vocabulary the current vocabulary. ! </p> ! <pre><b> ! : MODULE ( -- ) ! </b></pre> ! <p> ! Complete the module by making the external vocabulary the current vocabulary, removing the internal vocabulary from the search order if it's the context vocabulary and resetting the internal vocabulary to hidden. ! </p> ! <hr><p>Document $Id$</p> </body></html> --- 26,51 ---- EXTERNAL and MODULE should not be executed within a CLASS or OBJECT although they can be used before and after the CLASS or OBJECT. ! </p><h2>Error Handling ! </h2><p>If an uncaught error occurs while building a module then the default error handler resets the state of the module wordset as though the module had been finished correctly. ! </p><h2>Glossary ! </h2><pre><b><a name="0">: (PRIVATE) ( xt-of-voc -- ) ! </a></b></pre><p>Set the vocabulary for internal definitions for the next module to be built. This is a non-parsing version of the word PRIVATE. ! </p><pre><b><a name="0">: PRIVATE ( -<voc>- ) ! </a></b></pre><p>Set the vocabulary for internal definitions for the next module to be built. This is a parsing version of the word (PRIVATE). ! </p><pre><b><a name="0">: INTERNAL ( -- ) ! </a></b></pre><p>If a module hasn't yet been started or the internal vocabulary isn't the context vocabulary add the internal vocabulary to the search order and save the current vocabulary as the external vocabulary, then make the current vocabulary the internal vocabulary. If a module is already being built then make the current vocabulary the internal vocabulary. ! </p><pre><b><a name="0">: EXTERNAL ( -- ) ! </a></b></pre><p>Make the external vocabulary the current vocabulary. ! </p><pre><b><a name="0">: MODULE ( -- ) ! </a></b></pre><p>Complete the module by making the external vocabulary the current vocabulary, removing the internal vocabulary from the search order if it's the context vocabulary and resetting the internal vocabulary to hidden. ! </p><hr><p>Document $Id$</p> </body></html> Index: p-index.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-index.htm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** p-index.htm 20 Dec 2005 18:10:15 -0000 1.6 --- p-index.htm 22 Dec 2005 11:02:28 -0000 1.7 *************** *** 137,140 **** --- 137,141 ---- <li><a href="p-classes.htm">Win32Forth Classes</a></li> <li><a href="p-module.htm">Using the Module Wordset</a></li> + <li><a href="p-task.htm">Using the Task Wordset</a></li> <li><a href="p-random.htm">The Random Number Generator</a></li> <li><a href="p-switch.htm">Using Switches</a></li> |
From: George H. <geo...@us...> - 2005-12-22 11:02:57
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10424/win32forth/src Modified Files: Module.f Log Message: gah: Added documentation for dexh to task.f and minor spelling correction Index: Module.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Module.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Module.f 14 Dec 2005 13:50:30 -0000 1.2 --- Module.f 22 Dec 2005 11:02:28 -0000 1.3 *************** *** 15,19 **** \ a module ! \ *! doc\p-module W32F modules \ *T Using the Module Wordset \ *P Win32Forth implements the ANSI search-order wordset and extensions as well as it's --- 15,19 ---- \ a module ! \ *! doc\p-module W32F module \ *T Using the Module Wordset \ *P Win32Forth implements the ANSI search-order wordset and extensions as well as it's |
From: George H. <geo...@us...> - 2005-12-22 11:02:55
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10424/win32forth/src/lib Modified Files: task.f Log Message: gah: Added documentation for dexh to task.f and minor spelling correction Index: task.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/task.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** task.f 29 Aug 2005 15:56:28 -0000 1.3 --- task.f 22 Dec 2005 11:02:28 -0000 1.4 *************** *** 5,23 **** cr .( Loading Task Support...) \ -------------------- Task Control Block Offsets -------------------- cell checkstack ! cell field+ task>parm ( thread -- addr ) \ thread parameter ! cell field+ task>id ( thread -- addr ) \ thread id ! cell field+ task>handle ( thread -- addr ) \ thread handle ! cell field+ task>stop ( thread -- addr ) \ the stop flag drop ! : task>parm@ ( task-block -- parm ) \ extract the parameter task>parm @ ; \ -------------------- Task Start Initialisation -------------------- ! 1 proc ExitThread as exit-task ( n -- ) \ exit the thread : (task) ( parm cfa -- ) \ helper routine --- 5,40 ---- cr .( Loading Task Support...) + \ *! doc\p-task W32F Task + \ *T Using the Task Wordset + + \ *P Multi-tasking in Win32Forth is accomplished by using the Windows\_® \d multi-tasker. + \ ** This is a pre-emptive multi-tasker. + + \ *S Glossary + \ -------------------- Task Control Block Offsets -------------------- cell checkstack ! cell field+ task>parm ( task-block -- addr ) \ W32F Task ! \ *G Convert the task-block address into the address of the thread parameter ! cell field+ task>id ( task-block -- addr ) \ W32F Task ! \ *G Convert the task-block address into the address of the thread id ! cell field+ task>handle ( task-block -- addr ) \ W32F Task ! \ *G Convert the task-block address into the address of the thread handle ! cell field+ task>stop ( task-block -- addr ) \ W32F Task ! \ *G Convert the task-block address into the address of the the stop flag drop ! : task>parm@ ( task-block -- parm ) \ W32F Task ! \ *G Fetch the parameter from the task-block. task>parm @ ; \ -------------------- Task Start Initialisation -------------------- ! 1 proc ExitThread as exit-task ( n -- ) \ W32F Task ! \ *G Exit the current task returning the value n to the operating system, which can be retrieved ! \ ** by calling GetExitCodeThread. The stacks and user area for the thread are freed and ! \ ** DLLs are detatched. If the thread is the last active thread of the process then the ! \ ** process is terminated. : (task) ( parm cfa -- ) \ helper routine *************** *** 43,47 **** \ -------------------- Task Management -------------------- ! : (create-task) ( addr state -- flag ) \ create a task swap \ state addr dup task>stop off \ turn off stop flag --- 60,64 ---- \ -------------------- Task Management -------------------- ! : (create-task) ( thread state -- flag ) \ create a task swap \ state addr dup task>stop off \ turn off stop flag *************** *** 56,80 **** 0<> ; \ and set the flag, true=ok ! : create-task ( addr -- flag ) \ create task suspended CREATE_SUSPENDED (create-task) ; ! : run-task ( addr -- flag ) \ create task running 0 (create-task) ; ! : suspend-task ( addr -- flag ) \ suspend a task task>handle @ \ point at thread handle call SuspendThread -1 <> ; \ true=0K ! : resume-task ( addr -- flag ) \ suspend a task task>handle @ \ point at thread handle call ResumeThread -1 <> ; \ true=0K ! : stop-task ( addr -- ) \ stop the task task>stop on ; \ stop flag ! : task-sleep ( n -- ) \ sleep the task for n ms call Sleep drop ; ! : (task-block) ( parm cfa-task addr -- len ) \ build a task block at addr dup>r ! \ cfa r@ cell+ ! \ parameter for the task --- 73,106 ---- 0<> ; \ and set the flag, true=ok ! : create-task ( task-block -- flag ) \ W32F Task ! \ *G Create a new task which is suspended. Flag is true if successful. CREATE_SUSPENDED (create-task) ; ! : run-task ( task-block -- flag ) \ W32F Task ! \ *G Create a new task and run it. Flag is true if successful. 0 (create-task) ; ! : suspend-task ( task-block -- flag ) \ W32F Task ! \ *G Suspend a task. Flag is true if successful. task>handle @ \ point at thread handle call SuspendThread -1 <> ; \ true=0K ! : resume-task ( task-block -- flag ) \ W32F Task ! \ *G Resume a task. Flag is true if successful. task>handle @ \ point at thread handle call ResumeThread -1 <> ; \ true=0K ! : stop-task ( task-block -- ) \ W32F Task ! \ *G Set the stop flag of the task block to true. task>stop on ; \ stop flag ! : task-sleep ( n -- ) \ W32F Task ! \ *G Suspend the current task for at least n msec. If n is INFINITE (-1) the task is suspended ! \ ** forever. call Sleep drop ; ! : (task-block) ( parm cfa-task addr -- len ) \ W32F Task ! \ *G Build a task block at the supplied address, initialise the parameter and xt and ! \ ** return the size of the task block. dup>r ! \ cfa r@ cell+ ! \ parameter for the task *************** *** 85,89 **** ; ! : task-block ( parm cfa-task -- addr ) \ a task-block here >r \ return this block's address , \ cfa to execute as task --- 111,117 ---- ; ! : task-block ( parm cfa-task -- addr ) \ W32F Task ! \ *G Build a task block in the dictionary, initialise the parameter and xt and return ! \ ** the address of the block. here >r \ return this block's address , \ cfa to execute as task *************** *** 94,98 **** r> ; \ return structure ! : task-stop? ( task-block -- ) \ pause, stop if we're told task>stop @ ; \ check, exit if stop set --- 122,128 ---- r> ; \ return structure ! : task-stop? ( task-block -- flag ) \ W32F Task ! \ *G Flag is true if stop-task has been set by another task. In this case the task should ! \ ** do any necessary clean-up and exit. task>stop @ ; \ check, exit if stop set *************** *** 107,122 **** external ! : lock ( lock -- ) \ lock on a lock call EnterCriticalSection drop ; ! : unlock ( lock -- ) \ unlock a lock call LeaveCriticalSection drop ; ! : trylock ( lock -- fl ) \ try a lock ! call TryEnterCriticalSection 0<> ; \ 0 -- lock is blocked internal ! : init-lock ( lock -- ) 0 swap call InitializeCriticalSectionAndSpinCount drop ; --- 137,171 ---- external ! \ *S Locking Resources ! ! \ *P Since the multi-tasker is pre-emptive it is sometimes necessary to restrict access ! \ ** to resources to a single task to prevent inteference between different tasks. ! \ ** Win32Forth provides a set of words for efficiently locking sections of code. ! \ ** The system also contains some locks used internally that are transparent to the user. ! ! \ *S Glossary ! ! : lock ( lock -- ) \ W32F Lock ! \ *G If another thread owns the lock wait until it's free, ! \ ** then if the lock is free claim it for this thread, ! \ ** then increment the lock count. call EnterCriticalSection drop ; ! : unlock ( lock -- ) \ W32F Lock ! \ *G Decrement the lock count and free the lock if the resultant count is zero. call LeaveCriticalSection drop ; ! : trylock ( lock -- fl ) \ W32F Lock ! \ *G \b For NT 2000 and XP; \d ! \ ** If the lock is owned by another thread return false. \n ! \ ** If the lock is free claim it for this thread, ! \ ** then increment the lock count and return true. \n ! \ ** \b For Win9x; \d ! \ ** Perform the action of LOCK and return true. ! call TryEnterCriticalSection 0<> ; internal ! : init-lock ( lock -- ) \ Initialise a lock 0 swap call InitializeCriticalSectionAndSpinCount drop ; *************** *** 125,129 **** in-system ! : make-lock ( -<name>- -- ) \ create a lock create here lock-size ( 6 cells ) allot \ gah --- 174,179 ---- in-system ! : make-lock ( compiling: -<name>- -- runtime: -- lock ) \ W32F Lock ! \ *G Create a new lock. When executed the lock returns it's identifier. create here lock-size ( 6 cells ) allot \ gah *************** *** 135,142 **** internal ! : init-lock-from-list ( addr -- ) lock-size - init-lock ; ! : init-locks ['] init-lock-from-list lock-list do-link ; --- 185,192 ---- internal ! : init-lock-from-list ( addr -- ) \ Initialise a lock given address of link lock-size - init-lock ; ! : init-locks ( -- ) \ Initialise all the locks ['] init-lock-from-list lock-list do-link ; *************** *** 172,178 **** \ -------------------- Forgetting Locks ----------------------------- ! \ WARNING Before using FORGET or executing MARKER words Unlock any locks which are ! \ about to be forgotten to avoid memory leaks AND exit any threads which will be ! \ forgotten to avoid CRASHING !! YOU HAVE BEEN WARNED in-system --- 222,229 ---- \ -------------------- Forgetting Locks ----------------------------- ! \ *S WARNING ! \ *P Before using FORGET or executing MARKER words unlock any locks which are ! \ ** about to be forgotten to avoid memory leaks AND exit any threads which will be ! \ ** forgotten to avoid \b CRASHING !! YOU HAVE BEEN WARNED \d in-system *************** *** 190,191 **** --- 241,243 ---- module + \ *Z |
From: Dirk B. <db...@us...> - 2005-12-20 18:10:24
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23718/doc Modified Files: p-index.htm p-structures.htm Added Files: p-dexh.htm Removed Files: p-advanced.htm Log Message: DexH documentation added, and moved the "Advanced" topics into p-index.htm Index: p-structures.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-structures.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-structures.htm 21 Dec 2004 00:18:57 -0000 1.1 --- p-structures.htm 20 Dec 2005 18:10:15 -0000 1.2 *************** *** 30,34 **** makes it easy to implement custom structures tailored to your application. Nevertheless WIN32FORTH contains some words to help with this process as ! well as an optional structure package ( STRUCT.F )</p> <h3> Using FIELD+</h3> <p>FIELD+ is a defining word that creates a new word that adds an offset to --- 30,34 ---- makes it easy to implement custom structures tailored to your application. Nevertheless WIN32FORTH contains some words to help with this process as ! well as three optional structure packages ( ExtStruct.f, Struct.f and eStruct.f )</p> <h3> Using FIELD+</h3> <p>FIELD+ is a defining word that creates a new word that adds an offset to --- p-advanced.htm DELETED --- Index: p-index.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-index.htm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** p-index.htm 1 Oct 2005 09:06:50 -0000 1.5 --- p-index.htm 20 Dec 2005 18:10:15 -0000 1.6 *************** *** 90,93 **** --- 90,94 ---- <li><a href="ForthForm/ForthForm.htm">ForthForm</a> (Win32Forth Dialog-Editor)</li> <li><a href="ProMgr/ProjectManager.htm">ForthProject</a> (Win32Forth Project Manager)</li> + <li><a href="p-dexh.htm">Dex</a>Document Extractor</li> </ul> *************** *** 122,130 **** requirements of the ANS Forth Standard</a></li> </ul> ! <p>Once you've got to grips with the basics, it's time to move on to the</p> <ul> ! <li><a href="p-advanced.htm">Advanced Topics</a></li> <li><a href="p-relnotes.6.12.htm">Release Notes</a></li> </ul> <h3>Distributions</h3> <dir> --- 123,153 ---- requirements of the ANS Forth Standard</a></li> </ul> ! ! <p>Once you've got to grips with the basics, it's time to move on to the:</p> ! ! <h3>Advanced Topics</h3> ! ! <p>Advanced topics aren't really that advanced, but if you're just starting out ! with Win32Forth, these are best revisited once you've got to grips with the ! basics. Oh, go on then. Read them anyhow...</p> <ul> ! <li><a href="p-debugging.htm">Debugging in Win32Forth</a></li> ! <li><a href="p-windlls.htm">Calling Windows Procedures</a></li> ! <li><a href="p-objects.htm">Object Oriented Programming</a></li> ! <li><a href="p-classes.htm">Win32Forth Classes</a></li> ! <li><a href="p-module.htm">Using the Module Wordset</a></li> ! <li><a href="p-random.htm">The Random Number Generator</a></li> ! <li><a href="p-switch.htm">Using Switches</a></li> ! <li><a href="p-chains.htm">Chains and how to use them</a></li> ! <li><a href="p-locals.htm">Named input parameters and local variables</a></li> ! <li><a href="p-486asm.htm">Documentation for 486ASM.F</a> (the assembler)</li> ! <li><a href="p-imageman.htm">Building and saving an application</a></li> ! <li><a href="p-arch1.htm">The Internal Architecture of Win32Forth</a></li> ! <li><a href="p-using-if.htm">Using -IF</a></li> ! <li><a href="p-structures.htm">Structures in Win32Forth</a></li> ! <li><a href="p-numconv.htm">Number Conversion</a></li> <li><a href="p-relnotes.6.12.htm">Release Notes</a></li> </ul> + <h3>Distributions</h3> <dir> --- NEW FILE: p-dexh.htm --- <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/xml; charset=iso-8859-1" /> <meta name="GENERATOR" content="DexH v03" /> <style type="text/css"> </style> <title> DexH</title> </head> <body> <hr /><h1>DexH -- Document Extractor, HTML output </h1><hr /><h3><i>Version 3 </i></h3><p>Primary contributors: Brad Eckert br...@SP... </p><h3><i>Abstract </i></h3><p>DexH is a simple literate programming tool inspired by MPE's DOCGEN. DexH can also be used to write articles about Forth featuring a mixture of documentation and source code. DexH is a standalone program that processes a Forth source file. The following command does the conversion: <br /> <b>DEX input_filename</b> </p><h2>Commands </h2><p>Commands are embedded within comments. You can use the following formats, with either starting at the first column. </p><ul><li>( ?? ... ) where ?? is the command, or </li><li>\ ?? ... </li></ul><p>You can append HTML to created files by DEXing any number of source files but you should use a *Z command to complete the HTML. </p><table border="1"><tr><td>Command </td> <td>Effect </td> </tr> <tr><td>** </td> <td>continuation of G, E or P </td> </tr> <tr><td>*! </td> <td>create and select a new output file </td> </tr> <tr><td>*> </td> <td>select an existing file to add text to </td> </tr> <tr><td>*T </td> <td>Title </td> </tr> <tr><td>*Q </td> <td>Quotation or abstract </td> </tr> <tr><td>*S </td> <td>Section </td> </tr> <tr><td>*N </td> <td>Sub-section </td> </tr> <tr><td>*P </td> <td>Paragraph </td> </tr> <tr><td>*E </td> <td>Paragraph which is a code example </td> </tr> <tr><td>*B </td> <td>Bullet entry </td> </tr> <tr><td>*G </td> <td>Glossary entry for the previous line </td> </tr> <tr><td>*R </td> <td>raw LaTeX </td> </tr> <tr><td>*W </td> <td>raw HTML </td> </tr> <tr><td>*Z </td> <td>End output </td> </tr> <tr><td>*+ </td> <td>Include source code as document text </td> </tr> <tr><td>*- </td> <td>Turn off source code inclusion </td> </tr> </table><p>DexH is ANS Forth except for the need for BOUNDS, SCAN, SKIP and LCOUNT. They are commonly used words but redefined here for completeness. </p><pre>\ : BOUNDS OVER + SWAP ; \ : SCAN ( addr len char -- addr' len' ) \ >R BEGIN DUP WHILE OVER C@ R@ <> \ WHILE 1 /STRING REPEAT THEN R> DROP ; \ : SKIP ( addr len char -- addr' len' ) \ >R BEGIN DUP WHILE OVER C@ R@ = \ WHILE 1 /STRING REPEAT THEN R> DROP ; \ : LCOUNT ( addr -- addr' len ) DUP CELL+ SWAP @ ; </pre><p>Some files use very long lines, which is desirable for long sections of documentation. You can allocate buffers for lines longer than 2000 chars by changing the following line: </p><pre>2000 CHARS CONSTANT max$ </pre><pre></pre><p>HTML needs some canned boilerplate. This is created by ,| since HTML doesn't use | characters. </p><pre>: (,$) ( a len -- ) DUP C, 0 ?DO COUNT C, LOOP DROP ; : ,| ( <text> -- ) [CHAR] | WORD COUNT -TRAILING (,$) ; CREATE DexHTMLheader ,| <?xml version="1.0"?> | ,| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ,| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ,| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ,| <head> | ,| <meta http-equiv="Content-Type" content="text/xml; charset=iso-8859-1" />| ,| <meta name="GENERATOR" content="DexH v03" /> | ,| <style type="text/css"> | ,| </style> | ,| <title> | 0 C, </pre><p>All output is via OUT and OUTLN, which can be sent to the screen for debugging purposes. </p><pre>0 VALUE testing \ screen is for testing : werr ( n -- ) ABORT" Error writing file" ; : out ( a len -- ) testing IF TYPE ELSE outfile WRITE-FILE werr THEN ; : outln ( a len -- ) testing IF TYPE CR ELSE outfile WRITE-LINE werr THEN ; </pre><p>Some characters are replaced by special strings so they can't be interpreted as tags. Also, runs of blanks need special treatment. Some escape sequences are supported: </p><table border="1"><tr><td><b>seq</b> </td> <td><b>Escape command </b> </td> </tr> <tr><td>\i </td> <td>Italics </td> </tr> <tr><td>\b </td> <td>Bold </td> </tr> <tr><td>\t </td> <td>Typewriter </td> </tr> <tr><td>\^ </td> <td>Superscript (i.e. ax\^2\d+bx+c=0) </td> </tr> <tr><td>\_ </td> <td>Subscript </td> </tr> <tr><td>\d </td> <td>Default font (ends italic, superscript, etc.) </td> </tr> <tr><td>\n </td> <td>Line break </td> </tr> <tr><td>\r </td> <td>Horizontal rule </td> </tr> <tr><td>\p </td> <td>Page break </td> </tr> <tr><td>\\ </td> <td>\ </td> </tr> </table><p>Sample usage: "ax\^2\d + bx + w\_0\d = 0" displays ax<sup>2</sup> + bx + w<sub>0</sub> = 0 </p><p>"Try \bbold, \iitalic \dand \ttypewriter.\d" displays "Try <b>bold, </b><i>italic </i>and <code>typewriter</code>." </p><pre>: new-font ( n -- ) \ switch to a new font thisfont @ SWAP thisfont ! CASE [CHAR] i OF S" </i>" out ENDOF [CHAR] b OF S" </b>" out ENDOF [CHAR] t OF S" </code>" out ENDOF [CHAR] ^ OF S" </sup>" out ENDOF [CHAR] _ OF S" </sub>" out ENDOF ENDCASE ; : outh ( addr len -- ) \ HTMLized text output 999 bltally ! BOUNDS ?DO I C@ escape @ IF CASE [CHAR] \ OF S" \" out ENDOF [CHAR] n OF S" <br />" out ENDOF [CHAR] r OF hr ENDOF [CHAR] i OF I C@ new-font S" <i>" out ENDOF [CHAR] b OF I C@ new-font S" <b>" out ENDOF [CHAR] t OF I C@ new-font S" <code>" out ENDOF [CHAR] ^ OF I C@ new-font S" <sup>" out ENDOF [CHAR] _ OF I C@ new-font S" <sub>" out ENDOF [CHAR] d OF 0 new-font ENDOF no-escape I 1 out ENDCASE 0 escape ! ELSE CASE [CHAR] \ OF captive @ IF no-escape ELSE 1 escape ! THEN ENDOF [CHAR] & OF S" &amp;" out ENDOF [CHAR] < OF S" &lt;" out ENDOF [CHAR] > OF S" &gt;" out ENDOF [CHAR] " OF S" &quot;" out ENDOF [CHAR] © OF S" &copy;" out ENDOF BL OF bltally @ IF S" &nbsp;" ELSE S" " THEN out 1 bltally +! ENDOF I 1 out 0 bltally ! ENDCASE THEN LOOP escape @ IF no-escape THEN \ trailing \ S" " outln ; </pre><p>The fields in a table are separated by | (vertical bar) and end in |. </p><pre><b><a name="0">: gl-open ( -- ) </a></b></pre><p>Open glossary File </p><pre><b><a name="0">: gl-close ( -- ) </a></b></pre><p>Close glossary File </p><pre><b><a name="0">: gl-ancor ( -- ) </a></b></pre><p>Write ancor number </p><pre><b><a name="0">\ cr ." gl-create-entry: " prevline LCOUNT type </a></b></pre><p>Create a glossary entry </p><hr /> <h2>Glossary </h2><pre><b><a name="0">:noname ( <filename> -- ) </a></b></pre><p>Convert a file or files to HTML. Output filenames are included in the source file. </p><pre><b><a name="0">: q ( <string> -- ) </a></b></pre><p>Test a single line of text, outputting to the screen. </p><hr /><p>This file generated by <a href="dexh03.F">DexH</a></p> <hr /> </body></html> |
From: Dirk B. <db...@us...> - 2005-12-20 18:02:18
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19644/src/console Modified Files: ConsoleMenu.f Log Message: Added DexH to the Tool's menu of the console window. Index: ConsoleMenu.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/ConsoleMenu.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConsoleMenu.f 29 Aug 2005 15:56:28 -0000 1.4 --- ConsoleMenu.f 20 Dec 2005 18:02:03 -0000 1.5 *************** *** 143,149 **** \ INTERNAL \ internal definitions start here ! \ \ |Class MENUCONSOLE <Super MENUITEM \ Only for use with the console window ! \ \ :M DoMenu: ( IDM -- ) \ mid = --- 143,149 ---- \ INTERNAL \ internal definitions start here ! \ \ |Class MENUCONSOLE <Super MENUITEM \ Only for use with the console window ! \ \ :M DoMenu: ( IDM -- ) \ mid = *************** *** 152,156 **** \ [DEFINED] ledit-y [IF] getxy to ledit-y to ledit-x \ move lineeditor down \ [THEN] then ;M ! \ \ ;Class --- 152,156 ---- \ [DEFINED] ledit-y [IF] getxy to ledit-y to ledit-x \ move lineeditor down \ [THEN] then ;M ! \ \ ;Class *************** *** 245,248 **** --- 245,249 ---- MENULINE "&Help System" "help-system" MENULINE "Cross &reference lister" "xref" + MENULINE "&Dex - Document Extractor" "dexh" POPUP "&Macros" |
From: Dirk B. <db...@us...> - 2005-12-20 18:02:15
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19644/src/tools Modified Files: tools.f Log Message: Added DexH to the Tool's menu of the console window. Index: tools.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/tools/tools.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tools.f 29 Aug 2005 15:56:28 -0000 1.1 --- tools.f 20 Dec 2005 18:02:03 -0000 1.2 *************** *** 28,30 **** --- 28,36 ---- THEN ; is xref + defer dexh + :noname ( -- ) \ load the DexH tool + turnkeyed? 0= + \in-system-ok IF >system s" Tools/w32fdexh.f" INCLUDED system> + THEN ; is dexh + MODULE |
From: Dirk B. <db...@us...> - 2005-12-20 18:01:04
|
Update of /cvsroot/win32forth/win32forth/src/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18932/src/tools Added Files: DexH-Glossary.f DexH.f W32fdexh.f Log Message: DexH added --- NEW FILE: DexH-Glossary.f --- \ Word2Table.f \ Written June 13th, 2003 by di...@sc... (dbu) \ last changed on June 15th, 2003 - 10:15 (dbu) \ last changed on June 29th, 2003 - 10:16 (dbu) create OutputFile ," w32f-Glossary.txt" \ **************************************************************************** \ helper words \ **************************************************************************** [UNDEFINED] 2+ [if] CODE 2+ ( n1 -- n2 ) \ add two to n1 inc ebx inc ebx next c; [then] [UNDEFINED] 2- [if] CODE 2- ( n1 -- n2 ) \ sub two from n1 dec ebx dec ebx next c; [then] : "minus-path" { a1 n1 -- a2 n2 } \ remove path from filename \ scan to last '\' in filename a1 n1 + n1 [CHAR] \ -SCAN ?dup if n1 swap - 1- swap 1+ swap else drop a1 n1 then ; \ **************************************************************************** \ write output file \ **************************************************************************** [UNDEFINED] OutputFileHandle [if] 0 value OutputFileHandle \ hold's the handle of the output file [then] : output-close ( -- ) \ close output file OutputFileHandle ?dup if close-file drop 0 to OutputFileHandle then ; : output-open ( -- falg ) \ open output-file output-close OutputFile count r/w open-file swap to OutputFileHandle dup INVALID_HANDLE_VALUE = if drop OutputFile count r/w create-file swap to OutputFileHandle else drop OutputFileHandle file-append then ; : output-string ( addr count -- ) \ write a string to the output-file OutputFileHandle write-file drop ; : output-char ( char -- ) \ write a char to the output-file here c! here 1 output-string ; : output-tab ( -- ) \ write TAB to the output-file 9 output-char ; : output-cr ( -- ) \ write CR to the output-file 13 output-char 10 output-char ; : output-header ( -- ) \ write the header line to the output-file s" Name" output-string output-tab s" Stack" output-string output-tab s" Comment" output-string output-tab s" Type" output-string output-tab s" Class" output-string output-tab s" File" output-string output-cr ; \ **************************************************************************** \ parse input file \ **************************************************************************** 99 value definition-type create $definition-name 260 allot $definition-name off create $class-name 260 allot $class-name off false value InClass? : IsClass? ( -- f ) definition-type 8 = \ :class ? definition-type 9 = \ :object ? or ; : IsCloseingClass? ( -- f ) definition-type 10 = \ ;class ? definition-type 11 = \ ;object ? or ; : save-definition-name ( addr len f -- addr len ) if 2dup $definition-name place then IsClass? if 2dup $class-name place then IsCloseingClass? if $class-name off then ; : print-line { addr count char fSaveName -- addr' count' } \ write line to output file; stop on char count 0> if addr count char scan dup 0<> if 1- swap 1+ swap dup count swap - addr swap char bl = if 1- then fSaveName save-definition-name \ save name output-string else 2drop addr count fSaveName save-definition-name \ save name output-string addr 0 \ preevent stack underflow then else addr 0 \ preevent stack underflow then ; : print-definition-name ( addr count -- addr' count' ) \ write word name output file bl scan bl skip bl IsClass? print-line ; : print-stack-comment ( addr count -- addr' count' ) \ write stack-comment output file ?dup if bl skip dup if over c@ [char] ( = if [char] ) false print-line else over c@ [char] { = if [char] } false print-line then then then else 0 \ preevent stack underflow then ; : print-comment ( addr count -- ) \ write comment to output file ?dup if bl skip dup if over c@ [char] \ = if [char] \ skip bl skip output-string else 2drop then else 2drop then else drop then ; : print-definition-type ( -- ) \ write type of definition to output file definition-type case 0 of s" COLON" endof 1 of s" CODE" endof 2 of s" CONSTANT" endof 3 of s" DEFER" endof 4 of s" CREATE" endof 5 of s" VARIABLE" endof 6 of s" VALUE" endof 7 of s" METHOD" endof 8 of s" CLASS" endof 9 of s" OBJECT" endof 10 of s" ;CLASS" endof 11 of s" ;OBJECT" endof 99 of s" ?" endof endcase output-string ; : print-file-name ( #ancor -- ) \ write input file name to output file $infile lcount output-string s" #" output-string s>d (D.) output-string ; : is-definition-type ( addr1 len1 addr2 len2 -- f ) \ 4dup cr tab . space drop . drop \ 4dup cr tab type \ cr tab type COMPARE 0= ; : +word ( a1 n1 -- a2 n2 a3 n3 ) bl skip 2dup bl scan 2dup 2>r nip - 2r> 2swap ; : set-definition-type ( addr len n -- ) to definition-type 2drop ; : get-definition-type ( addr len -- ) \ get type of definition \ cr ." get-definition-type for: " 2dup type 99 to definition-type \ default: unkonwen 2dup upper +word 2nip -trailing 2dup s" :" is-definition-type if 0 set-definition-type exit then 2dup s" CODE" is-definition-type if 1 set-definition-type exit then 2dup s" CONSTANT" is-definition-type if 2 set-definition-type exit then 2dup s" DEFER" is-definition-type if 3 set-definition-type exit then 2dup s" CREATE" is-definition-type if 4 set-definition-type exit then 2dup s" VARIABLE" is-definition-type if 5 set-definition-type exit then 2dup s" VALUE" is-definition-type if 6 set-definition-type exit then 2dup s" :M" is-definition-type if 7 set-definition-type exit then 2dup s" :CLASS" is-definition-type if 8 set-definition-type true to InClass? exit then 2dup s" :OBJECT" is-definition-type if 9 set-definition-type true to InClass? exit then 2dup s" ;CLASS" is-definition-type if 10 set-definition-type false to InClass? exit then 2dup s" ;OBJECT" is-definition-type if 11 set-definition-type false to InClass? exit then ; \ 2drop ; : print-class-name ( -- ) InClass? IsClass? 0= and if $class-name count else s" " then output-string ; : process-word ( #ancor addr count -- ) \ process on line of the input file ?dup if print-definition-name output-tab ( #ancor addr' count' ) print-stack-comment output-tab ( #ancor addr' count' ) print-comment output-tab ( #ancor ) print-definition-type output-tab ( #ancor ) print-class-name output-tab ( #ancor ) print-file-name output-cr ( -- ) else 2drop then ; --- NEW FILE: W32fdexh.f --- \ $Id: W32fdexh.f,v 1.1 2005/12/20 18:00:50 dbu_de Exp $ needs tools/dexh create W32Fheader ,| <html> | ,| <head> | ,| <meta http-equiv="Content-Language" content="en-gb"> | ,| <meta name="GENERATOR" content="dexh00"> | ,| <meta name="ProgId" content="FrontPage.Editor.Document"> | ,| <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | ,| <title> | 0 c, create W32FHeaderA ,| </title><style><!-- | ,| h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } | ,| h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> | ,| </style> | ,| </head> | ,| <body><h1 align="center"> | ,| <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: W32fdexh.f,v 1.1 2005/12/20 18:00:50 dbu_de Exp $"> | ,| <img border="0" src="TELLUS.gif" align="left" width="32" height="32"></a> | ,| <img border="0" src="FORTHPRO.gif" | ,| width="32" height="32"> Win32Forth</h1> | 0 c, create W32FClassheaderA ,| </title><style><!-- | ,| h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } | ,| h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> | ,| </style> | ,| </head> | ,| <body><h1 align="center"> | ,| <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: W32fdexh.f,v 1.1 2005/12/20 18:00:50 dbu_de Exp $"> | ,| <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> | ,| <img border="0" src="../FORTHPRO.gif" | ,| width="32" height="32"> Win32Forth</h1> | 0 c, create W32FTrailer ,| <hr><p>Document $Id: W32fdexh.f,v 1.1 2005/12/20 18:00:50 dbu_de Exp $</p> | ,| </body></html> | 0 c, : W32FDocs ( -- ) W32Fheader to HtmlHeader W32FheaderA to HtmlheaderA W32FTrailer to HtmlTrailer ; : W32FClassDocs ( -- ) W32Fheader to HtmlHeader W32FClassheaderA to HtmlheaderA W32FTrailer to HtmlTrailer ; : DexDocs ( -- ) DexHTMLheader to HTMLheader DexHTMLheaderA to HTMLheaderA DexHTMLtrailer to HTMLtrailer ; cr .( DexH -- Document Extractor loaded ) cr cr .( Usage:" dex <filename> ) --- NEW FILE: DexH.f --- \ $Id: DexH.f,v 1.1 2005/12/20 18:00:50 dbu_de Exp $ ( *! dexh DexH ) ( *T DexH -- Document Extractor, HTML output ) \ *Q Version 3 \ ** Primary contributors: Brad Eckert br...@SP... ( *Q Abstract ) ( ** DexH is a simple literate programming tool inspired by MPE's DOCGEN. DexH ) ( ** can also be used to write articles about Forth featuring a mixture of ) ( ** documentation and source code. DexH is a standalone program that processes) ( ** a Forth source file. The following command does the conversion: \n ) ( ** \bDEX input_filename\d ) ( *S Commands ) ( *P Commands are embedded within comments. You can use the following formats, ) ( ** with either starting at the first column. ) \ *B ( ?? ... ) where ?? is the command, or \ *B \ ?? ... ( *P You can append HTML to created files by DEXing any number of source files ) ( ** but you should use a *Z command to complete the HTML. ) ( *L |c||l| ) ( *| Command | Effect | ) ( *| ** | continuation of G, E or P | ) ( *| *! | create and select a new output file | ) ( *| *> | select an existing file to add text to | ) ( *| *T | Title | ) ( *| *Q | Quotation or abstract | ) ( *| *S | Section | ) ( *| *N | Sub-section | ) ( *| *P | Paragraph | ) ( *| *E | Paragraph which is a code example | ) ( *| *B | Bullet entry | ) ( *| *G | Glossary entry for the previous line | ) ( *| *R | raw LaTeX | ) ( *| *W | raw HTML | ) ( *| *Z | End output | ) ( *| *+ | Include source code as document text | ) ( *| *- | Turn off source code inclusion | ) anew -DexH.f internal \ Set to true when a seperate glossary.txt should be created \ Still work in progress... (dbu) 0 constant create-glossary-file? external ( *P DexH is ANS Forth except for the need for BOUNDS, SCAN, SKIP and LCOUNT. ) ( ** They are commonly used words but redefined here for completeness. ) ( *+ ) \ : BOUNDS OVER + SWAP ; \ : SCAN ( addr len char -- addr' len' ) \ >R BEGIN DUP WHILE OVER C@ R@ <> \ WHILE 1 /STRING REPEAT THEN R> DROP ; \ : SKIP ( addr len char -- addr' len' ) \ >R BEGIN DUP WHILE OVER C@ R@ = \ WHILE 1 /STRING REPEAT THEN R> DROP ; \ : LCOUNT ( addr -- addr' len ) DUP CELL+ SWAP @ ; ( *P Some files use very long lines, which is desirable for long sections of ) ( ** documentation. You can allocate buffers for lines longer than 2000 chars ) ( ** by changing the following line: ) 2000 CHARS CONSTANT max$ ( *- ) CREATE inbuf max$ 2 CELLS + ALLOT \ current line CREATE prevline max$ 2 CELLS + ALLOT \ previous line CREATE XPAD max$ 2 CELLS + ALLOT \ temporary ( *+ ) ( *P HTML needs some canned boilerplate. This is created by ,| since HTML ) ( ** doesn't use | characters. ) : (,$) ( a len -- ) DUP C, 0 ?DO COUNT C, LOOP DROP ; : ,| ( <text> -- ) [CHAR] | WORD COUNT -TRAILING (,$) ; CREATE DexHTMLheader ,| <?xml version="1.0"?> | ,| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ,| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ,| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ,| <head> | ,| <meta http-equiv="Content-Type" content="text/xml; charset=iso-8859-1" />| ,| <meta name="GENERATOR" content="DexH v03" /> | ,| <style type="text/css"> | ,| </style> | ,| <title> | 0 C, ( *- ) DexHTMLheader value HTMLheader CREATE DexHTMLheaderA ,| </title> | ,| </head> | ,| <body> | 0 C, DexHTMLheaderA value HTMLheaderA CREATE DexHTMLtrailer ,| <hr /> | ,| </body></html> | 0 C, DexHTMLtrailer value HTMLtrailer 0 VALUE outfile \ The current output file 0 VALUE infile 0 VALUE echoing 0 value plain \ Echo the code as output 0 VALUE mode 0 VALUE gl-outfile \ The glossary current output file ( *P All output is via OUT and OUTLN, which can be sent to the screen for ) ( ** debugging purposes. ) ( *+ ) 0 VALUE testing \ screen is for testing : werr ( n -- ) ABORT" Error writing file" ; : out ( a len -- ) testing IF TYPE ELSE outfile WRITE-FILE werr THEN ; : outln ( a len -- ) testing IF TYPE CR ELSE outfile WRITE-LINE werr THEN ; ( *- ) : boiler ( addr -- ) BEGIN COUNT DUP WHILE 2DUP + >R outln R> REPEAT 2DROP ; : tag| ( <name><str> -- ) CREATE ,| DOES> COUNT out ( ln ) ; tag| +t <table border="1"> | \ table tag| -t </table> | tag| +b <ul><li> | \ bullets tag| -b </li></ul> | tag| ~b </li><li> | tag| +e <pre> | \ code paragraph tag| -e </pre> | tag| +p <p> | \ paragraph tag| -p </p> | tag| +g <pre><b> | \ preformatted bold glossary tag| -g </b></pre> | tag| hr <hr /> | \ rule tag| +h1 <h1> | \ title tag| -h1 </h1> | tag| +h2 <h2> | \ section tag| -h2 </h2> | tag| +h3 <h3> | \ sub-section tag| -h3 </h3> | tag| +qu <h3><i> | \ quotation or abstract tag| -qu </i></h3> | tag| +au <h4><i> | \ Author tag| -au </i></h4> | tag| -a </a> tag| +n <a name=" | tag| -n "> | tag| +href <a href=" | tag| -href "> | ( *P Some characters are replaced by special strings so they can't be ) ( ** interpreted as tags. Also, runs of blanks need special treatment. ) ( ** Some escape sequences are supported: ) ( *L |c||l| ) ( *| \bseq\d | \bEscape command \d | ) ( *| \\i | Italics | ) ( *| \\b | Bold | ) ( *| \\t | Typewriter | ) \ *| \\^ | Superscript (i.e. ax\\^2\\d+bx+c=0) | \ *| \\_ | Subscript | \ *| \\d | Default font (ends italic, superscript, etc.) | ( *| \\n | Line break | ) ( *| \\r | Horizontal rule | ) ( *| \\p | Page break | ) ( *| \\\\ | \ | ) \ *P Sample usage: \ ** "ax\\^2\\d + bx + w\\_0\\d = 0" displays ax\^2\d + bx + w\_0\d = 0 \ *P "Try \\bbold, \\iitalic \\dand \\ttypewriter.\\d" displays \ ** "Try \bbold, \iitalic \dand \ttypewriter\d." VARIABLE bltally \ counts runs of blanks VARIABLE thisfont \ current font attributes VARIABLE escape \ escape sequence in progress? VARIABLE captive \ ESC sequence not allowed : no-escape ( -- ) S" \" out 0 escape ! ; ( *+ ) : new-font ( n -- ) \ switch to a new font thisfont @ SWAP thisfont ! CASE [CHAR] i OF S" </i>" out ENDOF [CHAR] b OF S" </b>" out ENDOF [CHAR] t OF S" </code>" out ENDOF [CHAR] ^ OF S" </sup>" out ENDOF [CHAR] _ OF S" </sub>" out ENDOF ENDCASE ; : outh ( addr len -- ) \ HTMLized text output 999 bltally ! BOUNDS ?DO I C@ escape @ IF CASE [CHAR] \ OF S" \" out ENDOF [CHAR] n OF S" <br />" out ENDOF [CHAR] r OF hr ENDOF [CHAR] i OF I C@ new-font S" <i>" out ENDOF [CHAR] b OF I C@ new-font S" <b>" out ENDOF [CHAR] t OF I C@ new-font S" <code>" out ENDOF [CHAR] ^ OF I C@ new-font S" <sup>" out ENDOF [CHAR] _ OF I C@ new-font S" <sub>" out ENDOF [CHAR] d OF 0 new-font ENDOF no-escape I 1 out ENDCASE 0 escape ! ELSE CASE [CHAR] \ OF captive @ IF no-escape ELSE 1 escape ! THEN ENDOF [CHAR] & OF S" &" out ENDOF [CHAR] < OF S" <" out ENDOF [CHAR] > OF S" >" out ENDOF [CHAR] " OF S" "" out ENDOF [CHAR] © OF S" ©" out ENDOF BL OF bltally @ IF S" " ELSE S" " THEN out 1 bltally +! ENDOF I 1 out 0 bltally ! ENDCASE THEN LOOP escape @ IF no-escape THEN \ trailing \ S" " outln ; ( *- ) : outt ( a n -- ) out ; \ output as title string \ : lastchar ( a n -- a n c ) \ 2DUP 1- CHARS + C@ ; : line ( -- a len ) inbuf LCOUNT 5 /STRING \ remove ( ** and ) or \ ** inbuf CELL+ C@ [CHAR] ( = IF lastchar [CHAR] ) = IF 1- THEN THEN -TRAILING ; : _parse ( $line char -- $line' $ ) >R 2DUP R@ SKIP R> SCAN BL SCAN \ parse out a substring 2SWAP 2 PICK - ; : closeout ( -- ) outfile ?DUP IF CLOSE-FILE DROP THEN 0 TO outfile ; : end ( -- ) \ insert end tags mode CASE [CHAR] P OF -p ENDOF [CHAR] E OF -e ENDOF [CHAR] B OF -b ENDOF [CHAR] L OF -t ENDOF ENDCASE BL TO mode ; CREATE $infile max$ 2 CELLS + ALLOT \ file name 0 value #gl-ancor : switchfile ( -- $other $name io ) end closeout line BL _parse \ get filename (minus extension) >R XPAD R@ MOVE S" .htm" XPAD R@ CHARS + SWAP MOVE \ add file extension xpad R@ 4 CHARS + $infile lplace \ save file name 0 to #gl-ancor \ reset ancor XPAD R> 4 CHARS + w/o ; : pgraph ( -- ) +p line outh [CHAR] P TO mode ; : egraph ( -- ) +e line outh [CHAR] E TO mode ; : iscommand? ( $ -- ) inbuf CELL+ 3 COMPARE 0= ; \ *P The fields in a table are separated by | (vertical bar) and end in |. : table| ( -- ) \ add line to a table line BEGIN [CHAR] | _parse BL SKIP 1- 0 MAX -TRAILING DUP IF S" <td>" out outh S" </td>" outln ELSE 2DROP 2DROP EXIT THEN AGAIN ; fload tools/DexH-Glossary.f : gl-open ( -- ) \ *G Open glossary File create-glossary-file? if output-open drop then ; : gl-close ( -- ) \ *G Close glossary File create-glossary-file? if output-close then ; : gl-ancor ( -- ) \ *G Write ancor number #gl-ancor s>d (D.) out ; CREATE $line max$ 2 CELLS + ALLOT \ previous line : gl-get-type ( addr len - f ) $line lplace $line lcount get-definition-type definition-type 99 <> ; : gl-entry ( addr len -- ) cr 2dup type 2dup gl-get-type if $line lplace #gl-ancor $line lcount process-word else 2drop cr ." Line: " $line lcount type ." skipped" then ; \ debug gl-entry : gl-create-entry ( -- ) \ cr ." gl-create-entry: " prevline LCOUNT type \ *G Create a glossary entry +n gl-ancor -n prevline LCOUNT outh -a create-glossary-file? if prevline LCOUNT gl-entry 1 +to #gl-ancor then ; : command ( c -- ) plain IF -e 0 TO plain THEN \ terminate plain text CASE [CHAR] * OF line outh ENDOF [CHAR] ! OF switchfile create-file abort" Can't create file" TO outfile \ create and select a new file HTMLheader boiler outt \ add title HTMLheaderA boiler ENDOF [CHAR] > OF switchfile open-file abort" Can't open file" TO outfile 2DROP outfile FILE-SIZE DROP outfile REPOSITION-FILE DROP ENDOF [CHAR] T OF end hr +h1 line outh -h1 hr ENDOF [CHAR] S OF end +h2 line outh -h2 ENDOF [CHAR] N OF end +h3 line outh -h3 ENDOF [CHAR] A OF end +au line outh -au +p [CHAR] P TO mode ENDOF [CHAR] Q OF end +qu line outh -qu +p [CHAR] P TO mode ENDOF [CHAR] P OF end pgraph ENDOF [CHAR] E OF end egraph ENDOF [CHAR] B OF mode [CHAR] B <> IF end +b ELSE ~b THEN line outh [CHAR] B TO mode ENDOF [CHAR] G OF end +g gl-create-entry -g pgraph ENDOF [CHAR] W OF end line outln ENDOF [CHAR] + OF end +e 1 TO plain 1 TO echoing ENDOF [CHAR] - OF end 0 TO echoing ENDOF [CHAR] L OF end +t [CHAR] L TO mode ENDOF [CHAR] | OF S" <tr>" out table| S" </tr>" outln ENDOF [CHAR] Z OF end HTMLtrailer boiler ENDOF ENDCASE ; : process-line ( -- ) \ process INBUF S" ( *" iscommand? S" \ *" iscommand? OR inbuf @ 3 > AND IF 0 captive ! inbuf 3 CHARS + CELL+ C@ command \ a command ELSE end echoing \ not a command IF plain 0= IF 1 TO plain +e THEN 1 captive ! inbuf LCOUNT outh THEN THEN inbuf prevline OVER @ CELL+ MOVE ; \ save the old line ( *W <hr /> ) ( *S Glossary ) :noname ( <filename> -- ) ( *G Convert a file or files to HTML. Output filenames are included in the ) ( ** source file. ) 0 TO testing \ output to file 0 TO echoing 0 TO plain 0 TO mode \ reset modes 0 escape ! BL PARSE 2dup cr ." Processing file: " type R/O OPEN-FILE ABORT" Missing input file" TO infile gl-open prevline max$ BLANK BEGIN inbuf max$ BL FILL \ convert tabs to spaces XPAD max$ infile READ-LINE ABORT" Error reading file" >R >R 0 XPAD R> BOUNDS ( idx . . ) ?DO I C@ 9 = IF 3 RSHIFT 1+ 3 LSHIFT \ tab ELSE I C@ OVER CHARS CELL+ inbuf + C! 1+ DUP max$ = IF CR ." Input line too long" THEN THEN LOOP R> ( len eof ) WHILE inbuf ! process-line REPEAT DROP closeout infile CLOSE-FILE DROP \ close files \in-system-ok gl-close ; is dexh ' dexh alias dex : q ( <string> -- ) ( *G Test a single line of text, outputting to the screen. ) 1 TO testing -1 PARSE inbuf OVER ! inbuf CELL+ SWAP MOVE process-line ; \ *W <hr /><p>This file generated by <a href="dexh03.F">DexH</a></p> \ *Z module |
From: Dirk B. <db...@us...> - 2005-12-17 15:18:09
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7804/doc/classes Added Files: Generic.htm Window.htm gdiBase.htm gdiPen.htm Log Message: Started documentation of the classes defined in w32f. --- NEW FILE: Generic.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: Generic.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>Generic-Window -- Base class for all window objects. </h1><hr /><p>Generic-Window is the base class for all window objects. This class contains a single ivar, hWnd, that is the (MS Windows) handle for the window. This class encapsulates all the Win32 API calls that specify a window handle. There will be 3 subclasses of Generic-Window: </p><pre> Window Adds a device context and the ablility to display text and graphics output. Control Adds support for the standard Win32 controls with subclassing. Dialog Support for dialog boxes </pre><p>Since Generic-Window is a generic class it should not be used to create any instances. <br /> The Global Rectangle objects wRect and WndRect ( originally defined in Window.f ) have been replaced by a Rectangle IVAR WinRect so that Windows in different threads don't interfere with each other's drawing operations. <br /> For backwards compatibility wRect is defined as an int which is set to the address of WinRect by the ClassInit: method ( and WndRect is defined as an alias of wRect in Window.f. Also ) however WinRect should be used in new code since it uses early binding. ClientRect in class EditControl ( in Controls.f ) is also defined as an alias of wRect for compatibility. <br /> We also provide wRect as an alias of TempRect for compatibility. <br /> Temporarily added new generic class Dialog&Control and moved some code into it and duplicated the same code in Class Window so that Ivar offsets in Class Window are the same for temporary compatibility. </p><h2>Glossary </h2><pre><b><a name="0">:CLASS Generic-Window <Super Object </a></b></pre><p>Base class for all window objects. </p><h3>Instance Variables </h3><pre><b><a name="0">int hWnd </a></b></pre><p>handle to Win32 window object </p><h3>Methods </h3><pre><b><a name="0">:M Classinit: ( -- ) </a></b></pre><p>Init the class </p><pre><b><a name="0">:M GetHandle: ( -- hWnd ) </a></b></pre><p>Get the window handle </p><pre><b><a name="0">:M PutHandle: ( hWnd -- ) </a></b></pre><p>Set the window handle </p><pre><b><a name="0">:M ZeroWindow: ( -- ) </a></b></pre><p>Clear the window handle </p><pre><b><a name="0">:M DestroyWindow: ( -- ) </a></b></pre><p>Destroy the window </p><pre><b><a name="0">:M Close: ( -- ) </a></b></pre><p>Close the window </p><pre><b><a name="0">:M Paint: ( -- ) </a></b></pre><p>force window repaint </p><pre><b><a name="0">:M SetAlign: ( flag id -- ) \ hold over from the past </a></b></pre><p>Obsolescent Method use SetDlgItemAlign: instead </p><pre><b><a name="0">;CLASS </a></b></pre><p>End of generic-window class </p><hr><p>Document $Id: Generic.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiBase.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiBase.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>GdiObject -- Base class for GDI objects </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><p>GdiObject is the base class for all GDI objects. This class contains a single ivar, hObject, that is the (MS Windows) handle for the GDI object. <br /> There will be the following subclasses of GdiObject: </p><pre>gdiPen Class for cosmetic pen's gdiGeometricPen Class for geometric pen's gdiSolidBrush Solid brush class gdiHatchBrush Hatch brush class gdiPatternBrush Pattern brush class gdiDIBPatternBrush DIBPattern brush class GdiFont Class for windows fonts gdiBitmap Class for bitmaps gdiMetafile Class for enhanced metafiles gdiDC Base device context class gdiWindowDC Device context class for windows gdiMetafileDC Device context class for enhanced metafiles </pre><p>Since GdiObject is a generic class it should not be used to create any instances. <br /> </p><h2>Glossary </h2><pre><b><a name="0">:class GdiObject <super object </a></b></pre><p>GdiObject is the base class for all GDI Object classes. </p><pre><b><a name="0">:M ZeroHandle: ( -- ) </a></b></pre><p>Clear the handle of the object. <br /> If the current handle of the object is valid it will not be destroyed. </p><pre><b><a name="0">:M GetType: ( -- n ) </a></b></pre><p>Get the type of the object. <br /> Possible return values are: </p><table border="1"><tr><td>OBJ_BRUSH </td> <td>Brush </td> </tr> <tr><td>OBJ_COLORSPACE </td> <td>Color space </td> </tr> <tr><td>OBJ_DC </td> <td>Device context </td> </tr> <tr><td>OBJ_ENHMETADC </td> <td>Enhanced metafile DC </td> </tr> <tr><td>OBJ_ENHMETAFILE </td> <td>Enhanced metafile </td> </tr> <tr><td>OBJ_EXTPEN </td> <td>Extended pen </td> </tr> <tr><td>OBJ_FONT </td> <td>Font </td> </tr> <tr><td>OBJ_MEMDC </td> <td>Memory DC </td> </tr> <tr><td>OBJ_METAFILE </td> <td>Metafile </td> </tr> <tr><td>OBJ_METADC </td> <td>Metafile DC </td> </tr> <tr><td>OBJ_PAL </td> <td>Palette </td> </tr> <tr><td>OBJ_PEN </td> <td>Pen </td> </tr> <tr><td>OBJ_REGION </td> <td>Region </td> </tr> </table><pre><b><a name="0">:M GetObject: ( cbBuffer lpvObject -- n ) </a></b></pre><p>Get information for the object. <br /> If the function succeeds, and lpvObject is a valid pointer, the return value is the number of bytes stored into the buffer. <br /> If the function succeeds, and lpvObject is NULL, the return value is the number of bytes required to hold the information the function would store into the buffer. If the function fails, the return value is zero. </p><pre><b><a name="0">:M Destroy: ( -- ) </a></b></pre><p>Destroy the object. </p><pre><b><a name="0">:M GetHandle: ( -- hObject ) </a></b></pre><p>Get the handle of the object. </p><pre><b><a name="0">:M SetHandle: ( hObject -- ) </a></b></pre><p>Set the handle of the object. <br /> If the current handle of the object is valid it will be destroyed. </p><pre><b><a name="0">:M Valid?: ( -- f ) </a></b></pre><p>Check if this object is valid. </p><pre><b><a name="0">;class </a></b></pre><p>End of class </p><pre><b><a name="0">: .gdi-objects ( -- ) \ w32f sys </a></b></pre><p>Display GDI objects whitch are currently defined. </p><pre><b><a name="0">: ?IsGdiObject ( a1 -- f ) \ w32f </a></b></pre><p>Check if a1 is the address of a GdiObject. </p><pre><b><a name="0">: GetGdiObjectHandle { GdiObject -- handle } \ w32f </a></b></pre><p>Check if GdiObject is the address of a valid GdiObject. If so return the handle of the object. </p><pre><b><a name="0">: ?GdiCheck ( a1 -- a1 ) \ w32f </a></b></pre><p>Verify if a1 is the address of a GdiObject. If a1 isn't the address of a GdiObject and the error checking is enabled the application will be aborted. <br /> Use it for debugging only. </p><hr><p>Document $Id: gdiBase.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $</p> </body></html> --- NEW FILE: gdiPen.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: gdiPen.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>GdiPen -- Class for GDI Pens </h1><hr /><h3><i>Version 1.0 </i></h3><p>This GDI class library was written and placed in the Public Domain in 2005 by Dirk Busch </p><h2>Glossary </h2><a name="gdiPen"></a> <pre><b><a name="0">:class gdiPen <super gdiObject </a></b></pre><p>Class for cosmetic pen's </p><pre><b><a name="0">:M ClassInit: ( -- ) </a></b></pre><p>Init the class </p><pre><b><a name="0">:M SetStyle: ( style -- ) </a></b></pre><p>Set Syle of the pen. Possible values are: </p><table border="1"><tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_DOT </td> <td>The pen is dotted. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_DASHDOT </td> <td>The pen has alternating dashes and dots. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_DASHDOTDOT </td> <td>The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_NULL </td> <td>The pen is invisible. </td> </tr> <tr><td>PS_INSIDEFRAME </td> <td>The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> </table><pre><b><a name="0">:M SetWidth: ( width -- ) </a></b></pre><p>Set the width of the pen in logical units. If Width is zero, the pen is a single pixel wide, regardless of the current transformation. </p><pre><b><a name="0">:M SetRValue: ( r -- ) </a></b></pre><p>Set the red component of the pen color. </p><pre><b><a name="0">:M SetGValue: ( g -- ) </a></b></pre><p>Set the green component of the pen color. </p><pre><b><a name="0">:M SetBValue: ( b -- ) </a></b></pre><p>Set the blue component of the pen color. </p><pre><b><a name="0">:M SetRGB: ( r g b -- ) </a></b></pre><p>Set the red, green and blue component of the pen color. </p><pre><b><a name="0">:M SetColor: ( colorref -- ) </a></b></pre><p>Set color of the pen. </p><pre><b><a name="0">:M SetSysColor: ( n -- ) </a></b></pre><p>Set the color of the pen to a system color. </p><pre><b><a name="0">:M ChooseColor: ( hWnd -- f ) </a></b></pre><p>Open a dialog to choose the color of the pen. </p><pre><b><a name="0">:M GetStyle: ( -- style ) </a></b></pre><p>Get Syle of the pen. Possible values are: </p><table border="1"><tr><td>PS_DASH </td> <td>The pen is dashed. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_DOT </td> <td>The pen is dotted. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_DASHDOT </td> <td>The pen has alternating dashes and dots. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_DASHDOTDOT </td> <td>The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. </td> </tr> <tr><td>PS_NULL </td> <td>The pen is invisible. </td> </tr> <tr><td>PS_INSIDEFRAME </td> <td>The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens. </td> </tr> </table><pre><b><a name="0">:M GetWidth: ( -- width ) </a></b></pre><p>Get the width of the pen in logical units. If the width is zero, the pen is a single pixel wide, regardless of the current transformation. </p><pre><b><a name="0">:M GetRValue: ( -- r ) </a></b></pre><p>Get the red component of the pen color. </p><pre><b><a name="0">:M GetGValue: ( -- g ) </a></b></pre><p>Get the green component of the pen color. </p><pre><b><a name="0">:M GetBValue: ( -- b ) </a></b></pre><p>Get the blue component of the pen color. </p><pre><b><a name="0">:M GetColor: ( -- colorref ) </a></b></pre><p>Get the color of the pen as a windows COLORREF value. </p><pre><b><a name="0">:M Create: ( -- f ) </a></b></pre><p>Create the pen with the current style, color and width. </p><pre><b><a name="0">:M CreateIndirect: ( pLogpen -- f ) </a></b></pre><p>The CreateIndirect function creates a logical cosmetic pen that has the style, width, and color specified in a structure. </p><pre><b><a name="0">;class </a></b></pre><p>End of class </p><a name="gdiGeometricPen"></a> <pre><b><a name="0">:class gdiGeometricPen <super gdiObject </a></b></pre><p>Class for geometric pen's <br /> Note: this class isn't implemented yet </p><pre><b><a name="0">:M ClassInit: ( -- ) </a></b></pre><p>Init the class </p><pre><b><a name="0">;class </a></b></pre><p>End of class </p><hr><p>Document $Id: gdiPen.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $</p> </body></html> --- NEW FILE: Window.htm --- <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="dexh00"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title> </title><style><!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body><h1 align="center"> <a href="mailto:win...@ya...?subject=DOC:Doc error in $Id: Window.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $"> <img border="0" src="../TELLUS.gif" align="left" width="32" height="32"></a> <img border="0" src="../FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <hr /><h1>Window -- Class for window objects. </h1><hr /><h2>Glossary </h2><pre><b><a name="0">:CLASS Window <SUPER Generic-Window </a></b></pre><p>Class for window objects. </p><pre><b><a name="0">:M ClassInit: ( -- ) </a></b></pre><p>Init the class </p><h3>Window sizeing </h3><pre><b><a name="0">:M GetSize: ( -- w h ) </a></b></pre><p>Get the size (width and height) of the window. </p><pre><b><a name="0">:M Width: ( -- width ) </a></b></pre><p>Get the width of the window. </p><pre><b><a name="0">:M Height: ( -- height ) </a></b></pre><p>Get the height of the window. </p><pre><b><a name="0">:M SetSize: ( w h -- ) </a></b></pre><p>Set the size (width and height) of the window. <br /> Note: The window itself will not be resized. </p><pre><b><a name="0">:M On_Size: ( -- ) </a></b></pre><p>User windows should override the On_Size: method. When this method is called, the variables Width and Height will have already been set. <br /> default does nothing </p><pre><b><a name="0">:M MinSize: ( -- width height ) </a></b></pre><p>To change the minimum window size, override the MinSize: method. </p><pre><b><a name="0">:M MaxSize: ( -- width height ) </a></b></pre><p>To change the maximum window size, override the MaxSize: method. </p><pre><b><a name="0">:M StartSize: ( -- width height ) </a></b></pre><p>To change the size of the window when it's created, override the StartSize: method or call the SetSize: method before you create the window. </p><pre><b><a name="0">:M SetOrigin: ( x y -- ) </a></b></pre><p>To set the upper left corner of the window when it's created call the SetOrigin: method before you create the window. </p><pre><b><a name="0">:M StartPos: ( -- left top ) </a></b></pre><p>User windows should override the StartPos: method to set the upper left corner of the window when it's created. </p><h3>Window creation </h3><pre><b><a name="0">:M On_Init: ( -- ) </a></b></pre><p>Thing's to do during creation of the window. </p><pre><b><a name="0">:M On_Done: ( -- ) </a></b></pre><p>Thing's to do when the window will be destroyed. </p><pre>Your On_Init: and On_Done: methods should look like this: :M On_Init: ( -- ) On_Init: super ... other initialization ... ;M :M On_Done: ( -- ) ... other cleanup ... On_Done: super ;M An application window will need the following methods, which cause the program to terminate when the user closes the main application window. Don't un-comment these out here, copy them into your application window Object or Class, and them un-comment them out. :M WM_CLOSE ( h m w l -- res ) bye 0 ;M :M On_Done: ( h m w l -- res ) 0 call PostQuitMessage drop \ terminate application On_Done: super \ cleanup the super class 0 ;M </pre><pre><b><a name="0">:M SetClassName: ( adr len -- ) </a></b></pre><p>User windows should override the SetClassName: method to set the window class name. </p><pre><b><a name="0">:M GetClassName: ( -- adr len ) </a></b></pre><p>Get the window class name </p><pre><b><a name="0">:M SetParent: ( hwndParent -- ) </a></b></pre><p>Set owner window (0 if no parent) </p><pre><b><a name="0">:M ParentWindow: ( -- hwndparent | 0 if no parent ) </a></b></pre><p>Get owner window </p><pre><b><a name="0">:M DefaultCursor: ( -- cursor-id ) </a></b></pre><p>User windows should override the DefaultCursor: method to set the default cursor for window </p><pre><b><a name="0">:M DefaultIcon: ( -- hIcon ) </a></b></pre><p>User windows should override the WindowStyle: method to set the default icon handle for window. </p><pre><b><a name="0">:M WindowStyle: ( -- style ) </a></b></pre><p>User windows should override the WindowStyle: method to set the window style. </p><pre><b><a name="0">:M ExWindowStyle: ( -- extended_style ) </a></b></pre><p>User windows should override the ExWindowStyle: method to set the extended window style. </p><pre><b><a name="0">:M WindowTitle: ( -- Zstring ) </a></b></pre><p>User windows should override the WindowTitle: method to set the window caption. </p><h3>Painting </h3><pre><b><a name="0">WinDC dc </a></b></pre><p>The window's device context. <br /> It will be valid only when handling the WM_PAINT message (see On_Paint: method) </p><pre><b><a name="0">Record: &ps </a></b></pre><p>The PAINTSTRUCT for Begin- and EndPaint <br /> It will be valid only when handling the WM_PAINT message (see On_Paint: method) </p><pre><b><a name="0">:M On_EraseBackground: ( hwnd msg wparam lparam -- res ) </a></b></pre><p>User windows should override the On_EraseBackground: method to handle WM_ERASEBKGND messages. <br /> Default does nothing </p><pre><b><a name="0">:M On_Paint: ( -- ) </a></b></pre><p>User windows should override the On_Paint: method to handle WM_PAINT messages. <br /> Before this method is called BeginPaint will be called so that the PAINTSTRUCT (&PS ivar) and the window device context (DC ivar) are initialized. <br /> Check ps_fErase in your method to see if the background of the window should be drawn and use ps_left, ps_top, ps_right and ps_bottom to see whitch part of the window should be painted. <br /> Default does nothing </p><h3>Menu support </h3><pre><b><a name="0">:M WindowHasMenu: ( -- flag ) </a></b></pre><p>Override this method if your window has a menu </p><h3>Cursor (caret) support </h3><pre><b><a name="0">:M MoveCursor: ( gx gy -- ) </a></b></pre><p>Move the caret </p><pre><b><a name="0">:M MakeCursor: ( gx gy width height -- ) </a></b></pre><p>Create the caret </p><pre><b><a name="0">:M DestroyCursor: ( -- ) </a></b></pre><p>Destroy the caret </p><pre><b><a name="0">:M ShowCursor: ( -- ) </a></b></pre><p>Show the caret </p><pre><b><a name="0">:M HideCursor: ( -- ) </a></b></pre><p>Hide the caret </p><pre><b><a name="0">:M On_SetFocus: ( h m w l -- ) </a></b></pre><p>Override the method to handle the WM_SETFOCUS message. <br /> Example: When cursor is used, you will need something like the following to control the position of the cursor in the window: </p><pre> cursor-col char-width * cursor-row char-height * char-width char-height MakeCursor: self </pre><pre><b><a name="0">:M On_KillFocus: ( h m w l -- ) </a></b></pre><p>Override the method to handle the WM_KILLFOCUS message. <br /> Example: Use only when you are displaying a cursor in the window: </p><pre> DestroyCursor: self </pre><h3>Keyboard and mouse handling </h3><pre><b><a name="0">:M PushKey: ( c1 -- ) </a></b></pre><p>override to process keys yoruself </p><h3>Message handling </h3><pre><b><a name="0">:M Win32Forth: ( h m w l -- ) </a></b></pre><p>If you define an application specific window class or window object that redefines the method Win32Forth: to perform its own function rather than just doing a beep, then your window will be able to handle interprocess messages. </p><pre><b><a name="0">:M DefWindowProc: ( h m w l -- res ) </a></b></pre><p>Call the DefaultWindowProc for the window. </p><h3>everything else... </h3><pre><b><a name="0">:M CenterWindow: ( -- x y ) </a></b></pre><p>Calc the position of the window to center it in the middle of it's parent window. Whe the windows has no parent it will be placed in the middle of the primary display monitor. </p><pre><b><a name="0">:M Enable: ( f1 -- ) </a></b></pre><p>Enable or disable the window. </p><pre><b><a name="0">:M GetWindowRect: ( -- left top right bottom ) </a></b></pre><p>The GetWindowRect method retrieves the dimensions of the bounding rectangle of the window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. </p><pre><b><a name="0">:M SetTitle: { adr len \ temp$ -- } </a></b></pre><p>Set the window title </p><pre><b><a name="0">;CLASS </a></b></pre><p>End of window class </p><pre><b><a name="0">: find-window ( z"a1 -- hWnd ) \ w32f </a></b></pre><p>Find a window </p><pre><b><a name="0">: send-window ( lParam wParam Message_ID hWnd -- ) \ w32f </a></b></pre><p>Send a message to a window </p><pre><b><a name="0">: LoadIconFile ( adr len -- hIcon ) \ w32f </a></b></pre><p>load an icon from a icon file </p><hr><p>Document $Id: Window.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $</p> </body></html> |
From: Dirk B. <db...@us...> - 2005-12-17 15:18:09
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7804/doc Modified Files: p-advanced.htm Added Files: p-classes.htm Log Message: Started documentation of the classes defined in w32f. Index: p-advanced.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-advanced.htm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** p-advanced.htm 14 Dec 2005 13:49:30 -0000 1.3 --- p-advanced.htm 17 Dec 2005 15:18:00 -0000 1.4 *************** *** 35,38 **** --- 35,39 ---- <li><a href="p-windlls.htm">Calling Windows Procedures</a></li> <li><a href="p-objects.htm">Object Oriented Programming</a></li> + <li><a href="p-classes.htm">Win32Forth Classes</a></li> <li><a href="p-module.htm">Using the Module Wordset</a></li> <li><a href="p-random.htm">The Random Number Generator</a></li> *************** *** 52,54 **** </body> ! </html> \ No newline at end of file --- 53,55 ---- </body> ! </html> --- NEW FILE: p-classes.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta name="GENERATOR" content="Chami HTML.KIT 1.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content= "text/html; charset=windows-1252"> <title>The Documentation Project</title> <style type="text/css"> <!-- h1 { font-family: Tahoma; font-size: 24pt; font-weight: bold } h2 { font-family: Tahoma; font-size: 18pt; font-weight: bold } --> </style> </head> <body> <h1 align="center"><img border="0" src="FORTHPRO.gif" width="32" height="32"> Win32Forth</h1> <h2 align="center"><font face="Tahoma"><a href= "mailto:win...@ya...?subject=DOC: Doc error in $Id: p-classes.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $"> <img border="0" src="TELLUS.gif" align="left" width="32" height= "32"></a>Classes</font></h2> <hr> <h2>Windows, Dialogs and Controls</h2> <a href="./classes/Generic.htm">Generic-Window</a> Base class for all window objects.<br> <a href="./classes/Window.htm">Window</a> Class for window objects. <h2>GDI</h2> <a href="./classes/gdiBase.htm">gdiBase</a> Base class for GDI objects.<br> <a href="./classes/gdiPen.htm#gdiPen">gdiPen</a> Class for cosmetic pen's.<br> <a href="./classes/gdiPen.htm#gdiGeometricPen">gdiGeometricPen</a> Class for geometric pen's. <hr> <p>Document $Id: p-classes.htm,v 1.1 2005/12/17 15:18:00 dbu_de Exp $</p> </body> </html> |
From: Dirk B. <db...@us...> - 2005-12-17 15:16:20
|
Update of /cvsroot/win32forth/win32forth/doc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7557/classes Log Message: Directory /cvsroot/win32forth/win32forth/doc/classes added to the repository |