get_tpositionT_get_tpositionGetTpositionGetTpositionget_tposition (算子名称)
名称
get_tpositionT_get_tpositionGetTpositionGetTpositionget_tposition — Get cursor position.
参数签名
描述
get_tpositionget_tpositionGetTpositionGetTpositionGetTpositionget_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_stringWriteStringWriteStringWriteStringwrite_string, read_stringread_stringReadStringReadStringReadStringread_string) or by an explicit change
of position by (set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition, new_linenew_lineNewLineNewLineNewLinenew_line).
注意
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")SetCheck("~text")set_check("~text").
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Window handle.
RowRowRowRowrowrow (output_control) point.y → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Row index of text cursor position.
ColumnColumnColumnColumncolumncolumn (output_control) point.x → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Column index of text cursor position.
结果
get_tpositionget_tpositionGetTpositionGetTpositionGetTpositionget_tposition returns 2 (
H_MSG_TRUE)
if the window is valid. Otherwise
an exception is raised.
可能的前置算子
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window,
set_fontset_fontSetFontSetFontSetFontset_font
可能的后置算子
set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition,
write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string,
read_stringread_stringReadStringReadStringReadStringread_string,
read_charread_charReadCharReadCharReadCharread_char
参考其它
new_linenew_lineNewLineNewLineNewLinenew_line,
read_stringread_stringReadStringReadStringReadStringread_string,
set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition,
write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string,
set_checkset_checkSetCheckSetCheckSetCheckset_check
模块
Foundation