HALCON Reference Manual 10.0.2
Table of Contents / Graphics / Text ClassesClassesClasses | | | Operators

get_tpositionget_tpositionget_tpositionGetTpositionGetTposition (Operator)

Name

get_tpositionget_tpositionget_tpositionGetTpositionGetTposition — Get cursor position.

Signature

get_tposition( : : WindowHandle : Row, Column)

Herror get_tposition(const Hlong WindowHandle, Hlong* Row, Hlong* Column)

Herror T_get_tposition(const Htuple WindowHandle, Htuple* Row, Htuple* Column)

Herror get_tposition(const HTuple& WindowHandle, Hlong* Row, Hlong* Column)

Hlong HWindow::GetTposition(HTuple* Column) const

void HOperatorSetX.GetTposition(
[in] VARIANT WindowHandle, [out] VARIANT* Row, [out] VARIANT* Column)

Hlong HWindowX.GetTposition([out] Hlong* Column)

static void HOperatorSet.GetTposition(HTuple windowHandle, out HTuple row, out HTuple column)

void HWindow.GetTposition(out int row, out int column)

Description

get_tpositionget_tpositionget_tpositionGetTpositionGetTposition queries the current position of the text cursor in the output window. The position is measured in the coordinate system of the window (in pixels for text windows). The next output of text in this window starts at the cursor position. The left end of the baseline for writing the next string (not considering descenders) is placed on this position. The position is changed by the output or input of text (write_stringwrite_stringwrite_stringWriteStringWriteString, read_stringread_stringread_stringReadStringReadString) or by an explicit change of position by (set_tpositionset_tpositionset_tpositionSetTpositionSetTposition, new_linenew_linenew_lineNewLineNewLine).

Attention

If the output text does not fit completely into the window, an exception is raised. This can be avoided by set_check('~text')set_check("~text")set_check("~text")SetCheck("~text")SetCheck("~text").

Parallelization

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Window identifier.

RowRowRowRowrow (output_control)  point.y HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Row index of text cursor position.

ColumnColumnColumnColumncolumn (output_control)  point.x HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column index of text cursor position.

Result

get_tpositionget_tpositionget_tpositionGetTpositionGetTposition returns 2 (H_MSG_TRUE) if the window is valid. Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowopen_windowOpenWindowOpenWindow, open_textwindowopen_textwindowopen_textwindowOpenTextwindowOpenTextwindow, set_fontset_fontset_fontSetFontSetFont

Possible Successors

set_tpositionset_tpositionset_tpositionSetTpositionSetTposition, write_stringwrite_stringwrite_stringWriteStringWriteString, read_stringread_stringread_stringReadStringReadString, read_charread_charread_charReadCharReadChar

See also

new_linenew_linenew_lineNewLineNewLine, read_stringread_stringread_stringReadStringReadString, set_tpositionset_tpositionset_tpositionSetTpositionSetTposition, write_stringwrite_stringwrite_stringWriteStringWriteString, set_checkset_checkset_checkSetCheckSetCheck

Module

Foundation


Table of Contents / Graphics / Text ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH