Operator Reference

get_tpositionT_get_tpositionGetTpositionGetTpositionget_tposition (Operator)

get_tpositionT_get_tpositionGetTpositionGetTpositionget_tposition — Get cursor position.

Signature

get_tposition( : : WindowHandle : Row, Column)

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

void GetTposition(const HTuple& WindowHandle, HTuple* Row, HTuple* Column)

void HWindow::GetTposition(Hlong* Row, Hlong* Column) const

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

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

def get_tposition(window_handle: HHandle) -> Tuple[int, int]

Description

get_tpositionget_tpositionGetTpositionGetTpositionget_tposition queries the current position of the text cursor in the output window. The position is measured in the image coordinate system. 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_stringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringread_string) or by an explicit change of position by (set_tpositionset_tpositionSetTpositionSetTpositionset_tposition, new_linenew_lineNewLineNewLinenew_line).

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")SetCheck("~text")SetCheck("~text")set_check("~text").

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

WindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

RowRowRowrowrow (output_control)  point.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row index of text cursor position.

ColumnColumnColumncolumncolumn (output_control)  point.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column index of text cursor position.

Result

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

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowopen_window, set_fontset_fontSetFontSetFontset_font

Possible Successors

set_tpositionset_tpositionSetTpositionSetTpositionset_tposition, write_stringwrite_stringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringread_string, read_charread_charReadCharReadCharread_char

See also

new_linenew_lineNewLineNewLinenew_line, read_stringread_stringReadStringReadStringread_string, set_tpositionset_tpositionSetTpositionSetTpositionset_tposition, write_stringwrite_stringWriteStringWriteStringwrite_string, set_checkset_checkSetCheckSetCheckset_check

Module

Foundation