Foxtools – Editor _EDPOSINVI

Version: 01.10.10 - last Update: Tuesday, October 13, 2009, 12:55:00

Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter See also:_EdGetChar | _EdGetLNum | _EdGetLPos | _EdGetPos | _EdGetStr | _EdSkipLin


Foxtools Editor Support Functions

_EDPOSINVI

_EdPosInVi() Returns the current visibility of a given caret position from the beginning of file in the editor session passed in <nWHANDL>.

VFP Syntax

lDisplayed = _EdPosInVi(nWHAND, nPosition)

Parameters

[in] nWHAND

Fox-window handle of the editor session in question. If nWHANDL is no valid editor-session handle, an error “API call caused an exception” (Error 2028) is raised.

[in] nPosition

Offset position (byte count) from beginning of the file. <nPosition> value is zero-based. CRs @ EOL are counted as well.

    Returns

    Boolean – TRUE := caret is visible | FALSE := caret is not visible.

    Remarks

    Note: _EdPosInVi() returns .T. even if the text line holding the caret is only shown partially, like shown below!

    Partially visible caret

    VFP Example(s)

    Opening an editor session, echoing visibility of caret to _SCREEN:

    *\\ Open editor session
    *\\   use file content with a lot of wide lines
    nWHAND =_EDOPENFIL("TEST.TXT", 1)
    ? _EDPOSINVI(m.nWHAND, _EDGETPOS(m.nWHAND))

    Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter