Home | Trees | Index | Help |
|
---|
Package wx :: Module richtext :: Class RichTextCtrl |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |Panel
--+ |ScrolledWindow
--+ | RichTextCtrl
Proxy of C++ RichTextCtrl class
Method Summary | |
---|---|
Window |
Construct and show a generic Window. |
RichTextRange | AddImage(self,
image)
|
RichTextRange | AddParagraph(self,
text)
|
Append text to the end of the document. | |
bool | ApplyAlignmentToSelection(self,
alignment)
|
bool | ApplyBoldToSelection(self)
|
bool | ApplyItalicToSelection(self)
|
bool | ApplyStyleSheet(self,
styleSheet)
|
bool | ApplyUnderlineToSelection(self)
|
bool | BatchingUndo(self)
|
bool | BeginAlignment(self,
alignment)
|
bool | BeginBatchUndo(self,
cmdName)
|
bool | BeginBold(self)
|
bool | BeginCharacterStyle(self,
characterStyle)
|
bool | BeginFont(self,
font)
|
bool | BeginFontSize(self,
pointSize)
|
bool | BeginItalic(self)
|
bool | BeginLeftIndent(self,
leftIndent,
leftSubIndent)
|
bool | BeginLineSpacing(self,
lineSpacing)
|
bool |
Begin named list style. |
bool | BeginNumberedBullet(self,
bulletNumber,
leftIndent,
leftSubIndent,
bulletStyle)
|
bool | BeginParagraphSpacing(self,
before,
after)
|
bool | BeginParagraphStyle(self,
paragraphStyle)
|
bool | BeginRightIndent(self,
rightIndent)
|
bool | BeginSuppressUndo(self)
|
bool | BeginSymbolBullet(self,
symbol,
leftIndent,
leftSubIndent,
bulletStyle)
|
bool | BeginTextColour(self,
colour)
|
bool | BeginUnderline(self)
|
bool |
Begin URL. |
bool |
Returns True if the selection can be copied to the clipboard. |
bool |
Returns True if the selection can be cut to the clipboard. |
bool |
Returns True if the selection can be removed from the document. |
bool |
Returns True if the current contents of the clipboard can be pasted into the document. |
bool |
Returns True if the last operation can be redone. |
bool |
Returns True if the last operation can be undone. |
Clear(self)
| |
Copies the selected text to the clipboard. | |
bool |
Create the GUI part of the Window for 2-phase creation mode. |
Copies the selected text to the clipboard and removes the selection. | |
Remove the current selection. | |
Clears the dirty flag. | |
bool | EndAlignment(self)
|
bool | EndAllStyles(self)
|
bool | EndBatchUndo(self)
|
bool | EndBold(self)
|
bool | EndCharacterStyle(self)
|
bool | EndFont(self)
|
bool | EndFontSize(self)
|
bool | EndItalic(self)
|
bool | EndLeftIndent(self)
|
bool | EndLineSpacing(self)
|
bool |
End named list style. |
bool | EndNumberedBullet(self)
|
bool | EndParagraphSpacing(self)
|
bool | EndParagraphStyle(self)
|
bool | EndRightIndent(self)
|
bool | EndStyle(self)
|
bool | EndSuppressUndo(self)
|
bool | EndSymbolBullet(self)
|
bool | EndTextColour(self)
|
bool | EndUnderline(self)
|
bool |
End URL. |
wxRichTextBuffer | GetBuffer(self)
|
RichTextAttr |
Retrieves a copy of the default style object. |
long |
Get the threshold in character positions for doing layout optimization during sizing. |
String | GetFilename(self)
|
int |
Get the handler flags, controlling loading and saving. |
long |
Returns the insertion point. |
RichTextRange | GetInternalSelectionRange(self)
|
long |
Returns the zero based index of the last position in the document. |
int | GetLineLength(self,
lineNo)
|
String | GetLineText(self,
lineNo)
|
int | GetNumberOfLines(self)
|
String | GetRange(self,
from,
to)
|
GetSelection() --> (start, end) | |
RichTextRange | GetSelectionRange(self)
|
String | GetStringSelection(self)
|
bool |
Retrieve the style used at the given position. |
wxRichTextStyleSheet | GetStyleSheet(self)
|
bool |
Get the content (uncombined) attributes for this position. |
String | GetValue(self)
|
bool | HasCharacterAttributes(self,
range,
style)
|
bool | HasParagraphAttributes(self,
range,
style)
|
bool | HasSelection(self)
|
HitTest(self, Point pt) --> (result, pos) | |
HitTestRC(self, Point pt) --> (result, col, row) | |
bool | IsEditable(self)
|
bool | IsModified(self)
|
bool | IsMultiLine(self)
|
bool | IsSelectionAligned(self,
alignment)
|
bool | IsSelectionBold(self)
|
bool | IsSelectionItalics(self)
|
bool | IsSelectionUnderlined(self)
|
bool | IsSingleLine(self)
|
bool | LayoutContent(self,
onlyVisibleRect)
|
bool |
Load the contents of the document from the given filename. |
Sets the dirty flag, meaning that the contents of the control have changed and need to be saved. | |
bool | MoveCaret(self,
pos,
showAtLineStart)
|
bool | MoveDown(self,
noLines,
flags)
|
bool | MoveEnd(self,
flags)
|
bool | MoveHome(self,
flags)
|
bool | MoveLeft(self,
noPositions,
flags)
|
bool | MoveRight(self,
noPositions,
flags)
|
bool | MoveToLineEnd(self,
flags)
|
bool | MoveToLineStart(self,
flags)
|
bool | MoveToParagraphEnd(self,
flags)
|
bool | MoveToParagraphStart(self,
flags)
|
bool | MoveUp(self,
noLines,
flags)
|
bool | Newline(self)
|
bool |
This is just a wrapper for ScrollPages(1). |
bool |
This is just a wrapper for ScrollPages(-1). |
Pastes text from the clipboard into the document at the current insertion point. | |
PositionToXY(self, long pos) --> (x, y) | |
If the last operation can be redone, redoes the last operation. | |
Remove(self,
from,
to)
| |
Replace(self,
from,
to,
value)
| |
bool |
Save the contents of the document to the given filename, or if the empty string is passed then to the filename set with SetFilename . |
Select all text in the document. | |
SelectNone(self)
| |
bool | SelectWord(self,
position)
|
SetBasicStyle(self,
style)
| |
bool |
Set the style used by default for the rich text document. |
bool | SetDefaultStyleToCursorStyle(self)
|
Set the threshold in character positions for doing layout optimization during sizing. | |
Makes the document editable or read-only, overriding the RE_READONLY flag. | |
SetFilename(self,
filename)
| |
Set the handler flags, controlling loading and saving. | |
Sets the insertion point at the given position. | |
Moves the insertion point to the end of the document. | |
SetInternalSelectionRange(self,
range)
| |
SetMaxLength(self, unsigned long len) | |
Selects the text starting at the first position up to (but not including) the character at the last position. | |
SetSelectionRange(self,
range)
| |
bool |
Set the style for the text in range to style |
bool |
Extended style setting operation with flags including: RICHTEXT_SETSTYLE_WITH_UNDO, RICHTEXT_SETSTYLE_OPTIMIZE, RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY, RICHTEXT_SETSTYLE_CHARACTERS_ONLY |
SetStyleSheet(self,
styleSheet)
| |
SetValue(self,
value)
| |
Ensure that the given position in the document is visible. | |
bool | SuppressingUndo(self)
|
If the last operation can be undone, undoes the last operation. | |
bool | WordLeft(self,
noPages,
flags)
|
bool | WordRight(self,
noPages,
flags)
|
bool | WriteBitmap(self,
bitmap,
bitmapType)
|
bool | WriteImage(self,
image,
bitmapType)
|
bool | WriteImageBlock(self,
imageBlock)
|
bool | WriteImageFile(self,
filename,
bitmapType)
|
Insert text at the current position. | |
long |
Translate a col,row coordinants into a document position. |
Property Summary | |
---|---|
Buffer : See GetBuffer | |
DefaultStyle : See GetDefaultStyle and SetDefaultStyle | |
DelayedLayoutThreshold : See GetDelayedLayoutThreshold and SetDelayedLayoutThreshold | |
Filename : See GetFilename and SetFilename | |
InsertionPoint : See GetInsertionPoint and SetInsertionPoint | |
InternalSelectionRange : See GetInternalSelectionRange and SetInternalSelectionRange | |
LastPosition : See GetLastPosition | |
NumberOfLines : See GetNumberOfLines | |
Selection : See GetSelection and SetSelection | |
SelectionRange : See GetSelectionRange and SetSelectionRange | |
StringSelection : See GetStringSelection | |
StyleSheet : See GetStyleSheet and SetStyleSheet | |
thisown : The membership flag | |
Value : See GetValue and SetValue |
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
value=EmptyString,
pos=DefaultPosition,
size=DefaultSize,
style=RE_MULTILINE)
|
AppendText(self, text)Append text to the end of the document.
|
BeginListStyle(self, listStyle, level=1, number=1)Begin named list style.
|
BeginURL(self, url, characterStyle=wxEmptyString)Begin URL.
|
CanCopy(self)Returns True if the selection can be copied to the clipboard.
|
CanCut(self)Returns True if the selection can be cut to the clipboard.
|
CanDeleteSelection(self)Returns True if the selection can be removed from the document.
|
CanPaste(self)Returns True if the current contents of the clipboard can be pasted into the document.
|
CanRedo(self)Returns True if the last operation can be redone.
|
CanUndo(self)Returns True if the last operation can be undone.
|
Copy(self)Copies the selected text to the clipboard. |
Create(self, parent, id=-1, value=EmptyString, pos=DefaultPosition, size=DefaultSize, style=RE_MULTILINE)Create the GUI part of the Window for 2-phase creation mode.
|
Cut(self)Copies the selected text to the clipboard and removes the selection. |
DeleteSelection(self)Remove the current selection. |
DiscardEdits(self)Clears the dirty flag.
:see: |
EndListStyle(self)End named list style.
|
EndURL(self)End URL.
|
GetDefaultStyle(self)Retrieves a copy of the default style object.
|
GetDelayedLayoutThreshold(self)Get the threshold in character positions for doing layout optimization during sizing.
|
GetHandlerFlags(self)Get the handler flags, controlling loading and saving.
|
GetInsertionPoint(self)Returns the insertion point. This is defined as the zero based index of the character position to the right of the insertion point.
|
GetLastPosition(self)Returns the zero based index of the last position in the document.
|
GetSelection(*args, **kwargs)GetSelection() --> (start, end) Returns the start and end positions of the current selection. If the values are the same then there is no selection. |
GetStyle(self, position, style)Retrieve the style used at the given position. Copies the style values at position into the style parameter and returns True if successful. Returns False otherwise.
|
GetUncombinedStyle(self, position, style)Get the content (uncombined) attributes for this position. Copies the style values at position into the style parameter and returns True if successful. Returns False otherwise.
|
HitTest(*args, **kwargs)HitTest(self, Point pt) --> (result, pos) Returns the character position at the given point in pixels. Note that pt should be given in device coordinates, and not be adjusted for the client area origin nor for scrolling. The return value is a tuple of the hit test result and the position. Possible result values are a bitmask of these flags:
|
HitTestXY(*args, **kwargs)HitTestRC(self, Point pt) --> (result, col, row) Returns the column and row of the given point in pixels. Note that
pt should be given in device coordinates, and not be adjusted for
the client area origin nor for scrolling. The return value is a tuple
of the hit test result and the column and row values.
:see:
|
LoadFile(self, file, type=RICHTEXT_TYPE_ANY)Load the contents of the document from the given filename.
|
MarkDirty(self)Sets the dirty flag, meaning that the contents of the control have changed and need to be saved. |
PageDown(self, noPages=1, flags=0)This is just a wrapper for ScrollPages(1).
|
PageUp(self, noPages=1, flags=0)This is just a wrapper for ScrollPages(-1).
|
Paste(self)Pastes text from the clipboard into the document at the current insertion point. |
PositionToXY(*args, **kwargs)PositionToXY(self, long pos) --> (x, y) Retrieves the col,row for the given position within the document |
Redo(self)If the last operation can be redone, redoes the last operation. |
SaveFile(self, file=EmptyString, type=RICHTEXT_TYPE_ANY)Save the contents of the document to the given filename, or if the
empty string is passed then to the filename set with
|
SelectAll(self)Select all text in the document. |
SetDefaultStyle(self, style)Set the style used by default for the rich text document.
|
SetDelayedLayoutThreshold(self, threshold)Set the threshold in character positions for doing layout optimization during sizing.
|
SetEditable(self, editable)Makes the document editable or read-only, overriding the RE_READONLY flag.
|
SetHandlerFlags(self, flags)Set the handler flags, controlling loading and saving.
|
SetInsertionPoint(self, pos)Sets the insertion point at the given position.
|
SetInsertionPointEnd(self)Moves the insertion point to the end of the document. |
SetMaxLength(*args, **kwargs)SetMaxLength(self, unsigned long len) Set the max number of characters which may be entered in a single line text control. |
SetSelection(self, from, to)Selects the text starting at the first position up to (but not including) the character at the last position. If both parameters are equal to -1 then all text in the control is selected.
|
SetStyle(self, range, style)Set the style for the text in range to style
|
SetStyleEx(self, range, style, flags=RICHTEXT_SETSTYLE_WITH_UNDO)Extended style setting operation with flags including: RICHTEXT_SETSTYLE_WITH_UNDO, RICHTEXT_SETSTYLE_OPTIMIZE, RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY, RICHTEXT_SETSTYLE_CHARACTERS_ONLY
|
ShowPosition(self, position)Ensure that the given position in the document is visible.
|
Undo(self)If the last operation can be undone, undoes the last operation. |
WriteText(self, text)Insert text at the current position.
|
XYToPosition(self, x, y)Translate a col,row coordinants into a document position.
|
Property Details |
---|
BufferSee
|
DefaultStyleSee
|
DelayedLayoutThresholdSee
|
FilenameSee
|
InsertionPointSee
|
InternalSelectionRangeSee
|
LastPositionSee
|
NumberOfLinesSee
|
SelectionSee
|
SelectionRangeSee
|
StringSelection
|
StyleSheetSee
|
thisownThe membership flag
|
Value |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:12:37 2007 | http://epydoc.sf.net |