/*
 * $Id: funclist.txt 13358 2009-12-22 02:50:24Z vszakats $
 */

/*
 * funclist.txt
 * List (and Description) of GTWVW .prg Callable Functions.
 * Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
 */

Contents

- Introduction

- GTWVW specific function list (with brief descriptions)
  = Window operation
  = GTWVW parameter settings
    == Paint Refresh Interval
    == Vertical/Horizontal Caret
    == Line Spacing
  = Status Bar
  = Timer
  = Tool Bar
  = Scroll Bar
  = Push Buttons
  = Progress Bar

- GTWVT compatibility function list (imported from GTWVT)
  = Window independent functions
  = Window dependent functions
  = General Windows API functions

- Callback functions

- Brief descriptions of some GTWVW functions imported from GTWVT

- Epilogue


/*-------------------------------------------------------------------*/
/*                                                                   */
/*               Introduction                                        */
/*                                                                   */
/*-------------------------------------------------------------------*/

This document contains list (and description) of GTWVW .prg callable functions.
These descriptions and function list are taken from GTWVW source code,
with only a few additional notes. I've done my best to list all GTWVW
functions here. However, you will see that some of them are not
accompanied with description at all. Additionally, even the descriptions
given herein may not be accurate.

In other words, do not take this document as a reference. It is merely
an aid to help you get start with GTWVW. If you need a complete reference,
read the source code :-).


/*-------------------------------------------------------------------*/
/*                                                                   */
/*               GTWVW specific functions                            */
/*                                                                   */
/*-------------------------------------------------------------------*/


/*-------------------------------------------------------------------*/
/*               Window Operation from .prg                          */
/*-------------------------------------------------------------------*/

/*
 *WVW_nOpenWindow(cWinName, row1, col1, row2, col2, ;
 *                nStyle, nParentWin)
 *rowx and colx are relative to MAIN WINDOW (not current window!)
 *rowx and colx are used for:
 *(1) positioning window to its initial position,
 *(2) determining the size of the window (new maxrow() and maxcol())
 *(3) saved into RowOfs and ColOfs for MainCoord mode
 *
 *nStyle is window style (eg. WS_OVERLAPPEDWINDOW, etc.)
 *       default is: WS_CAPTION|WS_SYSMENU |WS_CLIPCHILDREN
 *       WARNING: you must know what you're doing if you supplied this param
 *       NOTES: if you will use controls such as PUSHBUTTON,
 *              you MUST include WS_CLIPCHILDREN.
 *
 *nParentWin is parent window of the new on we're about to open.
 *       default is: current window (in Standard Mode)
 *                   last window (in MainCoord Mode)
 *       If you want the new window to not have parent,
 *       pass -1 as nParentWin.
 *
 *
 *returns window number if successful
 *returns 0 if failed
 */

/*WVW_lCloseWindow()
 *closes the last/topmost window
 *returns .t. if successful
 */

/*WVW_nNumWindows()
 *returns number of windows opened (including main window)
 */

/*WVW_xReposWindow()
 *reposition all windows to their initial position
 */

/*WVW_nSetCurWindow( nWinNum )   (0==MAIN)
 *assigns nWinNum as the new current window (s_usCurWindow)
 *returns old current window
 *example: saved := WVW_nSetCurWindow(0)
 *         ? "This will be displayed in Main Window"
 *         WVW_nSetCurWindow(saved)
 *notes: makes sense only if !s_bMainCoordMode
 */

/*WVW_nRowOfs( [nWinNum] )
 *returns row offset of window #nWinNum (0==MAIN), relative to Main Window
 *nWinNum defaults to current window
 */

/*WVW_nColOfs( [nWinNum] )
 *returns col offset of window #nWinNum (0==MAIN), relative to Main Window
 *nWinNum defaults to topmost window
 */

/*WVW_SetMainCoord( [lMainCoord] )
 *returns old setting of s_bMainCoordMode,
 *then assigns s_bMainCoordMode := lMainCoord (if supplied)
 */

/* WVW_ADDROWS( [nWinNum], nRows)
 * add nRows rows to window nWinNum (nRows may be < 0)
 * returns .t. if successful
 *
 * NOTES: newly added rows (for nRows>0) will be colored with
 *        column 0 of original last row
 * WARNING: no checking if window size will become larger than desktop area
 *          (except if in MainCoord Mode, because it is implied from
 *           restriction of resulted maxrow())
 */

/*
 *WVW_NOCLOSE( [nWinNum] )
 *disable CLOSE 'X' button of a window
 *
 *no return value
 */

/*
 *WVW_SETWINSTYLE( [nWinNum], [nStyle] )
 *Get/Set window style
 *NOTES: if window has controls (eg. pushbutton, scrollbar)
 *       you should include WS_CLIPCHILDREN in nStyle
 *
 *SIDE EFFECT:
 *       if window is hidden, applying nStyle here will cause it to show
 *
 *return Window Style prior to applying the new style
 */

/*-------------------------------------------------------------------*/
/*               GTWVW parameter setting from .prg                   */
/*-------------------------------------------------------------------*/

/*WVW_SetPaintRefresh( [nPaintRefresh] )
 *returns old setting of s_uiPaintRefresh (millisec between calls to WVW_PAINT)
 *then assigns s_uiPaintRefresh:= nPaintRefresh (if supplied)
 *NOTES: nPaintRefresh must be >= 50
 *       or nPaintRefresh == 0, causing Repaint to execute immediately, as GTWVT
 */

/*WVW_SetVertCaret( [lOn] )
 *if lOn is supplied:
 *lOn == .t.: turn caret into vertical caret
 *lOn == .f.: turn caret into horizontal caret
 *return old setting of s_bVertCaret
 */

/*WVW_SetDefLineSpacing( [nLineSpacing] )
 *returns old setting of s_byDefLineSpacing (default linespacing between lines)
 *then assigns s_byDefLineSpacing:= nLineSpacing (if supplied)
 *NOTES:
 * - nLineSpacing will be the default line spacing for all window opens
 * - nLineSpacing must be even, positive number <= 40
 *   otherwise it will be ignored
 * - to check line spacing being used by a window, use WVW_SetLineSpacing()
 */

/*WVW_SetLineSpacing( [nWinNum], [nLineSpacing] )
 *returns old setting of linespacing between lines in window nWinNum
 *then set the line spacing to nLineSpacing (if supplied)
 *NOTES:
 * - nLineSpacing must be even, positive number <= 40
 *   otherwise it will be ignored
 * - if window size will become too high, line spacing is restored
 * - to change default line spacing for next window open, use WVW_SetDefLineSpacing()
 */

/*WVW_NoStartupSubWindow( [lOn] )
 *if lOn is supplied:
 *lOn == .t.: when opening window, window will not be displayed
 *lOn == .f.: when opening window, window will be displayed (default)
 *return old setting of s_bNOSTARTUPWINDOW
 *
 *See Also: WVW_ShowWindow()
 */

/*-------------------------------------------------------------------*/
/* STATUS BAR                                                        */
/*-------------------------------------------------------------------*/

/*WVW_SBcreate( [nWinNum] )
 *create status bar for window nWinNum, with one part.
 *returns handle to status bar of windows nWinNum
 *returns 0 if failed, eg. if there is already a status bar for this window
 */

/*WVW_SBdestroy( [nWinNum] )
 *destroy status bar for window nWinNum
 */

/*WVW_SBaddPart(nWinNum, cMaxText, nWidth, nStyle, lResetParts, [cIcon , cToolTip])
 *ps.
 *lResetParts==.t. :: remove all previously created parts
 *nStyle: 0 (default), 0x0200 (SBT_POPOUT), 0x0100 (SBT_NOBORDERS)
 *nWidth: expected width in pixels
 *NOTE: if cMaxText is passed, nWidth is ignored. width of cMaxText will be used instead
 *NOTE: the leftmost part will eventually have width of remaining spaces
 *NOTE: cIcon and cToolTip does not work currently
 *
 *returns number of parts
 *returns 0 if failed
 */

/*WVW_SBrefresh(nWinNum)
 *reinitialize StatusBar's parts, eg. after window resize
 *returns number of parts
 *returns 0 if failed
 */

/*WVW_SBsetText([nWinNum], [nPart], cText)
 *Set Text of status bar's part #npart
 */

/*WVW_SBgetText([nWinNum], [nPart])
 *Get Text of status bar's part #npart
 */

/*WVW_SBgetparts([nWinNum])
 *Get number of parts in statusbar of window nWinNum
 */

/*-------------------------------------------------------------------*/
/* TIMER                                                             */
/*-------------------------------------------------------------------*/

/*WVW_SetTimer([nWinNum], nInterval)
 *set timer event for every nInterval millisec
 *(effective only if WVW_TIMER() function exists)
 *eg. it can be usefull to update clock on status bar
 *returns .t. if successfull
 */


/*WVW_KillTimer([nWinNum])
 *kill the timer event handler for window nWinNum
 *returns .t. if successfull
 */

/*-------------------------------------------------------------------*/
/* TOOLBAR                                                           */
/*-------------------------------------------------------------------*/

/*WVW_TBCreate([nWinNum], lDisplayText, nStyle, nSystemBitmap, nImageWidth, nImageHeight)
 *creates a toolbar at the top (no button initially)
 *lDisplayText==.f. button's string is used as tooltips (default)
 *nStyle: toolbar style, defaults to TBSTYLE_FLAT | TBSTYLE_TOOLTIPS
 *nSystemBitmap: 0:none, 1:small, 2:large (defaults: 1)
 *               small=16x16 large=24x24
 *nImageWidth/Height are in effect only if nSystemBitmap==0
 */

/*WVW_TBAddButton([nWinNum], nCommand, xBitmap, cLabel, nBitmapType,;
 *                           lMap3Dcolors)
 *adds one button on the right of existing buttons
 *xBitmap:
 *nBitmap is resource id. or use cBitmap as bitmap file name.
 *(bitmap from resources cannot have > 256 colors)
 *
 *cLabel: if lDisplayText, it will be displayed below the bitmap
 *        otherwise it will be used as tooltip
 *nBitmapType: 0:custom, 1:system std bitmap, 2:system view bitmap, 3:system hist bitmap
 *lMap3Dcolors: defaults to .f.
 *           (meaningfull for custom bitmap only)
 *           if .t. the following color mapping will be performed:
 *              RGB(192,192,192) --> COLOR_3DFACE   ("transparent")
 *              RGB(128,128,128) --> COLOR_3DSHADOW
 *              RGB(223,223,223) --> COLOR_3DLIGHT
 *           This might be desirable to have transparent effect.
 *           LIMITATION: this will work on 256 colored bitmaps only
 */


/*WVW_TBButtonCount([nWinNum])
 *returns number of buttons in toolbar on window nWinNum
 */

/*WVW_TBDelButton([nWinNum], nButton)
 *nButton is zero based index of button to delete
 *index=0 is the leftmost button
 *NOTE: button separator is indexed and deleteable too
 */

/*WVW_TBEnableButton([nWinNum], nButton, [lToggle])
 *nButton is zero based index of button to delete
 *index=0 is the leftmost button
 *NOTE: button separator is indexed too
 *returns .t. if successful
 */

/*WVW_TBdestroy( [nWinNum] )
 *destroy toolbar for window nWinNum
 */

/*WVW_TBINDEX2CMD([nWinNum], nIndex)
 *returns Command Id of button nIndex (0 based)
 *returns -1 if the button does not exist
 */

/*WVW_TBCmd2Index([nWinNum], nCmd)
 *returns Index (0 based) of button whose command id is nCmd
 *returns -1 if the button does not exist
 */


/*-------------------------------------------------------------------*/
/* SCROLLBAR                                                         */
/*-------------------------------------------------------------------*/

/*WVW_XBcreate( [nWinNum], nStyle, nTop, nLeft, nLength, bBlock, aOffset)
 *create scroll bar for window nWinNum
 *nStyle: SBS_HORZ (0)=horizontal, SBS_VERT (1)=vertical
 *nTop: row of top/left corner (in character unit)
 *nLeft: col of top/left corner (in character unit)
 *nLength: length of scrollbar (in character unit)
 *NOTES: width of scrollbar (in character unit)
 *            horiz: defaults to one character height
 *            verti: defaults to one character _height_ too (!)
 *       use aOffset to adjust the dimension
 *aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
 *         dimension of scroll bar.
 *         defaults for vertical scroll bar: {0,+3,0,0}
 *         defaults for horiz scroll bar: {+3-linespacing,0,0,0}
 *         NOTES: these defaults are meant to make room for other common
 *                GUI elements like raised/recessed lines.
 *
 *bBlock:  codeblock to execute on every WM_VSCROLL/WM_HSCROLL event.
 *         This codeblock will be evaluated with these parameters:
 *         nWinNum: window number
 *         nXBid  : scrollbar id
 *         nXBmsg : scrollbar message, ie. one of these:
 *         nXBpos : scrollthumb position (only if message==SB_THUMB...)
 *         the "must be handled" messages:
 *             SB_LINEUP/SB_LINELEFT     0: up/left button clicked
 *             SB_LINEDOWN/SB_LINERIGHT  1: down/right button clicked
 *             SB_PAGEUP/SB_PAGELEFT     2: upper/left shaft clicked
 *             SB_PAGEDOWN/SB_PAGERIGHT  3: lower/right shaft clicked
 *         the "may not be handled" messages:
 *             SB_THUMBPOSITION          4: scroll thumb is released at position nXBpos
 *             SB_THUMBTRACK             5: scroll thumb is being dragged at position nXBpos
 *             SB_ENDSCROLL              8
 *
 *returns control id of newly created scroll bar of windows nWinNum
 *returns 0 if failed
 *
 *example:
 *WVW_XBcreate( , 1, 10, 70, 12)
 *  :: creates Vertical scrollbar on current window at (10,70) with length 12
 *     dimensions using default ones.
 *     buttons/parts behaviour using default ones.
 *
 *WVW_XBcreate( , 1, 10, 70, 12, {0, +5, 0, +5} )
 *  :: creates Vertical scrollbar on current window at (10,70) with length 12
 *     left and right coordinate is shifted 5 pixels to the right.
 *     buttons/parts behaviour using default ones.
 *
 *NOTES:
 *ScrollRange is always 0 - 100.
 *Initial ScrollPos is 0
 */

/*WVW_XBdestroy( [nWinNum], nXBid )
 *destroy scrollbar nXBid for window nWinNum
 */

/*WVW_XBupdate(nWinNum, XBid, [nPos], [nPageSize], [nMin], [nMax])
 *update scrollbar data and its display
 *nPos, nPageSize, nMin, nMax are optional.
 *however, both nMin & nMax must be supplied, or not at all.
 *returns current position of scroll thumb.
 *returns -1 if update failed.
 */

/*WVW_XBenable( [nWinNum], nXBid, nFlags )
 *enable/disable scrollbar nXBid in window nWinNum (default to topmost window)
 *nFlags: ESB_ENABLE_BOTH                    0: enable both arrows
 *        ESB_DISABLE_LEFT/ESB_DISABLE_UP    1: disable left/up arrow
 *        ESB_DISABLE_RIGHT/ESB_DISABLE_DOWN 2: disable right/down arrow
 *        ESB_DISABLE_BOTH                   3: disable both arrow
 *returns .t. if successful
 */


/*-------------------------------------------------------------------*/
/* PUSHBUTTON                                                        */
/*-------------------------------------------------------------------*/

/*WVW_PBcreate( [nWinNum], nTop, nLeft, nBottom, nRight, cText, cImage/nImage, bBlock, aOffset)
 *create pushbutton for window nWinNum
 *nTop: row of top/left corner (in character unit)
 *nLeft: col of top/left corner (in character unit)
 *nBottom: row of bottom/right corner (in character unit) defaults==nTop
 *nRight: col of bottom/right corner (in character unit) defaults==??
 *cText: caption, default == ""
 *
 *reserved for future: (TODO):
 *cImage: bitmap file name, can be supplied as nImage: bitmap resource id
 *this parm is now ignored
 *
 *aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
 *         dimension of pushbutton.
 *         defaults for vertical scroll bar: {0,+3,0,0}
 *         defaults for horiz scroll bar: {+3-linespacing,0,0,0}
 *         NOTES: these defaults are meant to make room for other common
 *                GUI elements like raised/recessed lines.
 *
 *bBlock:  codeblock to execute on every BN_CLICK event.
 *         This codeblock will be evaluated with these parameters:
 *         nWinNum: window number
 *         nPBid  : pushbutton id
 *
 *returns control id of newly created pushbutton of windows nWinNum
 *returns 0 if failed
 *
 *example:
 */

/*WVW_PBdestroy( [nWinNum], nPBid )
 *destroy button nPBid for window nWinNum
 */

/*WVW_PBsetFocus( [nWinNum], nButtonId )
 *set the focus to button nButtonId in window nWinNum
 */

/*WVW_PBenable( [nWinNum], nButtonId, [lToggle] )
 *enable/disable button nButtonId on window nWinNum
 *(lToggle defaults to .t., ie. enabling the button)
 *return previous state of the button (TRUE:enabled FALSE:disabled)
 *(if nButtonId is invalid, this function returns FALSE too)
 */

/*WVW_PBsetcodeblock( [nWinNum], nPBid, bBlock )
 *assign (new) codeblock bBlock to button nPBid for window nWinNum
 *
 * return .t. if successful
 */

/*WVW_PBsetstyle( [nWinNum], nPBid, nStyle )
 *assign new style nStyle to button nPBid for window nWinNum
 *typical usage: nStyle==BS_DEFPUSHBUTTON (==01) to turn the button
 *                                               into default push button
 *                                               (thick border)
 *                       BS_PUSHBUTTON    (==00) to turn the button
 *                                               into regular push button
 *
 *using other styles like BS_MULTILINE may also be usefull,
 *but I haven't tried that
 *
 * this function always return .t.
 */

/*WVW_PBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
 *                             lItalic, lUnderline, lStrikeout
 *
 *this will initialize font for ALL pushbuttons in window nWinNum
 *(including ones created later on)
 */


/*-------------------------------------------------------------------*/
/* PROGRESSBAR                                                       */
/*-------------------------------------------------------------------*/

/*WVW_PGcreate( [nWinNum], nTop, nLeft, nBottom, nRight, [aOffset],
 *                         [nBackColor], [nBarColor], [lSmooth], [lVertical])
 *create progress bar for window nWinNum
 *nTop: row of top/left corner (in character unit)
 *nLeft: col of top/left corner (in character unit)
 *nBottom: row of bottom/right corner (in character unit)
 *nRight: col of bottom/right corner (in character unit)
 *aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
 *         dimension of progress bar. defaults: {0, 0, 0, 0}
 *nBackColor: color of background (as RGB value)
 *nBarColor: color of bar (as RGB value)
 *lSmooth: if .t., draw as smooth bar (default is .f.)
 *lVertical: if .t., draw as vertical progress bar (default is .f.)
 *
 *returns control id of newly created progress bar of windows nWinNum
 *returns 0 if failed
 *
 *example:
 *WVW_PGcreate( , 5, 10, 5, 30)
 *  :: creates horiz progressbar on current window at (5,10) to (5,30)
 *     colors using default ones.
 *
 *WVW_PGcreate( , 5, 10, 5, 30, {-1, 0, +1, 0} )
 *  :: same as above, but the bar is enlarged 1 pixel to the top
 *     and 1 pixel to the bottom
 *
 *NOTES:
 *ProgressRange is initially set as 0 - 100.
 *Initial ProgressPos is 0
 */

/*WVW_PGdestroy( [nWinNum], nPGid )
 *destroy progressbar nPGid for window nWinNum
 *This function has no return value.
 */

/*WVW_PGsetrange(nWinNum, PGid, [nMin], [nMax])
 *update progressbar data range (default is 0-100)
 *nMin: a number in range of -32767 to +32767
 *nMax: a number in range of -32767 to +32767
 *
 *Remark: progress position is reset to nMin
 *
 *returns .t. if operation considered successfull
*/

/*WVW_PGsetpos(nWinNum, PGid, [nPos])
 *update progressbar position within current range
 *nPos: a number in range of current range
 *returns .t. if operation considered successfull
*/

/*WVW_PGgetpos(nWinNum, PGid)
 *get progressbar current position
 *returns 0 if operation failed
*/


/*-------------------------------------------------------------------*/
/*                                                                   */
/*               GTWVT compatibility functions.                      */
/*               See WVT2WVW.CH about how to map coresponding        */
/*               GTWVT functions to GTWVW's ones.                    */
/*                                                                   */
/*-------------------------------------------------------------------*/


/*-------------------------------------------------------------------*/
PART-1: WINDOW INDEPENDENT (the same parameter list with GTWVT)
/*-------------------------------------------------------------------*/

WVW_CREATEMENU         ([<vlist>])
WVW_CREATEPOPUPMENU    ([<vlist>])
WVW_APPENDMENU         ([<vlist>])
WVW_DELETEMENU         ([<vlist>])
WVW_DESTROYMENU        ([<vlist>])
WVW_ENABLEMENUITEM     ([<vlist>])
WVW_GETSCREENWIDTH     ([<vlist>])
WVW_GETSCREENHEIGHT    ([<vlist>])
WVW_SETALTF4CLOSE      ([<vlist>])
WVW_GETRGBCOLOR        ([<vlist>])
WVW_GETCLIPBOARD       ([<vlist>])
WVW_SETCLIPBOARD       ([<vlist>])
WVW_PASTEFROMCLIPBOARD ([<vlist>])
WVW_KEYBOARD           ([<vlist>])
WVW_ISLBUTTONPRESSED   ([<vlist>])
WVW_GETPALETTE         ([<vlist>])
WVW_SETPALETTE         ([<vlist>])
WVW_CREATEFONT         ([<vlist>])
WVW_GETCURSORPOS       ([<vlist>])
WVW_CHOOSEFONT         ([<vlist>])
WVW_CHOOSECOLOR        ([<vlist>])
WVW_LOADPICTURE        ([<vlist>])
WVW_LOADFONT           ([<vlist>])
WVW_LOADPEN            ([<vlist>])
WVW_SETPEN             ([<vlist>])
WVW_SETBRUSH           ([<vlist>])

WVW_CREATEDIALOGDYNAMIC([<vlist>])
WVW_CREATEDIALOGMODAL  ([<vlist>])
WVW__MAKEDLGTEMPLATE   ([<vlist>])
WVW_LBADDSTRING        ([<vlist>])
WVW_LBSETCURSEL        ([<vlist>])
WVW_CBADDSTRING        ([<vlist>])
WVW_CBSETCURSEL        ([<vlist>])
WVW_DLGSETICON         ([<vlist>])


/*-------------------------------------------------------------------*/
PART-2: WINDOW DEPENDENT (additional nWinNum parameter)
/*-------------------------------------------------------------------*/

/*
  Notes:

  All the following functions expect nWinNum as the first parameter.
  The rest parameters are generally the same as GTWVT's.

  You may want to pass nWinNum with NIL or your own function/variable by which you can decide
  which window to direct your output to.

  nWinNum parameter passed as NIL will be translated by gtwvw into :
    if !MainCoordMode
       Current Window
    else
       Topmost Window
    endif

*/

WVW_SETMENU             ([nWinNum] [, <vlist>])
WVW_SETPOPUPMENU        ([nWinNum] [, <vlist>])
WVW_GETLASTMENUEVENT    ([nWinNum] [, <vlist>])
WVW_SETMENUKEYEVENT     ([nWinNum] [, <vlist>])
WVW_DRAWMENUBAR         ([nWinNum] [, <vlist>])
WVW_SETWINDOWCENTRE     ([nWinNum] [, <vlist>])
WVW_PROCESSMESSAGES     ([nWinNum] [, <vlist>])
WVW_GETTITLE            ([nWinNum] [, <vlist>])
WVW_INVALIDATERECT      ([nWinNum] [, <vlist>])
WVW_CLIENTTOSCREEN      ([nWinNum] [, <vlist>])
WVW_SETFONT             ([nWinNum] [, <vlist>])
WVW_SETICON             ([nWinNum] [, <vlist>])
WVW_SETTITLE            ([nWinNum] [, <vlist>])
WVW_SETWINDOWPOS        ([nWinNum] [, <vlist>])
WVW_GETWINDOWHANDLE     ([nWinNum] [, <vlist>])
WVW_SETCODEPAGE         ([nWinNum] [, <vlist>])
WVW_CENTERWINDOW        ([nWinNum] [, <vlist>])
WVW_SETMOUSEMOVE        ([nWinNum] [, <vlist>])
WVW_GETXYFROMROWCOL     ([nWinNum] [, <vlist>])
WVW_GETFONTINFO         ([nWinNum] [, <vlist>])
WVW_MINIMIZE            ([nWinNum] [, <vlist>])
WVW_MAXIMIZE            ([nWinNum] [, <vlist>])
WVW_SETONTOP            ([nWinNum] [, <vlist>])
WVW_SETASNORMAL         ([nWinNum] [, <vlist>])
WVW_SAVESCREEN          ([nWinNum] [, <vlist>])
WVW_RESTSCREEN          ([nWinNum] [, <vlist>])
WVW_DRAWLABELOBJ        ([nWinNum] [, <vlist>])

/********************************************************************
WVW_DRAWTOOLBUTTONSTATE is for compatibility only.
Recommended to use WVW_TBxxxx specific functions instead.
*********************************************************************/
WVW_DRAWTOOLBUTTONSTATE ([nWinNum] [, <vlist>])

/********************************************************************
WVW_DRAWSCROLL* is for compatibility only.
Recommended to use WVW_XBxxxx specific functions instead.
*********************************************************************/
WVW_DRAWSCROLLBUTTON    ([nWinNum] [, <vlist>])
WVW_DRAWSCROLLTHUMBVERT ([nWinNum] [, <vlist>])
WVW_DRAWSCROLLTHUMBHORZ ([nWinNum] [, <vlist>])

WVW_DRAWSHADEDRECT      ([nWinNum] [, <vlist>])
WVW_DRAWTEXTBOX         ([nWinNum] [, <vlist>])


/********************************************************************
WVW_DRAWPROGRESSBAR is for compatibility only.
Recommended to use WVW_PGxxxx specific functions instead.
*********************************************************************/
WVW_DRAWPROGRESSBAR     ([nWinNum] [, <vlist>])

WVW_TRACKPOPUPMENU      ([nWinNum] [, <vlist>])
WVW_GETMENU             ([nWinNum] [, <vlist>])
WVW_SHOWWINDOW          ([nWinNum] [, <vlist>])
WVW_UPDATEWINDOW        ([nWinNum] [, <vlist>])
WVW_DRAWBOXGET          ([nWinNum] [, <vlist>])
WVW_DRAWBOXRAISED       ([nWinNum] [, <vlist>])
WVW_DRAWBOXRECESSED     ([nWinNum] [, <vlist>])
WVW_DRAWBOXGROUP        ([nWinNum] [, <vlist>])
WVW_DRAWBOXGROUPRAISED  ([nWinNum] [, <vlist>])
WVW_DRAWIMAGE           ([nWinNum] [, <vlist>])
WVW_DRAWLABEL           ([nWinNum] [, <vlist>])
WVW_DRAWOUTLINE         ([nWinNum] [, <vlist>])
WVW_DRAWLINE            ([nWinNum] [, <vlist>])
WVW_DRAWELLIPSE         ([nWinNum] [, <vlist>])
WVW_DRAWRECTANGLE       ([nWinNum] [, <vlist>])
WVW_FILLRECTANGLE       ([nWinNum] [, <vlist>])
WVW_DRAWCOLORRECT       ([nWinNum] [, <vlist>])
WVW_DRAWROUNDRECT       ([nWinNum] [, <vlist>])
WVW_DRAWFOCUSRECT       ([nWinNum] [, <vlist>])
WVW_DRAWGRIDHORZ        ([nWinNum] [, <vlist>])
WVW_DRAWGRIDVERT        ([nWinNum] [, <vlist>])

/********************************************************************
WVW_DRAWBUTTON is for compatibility only.
Recommended to use WVW_PBxxxx specific functions instead.
*********************************************************************/
WVW_DRAWBUTTON          ([nWinNum] [, <vlist>])

WVW_SETMOUSEPOS         ([nWinNum] [, <vlist>])

/* in gtwvt no pending rect is reflected as {0,0,0,0}
   in gtwvw no pending rect is reflected as {y1,x1,y2,x2} where y1 > y2 or x1 > x2
*/
WVW_GETPAINTRECT        ([nWinNum] [, <vlist>])

WVW_SETPOINTER          ([nWinNum] [, <vlist>])
WVW_DRAWPICTURE         ([nWinNum] [, <vlist>])
WVW_DRAWLABELEX         ([nWinNum] [, <vlist>])
WVW_DRAWLINEEX          ([nWinNum] [, <vlist>])
WVW_DRAWOUTLINEEX       ([nWinNum] [, <vlist>])
WVW_MESSAGEBOX          ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPACTIVE    ([nWinNum] [, <vlist>])
WVW_SETTOOLTIP          ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPTEXT      ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPMARGIN    ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPWIDTH     ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPBKCOLOR   ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPTEXTCOLOR ([nWinNum] [, <vlist>])
WVW_SETTOOLTIPTITLE     ([nWinNum] [, <vlist>])
WVW_GETTOOLTIPWIDTH     ([nWinNum] [, <vlist>])
WVW_GETTOOLTIPBKCOLOR   ([nWinNum] [, <vlist>])
WVW_GETTOOLTIPTEXTCOLOR ([nWinNum] [, <vlist>])

/********************************************************************
Timer functions. WARNING: WVT implementation is slightly different.
*********************************************************************/

WVW_SETTIMER  ([nWinNum] [, <vlist>])
WVW_KILLTIMER ([nWinNum] [, <vlist>])

/********************************************************************
WVW_DRAWSTATUSBAR is for compatibility only.
Recommended to use WVW_SBxxxx specific functions instead.
*********************************************************************/
WVW_DRAWSTATUSBAR ([nWinNum] [, <vlist>])


/*-------------------------------------------------------------------*/
PART-3: General Windows API functions
/*-------------------------------------------------------------------*/

/*
  Notes:

  These functions are recently added to GTWVT, hence it is also loaded
  into GTWVW for compatibility reasons.

  These are actually general Windows API functions similar to ones already
  exist in What32 library.

  These functions are exactly the same as the ones in GTWVT.
*/

WIN_SENDMESSAGE       ([<vlist>])
WIN_SENDDLGITEMMESSAGE([<vlist>])
WIN_SETTIMER          ([<vlist>])
WIN_SETFOCUS          ([<vlist>])
WIN_SETTEXTCOLOR      ([<vlist>])
WIN_SETBKCOLOR        ([<vlist>])
WIN_SETBKMODE         ([<vlist>])
WIN_GETSTOCKOBJECT    ([<vlist>])
WIN_DELETEOBJECT      ([<vlist>])
WIN_SELECTOBJECT      ([<vlist>])
WIN_LOWORD            ([<vlist>])
WIN_HIWORD            ([<vlist>])
WIN_MULDIV            ([<vlist>])
WIN_GETDIALOGBASEUNITS([<vlist>])
WIN_SETMENU           ([<vlist>])
WIN_SETDLGITEMTEXT    ([<vlist>])
WIN_GETDLGITEMTEXT    ([<vlist>])
WIN_CHECKDLGBUTTON    ([<vlist>])
WIN_ISDLGBUTTONCHECKED([<vlist>])
WIN_CHECKRADIOBUTTON  ([<vlist>])
WIN_GETDLGITEM        ([<vlist>])
WIN_MESSAGEBOX        ([<vlist>])
WIN_INVALIDATERECT    ([<vlist>])
WIN_LOADICON          ([<vlist>])
WIN_LOADIMAGE         ([<vlist>])
WIN_GETCLIENTRECT     ([<vlist>])

; WIN_DRAWIMAGE(): not adopted in GTWVW because it is not a general Win API function.

WIN_GETDC             ([<vlist>])
WIN_RELEASEDC         ([<vlist>])
WIN_RECTANGLE         ([<vlist>])
WIN_CREATEBRUSH       ([<vlist>])
WIN_DRAWTEXT          ([<vlist>])


/*-------------------------------------------------------------------*/
/*                                                                   */
/*               CALLBACK FUNCTIONS                                  */
/*               (functions in .prg, called by gtwvw)                */
/*               See WVT2WVW.CH about how to map coresponding        */
/*               GTWVT functions to GTWVW's ones.                    */
/*                                                                   */
/*-------------------------------------------------------------------*/

/*
  Notes:

  These functions, if exist in your code, will be called by gtwvw on particular events.

  Generally, each function is supplied additional nWinNum parameter at the front.
  nWinNum is 0-based (with 0 being the Main Window).

  Please see program samples on how to write/use such functions.

*/

FUNCTION WVW_PAINT(nWinNum)

FUNCTION WVW_SETFOCUS(nWinNum)

FUNCTION WVW_KILLFOCUS(nWinNum)

FUNCTION WVW_MOUSE(nWinNum, nKeyCode, nRow, nCol, nKeyState)

FUNCTION WVW_TIMER(nWinNum, hWnd, message, wParam, lParam)

FUNCTION WVW_MENUSELECT(nWinNum, hWnd, message, wParam, lParam)

FUNCTION WVW_INPUTFOCUS(nWinNum, hWnd, message, wParam, lParam)


/*-------------------------------------------------------------------*/
/*                                                                   */
/*               Brief descriptions of some GTWVW functions          */
/*               imported from GTWVT.                                */
/*                                                                   */
/*-------------------------------------------------------------------*/

/*-------------------------------------------------------------------*/
/*   aScr := Wvw_SaveScreen( nWinNum, nTop, nLeft, nBottom, nRight ) */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*   Wvw_RestScreen( nWinNum, nTop, nLeft, nBottom, nRight, aScr, lDoNotDestroyBMP )*/
/*                                                                     */

/*-------------------------------------------------------------------*/
/* Wvw_CreateFont( cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline,*/
/*                 lStrikeout, nCharSet, nQuality, nEscapement )            */
/*                                                                          */

/*-------------------------------------------------------------------*/
/*    WVW_DRAWLABELOBJ( [nWinNum], nTop, nLeft, nBottom, nRight, cLabel, nAlignHorz, nAlignVert, nTextColor, nBkColor, hFont )*/
/*                                                                   */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawToolButtonState( [nWinNum], nTop, nLeft, nBottom, nRight, aPxlOff, nState )*/
/*                                                                                       */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawScrollButton( [nWinNum], nTop, nLeft, nBottom, nRight, aOffPixels, nTLBR, lDepressed )*/
/*                                                                                                 */
/* SEE ALSO: WVW_XB* functions */

/*-------------------------------------------------------------------*/
/*                                                                                              */
/*  Wvw_DrawScrollbarThumbVert( [nWinNum], nTop, nLeft, nBottom, nRight, aPxlScroll, nThumbPos )*/
/*                                                                                              */
/* SEE ALSO: WVW_XB* functions */

/*-------------------------------------------------------------------*/
/*                                                                                              */
/*  Wvw_DrawScrollbarThumbHorz( [nWinNum], nTop, nLeft, nBottom, nRight, aPxlOffset, nThumbPos )*/
/*                                                                                              */
/* SEE ALSO: WVW_XB* functions */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawShadedRect( [nWinNum], nTop, nLeft, nBottom, nRight, aPxlOffSet, nHorVert, aRGBb, aRGBe  )*/
/*                                                                                                      */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawTextBox( [nWinNum], nTop, nLeft, nBottom, nRight, aPxlOffSet, cText, ;*/
/*                    nAlignHorz, nAlignVert, nTextColor, nBackColor, ;            */
/*                    nBackMode, hFont )                                           */
/*                                                                                 */

/*-------------------------------------------------------------------
 * Wvw_DrawProgressBar( [nWinNum], nTop, nLeft, nBottom, nRight, aPxlTLBR, nPercent,;
 *                      nBackColor, nBarColor, cImage, lVertical, nDirection )
 */

/* WVW_TrackPopupMenu([nWinNum], n) */

/* WVW_GetMenu([nWinNum]) */

/*-------------------------------------------------------------------*/
/*                                                                   */
/*   Wvw_SetPen( nPenStyle, nWidth, nColor )                         */
/*                                                                   */
/* IMPORTANT: in prev release this functions has nWinNum parameter
              PENs are now application-wide.
 */

/*-------------------------------------------------------------------*/
/*                                                                   */
/*   Wvw_SetBrush( nStyle, nColor, [ nHatch ] )                      */
/*                                                                   */
/* IMPORTANT: in prev release this functions has nWinNum parameter
              BRUSHes are now application-wide.
 */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawBoxGet( [nWinNum], nRow, nCol, nWidth )                     */
/*                                                                       */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawBoxRaised( nWinNum,                                     */
/*                   nTop, nLeft, nBottom, nRight,                   */
/*                   lTight) <--none in gtwvt                        */
/*                                                                   */
/*   if lTight, box is drawn inside the character region                               */
/*   AND top and left lines are lower two pixel down to make room for above/left object*/
/*   WARNING: gui object of this type subject to be overwritten by chars               */
/*   NOTE that these lines are to be overwritten by displayed char,                    */
/*        we are depending on the fact that gui object will be painted last            */
/*                                                                                     */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawBoxRecessed( nWinNum, ;                                                      */
/*                   nTop, nLeft, nBottom, nRight,                                         */
/*                   lTight) <--none in gtwvt                                              */
/*                                                                                         */
/*   if lTight, box is drawn inside the character region                                   */
/*   AND top and left lines are lower two pixel down to make room for above/left object    */
/*   WARNING: gui object of this type subject to be overwritten by chars                   */
/*   NOTE that these lines are to be overwritten by displayed char,                        */
/*        we are depending on the fact that gui object will be painted last                */
/*                                                                                         */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawBoxGroup( nWinNum, ;                                       */
/*                   nTop, nLeft, nBottom, nRight )                      */
/*                                                                       */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawBoxRaised( nWinNum, ;                                  */
/*                   nTop, nLeft, nBottom, nRight )                  */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawImage( nWinNum, ;                                           */
/*                   nTop, nLeft, nBottom, nRight, cImage/nPictureSlot, ; */
/*                   lTight/aOffset) <--none in gtwvt                     */
/*                                                                        */

/*-------------------------------------------------------------------*/
/*    WVW_DRAWLABEL( nWinNum, ;                                              */
/*                   nRow, nCol, cLabel, nAlign, nEscapement, nTextColor, ;  */
/*                   nBkColor, cFontFace,nHeight, nWidth, nWeight, ;         */
/*                   nQuality, nCharSet, lItalic, lUnderline, lStrikeOut )   */
/*                                                                           */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawOutline( nWinNum, ;                                    */
/*                   nTop, nLeft, nBottom, nRight,                   */
/*                   nThick, nShape, nRGBColor )                     */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawLine( nWinNum, ;                                                                       */
/*                 nTop, nLeft, nBottom, nRight, nOrient, nFormat, nAlign, nStyle, nThick, nColor ) */
/*                                                                                                  */

/*-------------------------------------------------------------------*/
/*    Inside the area requested!                                     */
/*    Wvw_DrawEllipse( nWinNum, nTop, nLeft, nBottom, nRight )       */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawRectangle( nWinNum, nTop, nLeft, nBottom, nRight )     */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*GTWVW specific                                                                   */
/*none in gtwvt                                                                         */
/*    Wvw_FillRectangle( nWinNum, nTop, nLeft, nBottom, nRight, nRGBcolor/hBrush,       */
/*                       lTight, lUseBrush )                                            */
/*                                                                                      */
/*   if lTight, rect is drawn inside the character region                               */
/*   AND top and left lines are lower two pixel down to make room for above/left object */
/*   WARNING: gui object of this type subject to be overwritten by chars                */
/*   NOTE that these lines are to be overwritten by displayed char,                     */
/*        we are depending on the fact that gui object will be painted last             */
/*                                                                                      */
/*   if lUseBrush, nRGBcolor is treated as a BRUSH handle                               */
/*                                                                                      */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawRoundRect( nWinNum, nTop, nLeft, nBottom, nRight, nRoundHeight, nRoundWidth )*/
/*                                                                                         */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawFocusRect( nWinNum, nTop, nLeft, nBottom, nRight )     */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawGridHorz( nWinNum, ;                                    */
/*                   nTop, nLeft, nRight, nRows )                    */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*     Wvw_DrawGridVert( nWinNum, ;                                  */
/*                   nTop, nBottom, aCols, nCols )                   */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawButton( nWinNum, ;                                                    */
/*                   nTop, nLeft, nBottom, nRight, cText, cImage/nImage, nFormat, ; */
/*                    nTextColor, nBkColor, nImageAt )                              */
/*                                                                                  */

/* WVW_DrawStatusbar() is meant for WVT compatibility only.
   WVW_SBxxxx() functions are recommended instead.
 */

/*-------------------------------------------------------------------*/
/*     Wvw_ChooseFont( cFontName, nHeight, nWidth, nWeight, nQuality, ; */
/*                                    lItalic, lUnderline, lStrikeout ) */
/*                                                                      */

/*-------------------------------------------------------------------*/
/*    Wvw_ChooseColor( nRGBInit, aRGB16, nFlags ) => nRGBSelected    */
/*                                                                   */

/*WVW_SETMOUSEPOS( nWinNum, nRow, nCol ) nWinNum is 0 based        */
/*WHAT'S the difference with GT_FUNC( mouse_SetPos ) ???           */
/*this func is able to position cursor on any window               */
/*NOTE: consider using 'standard' SETMOUSE() instead:     */
/*      SETMOUSE(.t., nRow, nCol)                                  */
/*      This will treat (nRow,nCol) according to current s_bMainCoordMode setting */

/*WVW_GetPaintRect( nWinNum )   nWinNum is 0 based               */
/*returns array of paint pending rect {top, left, bottom, right} */
/*WARNING:                                                       */
/*unlike WVT, top maybe > bottom                                 */
/*            left maybe > right                                 */
/*in these cases, no paint request is pending                    */
/*(in WVT these is reflected in {0,0,0,0})                       */

/*-------------------------------------------------------------------*/
/*   Wvw_LoadPicture( nSlot, cFilePic )                              */
/*                                                                   */

/*-------------------------------------------------------------------*/
/* Wvw_LoadFont( nSlotFont, cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline, lStrikeout, */
/*               nCharSet, nQuality, nEscapement )                                                */
/*                                                                                                */

/*-------------------------------------------------------------------*/
/*  Wvw_LoadPen( nSlot, nStyle, nWidth, nRGBColor )                  */
/*                                                                   */

/*-------------------------------------------------------------------*/
/*  Wvw_DrawPicture( [nWinNum], nTop, nLeft, nBottom, nRight, nSlot, lTight/aAdj ) -> lOk */
/*  nSlot <= 20  aAdj == { 0,0,-2,-2 } To Adjust the pixels for { Top,Left,Bottom,Right } */
/*                                                                                        */

/*-------------------------------------------------------------------*/
/*    WVW_DRAWLABELEX( [nWinNum], nRow, nCol, cLabel, nAlign, nTextColor, nBkColor, nSlotFont ) */
/*                                                                                              */

/*-------------------------------------------------------------------*/
/*   Wvw_DrawLineEx( [nWinNum], nTop, nLeft, nBottom, nRight, nOrient, nFormat, nAlign, nSlotPen ) */
/*                                                                                                 */

/*-------------------------------------------------------------------*/
/*    Wvw_DrawOutlineEx( [nWinNum], nTop, nLeft, nBottom, nRight, nSlotPen ) */
/*                                                                           */

/*-------------------------------------------------------------------*/
/*   WVW_SetToolTopActive([nWinNum], [lToggle]) */
/*                                                                        */

/*-------------------------------------------------------------------*/
/*   Wvw_SetToolTip( [nWinNum], nTop, nLeft, nBottom, nRight, cToolText ) */
/*                                                                        */


/*-------------------------------------------------------------------*/
/*                                                                   */
/*               Epilogue                                            */
/*                                                                   */
/*-------------------------------------------------------------------*/

Should you find errors in this document, please report it to
gtwvw@csacomputer.com

Hope I can get a chance to refine this document.

Bandung, 26 September 2004
Budyanto Dj.
