2.2.4.33.6 Page::FindCursors

Description

Find all cursors on the page. Cursors can be parked or attached to a data plot

Syntax

int FindCursors( vector<int> & vnLayers, vector<uint> & vnPlots = NULL, vector<uint> & vnDataIndices = NULL )

Parameters

vnLayers
[output] layer indices, -1 if cursor is parked, set this to NULL to get page.Cursors
vnPlots
[output] data plot index in its layer, ignore if vnLayers[ii] < 0
vnDataIndices
[output] cursor location on data plot, ignore if vnLayers[ii] < 0

Return

number of cursors that are attached to data plots if vnLayers is given, but return total number of cursors, parked or not, if vnLayers = NULL

Examples

EX1

//Draw a scatter plot and add some cursors
int Page_FindCursors_Ex1()
{
    Page pp = Project.Pages();
    if(pp.FindCursors(NULL) < 1)
        return 0;
    
    vector<int> vnLay;
    vector<uint> vnPlot, vnData;
    int nUsed = pp.FindCursors(vnLay, vnPlot, vnData);
    out_int("used =", nUsed);
    for(int ii = 0; ii < vnLay.GetSize(); ii++)
    {
        printf("Cursor %d: %d-%d-%d\n", ii+1, vnLay[ii], vnPlot[ii], vnData[ii]);
    }
    return nUsed;
}

Remark

See Also

Header to Include

origin.h