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

write_stringwrite_stringwrite_stringWriteStringWriteString (Operator)

Name

write_stringwrite_stringwrite_stringWriteStringWriteString — Print text in a window.

Signature

write_string( : : WindowHandle, String : )

Herror write_string(const Hlong WindowHandle, const char* String)

Herror T_write_string(const Htuple WindowHandle, const Htuple String)

Herror write_string(const HTuple& WindowHandle, const HTuple& String)

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

void HOperatorSetX.WriteString(
[in] VARIANT WindowHandle, [in] VARIANT String)

void HWindowX.WriteString([in] VARIANT String)

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

void HWindow.WriteString(HTuple stringVal)

void HWindow.WriteString(string stringVal)

Description

write_stringwrite_stringwrite_stringWriteStringWriteString prints StringStringStringStringstringVal 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_extentsget_string_extentsGetStringExtentsGetStringExtents).

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

write_stringwrite_stringwrite_stringWriteStringWriteString 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_systemset_systemSetSystemSetSystem with the flag 'flush_graphic'.

Attention

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

Parallelization

Parameters

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

Window identifier.

StringStringStringStringstringVal (input_control)  string(-array) HTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Tuple of output values (all types).

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

Result

write_stringwrite_stringwrite_stringWriteStringWriteString returns 2 (H_MSG_TRUE) if the window is valid and the output text fits within the current line (see set_checkset_checkset_checkSetCheckSetCheck). Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowopen_windowOpenWindowOpenWindow, open_textwindowopen_textwindowopen_textwindowOpenTextwindowOpenTextwindow, set_fontset_fontset_fontSetFontSetFont, get_string_extentsget_string_extentsget_string_extentsGetStringExtentsGetStringExtents

Alternatives

fwrite_stringfwrite_stringfwrite_stringFwriteStringFwriteString

See also

set_tpositionset_tpositionset_tpositionSetTpositionSetTposition, get_string_extentsget_string_extentsget_string_extentsGetStringExtentsGetStringExtents, open_textwindowopen_textwindowopen_textwindowOpenTextwindowOpenTextwindow, set_fontset_fontset_fontSetFontSetFont, set_systemset_systemset_systemSetSystemSetSystem, 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