SourceForge.net wxRichTextCtrl

wxRichTextCtrl

wxRichTextCtrl

wxRichTextCtrl provides a generic implementation of a rich text editor that can handle different character styles, paragraph formatting, and images. It's aimed at editing 'natural' language text - if you need an editor that supports code editing, wxStyledTextCtrl is a better choice.

Despite its name, it cannot currently read or write RTF (rich text format) files. Instead, it uses its own XML format, and can also read and write plain text. In future we expect to provide RTF file capabilities. Custom file formats can be supported by creating additional file handlers and registering them with the control.

wxRichTextCtrl is largely compatible with the wxTextCtrl API, but extends it where necessary. The control can be used where the native rich text capabilities of wxTextCtrl are not adequate (this is particularly true on Windows) and where more direct access to the content representation is required. It is difficult and inefficient to read the style information in a wxTextCtrl, whereas this information is readily available in wxRichTextCtrl. Since it's written in pure wxWidgets, any customizations you make to wxRichTextCtrl will be reflected on all platforms.

wxRichTextCtrl supports basic printing via the easy-to-use wxRichTextPrinting class. Creating applications with simple word processing features is simplified with the inclusion of wxRichTextFormattingDialog, a tabbed dialog allowing interactive tailoring of paragraph and character styling. Also provided is the multi-purpose dialog wxRichTextStyleOrganiserDialog that can be used for managing style definitions, browsing styles and applying them, or selecting list styles with a renumber option.

There are a few disadvantages to using wxRichTextCtrl. It is not native, so does not behave exactly as a native wxTextCtrl, although common editing conventions are followed. Users may miss the built-in spelling correction on Mac OS X, or any special character input that may be provided by the native control. It would also be a poor choice if intended users rely on screen readers that would be not work well with non-native text input implementation. You might mitigate this by providing the choice between wxTextCtrl and wxRichTextCtrl, with fewer features in the former case.

Functions/Procedures
Supertopics
Subtopics

wxRichTextCtrl

[func]
add_paragraph
( atom rich, sequence text )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
add_rich_image
( atom rich, atom image )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
apply_alignment_to_selection
( atom rich, atom alignment )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
apply_bold_to_selection
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
apply_italic_to_selection
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
apply_rich_style
( atom rich, atom style_def )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
apply_rich_style_sheet
( atom rich, atom style_sheet )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
apply_underline_to_selection
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
batching_undo
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_alignment
( atom rich, atom align )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_batch_undo
( atom rich, sequence cmd_name )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_bold
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_char_style
( atom rich, sequence named_style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_font
( atom rich, atom font )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_font_size
( atom rich, atom size )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_italic
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_left_indent
( atom rich, atom indent, atom sub_indent )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_line_spacing
( atom rich, atom spacing )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_list_style
( atom rich, sequence named_style, atom level, atom number )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_numbered_bullet
( atom rich, atom number, atom indent, atom sub_indent, atom style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_paragraph_spacing
( atom rich, atom before, atom after )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_paragraph_style
( atom rich, sequence named_style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_rich_style
( atom rich, atom style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_right_indent
( atom rich, atom indent )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_standard_bullet
( atom rich, sequence bullet_name, atom indent, atom sub_indent, atom style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_suppress_undo
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_symbol_bullet
( atom rich, sequence symbol, atom indent, atom sub_indent, atom style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_text_color
( atom rich, atom color )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_underline
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
begin_url
( atom rich, sequence url, sequence style )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_alignment
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_all_rich_styles
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_batch_undo
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_bold
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_char_style
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_font
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_font_size
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_italic
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_left_indent
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_line_spacing
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_list_style
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_numbered_bullet
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_paragraph_spacing
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_paragraph_style
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_rich_style
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_right_indent
( atom rich )

Returns atom
Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_standard_bullet
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_suppress_undo
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_symbol_bullet
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_text_color
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_underline
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
end_url
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
get_basic_rich_style
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
get_rich_internal_selection_range
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
get_rich_selection_range
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
get_rich_style_sheet
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
has_char_rich_attr
( atom rich, atom first, atom last, atom rich_attr )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
has_char_text_attr
( atom rich, atom first, atom last, atom text_attr_ex )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
has_para_char_attr
( atom rich, atom first, atom last, atom rich_attr )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
has_para_text_attr
( atom rich, atom first, atom last, atom text_attr_ex )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
is_selection_aligned
( atom rich, atom alignment )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
is_selection_bold
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
is_selection_italics
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
is_selection_underlined
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
layout_rich_content
( atom rich, atom only_visible )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
line_break
( atom rich )

Category: wxRichTextCtrl

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, or by typing Shift-Return.


wxRichTextCtrl

[proc]
move_down
( atom rich, atom n_pos, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_end
( atom rich, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_home
( atom rich, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_left
( atom rich, atom n_pos, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_rich_caret
( atom rich, atom pos, atom at_start )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_right
( atom rich, atom n_pos, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_to_line_end
( atom rich, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_to_line_start
( atom rich, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_to_paragraph_end
( atom rich, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_to_paragraph_start
( atom rich, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
move_up
( atom rich, atom n_pos, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
page_down
( atom rich, atom pages, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
page_up
( atom rich, atom pages, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
pop_rich_style_sheet
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
push_rich_style_sheet
( atom rich, atom style_sheet )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
select_none
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
select_word
( atom rich, atom pos )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
set_basic_rich_style
( atom rich, atom style )

Returns An integer which will be 1 if successful, 0 if unsuccessful.
Category: wxRichTextCtrl

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).

style is a wxTextAttrEx


wxRichTextCtrl

[proc]
set_basic_rich_text_style
( atom rich, atom style )

Category: wxRichTextCtrl

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).

style is a wxRichAttrEx


wxRichTextCtrl

[proc]
set_default_style_to_cursor_style
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
set_rich_internal_selection_range
( atom rich, atom start, atom finish )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
set_rich_selection_range
( atom rich, atom start, atom finish )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
set_rich_style_sheet
( atom rich, atom style_sheet )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
suppressing_undo
( atom rich )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
word_left
( atom rich, atom words, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[proc]
word_right
( atom rich, atom words, atom flags )

Category: wxRichTextCtrl


wxRichTextCtrl

[func]
write_image
( atom rich, atom image, atom bitmap_type )

Category: wxRichTextCtrl

Write a bitmap or image at the current insertion point. Supply an optional type (see wxBitmap) to use for internal and file storage of the raw data.


wxRichTextCtrl

[func]
write_image_block
( atom rich, atom image_block )

Category: wxRichTextCtrl

Writes an image block at the current insertion point.


wxRichTextCtrl

[func]
write_image_from_file
( atom rich, sequence filename, atom bitmap_type )

Category: wxRichTextCtrl

Write a bitmap or image from a file at the current insertion point. Supply an optional type (see wxBitmap) to use for internal and file storage of the raw data.