write_stringT_write_stringWriteStringWriteStringwrite_string (Operator)

Name

write_stringT_write_stringWriteStringWriteStringwrite_string — Print text in a window.

Signature

write_string( : : WindowHandle, String : )

Herror T_write_string(const Htuple WindowHandle, const Htuple String)

void WriteString(const HTuple& WindowHandle, const HTuple& String)

void HWindow::WriteString(const HTuple& String) const

void HWindow::WriteString(const HString& String) const

void HWindow::WriteString(const char* String) const

void HWindow::WriteString(const wchar_t* String) const   (Windows only)

static void HOperatorSet.WriteString(HTuple windowHandle, HTuple stringVal)

void HWindow.WriteString(HTuple stringVal)

void HWindow.WriteString(string stringVal)

def write_string(window_handle: HHandle, string: MaybeSequence[Union[int, float, str]]) -> None

Description

write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string prints StringStringStringStringstringValstring in the output window starting at the current cursor position. The output text has to fit within the right window boundary (the width of the string can be queried by get_string_extentsget_string_extentsGetStringExtentsGetStringExtentsGetStringExtentsget_string_extents).

The font currently assigned to the window will used. The text cursor is positioned at the end of the text.

write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string can output all three types of data used in HALCON . The conversion to a string is guided by the following rules:

For buffering of texts see set_systemset_systemSetSystemSetSystemSetSystemset_system with the flag 'flush_graphic'.

Attention

If clipping at the window boundary is desired, exceptions can be switched off by set_check('~text').

Execution Information

Parameters

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

Window handle.

StringStringStringStringstringValstring (input_control)  string(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Tuple of output values (all types).

Default value: 'hello' "hello" "hello" "hello" "hello" "hello"

Result

write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string returns TRUE if the window is valid and the output text fits within the current line (see set_checkset_checkSetCheckSetCheckSetCheckset_check). Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, set_fontset_fontSetFontSetFontSetFontset_font, get_string_extentsget_string_extentsGetStringExtentsGetStringExtentsGetStringExtentsget_string_extents

Alternatives

fwrite_stringfwrite_stringFwriteStringFwriteStringFwriteStringfwrite_string

See also

set_tpositionset_tpositionSetTpositionSetTpositionSetTpositionset_tposition, get_string_extentsget_string_extentsGetStringExtentsGetStringExtentsGetStringExtentsget_string_extents, set_fontset_fontSetFontSetFontSetFontset_font, set_systemset_systemSetSystemSetSystemSetSystemset_system, set_checkset_checkSetCheckSetCheckSetCheckset_check

Module

Foundation