RichTextCtrl provides a generic, ground-up implementation of a text control capable of showing multiple styles and images. It inherits from TextCtrl and so supports all methods and event handlers available in that class.
RichTextCtrl also sends notification events specific to the rich text class: see RichTextEvent. It also sends the standard TextCtrl events EVT_COMMAND_TEXT_ENTER and EVT_COMMAND_TEXT_UPDATED, and TextUrlEvent when URL content is clicked.
RichTextCtrl.new(Window parent, Integer id = ID_ANY,
String value = '',
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = RE_MULTILINE,
Validator validator = DEFAULT_VALIDATOR,
String name = TextCtrlNameStr)
Constructors.
Range add_image(Image image)
Adds an image to the control’s buffer.
Range add_paragraph(String text)
Adds a new paragraph of text to the end of the buffer.
append_text(String text)
Sets the insertion point to the end of the buffer and writes the text.
Boolean apply_alignment_to_selection(TextAttrAlignment alignment)
Applies the given alignment to the selection (undoable).
For alignment values, see RichTextAttr.
Boolean apply_bold_to_selection()
Apples bold to the selection (undoable).
Boolean apply_italic_to_selection()
Applies italic to the selection (undoable).
Boolean apply_style(RichTextStyleDefinition def)
Applies the given style to the selection.
Boolean apply_style_sheet(RichTextStyleSheet sheet $=$ NULL)
Applies the style sheet to the buffer, matching paragraph styles in the sheet against named styles in the buffer. This might be useful if the styles have changed. If sheet is NULL, the sheet set with SetStyleSheet is used.
Currently this applies paragraph styles only.
Boolean apply_underline_to_selection()
Applies underline to the selection (undoable).
Boolean batching_undo()
Returns if undo commands are being batched.
Boolean begin_alignment(TextAttrAlignment alignment)
Begins using alignment
For alignment values, see RichTextAttr.
Boolean begin_batch_undo(String cmdName)
Starts batching undo history for commands.
Boolean begin_bold()
Begins using bold.
Boolean begin_character_style(String characterStyle)
Begins using the named character style.
Boolean begin_font(Font font)
Begins using this font.
Boolean begin_font_size(Integer pointSize)
Begins using the given point size.
Boolean begin_italic()
Begins using italic.
Boolean begin_left_indent(Integer leftIndent, Integer leftSubIndent = 0)
Begins applying a left indent and subindent in tenths of a millimetre.
The sub-indent is an offset from the left of the paragraph, and is used for all but the first line in a paragraph. A positive value will cause the first line to appear to the left of the subsequent lines, and a negative value will cause the first line to be indented relative to the subsequent lines.
RichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the left of the actual paragraph is leftSubIndent.
Boolean begin_line_spacing(Integer lineSpacing)
Begins appling line spacing. spacing is a multiple, where 10 means single-spacing, 15 means 1.5 spacing, and 20 means double spacing. The following constants are defined for convenience:
#define TEXT_ATTR_LINE_SPACING_NORMAL 10
#define TEXT_ATTR_LINE_SPACING_HALF 15
#define TEXT_ATTR_LINE_SPACING_TWICE 20
Boolean begin_list_style(String listStyle, Integer level=1,
Integer number=1)
Begins using a specified list style. Optionally, you can also pass a level and a number.
Boolean begin_numbered_bullet(Integer bulletNumber, Integer leftIndent,
Integer leftSubIndent,
Integer bulletStyle = TEXT_ATTR_BULLET_STYLE_ARABIC|TEXT_ATTR_BULLET_STYLE_PERIOD)
Begins a numbered bullet. This call will be needed for each item in the list, and the application should take care of incrementing the numbering.
bulletNumber is a number, usually starting with 1.
leftIndent and leftSubIndent are values in tenths of a millimetre.
bulletStyle is a bitlist of the following values:
#define TEXT_ATTR_BULLET_STYLE_NONE 0x00000000
#define TEXT_ATTR_BULLET_STYLE_ARABIC 0x00000001
#define TEXT_ATTR_BULLET_STYLE_LETTERS_UPPER 0x00000002
#define TEXT_ATTR_BULLET_STYLE_LETTERS_LOWER 0x00000004
#define TEXT_ATTR_BULLET_STYLE_ROMAN_UPPER 0x00000008
#define TEXT_ATTR_BULLET_STYLE_ROMAN_LOWER 0x00000010
#define TEXT_ATTR_BULLET_STYLE_SYMBOL 0x00000020
#define TEXT_ATTR_BULLET_STYLE_BITMAP 0x00000040
#define TEXT_ATTR_BULLET_STYLE_PARENTHESES 0x00000080
#define TEXT_ATTR_BULLET_STYLE_PERIOD 0x00000100
#define TEXT_ATTR_BULLET_STYLE_STANDARD 0x00000200
#define TEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS 0x00000400
#define TEXT_ATTR_BULLET_STYLE_OUTLINE 0x00000800
#define TEXT_ATTR_BULLET_STYLE_ALIGN_LEFT 0x00000000
#define TEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT 0x00001000
#define TEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE 0x00002000
RichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the left of the actual paragraph is leftSubIndent.
Boolean begin_paragraph_spacing(Integer before, Integer after)
Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing in tenths of a millimetre.
Boolean begin_paragraph_style(String paragraphStyle)
Begins applying the named paragraph style.
Boolean begin_right_indent(Integer rightIndent)
Begins a right indent, specified in tenths of a millimetre.
Boolean begin_style(RichTextAttr style)
Begins applying a style.
Boolean begin_suppress_undo()
Starts suppressing undo history for commands.
Boolean begin_symbol_bullet(Char symbol, Integer leftIndent,
Integer leftSubIndent,
Integer bulletStyle = TEXT_ATTR_BULLET_STYLE_SYMBOL)
Begins applying a symbol bullet, using a character from the current font. See begin_numbered_bullet for an explanation of how indentation is used to render the bulleted paragraph.
Boolean begin_text_colour(Colour colour)
Begins using this colour.
Boolean begin_underline()
Begins using underlining.
Boolean begin_url(String url, String characterStyle = '')
Begins applying TEXT_ATTR_URL to the content. Pass a URL and optionally, a character style to apply, since it is common to mark a URL with a familiar style such as blue text with underlining.
Boolean can_copy()
Returns if selected content can be copied to the clipboard.
Boolean can_cut()
Returns if selected content can be copied to the clipboard and deleted.
Boolean can_delete_selection()
Returns if selected content can be deleted.
Boolean can_paste()
Returns if the clipboard content can be pasted to the buffer.
Boolean can_redo()
Returns if there is a command in the command history that can be redone.
Boolean can_undo()
Returns if there is a command in the command history that can be undone.
clear()
Clears the buffer content, leaving a single empty paragraph. Cannot be undone.
Boolean clear_list_style(Range range,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO)
Boolean clear_list_style(Range range,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO)
Clears the list style from the given range, clearing list-related attributes and applying any named paragraph style associated with each paragraph.
flags is a bit list of the following:
See also set_list_style, promote_list, number_list.
command(CommandEvent event)
Sends the event to the control.
copy()
Copies the selected content (if any) to the clipboard.
Boolean create(Window parent, Integer id = ID_ANY,
String value = '',
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer style = RE_MULTILINE,
Validator validator = DEFAULT_VALIDATOR,
String name = TextCtrlNameStr)
Creates the underlying window.
cut()
Copies the selected content (if any) to the clipboard and deletes the selection. This is undoable.
Boolean delete(Range range)
Deletes the content within the given range.
Boolean delete_selected_content(Integer newPos = nil)
Deletes content if there is a selection, e.g. when pressing a key. Returns the new caret position in newPos, or leaves it if there was no action. This is undoable.
delete_selection()
Deletes the content in the selection, if any. This is undoable.
discard_edits()
Sets the buffer’s modified status to , and clears the buffer’s command history.
Size do_get_best_size()
Currently this simply returns Size(10, 10).
Boolean end_alignment()
Ends alignment.
Boolean end_all_styles()
Ends application of all styles in the current style stack.
Boolean end_batch_undo()
Ends batching undo command history.
Boolean end_bold()
Ends using bold.
Boolean end_character_style()
Ends application of a named character style.
Boolean end_font()
Ends using a font.
Boolean end_font_size()
Ends using a point size.
Boolean end_italic()
Ends using italic.
Boolean end_left_indent()
Ends left indent.
Boolean end_line_spacing()
Ends line spacing.
Boolean end_list_style()
Ends using a specified list style.
Boolean end_numbered_bullet()
Ends application of a numbered bullet.
Boolean end_paragraph_spacing()
Ends paragraph spacing.
Boolean end_paragraph_style()
Ends application of a named character style.
Boolean end_right_indent()
Ends right indent.
Boolean end_style()
Ends the current style.
Boolean end_suppress_undo()
Ends suppressing undo command history.
Boolean end_symbol_bullet()
Ends applying a symbol bullet.
Boolean end_text_colour()
Ends applying a text colour.
Boolean end_underline()
End applying underlining.
Boolean end_url()
Ends applying a URL.
Boolean extend_selection(Integer oldPosition, Integer newPosition,
Integer flags)
Helper function for extending the selection, returning if the selection was changed. Selections are in caret positions.
Integer find_next_word_position(Integer direction = 1)
Helper function for finding the caret position for the next word. Direction is 1 (forward) or -1 (backwards).
freeze()
Call this function to prevent refresh and allow fast updates, and then Thaw to refresh the control.
RichTextAttr get_basic_style()
Gets the basic (overall) style. This is the style of the whole buffer before further styles are applied, unlike the default style, which only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
RichTextBuffer get_buffer()
Returns the buffer associated with the control.
Integer get_caret_position()
Returns the current caret position.
Rect rect get_caret_position_for_index(Integer position)
Returns the caret height and position for the given character position.
CommandProcessor get_command_processor()
Gets the command processor associated with the control’s buffer.
Integer get_delayed_layout_threshold()
Gets the size of the buffer beyond which layout is delayed during resizing. This optimizes sizing for large buffers. The default is 20000.
String get_filename()
Gets the current filename associated with the control.
Integer get_first_visible_position()
Returns the first visible position in the current view.
Integer get_handler_flags()
Returns flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler.
Integer get_insertion_point()
Returns the current insertion point.
TextPos get_last_position()
Returns the last position in the buffer.
Integer get_line_length(Integer lineNo)
Returns the length of the specified line in characters.
String get_line_text(Integer lineNo)
Returns the text for the given line.
Point get_logical_point(Point ptPhysical)
Transforms physical window position to logical (unscrolled) position.
Integer get_number_of_lines()
Returns the number of lines in the buffer.
Point get_physical_point(Point ptLogical)
Transforms logical (unscrolled) position to physical window position.
String get_range(Integer from, Integer to)
Gets the text for the given range.
The end point of range is specified as the last character position of the span of text, plus one.
get_selection(Integer from, Integer to)
Returns the range of the current selection.
The end point of range is specified as the last character position of the span of text, plus one.
If the return values from and to are the same, there is no selection.
Range get_selection_range()
Returns the selection range in character positions. -1, -1 means no selection.
String get_string_selection()
Returns the text within the current selection range, if any.
RichTextAttr% get_style(Integer position)
Gets the attributes at the given position. This function gets the combined style – that is, the style you see on the screen as a result of combining base style, paragraph style and character style attributes. To get the character or paragraph style alone, use get_uncombined_style.
RichTextAttr get_style_for_range(Range range)
Gets the attributes common to the specified range. Attributes that differ in value within the range will not be included in style’s flags.
RichTextStyleSheet get_style_sheet()
Returns the style sheet associated with the control, if any. A style sheet allows named character and paragraph styles to be applied.
RichTextAttr get_uncombined_style(Integer position)
Gets the attributes at the given position.
This function gets the uncombined style – that is, the attributes associated with the paragraph or character content, and not necessarily the combined attributes you see on the screen. To get the combined attributes, use get_style.
String get_value()
Returns the content of the entire control as a string.
RichTextLine get_visible_line_for_caret_position(Integer caretPosition)
Internal helper function returning the line for the visible caret position. If the caret is shown at the very end of the line, it means the next character is actually on the following line. So this function gets the line we’re expecting to find if this is the case.
Boolean has_character_attributes(Range range,
RichTextAttr style)
Test if this whole range has character attributes of the specified kind. If any of the attributes are different within the range, the test fails. You can use this to implement, for example, bold button updating. style must have flags indicating which attributes are of interest.
Boolean has_paragraph_attributes(Range range,
RichTextAttr style)
Test if this whole range has paragraph attributes of the specified kind. If any of the attributes are different within the range, the test fails. You can use this to implement, for example, centering button updating. style must have flags indicating which attributes are of interest.
Boolean has_selection()
Returns if there is a selection.
TextCtrlHitTestResult hit_test(Point pt,
Integer pos)
TextCtrlHitTestResult hit_test(Point pt,
TextCoord col,
TextCoord row)
Finds the character at the given position in pixels.
pt is in device coords (not adjusted for the client area origin nor for scrolling).
init()
Initialises the members of the control.
init_command_event(CommandEvent event)
Initialises the command event.
Boolean is_default_style_showing()
Returns if the user has recently set the default style without moving the caret, and therefore the UI needs to reflect the default style and not the style at the caret.
See also set_and_show_default_style.
Boolean is_editable()
Returns if the control is editable.
Boolean is_frozen()
Returns if Freeze has been called without a Thaw.
Boolean is_modified()
Returns if the buffer has been modified.
Boolean is_multi_line()
Returns if the control is multiline.
Boolean is_position_visible(Integer pos)
Returns if the given position is visible on the screen.
Boolean is_selection_aligned(TextAttrAlignment alignment)
Returns if all of the selection is aligned according to the specified flag.
Boolean is_selection_bold()
Returns if all of the selection is bold.
Boolean is_selection_italics()
Returns if all of the selection is italic.
Boolean is_selection_underlined()
Returns if all of the selection is underlined.
Boolean is_single_line()
Returns if the control is single-line. Currently RichTextCtrl does not support single-line editing.
Boolean keyboard_navigate(Integer keyCode, Integer flags)
Helper function implementing keyboard navigation.
Boolean layout_content(Boolean onlyVisibleRect = false)
Lays out the buffer, which must be done before certain operations, such as setting the caret position. This function should not normally be required by the application.
Boolean line_break()
Inserts a line break at the current insertion point. A line break forces wrapping within a paragraph, and can be introduced by using this function, by appending the Char value RichTextLineBreakChar to text content, or by typing Shift-Return.
Boolean load_file(String file, Integer type = RICHTEXT_TYPE_ANY)
Loads content into the control’s buffer using the given type. If the specified type is RICHTEXT_TYPE_ANY, the type is deduced from the filename extension.
This function looks for a suitable RichTextFileHandler object.
mark_dirty()
Marks the buffer as modified.
Boolean move_caret(Integer pos, Boolean showAtLineStart = false)
Move the caret to the given character position.
move_caret_back(Integer oldPosition)
Move the caret one visual step forward: this may mean setting a flag and keeping the same position if we’re going from the end of one line to the start of the next, which may be the exact same caret position.
move_caret_forward(Integer oldPosition)
Move the caret one visual step forward: this may mean setting a flag and keeping the same position if we’re going from the end of one line to the start of the next, which may be the exact same caret position.
Boolean move_down(Integer noLines = 1, Integer flags = 0)
Moves the caret down.
Boolean move_end(Integer flags = 0)
Moves to the end of the buffer.
Boolean move_home(Integer flags = 0)
Moves to the start of the buffer.
Boolean move_left(Integer noPositions = 1, Integer flags = 0)
Moves left.
Boolean move_right(Integer noPositions = 1, Integer flags = 0)
Moves right.
Boolean move_to_line_end(Integer flags = 0)
Moves to the end of the line.
Boolean move_to_line_start(Integer flags = 0)
Moves to the start of the line.
Boolean move_to_paragraph_end(Integer flags = 0)
Moves to the end of the paragraph.
Boolean move_to_paragraph_start(Integer flags = 0)
Moves to the start of the paragraph.
Boolean move_up(Integer noLines = 1, Integer flags = 0)
Moves up.
Boolean newline()
Inserts a new paragraph at the current insertion point. See also line_break.
Boolean number_list(Range range,
RichTextListStyleDefinition style,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO, Integer startFrom = -1, Integer listLevel = -1)
Boolean number(Range range, String styleName,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO,
Integer startFrom = -1,
Integer listLevel = -1)
Numbers the paragraphs in the given range. Pass flags to determine how the attributes are set. Either the style definition or the name of the style definition (in the current sheet) can be passed.
flags is a bit list of the following:
See also set_list_style, promote_list, clear_list_style.
on_clear(CommandEvent event)
Standard handler for the ID_CLEAR command.
on_context_menu(ContextMenuEvent event)
Shows a standard context menu with undo, redo, cut, copy, paste, clear, and select all commands.
on_copy(CommandEvent event)
Standard handler for the ID_COPY command.
on_cut(CommandEvent event)
Standard handler for the ID_CUT command.
on_drop_files(DropFilesEvent event)
Loads the first dropped file.
on_paste(CommandEvent event)
Standard handler for the ID_PASTE command.
on_redo(CommandEvent event)
Standard handler for the ID_REDO command.
on_select_all(CommandEvent event)
Standard handler for the ID_SELECTALL command.
on_undo(CommandEvent event)
Standard handler for the ID_PASTE command.
on_update_clear(UpdateUIEvent event)
Standard update handler for the ID_CLEAR command.
on_update_copy(UpdateUIEvent event)
Standard update handler for the ID_COPY command.
on_update_cut(UpdateUIEvent event)
Standard update handler for the ID_CUT command.
on_update_paste(UpdateUIEvent event)
Standard update handler for the ID_PASTE command.
on_update_redo(UpdateUIEvent event)
Standard update handler for the ID_REDO command.
on_update_select_all(UpdateUIEvent event)
Standard update handler for the ID_SELECTALL command.
on_update_undo(UpdateUIEvent event)
Standard update handler for the ID_UNDO command.
Boolean page_down(Integer noPages = 1, Integer flags = 0)
Moves one or more pages down.
Boolean page_up(Integer noPages = 1, Integer flags = 0)
Moves one or more pages up.
paint_background(DC dc)
Paints the background.
paste()
Pastes content from the clipboard to the buffer.
position_caret()
Internal function to position the visible caret according to the current caret position.
Integer, Integer = position_to_xy(Integer pos)
Converts a text position to zero-based column and line numbers.
Boolean promote_list(Integer promoteBy, Range range,
RichTextListStyleDefinition style,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO,
Integer listLevel = -1)
Boolean promote_list(Integer promoteBy, Range range,
String styleName,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO,
Integer listLevel = -1)
Promotes or demotes the paragraphs in the given range. A positive promoteBy produces a smaller indent, and a negative number produces a larger indent. Pass flags to determine how the attributes are set. Either the style definition or the name of the style definition (in the current sheet) can be passed.
flags is a bit list of the following:
See also set_list_style, See also set_list_style, clear_list_style.
redo()
Redoes the current command.
remove(Integer from, Integer to)
Removes the content in the specified range.
replace(Integer from, Integer to, String value)
Replaces the content in the specified range with the string specified by value.
Boolean save_file(String file = '', Integer type = RICHTEXT_TYPE_ANY)
Saves the buffer content using the given type. If the specified type is RICHTEXT_TYPE_ANY, the type is deduced from the filename extension.
In order to use this method, a RichTextFileHandler object must have been set previously.
Boolean scroll_into_view(Integer position, Integer keyCode)
Scrolls position into view. This function takes a caret position.
select_all()
Selects all the text in the buffer.
select_none()
Cancels any selection.
set_and_show_default_style(RichTextAttr attr)
Sets attr as the default style and tells the control that the UI should reflect this attribute until the user moves the caret.
See also is_default_style_showing.
set_basic_style(RichTextAttr style)
Sets the basic (overall) style. This is the style of the whole buffer before further styles are applied, unlike the default style, which only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold).
set_caret_position(Integer position, Boolean showAtLineStart = false)
The caret position is the character position just before the caret. A value of -1 means the caret is at the start of the buffer.
Boolean set_default_style(RichTextAttr style)
Sets the current default style, which can be used to change how subsequently inserted text is displayed.
Boolean set_default_style_to_cursor_style()
Sets the default style to the style under the cursor.
set_delayed_layout_threshold(Integer threshold)
Sets the size of the buffer beyond which layout is delayed during resizing. This optimizes sizing for large buffers. The default is 20000.
set_editable(Boolean editable)
Makes the control editable, or not.
set_filename(String filename)
Sets the current filename.
Boolean set_font(Font font)
Sets the font, and also the basic and default attributes (see set_default_style).
set_handler_flags(Integer flags)
Sets flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler.
set_insertion_point(Integer pos)
Sets the insertion point.
set_insertion_point_end()
Sets the insertion point to the end of the text control.
Boolean set_list_style(Range range,
RichTextListStyleDefinition style,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO, Integer startFrom = -1, Integer listLevel = -1)
Boolean set_list_style(Range range, String styleName,
Integer flags $=$ RICHTEXT_SETSTYLE_WITH_UNDO,
Integer startFrom = -1,
Integer listLevel = -1)
Sets the list attributes for the given range, passing flags to determine how the attributes are set. Either the style definition or the name of the style definition (in the current sheet) can be passed.
flags is a bit list of the following:
See also number_list, promote_list, clear_list_style.
set_selection(Integer from, Integer to)
Sets the selection to the given range.
The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the selection for a character at position 5, use the range (5,6).
set_selection_range(Range range)
Sets the selection to the given range.
The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the selection for a character at position 5, use the range (5,6).
Boolean set_style(Range range, RichTextAttr style)
Boolean set_style(Integer start, Integer end,
RichTextAttr style)
Sets the attributes for the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6).
Boolean set_style_ex(Range range, RichTextAttr style,
Integer flags = RICHTEXT_SETSTYLE_WITH_UNDO)
Sets the attributes for the given range, passing flags to determine how the attributes are set. The RichTextAttr version is more efficient because it does not use Font objects.
The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6).
flags may contain a bit list of the following values:
set_style_sheet(RichTextStyleSheet styleSheet)
Sets the style sheet associated with the control. A style sheet allows named character and paragraph styles to be applied.
set_value(String value)
Replaces existing content with the given text.
setup_scrollbars(Boolean atTop = false)
A helper function setting up scrollbars, for example after a resize.
show_position(Integer pos)
Scrolls the buffer so that the given position is in view.
Boolean suppressing_undo()
Returns true if undo history suppression is on.
thaw()
Call this function to end a Freeze and refresh the display.
undo()
Undoes the command at the top of the command history, if there is one.
Boolean word_left(Integer noWords = 1, Integer flags = 0)
Moves a number of words to the left.
Boolean word_right(Integer noWords = 1, Integer flags = 0)
Move a nuber of words to the right.
Boolean write_image(String filename, Integer bitmapType)
Loads an image from a file and writes it at the current insertion point.
Boolean write_image(Bitmap bitmap,
Integer bitmapType = BITMAP_TYPE_PNG)
Boolean write_image(Image image,
Integer bitmapType = BITMAP_TYPE_PNG)
Write a bitmap or image at the current insertion point. Supply an optional type to use for internal and file storage of the raw data.
write_text(String text)
Writes text at the current position.
Integer xy_to_position(Integer x, Integer y)
Translates from column and line number to position.
[This page automatically generated from the Textile source at Wed Sep 09 02:21:21 +0100 2009]