TranscriptEditor contains the following public methods:
| Method | Description |
|---|---|
load_transcript() |
Load the given transcript object into the editor. Pass a RTF filename as a string or pass a Transcript object. The dataType parameter defaults to rtf, but if you are loading a pickled transcript, be sure to use 'pickle'. Another thing that this method does is that if an RTF transcript has been loaded, it will automatically save the transcript using the pickle format. |
load_timecodes() |
Scan the document for timecodes and add to internal list. |
save_transcript() |
Save the transcript to the database. |
get_transcript() |
Get in memory transcript object. |
get_transcript_doc_data() |
No description |
export_transcript() |
Export the transcript to an RTF file. |
set_default_font() |
Change the default font. |
set_font() |
Change the current font or the font for the selected text. |
get_font() |
Get the current font. |
set_bold() |
Set bold state for current font or for the selected text. If enable is not specified as 0 or 1, then it will toggle the current bold state. |
get_bold() |
No description |
set_italic() |
Set italic state for current font or for the selected text. |
get_italic() |
No description |
set_underline() |
Set underline state for current font or for the selected text. |
get_underline() |
No description |
cut_selected_text() |
Delete selected text and place in clipboard. |
copy_seleted_text() |
Copy selected text to clipboard. |
paste_text() |
Paste text from clipboard. |
select_all() |
Select all document text. |
show_codes() |
Make encoded text in document visible. |
hide_codes() |
Make encoded text in document visible. |
codes_visible() |
Return 1 if encoded text is visible. |
changeTimeCodeHiddenStatus() |
Changes the Time Code marks (but not the time codes themselves) between visible and invisble styles. |
show_all_hidden() |
Make encoded text in document visible. |
hide_all_hidden() |
Make encoded text in document visible. |
find_text() |
Find text in document. |
insert_text() |
Insert text at current cursor position. |
insert_timecode() |
Insert a timecode in the current cursor position of the Transcript. The parameter time_ms is optional and will default to the current Video Position if not used. |
insert_timed_pause() |
No description |
scroll_to_time() |
Scroll to the nearest timecode matching 'ms' that isn't greater than 'ms'. Return TRUE if position in document is actually changed. |
cursor_find() |
Move the cursor to the next occurrence of given text in the transcript (for word tracking). |
select_find() |
Select the text from the current cursor position to the next occurrence of given text (for word tracking). |
spell_check() |
Interactively spell-check document. |
undo() |
Undo last operation(s). |
redo() |
Redo last undone operation(s). |
modified() |
Return TRUE if transcript was modified since last save. If no transcript is loaded, this will always return FALSE. |
set_read_only() |
Enable or disable read-only mode, to prevent the transcript from being modified. |
get_read_only() |
No description |
find_timecode_before_cursor() |
Return the position of the first timecode before the given cursor position. |
get_selected_time_range() |
Get the time range of the currently selected text. Return a tuple with the start and end times in milliseconds. |
ClearDoc() |
No description |
PrevTimeCode() |
Return the timecode immediately before the current one. |
NextTimeCode() |
Return the timecode immediately after the current one. |
OnKeyPress() |
Called when a key is pressed down. All characters are upper case. |
OnChar() |
Called when a character key is pressed. Works with case-sensitive characters. |
CheckTimeCodesAtSelectionBoundaries() |
Check the start and end of a selection and make sure neither is in the middle of a time code |
OnStartDrag() |
Called on the initiation of a Drag within the Transcript. |
PositionAfter() |
No description |
SetSelectionAfter() |
No description |
OnLeftUp() |
Left Mouse Button Up event |
OnRightClick() |
Right-clicking should handle Video Play Control rather than providing the traditional right-click editing control menu |
RestoreCursor() |
Restore the Cursor position following right-click play control operation |
AdjustIndexes() |
Adjust Transcript Time Codes by the specified amount |
CallFontDialog() |
Trigger the TransanaFontDialog, either updating the font settings for the selected text or changing the the font settingss for the current cursor position. |
MoveAfterInTabOrder() |
MoveAfterInTabOrder(self, Window win) Moves this window in the tab navigation order after the specified sibling window. This means that when the user presses the TAB key on that other window, the focus switches to this window. The default tab order is the same as creation order. This function and `MoveBeforeInTabOrder` allow to change it after creating all the windows. |
Fit() |
Fit(self) Sizes the window so that it fits around its subwindows. This function won't do anything if there are no subwindows and will only really work correctly if sizers are used for the subwindows layout. Also, if the window has exactly one subwindow it is better (faster and the result is more precise as Fit adds some margin to account for fuzziness of its calculations) to call window.SetClientSize(child.GetSize()) instead of calling Fit. |
SetWrapStartIndent() |
SetWrapStartIndent(self, int indent) Set the start indent for wrapped lines. |
GetStyleBits() |
GetStyleBits(self) -> int Retrieve number of bits in style bytes used to hold the lexical state. |
InitDialog() |
InitDialog(self) Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators. |
GetAlignment() |
GetAlignment(self) -> int Get the control alignment (left/right/centre, top/bottom/centre) |
AutoCompPosStart() |
AutoCompPosStart(self) -> int Retrieve the position of the caret when the auto-completion list was displayed. |
IsEnabled() |
IsEnabled(self) -> bool Returns true if the window is enabled for input, false otherwise. |
Refresh() |
Refresh(self, bool eraseBackground=True, Rect rect=None) Mark the specified rectangle (or the whole window) as "dirty" so it will be repainted. Causes an EVT_PAINT event to be generated and sent to the window. |
GetPasteConvertEndings() |
GetPasteConvertEndings(self) -> bool Get convert-on-paste setting |
SetIndent() |
SetIndent(self, int indentSize) Set the number of spaces used for one level of indentation. |
IsExposed() |
IsExposed(self, int x, int y, int w=1, int h=1) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed. |
SetHelpTextForId() |
SetHelpTextForId(self, String text) Associate this help text with all windows with the same id as this one. |
SetHelpText() |
SetHelpText(self, String text) Sets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current `wx.HelpProvider` implementation, and not in the window object itself. |
CanRedo() |
CanRedo(self) -> bool Are there any redoable actions in the undo history? |
GetLineRaw() |
GetLineRaw(self, int line) -> wxCharBuffer Retrieve the contents of a line. The returned value is a utf-8 encoded string in unicode builds of wxPython, or raw 8-bit text otherwise. |
Disconnect() |
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL) -> bool |
AutoCompSetSeparator() |
AutoCompSetSeparator(self, int separatorCharacter) Change the separator character in the string setting up an auto-completion list. Default is space but can be changed if items contain space. |
SearchNext() |
SearchNext(self, int flags, String text) -> int Find some text starting at the search anchor. Does not ensure the selection is visible. |
StyleSetEOLFilled() |
StyleSetEOLFilled(self, int style, bool filled) Set a style to have its end of line filled or not. |
HitTest() |
HitTest(self, Point pt) -> int Test where the given (in client coords) point lies |
SetSizeWH() |
SetSizeWH(self, int width, int height) Sets the size of the window in pixels. |
PointFromPosition() |
PointFromPosition(self, int pos) -> Point Retrieve the point in the window where a position is displayed. |
GetClientSizeTuple() |
GetClientSizeTuple() -> (width, height) This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc. |
SetUnderline() |
Set underline state for current font or for the selected text. |
LineEndWrap() |
LineEndWrap(self) |
PrepareDC() |
PrepareDC(self, DC dc) Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position. |
InsertText() |
InsertText(self, int pos, String text) Insert string at a position. |
DeleteBackNotLine() |
DeleteBackNotLine(self) Delete the selection or if no selection, the character before the caret. Will not delete the character before at the start of a line. |
CanPaste() |
CanPaste(self) -> bool Will a paste succeed? |
HomeRectExtend() |
HomeRectExtend(self) Move caret to first position on line, extending rectangular selection to new caret position. |
MarkerPrevious() |
MarkerPrevious(self, int lineStart, int markerMask) -> int Find the previous line before lineStart that includes a marker in mask. |
LinesOnScreen() |
LinesOnScreen(self) -> int Retrieves the number of lines completely visible. |
AppendTextUTF8() |
Append a UTF8 string to the end of the document without changing the selection. Works 'natively' in a unicode build of wxPython, and will also work in an ansi build if the UTF8 text is compatible with the current encoding. |
GetThemeEnabled() |
GetThemeEnabled(self) -> bool Return the themeEnabled flag. |
GetDocPointer() |
GetDocPointer(self) -> void Retrieve a pointer to the document object. |
SetIndentationGuides() |
SetIndentationGuides(self, bool show) Show or hide indentation guides. |
SetValidator() |
SetValidator(self, Validator validator) Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type. |
Home() |
Home(self) Move caret to first position on line. |
SetFocus() |
SetFocus(self) Set's the focus to this window, allowing it to receive keyboard input. |
AutoCompSetTypeSeparator() |
AutoCompSetTypeSeparator(self, int separatorCharacter) Change the type-separator character in the string setting up an auto-completion list. Default is '?' but can be changed if items contain '?'. |
GetIndentationGuides() |
GetIndentationGuides(self) -> bool Are the indentation guides visible? |
GetLineState() |
GetLineState(self, int line) -> int Retrieve the extra styling information for a line. |
Allocate() |
Allocate(self, int bytes) Enlarge the document to a particular size of text bytes. |
GetUseVerticalScrollBar() |
GetUseVerticalScrollBar(self) -> bool Is the vertical scroll bar visible? |
GetTextExtent() |
GetTextExtent(String string) -> (width, height) Get the width and height of the text using the current font. |
SetMaxSize() |
SetMaxSize(self, Size maxSize) A more convenient method than `SetSizeHints` for setting just the max size. |
StyleSetFontAttr() |
StyleSetFontAttr(self, int styleNum, int size, String faceName, bool bold, bool italic, bool underline, int encoding=wxFONTENCODING_DEFAULT) Set all font style attributes at once. |
SetFoldMarginColour() |
SetFoldMarginColour(self, bool useSetting, Colour back) Set the colours used as a chequerboard pattern in the fold margin |
GetFoldParent() |
GetFoldParent(self, int line) -> int Find the parent line of a child line. |
GetStyleAt() |
GetStyleAt(self, int pos) -> int Returns the style byte at the position. |
ParaUp() |
ParaUp(self) |
InsertSymbol() |
Insert a character in Symbol Font into the text |
SetSizeHints() |
SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds (if it is a top-level window.) Sizers will also inspect the minimum window size and will use that value if set when calculating layout. The resizing increments are only significant under Motif or Xt. |
HasMultiplePages() |
HasMultiplePages(self) -> bool |
SetSTCFocus() |
SetSTCFocus(self, bool focus) Change internal focus flag. |
MoveBeforeInTabOrder() |
MoveBeforeInTabOrder(self, Window win) Same as `MoveAfterInTabOrder` except that it inserts this window just before win instead of putting it right after it. |
AutoCompStops() |
AutoCompStops(self, String characterSet) Define a set of character that when typed cancel the auto-completion list. |
SetSelAlpha() |
SetSelAlpha(self, int alpha) Set the alpha of the selection. |
LineCut() |
LineCut(self) Cut the line containing the caret. |
GetVirtualSizeTuple() |
GetVirtualSizeTuple() -> (width, height) Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. |
SetSelection() |
SetSelection(self, int start, int end) Select a range of text. |
StyleSetCase() |
StyleSetCase(self, int style, int caseForce) Set a style to be mixed case, or to force upper or lower case. |
DelLineRight() |
DelLineRight(self) Delete forwards from the current position to the end of the line. |
SetMarginSensitive() |
SetMarginSensitive(self, int margin, bool sensitive) Make a margin sensitive or insensitive to mouse clicks. |
HasTransparentBackground() |
HasTransparentBackground(self) -> bool Returns True if this window's background is transparent (as, for example, for `wx.StaticText`) and should show the parent window's background. This method is mostly used internally by the library itself and you normally shouldn't have to call it. You may, however, have to override it in your custom control classes to ensure that background is painted correctly. |
CharRight() |
CharRight(self) Move caret right one character. |
GetCodePage() |
GetCodePage(self) -> int Get the code page used to interpret the bytes of the document as characters. |
GetConstraints() |
GetConstraints(self) -> LayoutConstraints Returns a pointer to the window's layout constraints, or None if there are none. |
AssociateHandle() |
AssociateHandle(self, long handle) Associate the window with a new native handle |
GetTargetStart() |
GetTargetStart(self) -> int Get the position that starts the target. |
IsExposedRect() |
IsExposedRect(self, Rect rect) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed. |
PushEventHandler() |
PushEventHandler(self, EvtHandler handler) Pushes this event handler onto the event handler stack for the window. An event handler is an object that is capable of processing the events sent to a window. (In other words, is able to dispatch the events to a handler function.) By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes. wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is handed to the next one in the chain. Use `wx.Window.PopEventHandler` to remove the event handler. Ownership of the handler is *not* given to the window, so you should be sure to pop the handler before the window is destroyed and either let PopEventHandler destroy it, or call its Destroy method yourself. |
ScrollToColumn() |
ScrollToColumn(self, int column) Scroll enough to make the given column visible |
Lower() |
Lower(self) Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows. |
SetSelForeground() |
SetSelForeground(self, bool useSetting, Colour fore) Set the foreground colour of the selection and whether to use this setting. |
AutoCompCancel() |
AutoCompCancel(self) Remove the auto-completion list from the screen. |
GetIndent() |
GetIndent(self) -> int Retrieve indentation size. |
GetTextLength() |
GetTextLength(self) -> int Retrieve the number of characters in the document. |
SetOwnFont() |
SetOwnFont(self, Font font) |
WordStartPosition() |
WordStartPosition(self, int pos, bool onlyWordCharacters) -> int Get position of start of word. |
EditToggleOvertype() |
EditToggleOvertype(self) Switch from insert to overtype mode or the reverse. |
GetScreenRect() |
GetScreenRect(self) -> Rect Returns the size and position of the window in screen coordinantes as a `wx.Rect` object. |
Hide() |
Hide(self) -> bool Equivalent to calling Show(False). |
SetWindowStyle() |
SetWindowStyleFlag(self, long style) Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to take place immediately. |
MarkerLineFromHandle() |
MarkerLineFromHandle(self, int handle) -> int Retrieve the line number at which a particular marker is located. |
AdjustForLayoutDirection() |
AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32. |
ToggleCaretSticky() |
ToggleCaretSticky(self) Switch between sticky and non-sticky: meant to be bound to a key. |
SetToolTipString() |
SetToolTipString(self, String tip) Attach a tooltip to the window. |
SetVirtualSizeWH() |
SetVirtualSizeWH(self, int w, int h) Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. |
CurrentSpec() |
No description |
GetUseTabs() |
GetUseTabs(self) -> bool Retrieve whether tabs will be used in indentation. |
LoadRTFFile() |
Load a RTF file into the editor. |
GetChildren() |
GetChildren(self) -> PyObject Returns a list of the window's children. NOTE: Currently this is a copy of the child window list maintained by the window, so the return value of this function is only valid as long as the window's children do not change. |
LinesSplit() |
LinesSplit(self, int pixelWidth) Split the lines in the target into lines that are less wide than pixelWidth where possible. |
StyleSetChangeable() |
StyleSetChangeable(self, int style, bool changeable) Set a style to be changeable or not (read only). Experimental feature, currently buggy. |
SetEOLMode() |
SetEOLMode(self, int eolMode) Set the current end of line mode. |
SetHScrollBar() |
SetHScrollBar(self, wxScrollBar bar) Set the horizontal scrollbar to use instead of the ont that's built-in. |
GetFoldExpanded() |
GetFoldExpanded(self, int line) -> bool Is a header line expanded? |
SetScrollPos() |
SetScrollPos(self, int orientation, int pos, bool refresh=True) Sets the position of one of the built-in scrollbars. |
InsertHiddenText() |
Insert hidden text at current cursor position. |
GetMinSize() |
GetMinSize(self) -> Size |
SetCaretLineBackAlpha() |
SetCaretLineBackAlpha(self, int alpha) Set background alpha of the caret line. |
HideSelection() |
HideSelection(self, bool normal) Draw the selection in normal style or with selection highlighted. |
GetLineSelEndPosition() |
GetLineSelEndPosition(self, int line) -> int Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). |
CanSetTransparent() |
CanSetTransparent(self) -> bool Returns ``True`` if the platform supports setting the transparency for this window. Note that this method will err on the side of caution, so it is possible that this will return ``False`` when it is in fact possible to set the transparency. NOTE: On X-windows systems the X server must have the composite extension loaded, and there must be a composite manager program (such as xcompmgr) running. |
DelWordRight() |
DelWordRight(self) Delete the word to the right of the caret. |
RefreshRect() |
RefreshRect(self, Rect rect, bool eraseBackground=True) Redraws the contents of the given rectangle: the area inside it will be repainted. This is the same as Refresh but has a nicer syntax. |
MakeModal() |
MakeModal(self, bool modal=True) Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect. |
HitTestXY() |
HitTestXY(self, int x, int y) -> int Test where the given (in client coords) point lies |
GetMaxSize() |
GetMaxSize(self) -> Size |
MarkerDeleteHandle() |
MarkerDeleteHandle(self, int handle) Delete a marker. |
StyleSetBold() |
StyleSetBold(self, int style, bool bold) Set a style to be bold or not. |
SetDimensions() |
SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels. The sizeFlags parameter indicates the interpretation of the other params if they are equal to -1. ======================== ====================================== wx.SIZE_AUTO A -1 indicates that a class-specific default should be used. wx.SIZE_USE_EXISTING Axisting dimensions should be used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be interpreted as real dimensions, not default values. ======================== ====================================== |
Enable() |
Enable(self, bool enable=True) -> bool Enable or disable the window for user input. Note that when a parent window is disabled, all of its children are disabled as well and they are reenabled again when the parent is. Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state. |
CaptureMouse() |
CaptureMouse(self) Directs all mouse input to this window. Call wx.Window.ReleaseMouse to release the capture. Note that wxWindows maintains the stack of windows having captured the mouse and when the mouse is released the capture returns to the window which had had captured it previously and it is only really released if there were no previous window. In particular, this means that you must release the mouse as many times as you capture it, unless the window receives the `wx.MouseCaptureLostEvent` event. Any application which captures the mouse in the beginning of some operation *must* handle `wx.MouseCaptureLostEvent` and cancel this operation when it receives the event. The event handler must not recapture mouse. |
GetBold() |
Get bold state for current font or for the selected text. |
SetCaret() |
SetCaret(self, Caret caret) Sets the caret associated with the window. |
FindWindowById() |
FindWindowById(self, long winid) -> Window Find a chld of this window by window ID |
ScrollLines() |
ScrollLines(self, int lines) -> bool If the platform and window class supports it, scrolls the window by the given number of lines down, if lines is positive, or up if lines is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done. |
SetWordChars() |
SetWordChars(self, String characters) Set the set of characters making up words for when moving or selecting by word. First sets deaults like SetCharsDefault. |
GetLength() |
GetLength(self) -> int Returns the number of characters in the document. |
SelectionIsRectangle() |
SelectionIsRectangle(self) -> bool Is the selection rectangular? The alternative is the more common stream selection. |
LoadFile() |
LoadFile(self, String filename) -> bool Load the contents of filename into the editor |
SetLexerLanguage() |
SetLexerLanguage(self, String language) Set the lexing language of the document based on string name. |
SetBackgroundColour() |
SetBackgroundColour(self, Colour colour) -> bool Sets the background colour of the window. Returns True if the colour was changed. The background colour is usually painted by the default EVT_ERASE_BACKGROUND event handler function under Windows and automatically under GTK. Using `wx.NullColour` will reset the window to the default background colour. Note that setting the background colour may not cause an immediate refresh, so you may wish to call `ClearBackground` or `Refresh` after calling this function. Using this function will disable attempts to use themes for this window, if the system supports them. Use with care since usually the themes represent the appearance chosen by the user to be used for all applications on the system. |
Colourise() |
Colourise(self, int start, int end) Colourise a segment of the document using the current lexing language. |
VCHomeWrapExtend() |
VCHomeWrapExtend(self) |
SetOvertype() |
SetOvertype(self, bool overtype) Set to overtype (true) or insert mode. |
GetTextUTF8() |
Retrieve all the text in the document as UTF8. In an ansi build of wxPython the text retrieved from the document is assumed to be in the current default encoding. |
WrapCount() |
WrapCount(self, int line) -> int The number of display lines needed to wrap a document line |
GetWindowStyle() |
GetWindowStyleFlag(self) -> long Gets the window style that was passed to the constructor or Create method. |
CharRightExtend() |
CharRightExtend(self) Move caret right one character extending selection to new caret position. |
GetExtraStyle() |
GetExtraStyle(self) -> long Returns the extra style bits for the window. |
WordRightEnd() |
WordRightEnd(self) Move caret right one word, position cursor at end of word. |
UseBgCol() |
UseBgCol(self) -> bool |
GetScrollPos() |
GetScrollPos(self, int orientation) -> int Returns the built-in scrollbar position. |
GetSelectedTextUTF8() |
Retrieve the selected text as UTF8. In an ansi build of wxPython the text retrieved from the document is assumed to be in the current default encoding. |
LineDownExtend() |
LineDownExtend(self) Move caret down one line extending selection to new caret position. |
SetId() |
SetId(self, int winid) Sets the identifier of the window. Each window has an integer identifier. If the application has not provided one, an identifier will be generated. Normally, the identifier should be provided on creation and should not be modified subsequently. |
SetTabIndents() |
SetTabIndents(self, bool tabIndents) Sets whether a tab pressed when caret is within indentation indents. |
SaveFile() |
SaveFile(self, String filename) -> bool Write the contents of the editor to filename |
SetEventHandler() |
SetEventHandler(self, EvtHandler handler) Sets the event handler for this window. An event handler is an object that is capable of processing the events sent to a window. (In other words, is able to dispatch the events to handler function.) By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes. It is usually better to use `wx.Window.PushEventHandler` since this sets up a chain of event handlers, where an event not handled by one event handler is handed off to the next one in the chain. |
OnModified() |
Triggered when the document is modified, including style changes. |
AutoCompSetAutoHide() |
AutoCompSetAutoHide(self, bool autoHide) Set whether or not autocompletion is hidden automatically when nothing matches. |
GetMinWidth() |
GetMinWidth(self) -> int |
GetLineIndentPosition() |
GetLineIndentPosition(self, int line) -> int Retrieve the position before the first non indentation character on a line. |
OnUpdateUI() |
Called when the the User Interface needs to be updated. |
SetSTCCursor() |
SetSTCCursor(self, int cursorType) Sets the cursor to one of the SC_CURSOR* values. |
GetEdgeColour() |
GetEdgeColour(self) -> Colour Retrieve the colour used in edge indication. |
InsertStyledText() |
Insert text with the current style. |
GetTextRangeRaw() |
GetTextRangeRaw(self, int startPos, int endPos) -> wxCharBuffer Retrieve a range of text. The returned value is a utf-8 encoded string in unicode builds of wxPython, or raw 8-bit text otherwise. |
SetReadOnly() |
SetReadOnly(self, bool readOnly) Set to read only or read write. |
HomeDisplay() |
HomeDisplay(self) Move caret to first position on display line. |
GetSizeTuple() |
GetSizeTuple() -> (width, height) Get the window size. |
CopyText() |
CopyText(self, int length, String text) Copy argument text to the clipboard. |
ClientToScreen() |
ClientToScreen(self, Point pt) -> Point Converts to screen coordinates from coordinates relative to this window. |
CmdKeyExecute() |
CmdKeyExecute(self, int cmd) Perform one of the operations defined by the wx.stc.STC_CMD_* constants. |
GetTabWidth() |
GetTabWidth(self) -> int Retrieve the visible size of a tab. |
SetSizerAndFit() |
SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) The same as SetSizer, except it also sets the size hints for the window based on the sizer's minimum size. |
Cancel() |
Cancel(self) Cancel any modes such as call tip or auto-completion list display. |
SetVScrollBar() |
SetVScrollBar(self, wxScrollBar bar) Set the vertical scrollbar to use instead of the one that's built-in. |
GetProperty() |
GetProperty(self, String key) -> String Retrieve a 'property' value previously set with SetProperty. |
GetLastChild() |
GetLastChild(self, int line, int level) -> int Find the last child line of a header line. |
TransferDataToWindow() |
TransferDataToWindow(self) -> bool Transfers values to child controls from data areas specified by their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataToWindow() of all child windows. |
VisibleFromDocLine() |
VisibleFromDocLine(self, int line) -> int Find the display line of a document line taking hidden lines into account. |
AutoCompGetDropRestOfWord() |
AutoCompGetDropRestOfWord(self) -> bool Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion. |
StyleClearAll() |
StyleClearAll(self) Clear all the styles and make equivalent to the global default style. |
VCHome() |
VCHome(self) Move caret to before first visible character on line. If already there move to first character on line. |
GetLine() |
GetLine(self, int line) -> String Retrieve the contents of a line. |
SendSizeEvent() |
No description |
SetExtraStyle() |
SetExtraStyle(self, long exStyle) Sets the extra style bits for the window. Extra styles are the less often used style bits which can't be set with the constructor or with SetWindowStyleFlag() |
GetRect() |
GetRect(self) -> Rect Returns the size and position of the window as a `wx.Rect` object. |
LineScrollDown() |
LineScrollDown(self) Scroll the document down, keeping the caret visible. |
GetAnchor() |
GetAnchor(self) -> int Returns the position of the opposite end of the selection to the caret. |
LineUpRectExtend() |
LineUpRectExtend(self) Move caret up one line, extending rectangular selection to new caret position. |
CenterOnParent() |
CenterOnParent(self, int dir=BOTH) Center with respect to the the parent window |
UpdateWindowUI() |
UpdateWindowUI(self, long flags=UPDATE_UI_NONE) This function sends EVT_UPDATE_UI events to the window. The particular implementation depends on the window; for example a wx.ToolBar will send an update UI event for each toolbar button, and a wx.Frame will send an update UI event for each menubar menu item. You can call this function from your application to ensure that your UI is up-to-date at a particular point in time (as far as your EVT_UPDATE_UI handlers are concerned). This may be necessary if you have called `wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to limit the overhead that wxWindows incurs by sending update UI events in idle time. |
AcceptsFocus() |
AcceptsFocus(self) -> bool Can this window have focus? |
SetXCaretPolicy() |
SetXCaretPolicy(self, int caretPolicy, int caretSlop) Set the way the caret is kept visible when going sideway. The exclusion zone is given in pixels. |
SetConstraints() |
SetConstraints(self, LayoutConstraints constraints) Sets the window to have the given layout constraints. If an existing layout constraints object is already owned by the window, it will be deleted. Pass None to disassociate and delete the window's current constraints. You must call SetAutoLayout to tell a window to use the constraints automatically in its default EVT_SIZE handler; otherwise, you must handle EVT_SIZE yourself and call Layout() explicitly. When setting both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have effect. |
GetPropertyInt() |
GetPropertyInt(self, String key) -> int Retrieve a 'property' value previously set with SetProperty, interpreted as an int AFTER any '$()' variable replacement. |
GetUpdateClientRect() |
GetUpdateClientRect(self) -> Rect Get the update rectangle region bounding box in client coords. |
GetCaretLineVisible() |
GetCaretLineVisible(self) -> bool Is the background of the line containing the caret in a different colour? |
MoveCaretInsideView() |
MoveCaretInsideView(self) Move the caret inside current view if it's not there already. |
SetSelBackground() |
SetSelBackground(self, bool useSetting, Colour back) Set the background colour of the selection and whether to use this setting. |
StyleResetDefault() |
StyleResetDefault(self) Reset the default style to its state at startup |
DocumentStartExtend() |
DocumentStartExtend(self) Move caret to first position in document extending selection to new caret position. |
GetClientAreaOrigin() |
GetClientAreaOrigin(self) -> Point Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...) |
IsSameAs() |
IsSameAs(self, Object p) -> bool For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object. |
StyleSetItalic() |
StyleSetItalic(self, int style, bool italic) Set a style to be italic or not. |
GetWrapStartIndent() |
GetWrapStartIndent(self) -> int Retrive the start indent for wrapped lines. |
UserListShow() |
UserListShow(self, int listType, String itemList) Display a list of strings and send notification when user chooses one. |
SetContainingSizer() |
SetContainingSizer(self, Sizer sizer) This normally does not need to be called by application code. It is called internally when a window is added to a sizer, and is used so the window can remove itself from the sizer when it is destroyed. |
ScreenToClientXY() |
ScreenToClientXY(int x, int y) -> (x,y) Converts from screen to client window coordinates. |
SetVirtualSizeHints() |
SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. |
GetMarginLeft() |
GetMarginLeft(self) -> int Returns the size in pixels of the left margin. |
IsFrozen() |
IsFrozen(self) -> bool Returns ``True`` if the window has been frozen and not thawed yet. :see: `Freeze` and `Thaw` |
ClearBackground() |
ClearBackground(self) Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated. |
GetForegroundColour() |
GetForegroundColour(self) -> Colour Returns the foreground colour of the window. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all. |
SetModEventMask() |
SetModEventMask(self, int mask) Set which document modification events are sent to the container. |
CacheBestSize() |
CacheBestSize(self, Size size) Cache the best size so it doesn't need to be calculated again, (at least until some properties of the window change.) |
GetSearchFlags() |
GetSearchFlags(self) -> int Get the search flags used by SearchInTarget. |
SetBackSpaceUnIndents() |
SetBackSpaceUnIndents(self, bool bsUnIndents) Sets whether a backspace pressed when caret is within indentation unindents. |
GetCaretPeriod() |
GetCaretPeriod(self) -> int Get the time in milliseconds that the caret is on and off. |
GetSTCCursor() |
GetSTCCursor(self) -> int Get cursor type. |
BraceHighlight() |
BraceHighlight(self, int pos1, int pos2) Highlight the characters at two positions. |
SetLineState() |
SetLineState(self, int line, int state) Used to hold extra styling information for each line. |
HomeWrap() |
HomeWrap(self) These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. |
LineDown() |
LineDown(self) Move caret down one line. |
Create() |
Create(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=wxSTCNameStr) -> bool |
LineEndExtend() |
LineEndExtend(self) Move caret to last position on line extending selection to new caret position. |
SetFoldExpanded() |
SetFoldExpanded(self, int line, bool expanded) Show the children of a header line. |
WordRightEndExtend() |
WordRightEndExtend(self) Move caret right one word, position cursor at end of word, extending selection to new caret position. |
GetBufferedDraw() |
GetBufferedDraw(self) -> bool Is drawing done first into a buffer or direct to the screen? |
GetCaret() |
GetCaret(self) -> Caret Returns the caret associated with the window. |
Close() |
Close(self, bool force=False) -> bool This function simply generates a EVT_CLOSE event whose handler usually tries to close the window. It doesn't close the window itself, however. If force is False (the default) then the window's close handler will be allowed to veto the destruction of the window. |
CharLeftRectExtend() |
CharLeftRectExtend(self) Move caret left one character, extending rectangular selection to new caret position. |
SetItalic() |
Set italic state for current font or for the selected text. |
GetUndoCollection() |
GetUndoCollection(self) -> bool Is undo history being collected? |
SetToolTip() |
SetToolTip(self, ToolTip tip) Attach a tooltip to the window. |
GetBackgroundColour() |
GetBackgroundColour(self) -> Colour Returns the background colour of the window. |
IsShownOnScreen() |
IsShownOnScreen(self) -> bool Returns ``True`` if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well. |
GetLayoutDirection() |
GetLayoutDirection(self) -> int Get the layout direction (LTR or RTL) for this window. Returns ``wx.Layout_Default`` if layout direction is not supported. |
SetProperty() |
SetProperty(self, String key, String value) Set up a value that may be used by a lexer for some optional feature. |
AutoCompGetMaxHeight() |
AutoCompGetMaxHeight(self) -> int Set the maximum height, in rows, of auto-completion and user lists. |
DocumentEnd() |
DocumentEnd(self) Move caret to last position in document. |
StopRecord() |
StopRecord(self) Stop notifying the container of all key presses and commands. |
SetHotspotActiveForeground() |
SetHotspotActiveForeground(self, bool useSetting, Colour fore) Set a fore colour for active hotspots. |
SetCharsDefault() |
SetCharsDefault(self) Reset the set of characters for whitespace and word characters to the defaults. |
SetStyleBytes() |
SetStyleBytes(self, int length, char styleBytes) Set the styles for a segment of the document. |
SetFoldMarginHiColour() |
SetFoldMarginHiColour(self, bool useSetting, Colour fore) |
SetMouseDwellTime() |
SetMouseDwellTime(self, int periodMilliseconds) Sets the time the mouse must sit still to generate a mouse dwell event. |
StutteredPageUp() |
StutteredPageUp(self) Move caret to top of page, or one page up if already at top of page. |
SetSelectionStart() |
SetSelectionStart(self, int pos) Sets the position that starts the selection - this becomes the anchor. |
GetReadOnly() |
GetReadOnly(self) -> bool In read-only mode? |
MarkerSetForeground() |
MarkerSetForeground(self, int markerNumber, Colour fore) Set the foreground colour used for a particular marker number. |
LoadRTFData() |
Load a RTF document into the editor with the document as a buffer (string). |
SetMargins() |
SetMargins(self, int left, int right) Set the left and right margin in the edit area, measured in pixels. |
FitInside() |
FitInside(self) Similar to Fit, but sizes the interior (virtual) size of a window. Mainly useful with scrolled windows to reset scrollbars after sizing changes that do not trigger a size event, and/or scrolled windows without an interior sizer. This function similarly won't do anything if there are no subwindows. |
GetContainingSizer() |
GetContainingSizer(self) -> Sizer Return the sizer that this window is a member of, if any, otherwise None. |
CallTipPosAtStart() |
CallTipPosAtStart(self) -> int Retrieve the position where the caret was before displaying the call tip. |
DocLineFromVisible() |
DocLineFromVisible(self, int lineDisplay) -> int Find the document line of a display line taking hidden lines into account. |
SetMarginLeft() |
SetMarginLeft(self, int pixelWidth) Sets the size in pixels of the left margin. |
SetBufferedDraw() |
SetBufferedDraw(self, bool buffered) If drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker. |
GetFirstVisibleLine() |
GetFirstVisibleLine(self) -> int Retrieve the display line at the top of the display. |
GetScreenPosition() |
GetScreenPosition(self) -> Point Get the position of the window in screen coordinantes. |
StyleSetFaceName() |
StyleSetFaceName(self, int style, String fontName) Set the font of a style. |
SetLastKeydownProcessed() |
SetLastKeydownProcessed(self, bool val) |
PositionFromLine() |
PositionFromLine(self, int line) -> int Retrieve the position at the start of a line. |
EnsureVisibleEnforcePolicy() |
EnsureVisibleEnforcePolicy(self, int line) Ensure a particular line is visible by expanding any header line hiding it. Use the currently set visibility policy to determine which range to display. |
GetUpdateRegion() |
GetUpdateRegion(self) -> Region Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler. |
BraceBadLight() |
BraceBadLight(self, int pos) Highlight the character at a position indicating there is no matching brace. |
StyleSetCharacterSet() |
StyleSetCharacterSet(self, int style, int characterSet) Set the character set of the font in a style. Converts the Scintilla wx.stc.STC_CHARSET_* set values to a wxFontEncoding. |
OnPaint() |
OnPaint(self, PaintEvent event) |
SetWhitespaceChars() |
SetWhitespaceChars(self, String characters) Set the set of characters making up whitespace for when moving or selecting by word. Should be called after SetWordChars. |
PageDown() |
PageDown(self) Move caret one page down. |
SetCodePage() |
SetCodePage(self, int codePage) Set the code page used to interpret the bytes of the document as characters. |
ReleaseMouse() |
ReleaseMouse(self) Releases mouse input captured with wx.Window.CaptureMouse. |
EndUndoAction() |
EndUndoAction(self) End a sequence of actions that is undone and redone as a unit. |
AutoCompGetAutoHide() |
AutoCompGetAutoHide(self) -> bool Retrieve whether or not autocompletion is hidden automatically when nothing matches. |
SetBackgroundStyle() |
SetBackgroundStyle(self, int style) -> bool Returns the background style of the window. The background style indicates how the background of the window is drawn. ====================== ======================================== wx.BG_STYLE_SYSTEM The background colour or pattern should be determined by the system wx.BG_STYLE_COLOUR The background should be a solid colour wx.BG_STYLE_CUSTOM The background will be implemented by the application. ====================== ======================================== On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of a custom background, such as a tiled bitmap. Currently the style has no effect on other platforms. :see: `GetBackgroundStyle`, `SetBackgroundColour` |
MarkerAdd() |
MarkerAdd(self, int line, int markerNumber) -> int Add a marker to a line, returning an ID which can be used to find or delete the marker. |
Connect() |
Connect(self, int id, int lastId, int eventType, PyObject func) |
InsertRisingIntonation() |
Insert the Rising Intonation (Up Arrow) symbol |
IsTopLevel() |
IsTopLevel(self) -> bool Returns true if the given window is a top-level one. Currently all frames and dialogs are always considered to be top-level windows (even if they have a parent window). |
CallTipActive() |
CallTipActive(self) -> bool Is there an active call tip? |
GetBestFittingSize() |
Use `GetEffectiveMinSize` instead. |
WordPartLeftExtend() |
WordPartLeftExtend(self) Move to the previous change in capitalisation extending selection to new caret position. |
GetHelpTextAtPoint() |
GetHelpTextAtPoint(self, Point pt, wxHelpEvent::Origin origin) -> String Get the help string associated with the given position in this window. Notice that pt may be invalid if event origin is keyboard or unknown and this method should return the global window help text then |
StutteredPageDownExtend() |
StutteredPageDownExtend(self) Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. |
GetMinHeight() |
GetMinHeight(self) -> int |
GetDropTarget() |
GetDropTarget(self) -> DropTarget Returns the associated drop target, which may be None. |
Copy() |
Copy(self) Copy the selection to the clipboard. |
SendMsg() |
SendMsg(self, int msg, long wp=0, long lp=0) -> long Send a message to Scintilla. |
GetName() |
GetName(self) -> String Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName. |
GetMouseDwellTime() |
GetMouseDwellTime(self) -> int Retrieve the time the mouse must sit still to generate a mouse dwell event. |
InsertRTFText() |
Add RTF text at the cursor, without clearing the whole document. Used to insert Clip Transcripts into TextReports. |
SetStatus() |
SetStatus(self, int statusCode) Change error status - 0 = OK. |
GetBackgroundStyle() |
GetBackgroundStyle(self) -> int Returns the background style of the window. :see: `SetBackgroundStyle` |
LineScrollUp() |
LineScrollUp(self) Scroll the document up, keeping the caret visible. |
GetAdjustedBestSize() |
Use `GetEffectiveMinSize` instead. |
CopyRange() |
CopyRange(self, int start, int end) Copy a range of text to the clipboard. Positions are clipped into the document. |
GetRTFBuffer() |
Get a string of data in RTF format of the current document in memory. If select_only = 1, then only the current selection will be processed instead of the whole document. |
SetLineIndentation() |
SetLineIndentation(self, int line, int indentSize) Change the indentation of a line to a number of columns. |
GetNextHandler() |
GetNextHandler(self) -> EvtHandler |
RemoveEventHandler() |
RemoveEventHandler(self, EvtHandler handler) -> bool Find the given handler in the event handler chain and remove (but not delete) it from the event handler chain, returns True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.) |
UpperCase() |
UpperCase(self) Transform the selection to upper case. |
GetGrandParent() |
GetGrandParent(self) -> Window Returns the parent of the parent of this window, or None if there isn't one. |
ProcessEvent() |
ProcessEvent(self, Event event) -> bool |
SetMarginRight() |
SetMarginRight(self, int pixelWidth) Sets the size in pixels of the right margin. |
HomeDisplayExtend() |
HomeDisplayExtend(self) Move caret to first position on display line extending selection to new caret position. |
VCHomeExtend() |
VCHomeExtend(self) Like VCHome but extending selection to new caret position. |
StyleSetVisible() |
StyleSetVisible(self, int style, bool visible) Set a style to be visible or not. |
SetDragEvent() |
No description |
SetYCaretPolicy() |
SetYCaretPolicy(self, int caretPolicy, int caretSlop) Set the way the line the caret is on is kept visible. The exclusion zone is given in lines. |
PageUpRectExtend() |
PageUpRectExtend(self) Move caret one page up, extending rectangular selection to new caret position. |
SetEdgeColour() |
SetEdgeColour(self, Colour edgeColour) Change the colour used in edge indication. |
StyleSetUnderline() |
StyleSetUnderline(self, int style, bool underline) Set a style to be underlined or not. |
LineCopy() |
LineCopy(self) Copy the line containing the caret. |
AutoCompShow() |
AutoCompShow(self, int lenEntered, String itemList) Display a auto-completion list. The lenEntered parameter indicates how many characters before the caret should be used to provide context. |
LineTranspose() |
LineTranspose(self) Switch the current line with the previous. |
ClearRegisteredImages() |
ClearRegisteredImages(self) Clear all the registered images. |
AutoCompSetChooseSingle() |
AutoCompSetChooseSingle(self, bool chooseSingle) Should a single item auto-completion list automatically choose the item. |
SetCaretLineBackground() |
SetCaretLineBackground(self, Colour back) Set the colour of the background of the line containing the caret. |
AddPendingEvent() |
AddPendingEvent(self, Event event) |
AutoCompSelect() |
AutoCompSelect(self, String text) Select the item in the auto-completion list that starts with a string. |
RegisterHotKey() |
RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool Registers a system wide hotkey. Every time the user presses the hotkey registered here, this window will receive a hotkey event. It will receive the event even if the application is in the background and does not have the input focus because the user is working with some other application. To bind an event handler function to this hotkey use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the hotkey was registered successfully. |
AutoCompGetTypeSeparator() |
AutoCompGetTypeSeparator(self) -> int Retrieve the auto-completion list type-separator character. |
ScrollWindow() |
ScrollWindow(self, int dx, int dy, Rect rect=None) Physically scrolls the pixels in the window and move child windows accordingly. Use this function to optimise your scrolling implementations, to minimise the area that must be redrawn. Note that it is rarely required to call this function from a user program. |
GetLastKeydownProcessed() |
GetLastKeydownProcessed(self) -> bool |
AutoCompGetSeparator() |
AutoCompGetSeparator(self) -> int Retrieve the auto-completion list separator character. |
AutoCompSetCancelAtStart() |
AutoCompSetCancelAtStart(self, bool cancel) Should the auto-completion list be cancelled if the user backspaces to a position before where the box was created. |
StyleSetSpec() |
StyleSetSpec(self, int styleNum, String spec) Extract style settings from a spec-string which is composed of one or more of the following comma separated elements:: bold turns on bold italic turns on italics fore:[name or #RRGGBB] sets the foreground colour back:[name or #RRGGBB] sets the background colour face:[facename] sets the font face name to use size:[num] sets the font size in points eol turns on eol filling underline turns on underlining |
LowerCase() |
LowerCase(self) Transform the selection to lower case. |
GetPropertyExpanded() |
GetPropertyExpanded(self, String key) -> String Retrieve a 'property' value previously set with SetProperty, with '$()' variable replacement on returned buffer. |
GetCharAt() |
GetCharAt(self, int pos) -> int Returns the character byte at the position. |
SetMarginMask() |
SetMarginMask(self, int margin, int mask) Set a mask that determines which markers are displayed in a margin. |
AutoCompGetChooseSingle() |
AutoCompGetChooseSingle(self) -> bool Retrieve whether a single item auto-completion list automatically choose the item. |
SetPreviousHandler() |
SetPreviousHandler(self, EvtHandler handler) |
GetScrollWidth() |
GetScrollWidth(self) -> int Retrieve the document width assumed for scrolling. |
ChooseCaretX() |
ChooseCaretX(self) Set the last x chosen value to be the caret x position. |
ToggleFold() |
ToggleFold(self, int line) Switch a header line between expanded and contracted. |
GetAcceleratorTable() |
GetAcceleratorTable(self) -> AcceleratorTable Gets the accelerator table for this window. |
GetSTCFocus() |
GetSTCFocus(self) -> bool Get internal focus flag. |
Command() |
Command(self, CommandEvent event) Simulates the effect of the user issuing a command to the item. :see: `wx.CommandEvent` |
GetLineVisible() |
GetLineVisible(self, int line) -> bool Is a line visible? |
SetControlCharSymbol() |
SetControlCharSymbol(self, int symbol) Change the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character. |
GetClassName() |
GetClassName(self) -> String Returns the class name of the C++ class using wxRTTI. |
GetCharHeight() |
GetCharHeight(self) -> int Get the (average) character size for the current font. |
InsertTextUTF8() |
Insert UTF8 encoded text at a position. Works 'natively' in a unicode build of wxPython, and will also work in an ansi build if the UTF8 text is compatible with the current encoding. |
LineScroll() |
LineScroll(self, int columns, int lines) Scroll horizontally and vertically. |
SearchInTarget() |
SearchInTarget(self, String text) -> int Search for a counted string in the target and set the target to the found range. Text is counted so it can contain NULs. Returns length of range or -1 for failure in which case target is not moved. |
LineEndDisplayExtend() |
LineEndDisplayExtend(self) Move caret to last position on display line extending selection to new caret position. |
GetBackSpaceUnIndents() |
GetBackSpaceUnIndents(self) -> bool Does a backspace pressed when caret is within indentation unindent? |
AutoCompGetMaxWidth() |
AutoCompGetMaxWidth(self) -> int Get the maximum width, in characters, of auto-completion and user lists. |
Cut() |
Cut(self) Cut the selection to the clipboard. |
ParaUpExtend() |
ParaUpExtend(self) |
SetEndAtLastLine() |
SetEndAtLastLine(self, bool endAtLastLine) Sets the scroll range so that maximum scroll position has the last line at the bottom of the view (default). Setting this to false allows scrolling one page below the last line. |
SetFont() |
Set the font. |
TransferDataFromWindow() |
TransferDataFromWindow(self) -> bool Transfers values from child controls to data areas specified by their validators. Returns false if a transfer failed. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataFromWindow() of all child windows. |
GetParent() |
GetParent(self) -> Window Returns the parent window of this window, or None if there isn't one. |
ZoomOut() |
ZoomOut(self) Make the displayed text smaller by decreasing the sizes by 1 point. |
FindColumn() |
FindColumn(self, int line, int column) -> int Find the position of a column on a line taking into account tabs and multi-byte characters. If beyond end of line, return line end position. |
SetPrintMagnification() |
SetPrintMagnification(self, int magnification) Sets the print magnification added to the point size of each style for printing. |
SetMarginType() |
SetMarginType(self, int margin, int marginType) Set a margin to be either numeric or symbolic. |
SetPrintWrapMode() |
SetPrintWrapMode(self, int mode) Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). |
GetHelpText() |
GetHelpText(self) -> String Gets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current `wx.HelpProvider` implementation, and not in the window object itself. |
IsShown() |
IsShown(self) -> bool Returns true if the window is shown, false if it has been hidden. |
GetMarginSensitive() |
GetMarginSensitive(self, int margin) -> bool Retrieve the mouse click sensitivity of a margin. |
StyleSetSize() |
StyleSetSize(self, int style, int sizePoints) Set the size of characters of a style. |
InvalidateBestSize() |
InvalidateBestSize(self) Reset the cached best size value so it will be recalculated the next time it is needed. |
SetSizeHintsSz() |
SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds (if it is a top-level window.) Sizers will also inspect the minimum window size and will use that value if set when calculating layout. The resizing increments are only significant under Motif or Xt. |
LoadDocument() |
Load a file into the editor. |
GetCharWidth() |
GetCharWidth(self) -> int Get the (average) character size for the current font. |
SetAutoLayout() |
SetAutoLayout(self, bool autoLayout) Determines whether the Layout function will be called automatically when the window is resized. lease note that this only happens for the windows usually used to contain children, namely `wx.Panel` and `wx.TopLevelWindow` (and the classes deriving from them). This method is called implicitly by `SetSizer` but if you use `SetConstraints` you should call it manually or otherwise the window layout won't be correctly updated when its size changes. |
GetLexer() |
GetLexer(self) -> int Retrieve the lexing language of the document. |
InsertTextRaw() |
InsertTextRaw(self, int pos, char text) Insert string at a position. The text should be utf-8 encoded on unicode builds of wxPython, or can be any 8-bit text in ansi builds. |
SetEdgeColumn() |
SetEdgeColumn(self, int column) Set the column number of the edge. If text goes past the edge then it is highlighted. |
ConvertPixelPointToDialog() |
ConvertPixelPointToDialog(self, Point pt) -> Point |
AcceptsFocusFromKeyboard() |
AcceptsFocusFromKeyboard(self) -> bool Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click it. |
GetCaretWidth() |
GetCaretWidth(self) -> int Returns the width of the insert mode caret. |
WordRightExtend() |
WordRightExtend(self) Move caret right one word extending selection to new caret position. |
HomeWrapExtend() |
HomeWrapExtend(self) |
StyleSetBackground() |
StyleSetBackground(self, int style, Colour back) Set the background colour of a style. |
AutoCompActive() |
AutoCompActive(self) -> bool Is there an auto-completion list visible? |
SetVirtualSizeHintsSz() |
SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. |
MarkerAddSet() |
MarkerAddSet(self, int line, int set) Add a set of markers to a line. |
ToggleWindowStyle() |
ToggleWindowStyle(self, int flag) -> bool Turn the flag on if it had been turned off before and vice versa, returns True if the flag is turned on by this function call. |
ShouldInheritColours() |
ShouldInheritColours(self) -> bool Return true from here to allow the colours of this window to be changed by InheritAttributes, returning false forbids inheriting them from the parent window. The base class version returns false, but this method is overridden in wxControl where it returns true. |
WordLeftEndExtend() |
WordLeftEndExtend(self) Move caret left one word, position cursor at end of word, extending selection to new caret position. |
LineUp() |
LineUp(self) Move caret up one line. |
CmdKeyClearAll() |
CmdKeyClearAll(self) Drop all key mappings. |
SetScrollWidth() |
SetScrollWidth(self, int pixelWidth) Sets the document width assumed for scrolling. |
SetSavePoint() |
Override the existing SetSavePoint to account for style changes. |
GetCursor() |
GetCursor(self) -> Cursor Return the cursor associated with this window. |
DLG_PNT() |
DLG_PNT(self, Point pt) -> Point Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8. |
WordPartRightExtend() |
WordPartRightExtend(self) Move to the next change in capitalisation extending selection to new caret position. |
SetText() |
SetText(self, String text) Replace the contents of the document with the argument text. |
WordLeft() |
WordLeft(self) Move caret left one word. |
SetHighlightGuide() |
SetHighlightGuide(self, int column) Set the highlighted indentation guide column. 0 = no highlighted guide. |
GetColumn() |
GetColumn(self, int pos) -> int Retrieve the column number of a position, taking tab width into account. |
GetWindowBorderSize() |
GetWindowBorderSize(self) -> Size Return the size of the left/right and top/bottom borders. |
PageUpExtend() |
PageUpExtend(self) Move caret one page up extending selection to new caret position. |
GetPickledBuffer() |
Get the current document as a pickled string. This is useful for saving to the database. |
SearchAnchor() |
SearchAnchor(self) Sets the current caret position to be the search anchor. |
LineEndRectExtend() |
LineEndRectExtend(self) Move caret to last position on line, extending rectangular selection to new caret position. |
IndicatorGetStyle() |
IndicatorGetStyle(self, int indic) -> int Retrieve the style of an indicator. |
LineFromPosition() |
LineFromPosition(self, int pos) -> int Retrieve the line containing a position. |
AutoCompGetCurrent() |
AutoCompGetCurrent(self) -> int Get currently selected item position in the auto-completion list |
VCHomeWrap() |
VCHomeWrap(self) |
MarkerNext() |
MarkerNext(self, int lineStart, int markerMask) -> int Find the next line after lineStart that includes a marker in mask. |
GetClientRect() |
GetClientRect(self) -> Rect Get the client area position and size as a `wx.Rect` object. |
DocumentStart() |
DocumentStart(self) Move caret to first position in document. |
DelLineLeft() |
DelLineLeft(self) Delete back from the current position to the start of the line. |
ParaDownExtend() |
ParaDownExtend(self) |
ConvertPixelSizeToDialog() |
ConvertPixelSizeToDialog(self, Size sz) -> Size |
SetViewWhiteSpace() |
SetViewWhiteSpace(self, int viewWS) Make white space characters invisible, always visible or visible outside indentation. |
Tab() |
Tab(self) If selection is empty or all on one line replace the selection with a tab character. If more than one line selected, indent the lines. |
EmptyUndoBuffer() |
EmptyUndoBuffer(self) Delete the undo history. |
GetFoldLevel() |
GetFoldLevel(self, int line) -> int Retrieve the fold level of a line. |
AutoCompComplete() |
AutoCompComplete(self) User has selected an item so remove the list and insert the selection. |
BraceMatch() |
BraceMatch(self, int pos) -> int Find the position of a matching brace or INVALID_POSITION if no match. |
HasCapture() |
HasCapture(self) -> bool Returns true if this window has the current mouse capture. |
GetSelectedTextRaw() |
GetSelectedTextRaw(self) -> wxCharBuffer Retrieve the selected text. The returned value is a utf-8 encoded string in unicode builds of wxPython, or raw 8-bit text otherwise. |
IsDoubleBuffered() |
IsDoubleBuffered(self) -> bool Returns ``True`` if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later. |
SetStyling() |
SetStyling(self, int length, int style) Change style from current styling position for length characters to a style and move the current styling position to after this newly styled segment. |
SetWrapVisualFlagsLocation() |
SetWrapVisualFlagsLocation(self, int wrapVisualFlagsLocation) Set the location of visual flags for wrapped lines. |
GetPreviousHandler() |
GetPreviousHandler(self) -> EvtHandler |
CallTipSetHighlight() |
CallTipSetHighlight(self, int start, int end) Highlight a segment of the definition. |
GetClientSize() |
GetClientSize(self) -> Size This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc. |
GetStyleBitsNeeded() |
GetStyleBitsNeeded(self) -> int Retrieve the number of bits the current lexer needs for styling. |
GetHandle() |
GetHandle(self) -> long Returns the platform-specific handle (as a long integer) of the physical window. Currently on wxMac it returns the handle of the toplevel parent of the window. |
StyleSetFont() |
StyleSetFont(self, int styleNum, Font font) Set style size, face, bold, italic, and underline attributes from the attributes of a `wx.Font`. |
DeleteBack() |
DeleteBack(self) Delete the selection or if no selection, the character before the caret. |
AddText() |
AddText(self, String text) Add text to the document at current position. |
GetModEventMask() |
GetModEventMask(self) -> int Get which document modification events are sent to the container. |
GetViewWhiteSpace() |
GetViewWhiteSpace(self) -> int Are white space characters currently visible? Returns one of SCWS_* constants. |
GetCaretSticky() |
GetCaretSticky(self) -> bool Can the caret preferred x position only be changed by explicit movement commands? |
SetWindowStyleFlag() |
SetWindowStyleFlag(self, long style) Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to take place immediately. |
IsBeingDeleted() |
IsBeingDeleted(self) -> bool Is the window in the process of being deleted? |
ClearAll() |
ClearAll(self) Delete all text in the document. |
GetStyledText() |
GetStyledText(self, int startPos, int endPos) -> wxMemoryBuffer Retrieve a buffer of cells. |
SelectAll() |
SelectAll(self) Select all the text in the document. |
GetMarginWidth() |
GetMarginWidth(self, int margin) -> int Retrieve the width of a margin in pixels. |
SetDoubleBuffered() |
SetDoubleBuffered(self, bool on) Currently wxGTK2 only. |
ClearDocumentStyle() |
ClearDocumentStyle(self) Set all style bytes to 0, remove all folding information. |
GetCaretLineBackAlpha() |
GetCaretLineBackAlpha(self) -> int Get the background alpha of the caret line. |
LineLength() |
LineLength(self, int line) -> int How many characters are on a line, not including end of line characters? |
SetOwnForegroundColour() |
SetOwnForegroundColour(self, Colour colour) |
SetFoldFlags() |
SetFoldFlags(self, int flags) Set some style options for folding. |
Freeze() |
Freeze(self) Freezes the window or, in other words, prevents any updates from taking place on screen, the window is not redrawn at all. Thaw must be called to reenable window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw being delayed until all the nesting has been undone. This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into a wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all controls so it is mostly just a hint to wxWindows and not a mandatory directive. |
InheritAttributes() |
InheritAttributes(self) This function is (or should be, in case of custom controls) called during window creation to intelligently set up the window visual attributes, that is the font and the foreground and background colours. By 'intelligently' the following is meant: by default, all windows use their own default attributes. However if some of the parent's attributes are explicitly changed (that is, using SetFont and not SetOwnFont) and if the corresponding attribute hadn't been explicitly set for this window itself, then this window takes the same value as used by the parent. In addition, if the window overrides ShouldInheritColours to return false, the colours will not be changed no matter what and only the font might. This rather complicated logic is necessary in order to accommodate the different usage scenarios. The most common one is when all default attributes are used and in this case, nothing should be inherited as in modern GUIs different controls use different fonts (and colours) than their siblings so they can't inherit the same value from the parent. However it was also deemed desirable to allow to simply change the attributes of all children at once by just changing the font or colour of their common parent, hence in this case we do inherit the parents attributes. |
PageDownRectExtend() |
PageDownRectExtend(self) Move caret one page down, extending rectangular selection to new caret position. |
DestroyChildren() |
DestroyChildren(self) -> bool Destroys all children of a window. Called automatically by the destructor. |
ScreenToClient() |
ScreenToClient(self, Point pt) -> Point Converts from screen to client window coordinates. |
HasScrollbar() |
HasScrollbar(self, int orient) -> bool Does the window have the scrollbar for this orientation? |
SetName() |
SetName(self, String name) Sets the window's name. The window name is used for ressource setting in X, it is not the same as the window title/label |
MarkerDelete() |
MarkerDelete(self, int line, int markerNumber) Delete a marker from a line. |
GetStatus() |
GetStatus(self) -> int Get error status. |
GetCaretForeground() |
GetCaretForeground(self) -> Colour Get the foreground colour of the caret. |
GetPrintColourMode() |
GetPrintColourMode(self) -> int Returns the print colour mode. |
FormFeed() |
FormFeed(self) Insert a Form Feed character. |
SetSelectionEnd() |
SetSelectionEnd(self, int pos) Sets the position that ends the selection - this becomes the currentPosition. |
EnsureCaretVisible() |
EnsureCaretVisible(self) Ensure the caret is visible. |
GetControlCharSymbol() |
GetControlCharSymbol(self) -> int Get the way control characters are displayed. |
GetUseHorizontalScrollBar() |
GetUseHorizontalScrollBar(self) -> bool Is the horizontal scroll bar visible? |
SetAnchor() |
SetAnchor(self, int posAnchor) Set the selection anchor to a position. The anchor is the opposite end of the selection from the caret. |
GetMarginRight() |
GetMarginRight(self) -> int Returns the size in pixels of the right margin. |
WordLeftExtend() |
WordLeftExtend(self) Move caret left one word extending selection to new caret position. |
CharLeft() |
CharLeft(self) Move caret left one character. |
HideLines() |
HideLines(self, int lineStart, int lineEnd) Make a range of lines invisible. |
GetMarginType() |
GetMarginType(self, int margin) -> int Retrieve the type of a margin. |
CmdKeyAssign() |
CmdKeyAssign(self, int key, int modifiers, int cmd) When key+modifier combination km is pressed perform msg. |
GetModify() |
Override the existing GetModify to account for style changes. |
GetPrintWrapMode() |
GetPrintWrapMode(self) -> int Is printing line wrapped? |
SetPasteConvertEndings() |
SetPasteConvertEndings(self, bool convert) Enable/Disable convert-on-paste for line endings |
StutteredPageDown() |
StutteredPageDown(self) Move caret to bottom of page, or one page down if already at bottom of page. |
GetWrapVisualFlags() |
GetWrapVisualFlags(self) -> int Retrive the display mode of visual flags for wrapped lines. |
Raise() |
Raise(self) Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows. |
GetVirtualSize() |
GetVirtualSize(self) -> Size Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. |
GetEndAtLastLine() |
GetEndAtLastLine(self) -> bool Retrieve whether the maximum scroll position has the last line at the bottom of the view. |
ReplaceSelection() |
ReplaceSelection(self, String text) Replace the selected text with the argument text. |
GetMaxWidth() |
GetMaxWidth(self) -> int |
SetCaretLineVisible() |
SetCaretLineVisible(self, bool show) Display the background of the line containing the caret in a different colour. |
CreateDocument() |
CreateDocument(self) -> void Create a new document object. Starts with reference count of 1 and not selected into editor. |
PageUp() |
PageUp(self) Move caret one page up. |
AutoCompSetIgnoreCase() |
AutoCompSetIgnoreCase(self, bool ignoreCase) Set whether case is significant when performing auto-completion searches. |
StutteredPageUpExtend() |
StutteredPageUpExtend(self) Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. |
GetEdgeMode() |
GetEdgeMode(self) -> int Retrieve the edge highlight mode. |
GetSelectionEnd() |
GetSelectionEnd(self) -> int Returns the position at the end of the selection. |
WordPartLeft() |
WordPartLeft(self) Move to the previous change in capitalisation. |
LineEnd() |
LineEnd(self) Move caret to last position on line. |
SetSearchFlags() |
SetSearchFlags(self, int flags) Set the search flags used by SearchInTarget. |
GetCurrentLine() |
GetCurrentLine(self) -> int Returns the line number of the line with the caret. |
SetWhitespaceBackground() |
SetWhitespaceBackground(self, bool useSetting, Colour back) Set the background colour of all whitespace and whether to use this setting. |
WordEndPosition() |
WordEndPosition(self, int pos, bool onlyWordCharacters) -> int Get position of end of word. |
SetPrintColourMode() |
SetPrintColourMode(self, int mode) Modify colours when printing for clearer printed text. |
MarkerSetAlpha() |
MarkerSetAlpha(self, int markerNumber, int alpha) Set the alpha used for a marker that is drawn in the text area, not the margin. |
SetCaretLineBack() |
SetCaretLineBackground(self, Colour back) Set the colour of the background of the line containing the caret. |
GetScreenPositionTuple() |
GetScreenPositionTuple() -> (x,y) Get the position of the window in screen coordinantes. |
PostCreate() |
Phase 3 of the 2-phase create |
SetThemeEnabled() |
SetThemeEnabled(self, bool enableTheme) This function tells a window if it should use the system's "theme" code to draw the windows' background instead if its own background drawing code. This will only have an effect on platforms that support the notion of themes in user defined windows. One such platform is GTK+ where windows can have (very colourful) backgrounds defined by a user's selected theme. Dialogs, notebook pages and the status bar have this flag set to true by default so that the default look and feel is simulated best. |
GetItalic() |
Get italic state for current font or for the selected text. |
SetBestFittingSize() |
Use `SetInitialSize` |
ScrollPages() |
ScrollPages(self, int pages) -> bool If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done. |
SetNextHandler() |
SetNextHandler(self, EvtHandler handler) |
WarpPointer() |
WarpPointer(self, int x, int y) Moves the pointer to the given position on the window. NOTE: This function is not supported under Mac because Apple Human Interface Guidelines forbid moving the mouse cursor programmatically. |
MarkerDefine() |
MarkerDefine(self, int markerNumber, int markerSymbol, Colour foreground=wxNullColour, Colour background=wxNullColour) Set the symbol used for a particular marker number, and optionally the fore and background colours. |
GetSelAlpha() |
GetSelAlpha(self) -> int Get the alpha of the selection. |
CentreOnParent() |
CenterOnParent(self, int dir=BOTH) Center with respect to the the parent window |
GetTextRange() |
GetTextRange(self, int startPos, int endPos) -> String Retrieve a range of text. |
SetHotspotActiveUnderline() |
SetHotspotActiveUnderline(self, bool underline) Enable / Disable underlining active hotspots. |
GetEvtHandlerEnabled() |
GetEvtHandlerEnabled(self) -> bool |
SetTargetEnd() |
SetTargetEnd(self, int pos) Sets the position that ends the target which is used for updating the document without affecting the scroll position. |
SetLexer() |
SetLexer(self, int lexer) Set the lexing language of the document. |
InheritsBackgroundColour() |
InheritsBackgroundColour(self) -> bool |
Navigate() |
Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool Does keyboard navigation from this window to another, by sending a `wx.NavigationKeyEvent`. |
UsePopUp() |
UsePopUp(self, bool allowPopUp) Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button. |
SetHotspotActiveBackground() |
SetHotspotActiveBackground(self, bool useSetting, Colour back) Set a back colour for active hotspots. |
DocumentEndExtend() |
DocumentEndExtend(self) Move caret to last position in document extending selection to new caret position. |
PositionBefore() |
PositionBefore(self, int pos) -> int Given a valid document position, return the previous position taking code page into account. Returns 0 if passed 0. |
IndicatorSetForeground() |
IndicatorSetForeground(self, int indic, Colour fore) Set the foreground colour of an indicator. |
GetLineEndPosition() |
GetLineEndPosition(self, int line) -> int Get the position after the last visible characters on a line. |
GetEOLMode() |
GetEOLMode(self) -> int Retrieve the current end of line mode - one of CRLF, CR, or LF. |
CallTipSetForegroundHighlight() |
CallTipSetForegroundHighlight(self, Colour fore) Set the foreground colour for the highlighted part of the call tip. |
GetLineUTF8() |
Retrieve the contents of a line as UTF8. In an ansi build of wxPython the text retrieved from the document is assumed to be in the current default encoding. |
NewLine() |
NewLine(self) Insert a new line, may use a CRLF, CR or LF depending on EOL mode. |
RemoveChild() |
RemoveChild(self, Window child) Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer. |
GetMarginMask() |
GetMarginMask(self, int margin) -> int Retrieve the marker mask of a margin. |
DissociateHandle() |
DissociateHandle(self) Dissociate the current native handle from the window |
Centre() |
Center(self, int direction=BOTH) Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen. |
LineEndDisplay() |
LineEndDisplay(self) Move caret to last position on display line. |
GetText() |
GetText(self) -> String Retrieve all the text in the document. |
GetSize() |
GetSize(self) -> Size Get the window size. |
LineDownRectExtend() |
LineDownRectExtend(self) Move caret down one line, extending rectangular selection to new caret position. |
GetTextRaw() |
GetTextRaw(self) -> wxCharBuffer Retrieve all the text in the document. The returned value is a utf-8 encoded string in unicode builds of wxPython, or raw 8-bit text otherwise. |
DoDropText() |
DoDropText(self, long x, long y, String data) -> bool Allow for simulating a DnD DropText. |
Bind() |
Bind an event to an event handler. :param event: One of the EVT_* objects that specifies the type of event to bind, :param handler: A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler. :param source: Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls. :param id: Used to spcify the event source by ID instead of instance. :param id2: Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE. |
SetEdgeMode() |
SetEdgeMode(self, int mode) The edge may be displayed by a line (EDGE_LINE) or by highlighting text that goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). |
SetStyleBits() |
SetStyleBits(self, int bits) Divide each styling byte into lexical class bits (default: 5) and indicator bits (default: 3). If a lexer requires more than 32 lexical states, then this is used to expand the possible states. |
TargetFromSelection() |
TargetFromSelection(self) Make the target range start and end be the same as the selection range start and end. |
GetWrapMode() |
GetWrapMode(self) -> int Retrieve whether text is word wrapped. |
SetXOffset() |
SetXOffset(self, int newOffset) Get and Set the xOffset (ie, horizonal scroll position). |
EnsureVisible() |
EnsureVisible(self, int line) Ensure a particular line is visible by expanding any header line hiding it. |
Redo() |
Redo(self) Redoes the next action on the undo history. |
GetPosition() |
GetPosition(self) -> Point Get the window's position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use `GetScreenPosition` if you need screen coordinates for all kinds of windows. |
GetWindowVariant() |
GetWindowVariant(self) -> int |
GetSelectionMode() |
GetSelectionMode(self) -> int Get the mode of the current selection. |
AddChild() |
AddChild(self, Window child) Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer. |
InsertWhisper() |
Insert the Whisper (Open Dot) symbol |
AutoCompSetMaxHeight() |
AutoCompSetMaxHeight(self, int rowCount) Set the maximum height, in rows, of auto-completion and user lists. The default is 5 rows. |
BeginUndoAction() |
BeginUndoAction(self) Start a sequence of actions that is undone and redone as a unit. May be nested. |
LineDelete() |
LineDelete(self) Delete the line containing the caret. |
GetSelectedText() |
GetSelectedText(self) -> String Retrieve the selected text. |
SetWrapMode() |
SetWrapMode(self, int mode) Sets whether text is word wrapped. |
SetBold() |
Set bold state for current font or for the selected text. |
DragAcceptFiles() |
DragAcceptFiles(self, bool accept) Enables or disables eligibility for drop file events, EVT_DROP_FILES. Only functional on Windows. |
ShowLines() |
ShowLines(self, int lineStart, int lineEnd) Make a range of lines visible. |
ProcessPendingEvents() |
ProcessPendingEvents(self) |
GetId() |
GetId(self) -> int Returns the identifier of the window. Each window has an integer identifier. If the application has not provided one (or the default Id -1 is used) then an unique identifier with a negative value will be generated. |
InsertInBreath() |
Insert the In Breath (Closed Dot) symbol |
SetAcceleratorTable() |
SetAcceleratorTable(self, AcceleratorTable accel) Sets the accelerator table for this window. |
SetSizer() |
SetSizer(self, Sizer sizer, bool deleteOld=True) Sets the window to have the given layout sizer. The window will then own the object, and will take care of its deletion. If an existing layout sizer object is already owned by the window, it will be deleted if the deleteOld parameter is true. Note that this function will also call SetAutoLayout implicitly with a True parameter if the sizer is non-None, and False otherwise. |
PositionFromPoint() |
PositionFromPoint(self, Point pt) -> int Find the position from a point within the window. |
GetOvertype() |
GetOvertype(self) -> bool Returns true if overtype mode is active otherwise false is returned. |
SetPosition() |
Move(self, Point pt, int flags=SIZE_USE_EXISTING) Moves the window to the given position. |
AutoCompGetCancelAtStart() |
AutoCompGetCancelAtStart(self) -> bool Retrieve whether auto-completion cancelled by backspacing before start. |
SetOwnBackgroundColour() |
SetOwnBackgroundColour(self, Colour colour) |
SetClientSize() |
SetClientSize(self, Size size) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example. |
SetEvtHandlerEnabled() |
SetEvtHandlerEnabled(self, bool enabled) |
GetTwoPhaseDraw() |
GetTwoPhaseDraw(self) -> bool Is drawing done in two phases with backgrounds drawn before foregrounds? |
InsertFallingIntonation() |
Insert the Falling Intonation (Down Arrow) symbol |
GotoPos() |
GotoPos(self, int pos) Set caret to a position and ensure it is visible. |
RegisterImage() |
RegisterImage(self, int type, Bitmap bmp) Register an image for use in autocompletion lists. |
LineEndWrapExtend() |
LineEndWrapExtend(self) |
SetWindowVariant() |
SetWindowVariant(self, int variant) Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac. |
ReleaseDocument() |
ReleaseDocument(self, void docPointer) Release a reference to the document, deleting document if it fades to black. |
Update() |
Update(self) Calling this method immediately repaints the invalidated area of the window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and does nothing if the window has been already repainted. Use `Refresh` first if you want to immediately redraw the window (or some portion of it) unconditionally. |
Undo() |
Undo(self) Undo one action in the undo history. |
FindWindowByName() |
FindWindowByName(self, String name) -> Window Find a child of this window by name |
SetUndoCollection() |
SetUndoCollection(self, bool collectUndo) Choose between collecting actions into the undo history and discarding them. |
VCHomeRectExtend() |
VCHomeRectExtend(self) Move caret to before first visible character on line. If already there move to first character on line. In either case, extend rectangular selection to new caret position. |
Validate() |
Validate(self) -> bool Validates the current values of the child controls using their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call Validate() of all child windows. Returns false if any of the validations failed. |
SetMinSize() |
SetMinSize(self, Size minSize) A more convenient method than `SetSizeHints` for setting just the min size. |
GetUnderline() |
Get underline state for current font or for the selected text. |
SetUseHorizontalScrollBar() |
SetUseHorizontalScrollBar(self, bool show) Show or hide the horizontal scroll bar. |
SetFoldLevel() |
SetFoldLevel(self, int line, int level) Set the fold level of a line. This encodes an integer level along with flags indicating whether the line is a header and whether it is effectively white space. |
GetLineCount() |
GetLineCount(self) -> int Returns the number of lines in the document. There is always at least one. |
SetClientRect() |
SetClientRect(self, Rect rect) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example. |
GetBestSize() |
GetBestSize(self) -> Size This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit. |
BackTab() |
BackTab(self) Dedent the selected lines. |
DoDragOver() |
DoDragOver(self, int x, int y, int def) -> int Allow for simulating a DnD DragOver. |
GetToolTip() |
GetToolTip(self) -> ToolTip get the associated tooltip or None if none |
Move() |
Move(self, Point pt, int flags=SIZE_USE_EXISTING) Moves the window to the given position. |
GetCurLineRaw() |
GetCurLineRaw() -> (text, index) Retrieve the text of the line containing the caret, and also the index of the caret on the line. The returned value is a utf-8 encoded string in unicode builds of wxPython, or raw 8-bit text otherwise. |
GetEdgeColumn() |
GetEdgeColumn(self) -> int Retrieve the column number which text should be kept within. |
HomeExtend() |
HomeExtend(self) Move caret to first position on line extending selection to new caret position. |
SetMouseDownCaptures() |
SetMouseDownCaptures(self, bool captures) Set whether the mouse is captured when its button is pressed. |
SetMarginWidth() |
SetMarginWidth(self, int margin, int pixelWidth) Set the width of a margin to a width expressed in pixels. |
ScrollToLine() |
ScrollToLine(self, int line) Scroll enough to make the given line visible. |
PositionFromPointClose() |
PositionFromPointClose(self, int x, int y) -> int Find the position from a point within the window but return INVALID_POSITION if not close to text. |
ZoomIn() |
ZoomIn(self) Magnify the displayed text by increasing the sizes by 1 point. |
SetTabWidth() |
SetTabWidth(self, int tabWidth) Change the visible size of a tab to be a multiple of the width of a space character. |
SetLabel() |
SetLabel(self, String label) Set the text which the window shows in its label if applicable. |
Thaw() |
Thaw(self) Reenables window updating after a previous call to Freeze. Calls to Freeze/Thaw may be nested, so Thaw must be called the same number of times that Freeze was before the window will be updated. |
GetTextRangeUTF8() |
Retrieve a range of text as UTF8. In an ansi build of wxPython the text retrieved from the document is assumed to be in the current default encoding. |
GetEffectiveMinSize() |
GetEffectiveMinSize(self) -> Size This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results. |
CanUndo() |
CanUndo(self) -> bool Are there any undoable actions in the undo history? |
AppendTextRaw() |
AppendTextRaw(self, char text) Append a string to the end of the document without changing the selection. The text should be utf-8 encoded on unicode builds of wxPython, or can be any 8-bit text in ansi builds. |
MarkerGet() |
MarkerGet(self, int line) -> int Get a bit mask of all the markers set on a line. |
GetTabIndents() |
GetTabIndents(self) -> bool Does a tab pressed when caret is within indentation indent? |
CallTipCancel() |
CallTipCancel(self) Remove the call tip from the screen. |
GetMaxHeight() |
GetMaxHeight(self) -> int |
PageDownExtend() |
PageDownExtend(self) Move caret one page down extending selection to new caret position. |
SetWrapVisualFlags() |
SetWrapVisualFlags(self, int wrapVisualFlags) Set the display mode of visual flags for wrapped lines. |
StyleSetFontEncoding() |
StyleSetFontEncoding(self, int style, int encoding) Set the font encoding to be used by a style. |
IsRetained() |
IsRetained(self) -> bool Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms. |
GetSizer() |
GetSizer(self) -> Sizer Return the sizer associated with the window by a previous call to SetSizer or None if there isn't one. |
SetTwoPhaseDraw() |
SetTwoPhaseDraw(self, bool twoPhase) In twoPhaseDraw mode, drawing is performed in two phases, first the background and then the foreground. This avoids chopping off characters that overlap the next run. |
StyleSetForeground() |
StyleSetForeground(self, int style, Colour fore) Set the foreground colour of a style. |
MarkerDeleteAll() |
MarkerDeleteAll(self, int markerNumber) Delete all markers with a particular number from all lines. |
GetCaretLineBackground() |
GetCaretLineBackground(self) -> Colour Get the colour of the background of the line containing the caret. |
SetDropTarget() |
SetDropTarget(self, DropTarget dropTarget) Associates a drop target with this window. If the window already has a drop target, it is deleted. |
FormatRange() |
FormatRange(self, bool doDraw, int startPos, int endPos, DC draw, DC target, Rect renderRect, Rect pageRect) -> int On Windows, will draw the document into a display context such as a printer. |
Center() |
Center(self, int direction=BOTH) Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen. |
GetCurLine() |
GetCurLine(self) -> (text, pos) Retrieve the text of the line containing the caret, and also theindex of the caret on the line. |
SetTargetStart() |
SetTargetStart(self, int pos) Sets the position that starts the target which is used for updating the document without affecting the scroll position. |
MarkerDefineBitmap() |
MarkerDefineBitmap(self, int markerNumber, Bitmap bmp) Define a marker from a bitmap |
GetTargetEnd() |
GetTargetEnd(self) -> int Get the position that ends the target. |
AddTextRaw() |
AddTextRaw(self, char text) Add text to the document at current position. The text should be utf-8 encoded on unicode builds of wxPython, or can be any 8-bit text in ansi builds. |
GetHighlightGuide() |
GetHighlightGuide(self) -> int Get the highlighted indentation guide column. |
MoveXY() |
MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) Moves the window to the given position. |
AutoCompSetMaxWidth() |
AutoCompSetMaxWidth(self, int characterCount) Set the maximum width, in characters, of auto-completion and user lists. Set to 0 to autosize to fit longest item, which is the default. |
SetCaretWidth() |
SetCaretWidth(self, int pixelWidth) Set the width of the insert mode caret. |
GetSelection() |
GetSelection(self) -> (startPos, endPos) Retrieve the start and end positions of the current selection. |
GetUseAntiAliasing() |
GetUseAntiAliasing(self) -> bool Returns the current UseAntiAliasing setting. |
MarkerSetBackground() |
MarkerSetBackground(self, int markerNumber, Colour back) Set the background colour used for a particular marker number. |
SetCurrentPos() |
SetCurrentPos(self, int pos) Sets the position of the caret. |
GetSelectionStart() |
GetSelectionStart(self) -> int Returns the position at the start of the selection. |
GetScrollRange() |
GetScrollRange(self, int orientation) -> int Returns the built-in scrollbar range. |
GetBorder() |
GetBorder(self, long flags) -> int GetBorder(self) -> int Get border for the flags of this window |
SetInitialSize() |
SetInitialSize(self, Size size=DefaultSize) A 'Smart' SetSize that will fill in default size components with the window's *best size* values. Also set's the minsize for use with sizers. |
CallTipSetForeground() |
CallTipSetForeground(self, Colour fore) Set the foreground colour for the call tip. |
GetXOffset() |
GetXOffset(self) -> int |
GetDefaultAttributes() |
GetDefaultAttributes(self) -> VisualAttributes Get the default attributes for an instance of this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes. |
SetForegroundColour() |
SetForegroundColour(self, Colour colour) -> bool Sets the foreground colour of the window. Returns True is the colour was changed. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all. |
GetLabelText() |
GetLabelText(self) -> String Get just the text of the label, without mnemonic characters ('&') |
SetKeyWords() |
SetKeyWords(self, int keywordSet, String keyWords) Set up the key words used by the lexer. |
AddRefDocument() |
AddRefDocument(self, void docPointer) Extend life of document. |
SetUseTabs() |
SetUseTabs(self, bool useTabs) Indentation will only use space characters if useTabs is false, otherwise it will use a combination of tabs and spaces. |
IsExposedPoint() |
IsExposedPoint(self, Point pt) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed. |
IndicatorGetForeground() |
IndicatorGetForeground(self, int indic) -> Colour Retrieve the foreground colour of an indicator. |
Paste() |
Paste(self) Paste the contents of the clipboard into the document replacing the selection. |
TextWidth() |
TextWidth(self, int style, String text) -> int Measure the pixel width of some text in a particular style. NUL terminated text argument. Does not handle tab or control characters. |
Clear() |
Clear(self) Clear the selection. |
SetDocPointer() |
SetDocPointer(self, void docPointer) Change the document object used. |
WordPartRight() |
WordPartRight(self) Move to the change next in capitalisation. |
GetViewEOL() |
GetViewEOL(self) -> bool Are the end of line characters visible? |
TextHeight() |
TextHeight(self, int line) -> int Retrieve the height of a particular line of text in pixels. |
SelectionDuplicate() |
SelectionDuplicate(self) Duplicate the selection. If selection empty duplicate the line containing the caret. |
GetCurrentPos() |
GetCurrentPos(self) -> int Returns the position of the caret. |
GetLineSelStartPosition() |
GetLineSelStartPosition(self, int line) -> int Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). |
AutoCompSetDropRestOfWord() |
AutoCompSetDropRestOfWord(self, bool dropRestOfWord) Set whether or not autocompletion deletes any word characters after the inserted text upon completion. |
CallTipSetBackground() |
CallTipSetBackground(self, Colour back) Set the background colour for the call tip. |
SetCursor() |
SetCursor(self, Cursor cursor) -> bool Sets the window's cursor. Notice that the window cursor also sets it for the children of the window implicitly. The cursor may be wx.NullCursor in which case the window cursor will be reset back to default. |
SetClientSizeWH() |
SetClientSizeWH(self, int width, int height) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example. |
UnregisterHotKey() |
UnregisterHotKey(self, int hotkeyId) -> bool Unregisters a system wide hotkey. |
FindText() |
FindText(self, int minPos, int maxPos, String text, int flags=0) -> int Find some text in the document. |
GetFullTextExtent() |
GetFullTextExtent(String string, Font font=None) -> (width, height, descent, externalLeading) Get the width, height, decent and leading of the text using the current or specified font. |
CharRightRectExtend() |
CharRightRectExtend(self) Move caret right one character, extending rectangular selection to new caret position. |
IndicatorSetStyle() |
IndicatorSetStyle(self, int indic, int style) Set an indicator to plain, squiggle or TT. |
AddStyledText() |
AddStyledText(self, wxMemoryBuffer data) Add array of cells to document. |
GetBestVirtualSize() |
GetBestVirtualSize(self) -> Size Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means) |
GetScrollThumb() |
GetScrollThumb(self, int orientation) -> int Returns the built-in scrollbar thumb size. |
SetLayoutCache() |
SetLayoutCache(self, int mode) Sets the degree of caching of layout information. |
CmdKeyClear() |
CmdKeyClear(self, int key, int modifiers) When key+modifier combination km is pressed do nothing. |
PopupMenuXY() |
PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usual. If the default position is given then the current position of the mouse cursor will be used. |
Unbind() |
Disconencts the event handler binding for event from self. Returns True if successful. |
ClientToScreenXY() |
ClientToScreenXY(int x, int y) -> (x,y) Converts to screen coordinates from coordinates relative to this window. |
SetCaretPeriod() |
SetCaretPeriod(self, int periodMilliseconds) Get the time in milliseconds that the caret is on and off. 0 = steady on. |
StyleSetHotSpot() |
StyleSetHotSpot(self, int style, bool hotspot) Set a style to be a hotspot or not. |
LinesJoin() |
LinesJoin(self) Join the lines in the target. |
GetTopLevelParent() |
GetTopLevelParent(self) -> Window Returns the first frame or dialog in this window's parental hierarchy. |
SetTransparent() |
SetTransparent(self, byte alpha) -> bool Attempt to set the transparency of this window to the ``alpha`` value, returns True on success. The ``alpha`` value is an integer in the range of 0 to 255, where 0 is fully transparent and 255 is fully opaque. |
WordLeftEnd() |
WordLeftEnd(self) Move caret left one word, position cursor at end of word. |
ParaDown() |
ParaDown(self) Move caret between paragraphs (delimited by empty lines). |
GetFont() |
Get the current (font face, size, color) in a tuple. |
ReplaceTarget() |
ReplaceTarget(self, String text) -> int Replace the target text with the argument text. Text is counted so it can contain NULs. Returns the length of the replacement text. |
Show() |
Show(self, bool show=True) -> bool Shows or hides the window. You may need to call Raise for a top level window if you want to bring it to top, although this is not needed if Show is called immediately after the frame creation. Returns True if the window has been shown or hidden or False if nothing was done because it already was in the requested state. |
StartRecord() |
StartRecord(self) Start notifying the container of all key presses and commands. |
GetWindowStyleFlag() |
GetWindowStyleFlag(self) -> long Gets the window style that was passed to the constructor or Create method. |
ConvertEOLs() |
ConvertEOLs(self, int eolMode) Convert all line endings in the document to one mode. |
PopupMenu() |
PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usual. If the default position is given then the current position of the mouse cursor will be used. |
AutoCompGetIgnoreCase() |
AutoCompGetIgnoreCase(self) -> bool Retrieve state of ignore case flag. |
LineDuplicate() |
LineDuplicate(self) Duplicate the current line. |
CharLeftExtend() |
CharLeftExtend(self) Move caret left one character extending selection to new caret position. |
Destroy() |
Destroy(self) -> bool Destroys the window safely. Frames and dialogs are not destroyed immediately when this function is called -- they are added to a list of windows to be deleted on idle time, when all the window's events have been processed. This prevents problems with events being sent to non-existent windows. Returns True if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion. |
GetMaxLineState() |
GetMaxLineState(self) -> int Retrieve the last line number that has line state. |
AddTextUTF8() |
Add UTF8 encoded text to the document at the current position. Works 'natively' in a unicode build of wxPython, and will also work in an ansi build if the UTF8 text is compatible with the current encoding. |
GotoLine() |
GotoLine(self, int line) Set caret to start of a line and ensure it is visible. |
GetZoom() |
GetZoom(self) -> int Retrieve the zoom level. |
HasFlag() |
HasFlag(self, int flag) -> bool Test if the given style is set for this window. |
GetEndStyled() |
GetEndStyled(self) -> int Retrieve the position of the last correctly styled character. |
SetSelectionMode() |
SetSelectionMode(self, int mode) Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or by lines (SC_SEL_LINES). |
CallTipUseStyle() |
CallTipUseStyle(self, int tabSize) Enable use of STYLE_CALLTIP and set call tip tab size in pixels. |
GetLayoutCache() |
GetLayoutCache(self) -> int Retrieve the degree of caching of layout information. |
ConvertDialogPointToPixels() |
ConvertDialogPointToPixels(self, Point pt) -> Point Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8. |
SetUseAntiAliasing() |
SetUseAntiAliasing(self, bool useAA) Specify whether anti-aliased fonts should be used. Will have no effect on some platforms, but on some (wxMac for example) can greatly improve performance. |
SetFocusFromKbd() |
SetFocusFromKbd(self) Set focus to this window as the result of a keyboard action. Normally only called internally. |
SetCaretForeground() |
SetCaretForeground(self, Colour fore) Set the foreground colour of the caret. |
SetHotspotSingleLine() |
SetHotspotSingleLine(self, bool singleLine) Limit hotspots to single line so hotspots on two lines don't merge. |
GetPositionTuple() |
GetPositionTuple() -> (x,y) Get the window's position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use `GetScreenPosition` if you need screen coordinates for all kinds of windows. |
WordRight() |
WordRight(self) Move caret right one word. |
SetTextUTF8() |
Replace the contents of the document with the UTF8 text given. Works 'natively' in a unicode build of wxPython, and will also work in an ansi build if the UTF8 text is compatible with the current encoding. |
GetWrapVisualFlagsLocation() |
GetWrapVisualFlagsLocation(self) -> int Retrive the location of visual flags for wrapped lines. |
SetLayoutDirection() |
SetLayoutDirection(self, int dir) Set the layout direction (LTR or RTL) for this window. |
PopEventHandler() |
PopEventHandler(self, bool deleteHandler=False) -> EvtHandler Removes and returns the top-most event handler on the event handler stack. If deleteHandler is True then the wx.EvtHandler object will be destroyed after it is popped, and ``None`` will be returned instead. |
GetBestSizeTuple() |
GetBestSizeTuple() -> (width, height) This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit. |
SetVisiblePolicy() |
SetVisiblePolicy(self, int visiblePolicy, int visibleSlop) Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc. |
GetCurLineUTF8() |
Retrieve the UTF8 text of the line containing the caret, and also the index of the caret on the line. In an ansi build of wxPython the text retrieved from the document is assumed to be in the current default encoding. |
SetCaretSticky() |
SetCaretSticky(self, bool useCaretStickyBehaviour) Stop the caret preferred x position changing when the user types. |
DelWordLeft() |
DelWordLeft(self) Delete the word to the left of the caret. |
SetZoom() |
SetZoom(self, int zoom) Set the zoom level. This number of points is added to the size of all fonts. It may be positive to magnify or negative to reduce. |
SetVirtualSize() |
SetVirtualSize(self, Size size) Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. |
LineUpExtend() |
LineUpExtend(self) Move caret up one line extending selection to new caret position. |
SearchPrev() |
SearchPrev(self, int flags, String text) -> int Find some text starting at the search anchor and moving backwards. Does not ensure the selection is visible. |
GetStyleAccessor() |
This method is simply a public wrapper around __GetStyle() |
Layout() |
Layout(self) -> bool Invokes the constraint-based layout algorithm or the sizer-based algorithm for this window. See SetAutoLayout: when auto layout is on, this function gets called automatically by the default EVT_SIZE handler when the window is resized. |
OnCharAdded() |
Called when a character is added to the document. |
SaveRTFDocument() |
Save the document in memory to the given file. |
ConvertDialogSizeToPixels() |
ConvertDialogSizeToPixels(self, Size sz) -> Size Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8. |
GetLineIndentation() |
GetLineIndentation(self, int line) -> int Retrieve the number of columns that a line is indented. |
GetMouseDownCaptures() |
GetMouseDownCaptures(self) -> bool Get whether mouse gets captured. |
SetSize() |
SetSize(self, Size size) Sets the size of the window in pixels. |
SetUseVerticalScrollBar() |
SetUseVerticalScrollBar(self, bool show) Show or hide the vertical scroll bar. |
InsertUnicodeChar() |
Insert a Unicode character, which may not have a length of 1, into the text |
CallTipShow() |
CallTipShow(self, int pos, String definition) Show a call tip containing a definition near position pos. |
GetValidator() |
GetValidator(self) -> Validator Returns a pointer to the current validator for the window, or None if there is none. |
Disable() |
Disable(self) -> bool Disables the window, same as Enable(false). |
GetLabel() |
GetLabel(self) -> String Generic way of getting a label from any window, for identification purposes. The interpretation of this function differs from class to class. For frames and dialogs, the value returned is the title. For buttons or static text controls, it is the button text. This function can be useful for meta-programs such as testing tools or special-needs access programs)which need to identify windows by name. |
GetEventHandler() |
GetEventHandler(self) -> EvtHandler Returns the event handler for this window. By default, the window is its own event handler. |
StartStyling() |
StartStyling(self, int pos, int mask) Set the current styling position to pos and the styling mask to mask. The styling mask can be used to protect some bits in each styling byte from modification. |
SetViewEOL() |
SetViewEOL(self, bool visible) Make the end of line characters visible or invisible. |
AutoCompSetFillUps() |
AutoCompSetFillUps(self, String characterSet) Define a set of characters that when typed will cause the autocompletion to choose the selected item. |
GetAutoLayout() |
GetAutoLayout(self) -> bool Returns the current autoLayout setting |
SetTextRaw() |
SetTextRaw(self, char text) Replace the contents of the document with the argument text. The text should be utf-8 encoded on unicode builds of wxPython, or can be any 8-bit text in ansi builds. |
Reparent() |
Reparent(self, Window newParent) -> bool Reparents the window, i.e the window will be removed from its current parent window (e.g. a non-standard toolbar in a wxFrame) and then re-inserted into another. Available on Windows and GTK. Returns True if the parent was changed, False otherwise (error or newParent == oldParent) |
SetWhitespaceForeground() |
SetWhitespaceForeground(self, bool useSetting, Colour fore) Set the foreground colour of all whitespace and whether to use this setting. |
SetRect() |
SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels using a wx.Rect. |
AppendText() |
AppendText(self, String text) Append a string to the end of the document without changing the selection. |
GetPrintMagnification() |
GetPrintMagnification(self) -> int Returns the print magnification. |
GetCaretLineBack() |
GetCaretLineBackground(self) -> Colour Get the colour of the background of the line containing the caret. |
ReplaceTargetRE() |
ReplaceTargetRE(self, String text) -> int Replace the target text with the argument text after \d processing. Text is counted so it can contain NULs. Looks for \d where d is between 1 and 9 and replaces these with the strings matched in the last search operation which were surrounded by \( and \). Returns the length of the replacement text including any change caused by processing the \d patterns. |
SetScrollbar() |
SetScrollbar(self, int orientation, int position, int thumbSize, int range, bool refresh=True) Sets the scrollbar properties of a built-in scrollbar. |
DLG_SZE() |
DLG_SZE(self, Size sz) -> Size Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8. |
TranscriptEditor contains the following public properties:
| Property | Description |
|---|---|
AcceleratorTable |
See `GetAcceleratorTable` and `SetAcceleratorTable` |
Alignment |
See `GetAlignment` |
Anchor |
See `GetAnchor` and `SetAnchor` |
AutoLayout |
See `GetAutoLayout` and `SetAutoLayout` |
BackSpaceUnIndents |
See `GetBackSpaceUnIndents` and `SetBackSpaceUnIndents` |
BackgroundColour |
See `GetBackgroundColour` and `SetBackgroundColour` |
BackgroundStyle |
See `GetBackgroundStyle` and `SetBackgroundStyle` |
BestSize |
See `GetBestSize` |
BestVirtualSize |
See `GetBestVirtualSize` |
Border |
See `GetBorder` |
BufferedDraw |
See `GetBufferedDraw` and `SetBufferedDraw` |
Caret |
See `GetCaret` and `SetCaret` |
CaretForeground |
See `GetCaretForeground` and `SetCaretForeground` |
CaretLineBack |
See `GetCaretLineBack` and `SetCaretLineBack` |
CaretLineBackAlpha |
See `GetCaretLineBackAlpha` and `SetCaretLineBackAlpha` |
CaretLineBackground |
See `GetCaretLineBackground` and `SetCaretLineBackground` |
CaretLineVisible |
See `GetCaretLineVisible` and `SetCaretLineVisible` |
CaretPeriod |
See `GetCaretPeriod` and `SetCaretPeriod` |
CaretSticky |
See `GetCaretSticky` and `SetCaretSticky` |
CaretWidth |
See `GetCaretWidth` and `SetCaretWidth` |
CharHeight |
See `GetCharHeight` |
CharWidth |
See `GetCharWidth` |
Children |
See `GetChildren` |
ClassName |
See `GetClassName` |
ClientAreaOrigin |
See `GetClientAreaOrigin` |
ClientRect |
See `GetClientRect` and `SetClientRect` |
ClientSize |
See `GetClientSize` and `SetClientSize` |
CodePage |
See `GetCodePage` and `SetCodePage` |
Constraints |
See `GetConstraints` and `SetConstraints` |
ContainingSizer |
See `GetContainingSizer` and `SetContainingSizer` |
ControlCharSymbol |
See `GetControlCharSymbol` and `SetControlCharSymbol` |
CurLine |
See `GetCurLine` |
CurLineRaw |
See `GetCurLineRaw` |
CurLineUTF8 |
See `GetCurLineUTF8` |
CurrentLine |
See `GetCurrentLine` |
CurrentPos |
See `GetCurrentPos` and `SetCurrentPos` |
Cursor |
See `GetCursor` and `SetCursor` |
DefaultAttributes |
See `GetDefaultAttributes` |
DocPointer |
See `GetDocPointer` and `SetDocPointer` |
DropTarget |
See `GetDropTarget` and `SetDropTarget` |
EOLMode |
See `GetEOLMode` and `SetEOLMode` |
EdgeColour |
See `GetEdgeColour` and `SetEdgeColour` |
EdgeColumn |
See `GetEdgeColumn` and `SetEdgeColumn` |
EdgeMode |
See `GetEdgeMode` and `SetEdgeMode` |
EffectiveMinSize |
See `GetEffectiveMinSize` |
Enabled |
See `IsEnabled` and `Enable` |
EndAtLastLine |
See `GetEndAtLastLine` and `SetEndAtLastLine` |
EndStyled |
See `GetEndStyled` |
EventHandler |
See `GetEventHandler` and `SetEventHandler` |
EvtHandlerEnabled |
See `GetEvtHandlerEnabled` and `SetEvtHandlerEnabled` |
ExtraStyle |
See `GetExtraStyle` and `SetExtraStyle` |
FirstVisibleLine |
See `GetFirstVisibleLine` |
Font |
See `GetFont` and `SetFont` |
ForegroundColour |
See `GetForegroundColour` and `SetForegroundColour` |
GrandParent |
See `GetGrandParent` |
Handle |
See `GetHandle` |
HelpText |
See `GetHelpText` and `SetHelpText` |
HighlightGuide |
See `GetHighlightGuide` and `SetHighlightGuide` |
Id |
See `GetId` and `SetId` |
Indent |
See `GetIndent` and `SetIndent` |
IndentationGuides |
See `GetIndentationGuides` and `SetIndentationGuides` |
Label |
See `GetLabel` and `SetLabel` |
LabelText |
See `GetLabelText` |
LastKeydownProcessed |
See `GetLastKeydownProcessed` and `SetLastKeydownProcessed` |
LayoutCache |
See `GetLayoutCache` and `SetLayoutCache` |
LayoutDirection |
See `GetLayoutDirection` and `SetLayoutDirection` |
Length |
See `GetLength` |
Lexer |
See `GetLexer` and `SetLexer` |
LineCount |
See `GetLineCount` |
MarginLeft |
See `GetMarginLeft` and `SetMarginLeft` |
MarginRight |
See `GetMarginRight` and `SetMarginRight` |
MaxHeight |
See `GetMaxHeight` |
MaxLineState |
See `GetMaxLineState` |
MaxSize |
See `GetMaxSize` and `SetMaxSize` |
MaxWidth |
See `GetMaxWidth` |
MinHeight |
See `GetMinHeight` |
MinSize |
See `GetMinSize` and `SetMinSize` |
MinWidth |
See `GetMinWidth` |
ModEventMask |
See `GetModEventMask` and `SetModEventMask` |
Modify |
See `GetModify` |
MouseDownCaptures |
See `GetMouseDownCaptures` and `SetMouseDownCaptures` |
MouseDwellTime |
See `GetMouseDwellTime` and `SetMouseDwellTime` |
Name |
See `GetName` and `SetName` |
NextHandler |
See `GetNextHandler` and `SetNextHandler` |
Overtype |
See `GetOvertype` and `SetOvertype` |
Parent |
See `GetParent` |
PasteConvertEndings |
See `GetPasteConvertEndings` and `SetPasteConvertEndings` |
Position |
See `GetPosition` and `SetPosition` |
PreviousHandler |
See `GetPreviousHandler` and `SetPreviousHandler` |
PrintColourMode |
See `GetPrintColourMode` and `SetPrintColourMode` |
PrintMagnification |
See `GetPrintMagnification` and `SetPrintMagnification` |
PrintWrapMode |
See `GetPrintWrapMode` and `SetPrintWrapMode` |
ReadOnly |
See `GetReadOnly` and `SetReadOnly` |
Rect |
See `GetRect` and `SetRect` |
STCCursor |
See `GetSTCCursor` and `SetSTCCursor` |
STCFocus |
See `GetSTCFocus` and `SetSTCFocus` |
ScreenPosition |
See `GetScreenPosition` |
ScreenRect |
See `GetScreenRect` |
ScrollWidth |
See `GetScrollWidth` and `SetScrollWidth` |
SearchFlags |
See `GetSearchFlags` and `SetSearchFlags` |
SelAlpha |
See `GetSelAlpha` and `SetSelAlpha` |
SelectedText |
See `GetSelectedText` |
SelectedTextRaw |
See `GetSelectedTextRaw` |
SelectedTextUTF8 |
See `GetSelectedTextUTF8` |
Selection |
See `GetSelection` |
SelectionEnd |
See `GetSelectionEnd` and `SetSelectionEnd` |
SelectionMode |
See `GetSelectionMode` and `SetSelectionMode` |
SelectionStart |
See `GetSelectionStart` and `SetSelectionStart` |
Shown |
See `IsShown` and `Show` |
Size |
See `GetSize` and `SetSize` |
Sizer |
See `GetSizer` and `SetSizer` |
Status |
See `GetStatus` and `SetStatus` |
StyleBits |
See `GetStyleBits` and `SetStyleBits` |
StyleBitsNeeded |
See `GetStyleBitsNeeded` |
TabIndents |
See `GetTabIndents` and `SetTabIndents` |
TabWidth |
See `GetTabWidth` and `SetTabWidth` |
TargetEnd |
See `GetTargetEnd` and `SetTargetEnd` |
TargetStart |
See `GetTargetStart` and `SetTargetStart` |
Text |
See `GetText` and `SetText` |
TextLength |
See `GetTextLength` |
TextRaw |
See `GetTextRaw` and `SetTextRaw` |
TextUTF8 |
See `GetTextUTF8` and `SetTextUTF8` |
ThemeEnabled |
See `GetThemeEnabled` and `SetThemeEnabled` |
ToolTip |
See `GetToolTip` and `SetToolTip` |
TopLevel |
See `IsTopLevel` |
TopLevelParent |
See `GetTopLevelParent` |
TwoPhaseDraw |
See `GetTwoPhaseDraw` and `SetTwoPhaseDraw` |
UndoCollection |
See `GetUndoCollection` and `SetUndoCollection` |
UpdateClientRect |
See `GetUpdateClientRect` |
UpdateRegion |
See `GetUpdateRegion` |
UseAntiAliasing |
See `GetUseAntiAliasing` and `SetUseAntiAliasing` |
UseHorizontalScrollBar |
See `GetUseHorizontalScrollBar` and `SetUseHorizontalScrollBar` |
UseTabs |
See `GetUseTabs` and `SetUseTabs` |
UseVerticalScrollBar |
See `GetUseVerticalScrollBar` and `SetUseVerticalScrollBar` |
Validator |
See `GetValidator` and `SetValidator` |
ViewEOL |
See `GetViewEOL` and `SetViewEOL` |
ViewWhiteSpace |
See `GetViewWhiteSpace` and `SetViewWhiteSpace` |
VirtualSize |
See `GetVirtualSize` and `SetVirtualSize` |
WindowStyle |
See `GetWindowStyle` and `SetWindowStyle` |
WindowStyleFlag |
See `GetWindowStyleFlag` and `SetWindowStyleFlag` |
WindowVariant |
See `GetWindowVariant` and `SetWindowVariant` |
WrapMode |
See `GetWrapMode` and `SetWrapMode` |
WrapStartIndent |
See `GetWrapStartIndent` and `SetWrapStartIndent` |
WrapVisualFlags |
See `GetWrapVisualFlags` and `SetWrapVisualFlags` |
WrapVisualFlagsLocation |
See `GetWrapVisualFlagsLocation` and `SetWrapVisualFlagsLocation` |
XOffset |
See `GetXOffset` and `SetXOffset` |
Zoom |
See `GetZoom` and `SetZoom` |
thisown |
The membership flag |
TranscriptEditor defines the following events:
| Event | Description |
|---|---|
EVT_DOC_CHANGED() |
Set function to be called when document is modified. |