1 \section{\class{wxRichTextBuffer
}}\label{wxrichtextbuffer
}
3 This class represents the whole buffer associated with a
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}.
5 \wxheading{Derived from
}
7 wxRichTextParagraphLayoutBox
9 \wxheading{Include files
}
11 <wx/richtext/richtextbuffer.h>
13 \wxheading{Data structures
}
17 \helpref{wxTextAttr
}{wxtextattr
},
\helpref{wxTextAttrEx
}{wxtextattrex
},
\helpref{wxRichTextAttr
}{wxrichtextattr
},
\helpref{wxRichTextCtrl
}{wxrichtextctrl
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
21 \membersection{wxRichTextBuffer::wxRichTextBuffer
}\label{wxrichtextbufferwxrichtextbuffer
}
23 \func{}{wxRichTextBuffer
}{\param{const wxRichTextBuffer\&
}{obj
}}
27 \func{}{wxRichTextBuffer
}{\void}
31 \membersection{wxRichTextBuffer::
\destruct{wxRichTextBuffer
}}\label{wxrichtextbufferdtor
}
33 \func{}{\destruct{wxRichTextBuffer
}}{\void}
37 \membersection{wxRichTextBuffer::AddHandler
}\label{wxrichtextbufferaddhandler
}
39 \func{void
}{AddHandler
}{\param{wxRichTextFileHandler*
}{handler
}}
43 \membersection{wxRichTextBuffer::AddParagraph
}\label{wxrichtextbufferaddparagraph
}
45 \func{wxRichTextRange
}{AddParagraph
}{\param{const wxString\&
}{text
}}
47 Adds a paragraph of text.
49 \membersection{wxRichTextBuffer::BatchingUndo
}\label{wxrichtextbufferbatchingundo
}
51 \constfunc{bool
}{BatchingUndo
}{\void}
53 Returns
\true if the buffer is currently collapsing commands into a single notional command.
55 \membersection{wxRichTextBuffer::BeginAlignment
}\label{wxrichtextbufferbeginalignment
}
57 \func{bool
}{BeginAlignment
}{\param{wxTextAttrAlignment
}{alignment
}}
59 Begins using alignment.
61 \membersection{wxRichTextBuffer::BeginBatchUndo
}\label{wxrichtextbufferbeginbatchundo
}
63 \func{bool
}{BeginBatchUndo
}{\param{const wxString\&
}{cmdName
}}
65 Begins collapsing undo/redo commands. Note that this may not work properly
66 if combining commands that delete or insert content, changing ranges for
69 {\it cmdName
} should be the name of the combined command that will appear
70 next to Undo and Redo in the edit menu.
72 \membersection{wxRichTextBuffer::BeginBold
}\label{wxrichtextbufferbeginbold
}
74 \func{bool
}{BeginBold
}{\void}
78 \membersection{wxRichTextBuffer::BeginCharacterStyle
}\label{wxrichtextbufferbegincharacterstyle
}
80 \func{bool
}{BeginCharacterStyle
}{\param{const wxString\&
}{characterStyle
}}
82 Begins applying the named character style.
84 \membersection{wxRichTextBuffer::BeginFont
}\label{wxrichtextbufferbeginfont
}
86 \func{bool
}{BeginFont
}{\param{const wxFont\&
}{font
}}
88 Begins using this font.
90 \membersection{wxRichTextBuffer::BeginFontSize
}\label{wxrichtextbufferbeginfontsize
}
92 \func{bool
}{BeginFontSize
}{\param{int
}{pointSize
}}
94 Begins using the given point size.
96 \membersection{wxRichTextBuffer::BeginItalic
}\label{wxrichtextbufferbeginitalic
}
98 \func{bool
}{BeginItalic
}{\void}
102 \membersection{wxRichTextBuffer::BeginLeftIndent
}\label{wxrichtextbufferbeginleftindent
}
104 \func{bool
}{BeginLeftIndent
}{\param{int
}{leftIndent
},
\param{int
}{leftSubIndent =
0}}
106 Begin using
{\it leftIndent
} for the left indent, and optionally
{\it leftSubIndent
} for
107 the sub-indent. Both are expressed in tenths of a millimetre.
109 The sub-indent is an offset from the left of the paragraph, and is used for all but the
110 first line in a paragraph. A positive value will cause the first line to appear to the left
111 of the subsequent lines, and a negative value will cause the first line to be indented
112 relative to the subsequent lines.
114 \membersection{wxRichTextBuffer::BeginLineSpacing
}\label{wxrichtextbufferbeginlinespacing
}
116 \func{bool
}{BeginLineSpacing
}{\param{int
}{lineSpacing
}}
118 Begins line spacing using the specified value.
{\it spacing
} is a multiple, where
10 means single-spacing,
119 15 means
1.5 spacing, and
20 means double spacing. The following constants are
120 defined for convenience:
124 #define wxTEXT_ATTR_LINE_SPACING_NORMAL
10
125 #define wxTEXT_ATTR_LINE_SPACING_HALF
15
126 #define wxTEXT_ATTR_LINE_SPACING_TWICE
20
130 \membersection{wxRichTextBuffer::BeginNumberedBullet
}\label{wxrichtextbufferbeginnumberedbullet
}
132 \func{bool
}{BeginNumberedBullet
}{\param{int
}{bulletNumber
},
\param{int
}{leftIndent
},
\param{int
}{leftSubIndent
},
\param{int
}{bulletStyle = wxTEXT
\_ATTR\_BULLET\_STYLE\_ARABIC|wxTEXT
\_ATTR\_BULLET\_STYLE\_PERIOD}}
134 Begins a numbered bullet. This call will be needed for each item in the list, and the
135 application should take care of incrementing the numbering.
137 {\it bulletNumber
} is a number, usually starting with
1.
139 {\it leftIndent
} and
{\it leftSubIndent
} are values in tenths of a millimetre.
141 {\it bulletStyle
} is a bitlist of the following values:
145 #define wxTEXT_ATTR_BULLET_STYLE_NONE
0x0000
146 #define wxTEXT_ATTR_BULLET_STYLE_ARABIC
0x0001
147 #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER
0x0002
148 #define wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER
0x0004
149 #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER
0x0008
150 #define wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER
0x0010
151 #define wxTEXT_ATTR_BULLET_STYLE_SYMBOL
0x0020
152 #define wxTEXT_ATTR_BULLET_STYLE_BITMAP
0x0040
153 #define wxTEXT_ATTR_BULLET_STYLE_PARENTHESES
0x0080
154 #define wxTEXT_ATTR_BULLET_STYLE_PERIOD
0x0100
158 wxRichTextBuffer uses indentation to render a bulleted item. The left indent is the distance between
159 the margin and the bullet. The content of the paragraph, including the first line, starts
160 at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the
161 left of the actual paragraph is leftSubIndent.
163 \membersection{wxRichTextBuffer::BeginParagraphSpacing
}\label{wxrichtextbufferbeginparagraphspacing
}
165 \func{bool
}{BeginParagraphSpacing
}{\param{int
}{before
},
\param{int
}{after
}}
167 Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing in tenths of
170 \membersection{wxRichTextBuffer::BeginParagraphStyle
}\label{wxrichtextbufferbeginparagraphstyle
}
172 \func{bool
}{BeginParagraphStyle
}{\param{const wxString\&
}{paragraphStyle
}}
174 Begins applying the named paragraph style.
176 \membersection{wxRichTextBuffer::BeginRightIndent
}\label{wxrichtextbufferbeginrightindent
}
178 \func{bool
}{BeginRightIndent
}{\param{int
}{rightIndent
}}
180 Begins a right indent, specified in tenths of a millimetre.
182 \membersection{wxRichTextBuffer::BeginStyle
}\label{wxrichtextbufferbeginstyle
}
184 \func{bool
}{BeginStyle
}{\param{const wxTextAttrEx\&
}{style
}}
186 Begins using a specified style.
188 \membersection{wxRichTextBuffer::BeginSuppressUndo
}\label{wxrichtextbufferbeginsuppressundo
}
190 \func{bool
}{BeginSuppressUndo
}{\void}
192 Begins suppressing undo/redo commands. The way undo is suppressed may be implemented
193 differently by each command. If not dealt with by a command implementation, then
194 it will be implemented automatically by not storing the command in the undo history
195 when the action is submitted to the command processor.
197 \membersection{wxRichTextBuffer::BeginSymbolBullet
}\label{wxrichtextbufferbeginsymbolbullet
}
199 \func{bool
}{BeginSymbolBullet
}{\param{wxChar
}{symbol
},
\param{int
}{leftIndent
},
\param{int
}{leftSubIndent
},
\param{int
}{bulletStyle = wxTEXT
\_ATTR\_BULLET\_STYLE\_SYMBOL}}
201 Begins applying a symbol bullet, using a character from the current font. See
\helpref{BeginNumberedBullet
}{wxrichtextbufferbeginnumberedbullet
} for
202 an explanation of how indentation is used to render the bulleted paragraph.
204 \membersection{wxRichTextBuffer::BeginTextColour
}\label{wxrichtextbufferbegintextcolour
}
206 \func{bool
}{BeginTextColour
}{\param{const wxColour\&
}{colour
}}
208 Begins using the specified text foreground colour.
210 \membersection{wxRichTextBuffer::BeginUnderline
}\label{wxrichtextbufferbeginunderline
}
212 \func{bool
}{BeginUnderline
}{\void}
214 Begins using underline.
216 \membersection{wxRichTextBuffer::CanPasteFromClipboard
}\label{wxrichtextbuffercanpastefromclipboard
}
218 \constfunc{bool
}{CanPasteFromClipboard
}{\void}
220 Returns
\true if content can be pasted from the clipboard.
222 \membersection{wxRichTextBuffer::CleanUpHandlers
}\label{wxrichtextbuffercleanuphandlers
}
224 \func{void
}{CleanUpHandlers
}{\void}
226 Cleans up the file handlers.
228 \membersection{wxRichTextBuffer::Clear
}\label{wxrichtextbufferclear
}
230 \func{void
}{Clear
}{\void}
232 Clears the buffer and resets the command processor.
234 \membersection{wxRichTextBuffer::ClearStyleStack
}\label{wxrichtextbufferclearstylestack
}
236 \func{void
}{ClearStyleStack
}{\void}
238 Clears the style stack.
240 \membersection{wxRichTextBuffer::Clone
}\label{wxrichtextbufferclone
}
242 \constfunc{wxRichTextObject*
}{Clone
}{\void}
246 \membersection{wxRichTextBuffer::Copy
}\label{wxrichtextbuffercopy
}
248 \func{void
}{Copy
}{\param{const wxRichTextBuffer\&
}{obj
}}
250 Copies the given buffer.
252 \membersection{wxRichTextBuffer::CopyToClipboard
}\label{wxrichtextbuffercopytoclipboard
}
254 \func{bool
}{CopyToClipboard
}{\param{const wxRichTextRange\&
}{range
}}
256 Copy the given range to the clipboard.
258 \membersection{wxRichTextBuffer::DeleteRangeWithUndo
}\label{wxrichtextbufferdeleterangewithundo
}
260 \func{bool
}{DeleteRangeWithUndo
}{\param{const wxRichTextRange\&
}{range
},
\param{long
}{initialCaretPosition
},
\param{long
}{newCaretPositon
},
\param{wxRichTextCtrl*
}{ctrl
}}
262 Submits a command to delete the given range.
264 \membersection{wxRichTextBuffer::Dump
}\label{wxrichtextbufferdump
}
266 \func{void
}{Dump
}{\void}
268 \func{void
}{Dump
}{\param{wxTextOutputStream\&
}{stream
}}
270 Dumps the contents of the buffer for debugging purposes.
272 \membersection{wxRichTextBuffer::EndAlignment
}\label{wxrichtextbufferendalignment
}
274 \func{bool
}{EndAlignment
}{\void}
278 \membersection{wxRichTextBuffer::EndAllStyles
}\label{wxrichtextbufferendallstyles
}
280 \func{bool
}{EndAllStyles
}{\void}
282 Ends all styles that have been started with a Begin... command.
284 \membersection{wxRichTextBuffer::EndBatchUndo
}\label{wxrichtextbufferendbatchundo
}
286 \func{bool
}{EndBatchUndo
}{\void}
288 Ends collapsing undo/redo commands, and submits the combined command.
290 \membersection{wxRichTextBuffer::EndBold
}\label{wxrichtextbufferendbold
}
292 \func{bool
}{EndBold
}{\void}
296 \membersection{wxRichTextBuffer::EndCharacterStyle
}\label{wxrichtextbufferendcharacterstyle
}
298 \func{bool
}{EndCharacterStyle
}{\void}
300 Ends using the named character style.
302 \membersection{wxRichTextBuffer::EndFont
}\label{wxrichtextbufferendfont
}
304 \func{bool
}{EndFont
}{\void}
308 \membersection{wxRichTextBuffer::EndFontSize
}\label{wxrichtextbufferendfontsize
}
310 \func{bool
}{EndFontSize
}{\void}
312 Ends using a point size.
314 \membersection{wxRichTextBuffer::EndItalic
}\label{wxrichtextbufferenditalic
}
316 \func{bool
}{EndItalic
}{\void}
320 \membersection{wxRichTextBuffer::EndLeftIndent
}\label{wxrichtextbufferendleftindent
}
322 \func{bool
}{EndLeftIndent
}{\void}
324 Ends using a left indent.
326 \membersection{wxRichTextBuffer::EndLineSpacing
}\label{wxrichtextbufferendlinespacing
}
328 \func{bool
}{EndLineSpacing
}{\void}
330 Ends using a line spacing.
332 \membersection{wxRichTextBuffer::EndNumberedBullet
}\label{wxrichtextbufferendnumberedbullet
}
334 \func{bool
}{EndNumberedBullet
}{\void}
336 Ends a numbered bullet.
338 \membersection{wxRichTextBuffer::EndParagraphSpacing
}\label{wxrichtextbufferendparagraphspacing
}
340 \func{bool
}{EndParagraphSpacing
}{\void}
342 Ends paragraph spacing.
344 \membersection{wxRichTextBuffer::EndParagraphStyle
}\label{wxrichtextbufferendparagraphstyle
}
346 \func{bool
}{EndParagraphStyle
}{\void}
348 Ends applying a named character style.
350 \membersection{wxRichTextBuffer::EndRightIndent
}\label{wxrichtextbufferendrightindent
}
352 \func{bool
}{EndRightIndent
}{\void}
354 Ends using a right indent.
356 \membersection{wxRichTextBuffer::EndStyle
}\label{wxrichtextbufferendstyle
}
358 \func{bool
}{EndStyle
}{\void}
360 Ends the current style.
362 \membersection{wxRichTextBuffer::EndSuppressUndo
}\label{wxrichtextbufferendsuppressundo
}
364 \func{bool
}{EndSuppressUndo
}{\void}
366 Ends suppressing undo/redo commands.
368 \membersection{wxRichTextBuffer::EndSymbolBullet
}\label{wxrichtextbufferendsymbolbullet
}
370 \func{bool
}{EndSymbolBullet
}{\void}
372 Ends using a symbol bullet.
374 \membersection{wxRichTextBuffer::EndTextColour
}\label{wxrichtextbufferendtextcolour
}
376 \func{bool
}{EndTextColour
}{\void}
378 Ends using a text foreground colour.
380 \membersection{wxRichTextBuffer::EndUnderline
}\label{wxrichtextbufferendunderline
}
382 \func{bool
}{EndUnderline
}{\void}
384 Ends using underline.
386 \membersection{wxRichTextBuffer::FindHandler
}\label{wxrichtextbufferfindhandler
}
388 \func{wxRichTextFileHandler*
}{FindHandler
}{\param{int
}{imageType
}}
390 Finds a handler by type.
392 \func{wxRichTextFileHandler*
}{FindHandler
}{\param{const wxString\&
}{extension
},
\param{int
}{imageType
}}
394 Finds a handler by extension and type.
396 \func{wxRichTextFileHandler*
}{FindHandler
}{\param{const wxString\&
}{name
}}
398 Finds a handler by name.
400 \membersection{wxRichTextBuffer::FindHandlerFilenameOrType
}\label{wxrichtextbufferfindhandlerfilenameortype
}
402 \func{wxRichTextFileHandler*
}{FindHandlerFilenameOrType
}{\param{const wxString\&
}{filename
},
\param{int
}{imageType
}}
404 Finds a handler by filename or, if supplied, type.
406 \membersection{wxRichTextBuffer::GetBasicStyle
}\label{wxrichtextbuffergetbasicstyle
}
408 \constfunc{const wxTextAttrEx\&
}{GetBasicStyle
}{\void}
410 Gets the basic (overall) style. This is the style of the whole
411 buffer before further styles are applied, unlike the default style, which
412 only affects the style currently being applied (for example, setting the default
413 style to bold will cause subsequently inserted text to be bold).
415 \membersection{wxRichTextBuffer::GetBatchedCommand
}\label{wxrichtextbuffergetbatchedcommand
}
417 \constfunc{wxRichTextCommand*
}{GetBatchedCommand
}{\void}
419 Gets the collapsed command.
421 \membersection{wxRichTextBuffer::GetCommandProcessor
}\label{wxrichtextbuffergetcommandprocessor
}
423 \constfunc{wxCommandProcessor*
}{GetCommandProcessor
}{\void}
425 Gets the command processor. A text buffer always creates its own command processor when it is
428 \membersection{wxRichTextBuffer::GetDefaultStyle
}\label{wxrichtextbuffergetdefaultstyle
}
430 \constfunc{const wxTextAttrEx\&
}{GetDefaultStyle
}{\void}
432 Returns the current default style, affecting the style currently being applied (for example, setting the default
433 style to bold will cause subsequently inserted text to be bold).
435 \membersection{wxRichTextBuffer::GetExtWildcard
}\label{wxrichtextbuffergetextwildcard
}
437 \func{wxString
}{GetExtWildcard
}{\param{bool
}{combine = false
},
\param{bool
}{save = false
},
\param{wxArrayInt*
}{types = NULL
}}
439 Gets a wildcard incorporating all visible handlers. If
{\it types
} is present,
440 it will be filled with the file type corresponding to each filter. This can be
441 used to determine the type to pass to
\helpref{LoadFile
}{wxrichtextbuffergetextwildcard
} given a selected filter.
443 \membersection{wxRichTextBuffer::GetHandlers
}\label{wxrichtextbuffergethandlers
}
445 \func{wxList\&
}{GetHandlers
}{\void}
447 Returns the list of file handlers.
449 \membersection{wxRichTextBuffer::GetStyle
}\label{wxrichtextbuffergetstyle
}
451 \func{bool
}{GetStyle
}{\param{long
}{position
},
\param{wxRichTextAttr\&
}{style
}}
453 \func{bool
}{GetStyle
}{\param{long
}{position
},
\param{wxTextAttrEx\&
}{style
}}
455 Gets the attributes at the given position.
457 This function gets the combined style - that is, the style you see on the screen as a result
458 of combining base style, paragraph style and character style attributes. To get the character
459 or paragraph style alone, use
\helpref{GetUncombinedStyle
}{wxrichtextbuffergetuncombinedstyle
}.
461 \membersection{wxRichTextBuffer::GetStyleForRange
}\label{wxrichtextbuffergetstyleforrange
}
463 \func{bool
}{GetStyleForRange
}{\param{const wxRichTextRange\&
}{ range
},
\param{wxTextAttrEx\&
}{style
}}
465 This function gets a style representing the common, combined attributes in the given range.
466 Attributes which have different values within the specified range will not be included the style
469 The function is used to get the attributes to display in the formatting dialog: the user
470 can edit the attributes common to the selection, and optionally specify the values of further
471 attributes to be applied uniformly.
473 To apply the edited attributes, you can use
\helpref{SetStyle
}{wxrichtextbuffersetstyle
} specifying
474 the wxRICHTEXT
\_SETSTYLE\_OPTIMIZE flag, which will only apply attributes that are different
475 from the
{\it combined
} attributes within the range. So, the user edits the effective, displayed attributes
476 for the range, but his choice won't be applied unnecessarily to content. As an example,
477 say the style for a paragraph specifies bold, but the paragraph text doesn't specify a weight. The
478 combined style is bold, and this is what the user will see on-screen and in the formatting
479 dialog. The user now specifies red text, in addition to bold. When applying with
480 SetStyle, the content font weight attributes won't be changed to bold because this is already specified
481 by the paragraph. However the text colour attributes
{\it will
} be changed to
484 \membersection{wxRichTextBuffer::GetStyleSheet
}\label{wxrichtextbuffergetstylesheet
}
486 \constfunc{wxRichTextStyleSheet*
}{GetStyleSheet
}{\void}
488 Returns the current style sheet associated with the buffer, if any.
490 \membersection{wxRichTextBuffer::GetStyleStackSize
}\label{wxrichtextbuffergetstylestacksize
}
492 \constfunc{size
\_t}{GetStyleStackSize
}{\void}
494 Get the size of the style stack, for example to check correct nesting.
496 \membersection{wxRichTextBuffer::GetUncombinedStyle
}\label{wxrichtextbuffergetuncombinedstyle
}
498 \func{bool
}{GetUncombinedStyle
}{\param{long
}{position
},
\param{wxRichTextAttr\&
}{style
}}
500 \func{bool
}{GetUncombinedStyle
}{\param{long
}{position
},
\param{wxTextAttrEx\&
}{style
}}
502 Gets the attributes at the given position.
504 This function gets the
{\it uncombined style
} - that is, the attributes associated with the
505 paragraph or character content, and not necessarily the combined attributes you see on the
506 screen. To get the combined attributes, use
\helpref{GetStyle
}{wxrichtextbuffergetstyle
}.
508 If you specify (any) paragraph attribute in
{\it style
}'s flags, this function will fetch
509 the paragraph attributes. Otherwise, it will return the character attributes.
511 \membersection{wxRichTextBuffer::HitTest
}\label{wxrichtextbufferhittest
}
513 \func{int
}{HitTest
}{\param{wxDC\&
}{dc
},
\param{const wxPoint\&
}{pt
},
\param{long\&
}{textPosition
}}
515 Finds the text position for the given position, putting the position in
{\it textPosition
} if
516 one is found.
{\it pt
} is in logical units (a zero y position is
517 at the beginning of the buffer).
519 The function returns one of the following values:
523 // The point was not on this object
524 #define wxRICHTEXT_HITTEST_NONE
0x01
525 // The point was before the position returned from HitTest
526 #define wxRICHTEXT_HITTEST_BEFORE
0x02
527 // The point was after the position returned from HitTest
528 #define wxRICHTEXT_HITTEST_AFTER
0x04
529 // The point was on the position returned from HitTest
530 #define wxRICHTEXT_HITTEST_ON
0x08
534 \membersection{wxRichTextBuffer::Init
}\label{wxrichtextbufferinit
}
536 \func{void
}{Init
}{\void}
540 \membersection{wxRichTextBuffer::InitStandardHandlers
}\label{wxrichtextbufferinitstandardhandlers
}
542 \func{void
}{InitStandardHandlers
}{\void}
544 Initialises the standard handlers. Currently, only the plain text loading/saving handler
545 is initialised by default.
547 \membersection{wxRichTextBuffer::InsertHandler
}\label{wxrichtextbufferinserthandler
}
549 \func{void
}{InsertHandler
}{\param{wxRichTextFileHandler*
}{handler
}}
551 Inserts a handler at the front of the list.
553 \membersection{wxRichTextBuffer::InsertImageWithUndo
}\label{wxrichtextbufferinsertimagewithundo
}
555 \func{bool
}{InsertImageWithUndo
}{\param{long
}{pos
},
\param{const wxRichTextImageBlock\&
}{imageBlock
},
\param{wxRichTextCtrl*
}{ctrl
}}
557 Submits a command to insert the given image.
559 \membersection{wxRichTextBuffer::InsertNewlineWithUndo
}\label{wxrichtextbufferinsertnewlinewithundo
}
561 \func{bool
}{InsertNewlineWithUndo
}{\param{long
}{pos
},
\param{wxRichTextCtrl*
}{ctrl
}}
563 Submits a command to insert a newline.
565 \membersection{wxRichTextBuffer::InsertTextWithUndo
}\label{wxrichtextbufferinserttextwithundo
}
567 \func{bool
}{InsertTextWithUndo
}{\param{long
}{pos
},
\param{const wxString\&
}{text
},
\param{wxRichTextCtrl*
}{ctrl
}}
569 Submits a command to insert the given text.
571 \membersection{wxRichTextBuffer::IsModified
}\label{wxrichtextbufferismodified
}
573 \constfunc{bool
}{IsModified
}{\void}
575 Returns
\true if the buffer has been modified.
577 \membersection{wxRichTextBuffer::LoadFile
}\label{wxrichtextbufferloadfile
}
579 \func{bool
}{LoadFile
}{\param{wxInputStream\&
}{stream
},
\param{int
}{type = wxRICHTEXT
\_TYPE\_ANY}}
581 Loads content from a stream.
583 \func{bool
}{LoadFile
}{\param{const wxString\&
}{filename
},
\param{int
}{type = wxRICHTEXT
\_TYPE\_ANY}}
585 Loads content from a file.
587 \membersection{wxRichTextBuffer::Modify
}\label{wxrichtextbuffermodify
}
589 \func{void
}{Modify
}{\param{bool
}{modify = true
}}
591 Marks the buffer as modified or unmodified.
593 \membersection{wxRichTextBuffer::PasteFromClipboard
}\label{wxrichtextbufferpastefromclipboard
}
595 \func{bool
}{PasteFromClipboard
}{\param{long
}{position
}}
597 Pastes the clipboard content to the buffer at the given position.
599 \membersection{wxRichTextBuffer::RemoveHandler
}\label{wxrichtextbufferremovehandler
}
601 \func{bool
}{RemoveHandler
}{\param{const wxString\&
}{name
}}
605 \membersection{wxRichTextBuffer::Reset
}\label{wxrichtextbufferreset
}
607 \func{void
}{Reset
}{\void}
609 The same as
\helpref{Clear
}{wxrichtextbufferclear
}, plus an empty paragraph is added.
611 \membersection{wxRichTextBuffer::SaveFile
}\label{wxrichtextbuffersavefile
}
613 \func{bool
}{SaveFile
}{\param{wxOutputStream\&
}{stream
},
\param{int
}{type = wxRICHTEXT
\_TYPE\_ANY}}
615 Saves content to a stream.
617 \func{bool
}{SaveFile
}{\param{const wxString\&
}{filename
},
\param{int
}{type = wxRICHTEXT
\_TYPE\_ANY}}
619 Saves content to a file.
621 \membersection{wxRichTextBuffer::SetBasicStyle
}\label{wxrichtextbuffersetbasicstyle
}
623 \func{void
}{SetBasicStyle
}{\param{const wxRichTextAttr\&
}{style
}}
625 \func{void
}{SetBasicStyle
}{\param{const wxTextAttrEx\&
}{style
}}
627 Sets the basic (overall) style. This is the style of the whole
628 buffer before further styles are applied, unlike the default style, which
629 only affects the style currently being applied (for example, setting the default
630 style to bold will cause subsequently inserted text to be bold).
632 \membersection{wxRichTextBuffer::SetDefaultStyle
}\label{wxrichtextbuffersetdefaultstyle
}
634 \func{void
}{SetDefaultStyle
}{\param{const wxTextAttrEx\&
}{style
}}
636 Sets the default style, affecting the style currently being applied (for example, setting the default
637 style to bold will cause subsequently inserted text to be bold).
639 This is not cumulative - setting the default style will replace the previous default style.
641 \membersection{wxRichTextBuffer::SetStyle
}\label{wxrichtextbuffersetstyle
}
643 \func{bool
}{SetStyle
}{\param{const wxRichTextRange\&
}{range
},
\param{const wxRichTextAttr\&
}{style
},
\param{int
}{flags $=$ wxRICHTEXT
\_SETSTYLE\_WITH\_UNDO}}
645 \func{bool
}{SetStyle
}{\param{const wxRichTextRange\&
}{range
},
\param{const wxTextAttrEx\&
}{style
},
\param{int
}{flags $=$ wxRICHTEXT
\_SETSTYLE\_WITH\_UNDO}}
647 Sets the attributes for the given range, passing flags to determine how the attributes are set.
649 The end point of range is specified as the last character position of the span of text.
650 So, for example, to set the style for a character at position
5, use the range (
5,
5).
651 This differs from the wxRichTextCtrl API, where you would specify (
5,
6).
653 {\it flags
} may contain a bit list of the following values:
656 #define wxRICHTEXT_SETSTYLE_NONE
0x00
658 // Specifies that this operation should be undoable
659 #define wxRICHTEXT_SETSTYLE_WITH_UNDO
0x01
661 // Specifies that the style should not be applied if the
662 // combined style at this point is already the style in question.
663 #define wxRICHTEXT_SETSTYLE_OPTIMIZE
0x02
665 // Specifies that the style should only be applied to paragraphs,
666 // and not the content. This allows content styling to be
667 // preserved independently from that of e.g. a named paragraph style.
668 #define wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY
0x04
670 // Specifies that the style should only be applied to characters,
671 // and not the paragraph. This allows content styling to be
672 // preserved independently from that of e.g. a named paragraph style.
673 #define wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY
0x08
676 \membersection{wxRichTextBuffer::SetStyleSheet
}\label{wxrichtextbuffersetstylesheet
}
678 \func{void
}{SetStyleSheet
}{\param{wxRichTextStyleSheet*
}{styleSheet
}}
680 Sets the current style sheet, if any. This will allow the application to use
681 named character and paragraph styles found in the style sheet.
683 \membersection{wxRichTextBuffer::SubmitAction
}\label{wxrichtextbuffersubmitaction
}
685 \func{bool
}{SubmitAction
}{\param{wxRichTextAction*
}{action
}}
687 Submit an action immediately, or delay it according to whether collapsing is on.
689 \membersection{wxRichTextBuffer::SuppressingUndo
}\label{wxrichtextbuffersuppressingundo
}
691 \constfunc{bool
}{SuppressingUndo
}{\void}
693 Returns
\true if undo suppression is currently on.