/* * List (and Description) of GTWVW .prg Callable Functions. * Copyright 2004 Budyanto Dj. */ 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 ([]) WVW_CREATEPOPUPMENU ([]) WVW_APPENDMENU ([]) WVW_DELETEMENU ([]) WVW_DESTROYMENU ([]) WVW_ENABLEMENUITEM ([]) WVW_GETSCREENWIDTH ([]) WVW_GETSCREENHEIGHT ([]) WVW_SETALTF4CLOSE ([]) WVW_GETRGBCOLOR ([]) WVW_GETCLIPBOARD ([]) WVW_SETCLIPBOARD ([]) WVW_PASTEFROMCLIPBOARD ([]) WVW_KEYBOARD ([]) WVW_ISLBUTTONPRESSED ([]) WVW_GETPALETTE ([]) WVW_SETPALETTE ([]) WVW_CREATEFONT ([]) WVW_GETCURSORPOS ([]) WVW_CHOOSEFONT ([]) WVW_CHOOSECOLOR ([]) WVW_LOADPICTURE ([]) WVW_LOADFONT ([]) WVW_LOADPEN ([]) WVW_SETPEN ([]) WVW_SETBRUSH ([]) wvw_CreateDialogDynamic([]) WVW_CREATEDIALOGMODAL ([]) WVW__MAKEDLGTEMPLATE ([]) WVW_LBADDSTRING ([]) WVW_LBSETCURSEL ([]) WVW_CBADDSTRING ([]) WVW_CBSETCURSEL ([]) WVW_DLGSETICON ([]) //------------------------------------------------- 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] [, ]) WVW_SETPOPUPMENU ([nWinNum] [, ]) WVW_GETLASTMENUEVENT ([nWinNum] [, ]) WVW_SETMENUKEYEVENT ([nWinNum] [, ]) WVW_DRAWMENUBAR ([nWinNum] [, ]) WVW_SETWINDOWCENTRE ([nWinNum] [, ]) WVW_PROCESSMESSAGES ([nWinNum] [, ]) WVW_GETTITLE ([nWinNum] [, ]) WVW_INVALIDATERECT ([nWinNum] [, ]) WVW_CLIENTTOSCREEN ([nWinNum] [, ]) WVW_SETFONT ([nWinNum] [, ]) WVW_SETICON ([nWinNum] [, ]) WVW_SETTITLE ([nWinNum] [, ]) WVW_SETWINDOWPOS ([nWinNum] [, ]) WVW_GETWINDOWHANDLE ([nWinNum] [, ]) WVW_SETCODEPAGE ([nWinNum] [, ]) WVW_CENTERWINDOW ([nWinNum] [, ]) WVW_SETMOUSEMOVE ([nWinNum] [, ]) WVW_GETXYFROMROWCOL ([nWinNum] [, ]) WVW_GETFONTINFO ([nWinNum] [, ]) WVW_MINIMIZE ([nWinNum] [, ]) WVW_MAXIMIZE ([nWinNum] [, ]) WVW_SETONTOP ([nWinNum] [, ]) WVW_SETASNORMAL ([nWinNum] [, ]) WVW_SAVESCREEN ([nWinNum] [, ]) WVW_RESTSCREEN ([nWinNum] [, ]) WVW_DRAWLABELOBJ ([nWinNum] [, ]) //******************************************************************* WVW_DRAWTOOLBUTTONSTATE is for compatibility only. Recommended to use WVW_TBxxxx specific functions instead. ******************************************************************** WVW_DRAWTOOLBUTTONSTATE ([nWinNum] [, ]) //******************************************************************* WVW_DRAWSCROLL* is for compatibility only. Recommended to use WVW_XBxxxx specific functions instead. ******************************************************************** WVW_DRAWSCROLLBUTTON ([nWinNum] [, ]) WVW_DRAWSCROLLTHUMBVERT ([nWinNum] [, ]) WVW_DRAWSCROLLTHUMBHORZ ([nWinNum] [, ]) WVW_DRAWSHADEDRECT ([nWinNum] [, ]) WVW_DRAWTEXTBOX ([nWinNum] [, ]) //******************************************************************* WVW_DRAWPROGRESSBAR is for compatibility only. Recommended to use WVW_PGxxxx specific functions instead. ******************************************************************** WVW_DRAWPROGRESSBAR ([nWinNum] [, ]) WVW_TRACKPOPUPMENU ([nWinNum] [, ]) WVW_GETMENU ([nWinNum] [, ]) WVW_SHOWWINDOW ([nWinNum] [, ]) WVW_UPDATEWINDOW ([nWinNum] [, ]) WVW_DRAWBOXGET ([nWinNum] [, ]) WVW_DRAWBOXRAISED ([nWinNum] [, ]) WVW_DRAWBOXRECESSED ([nWinNum] [, ]) WVW_DRAWBOXGROUP ([nWinNum] [, ]) WVW_DRAWBOXGROUPRAISED ([nWinNum] [, ]) WVW_DRAWIMAGE ([nWinNum] [, ]) WVW_DRAWLABEL ([nWinNum] [, ]) WVW_DRAWOUTLINE ([nWinNum] [, ]) WVW_DRAWLINE ([nWinNum] [, ]) WVW_DRAWELLIPSE ([nWinNum] [, ]) WVW_DRAWRECTANGLE ([nWinNum] [, ]) WVW_FILLRECTANGLE ([nWinNum] [, ]) WVW_DRAWCOLORRECT ([nWinNum] [, ]) WVW_DRAWROUNDRECT ([nWinNum] [, ]) WVW_DRAWFOCUSRECT ([nWinNum] [, ]) WVW_DRAWGRIDHORZ ([nWinNum] [, ]) WVW_DRAWGRIDVERT ([nWinNum] [, ]) //******************************************************************* WVW_DRAWBUTTON is for compatibility only. Recommended to use WVW_PBxxxx specific functions instead. ******************************************************************** WVW_DRAWBUTTON ([nWinNum] [, ]) WVW_SETMOUSEPOS ([nWinNum] [, ]) // 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] [, ]) WVW_SETPOINTER ([nWinNum] [, ]) WVW_DRAWPICTURE ([nWinNum] [, ]) WVW_DRAWLABELEX ([nWinNum] [, ]) WVW_DRAWLINEEX ([nWinNum] [, ]) WVW_DRAWOUTLINEEX ([nWinNum] [, ]) WVW_MESSAGEBOX ([nWinNum] [, ]) WVW_SETTOOLTIPACTIVE ([nWinNum] [, ]) WVW_SETTOOLTIP ([nWinNum] [, ]) WVW_SETTOOLTIPTEXT ([nWinNum] [, ]) WVW_SETTOOLTIPMARGIN ([nWinNum] [, ]) WVW_SETTOOLTIPWIDTH ([nWinNum] [, ]) WVW_SETTOOLTIPBKCOLOR ([nWinNum] [, ]) WVW_SETTOOLTIPTEXTCOLOR ([nWinNum] [, ]) WVW_SETTOOLTIPTITLE ([nWinNum] [, ]) WVW_GETTOOLTIPWIDTH ([nWinNum] [, ]) WVW_GETTOOLTIPBKCOLOR ([nWinNum] [, ]) WVW_GETTOOLTIPTEXTCOLOR ([nWinNum] [, ]) //******************************************************************* Timer functions. WARNING: WVT implementation is slightly different. ******************************************************************** WVW_SETTIMER ([nWinNum] [, ]) WVW_KILLTIMER ([nWinNum] [, ]) //******************************************************************* WVW_DRAWSTATUSBAR is for compatibility only. Recommended to use WVW_SBxxxx specific functions instead. ******************************************************************** WVW_DRAWSTATUSBAR ([nWinNum] [, ]) //------------------------------------------------- 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 ([]) win_SendDlgItemMessage([]) WIN_SETTIMER ([]) WIN_SETFOCUS ([]) WIN_SETTEXTCOLOR ([]) WIN_SETBKCOLOR ([]) WIN_SETBKMODE ([]) WIN_GETSTOCKOBJECT ([]) WIN_DELETEOBJECT ([]) WIN_SELECTOBJECT ([]) WIN_LOWORD ([]) WIN_HIWORD ([]) WIN_MULDIV ([]) win_GetDialogBaseUnits([]) WIN_SETMENU ([]) WIN_SETDLGITEMTEXT ([]) WIN_GETDLGITEMTEXT ([]) WIN_CHECKDLGBUTTON ([]) win_IsDlgButtonChecked([]) WIN_CHECKRADIOBUTTON ([]) WIN_GETDLGITEM ([]) WIN_MESSAGEBOX ([]) WIN_INVALIDATERECT ([]) WIN_LOADICON ([]) WIN_LOADIMAGE ([]) WIN_GETCLIENTRECT ([]) ; WIN_DRAWIMAGE(): not adopted in GTWVW because it is not a general Win API function. WIN_GETDC ([]) WIN_RELEASEDC ([]) WIN_RECTANGLE ([]) WIN_CREATEBRUSH ([]) WIN_DRAWTEXT ([]) //------------------------------------------------- // // 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.