Package gui :: Module controller :: Class LogCtrl
[hide private]
[frames] | no frames]

Class LogCtrl

source code


A special control designed to display relax output messages.

Instance Methods [hide private]
EvtHandler
__init__(self, parent, controller, log_queue=None, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=134217728, name=u'stcwindow')
Set up the log control.
source code
 
capture_keys(self, event)
Control which key events are active, preventing text insertion and deletion.
source code
 
clear(self)
Remove all text from the log.
source code
 
find(self, event)
Find the text in the log control.
source code
 
find_close(self, event)
Close the find dialog.
source code
 
find_open(self, event)
Display the text finding dialog.
source code
 
find_next(self, event)
Find the next instance of the text.
source code
list of str, list of int
get_text(self)
Concatenate all of the text from the log queue and return it as a string.
source code
 
limit_scrollback(self, prune=20)
Limit scroll back to the maximum number of lines.
source code
 
on_copy(self, event)
Copy the selected text.
source code
 
on_goto_end(self, event)
Move to the end of the text.
source code
 
on_goto_start(self, event)
Move to the start of the text.
source code
 
on_select_all(self, event)
Select all text in the control.
source code
 
on_zoom_in(self, event)
Zoom in by increase the font by 1 point size.
source code
 
on_zoom_orig(self, event)
Zoom to the original zoom level.
source code
 
on_zoom_out(self, event)
Zoom out by decreasing the font by 1 point size.
source code
 
pop_up_menu(self, event)
Override the StyledTextCtrl pop up menu.
source code
 
write(self)
Write the text in the log queue to the log control.
source code

Inherited from wx.stc.StyledTextCtrl: AddRefDocument, AddStyledText, AddText, AddTextRaw, AddTextUTF8, Allocate, AppendText, AppendTextRaw, AppendTextUTF8, AutoCompActive, AutoCompCancel, AutoCompComplete, AutoCompGetAutoHide, AutoCompGetCancelAtStart, AutoCompGetChooseSingle, AutoCompGetCurrent, AutoCompGetDropRestOfWord, AutoCompGetIgnoreCase, AutoCompGetMaxHeight, AutoCompGetMaxWidth, AutoCompGetSeparator, AutoCompGetTypeSeparator, AutoCompPosStart, AutoCompSelect, AutoCompSetAutoHide, AutoCompSetCancelAtStart, AutoCompSetChooseSingle, AutoCompSetDropRestOfWord, AutoCompSetFillUps, AutoCompSetIgnoreCase, AutoCompSetMaxHeight, AutoCompSetMaxWidth, AutoCompSetSeparator, AutoCompSetTypeSeparator, AutoCompShow, AutoCompStops, BackTab, BeginUndoAction, BraceBadLight, BraceHighlight, BraceMatch, CallTipActive, CallTipCancel, CallTipPosAtStart, CallTipSetBackground, CallTipSetForeground, CallTipSetForegroundHighlight, CallTipSetHighlight, CallTipShow, CallTipUseStyle, CanPaste, CanRedo, CanUndo, Cancel, CharLeft, CharLeftExtend, CharLeftRectExtend, CharRight, CharRightExtend, CharRightRectExtend, ChooseCaretX, Clear, ClearAll, ClearDocumentStyle, ClearRegisteredImages, CmdKeyAssign, CmdKeyClear, CmdKeyClearAll, CmdKeyExecute, Colourise, ConvertEOLs, Copy, CopyRange, CopyText, Create, CreateDocument, Cut, DelLineLeft, DelLineRight, DelWordLeft, DelWordRight, DeleteBack, DeleteBackNotLine, DoDragOver, DoDropText, DocLineFromVisible, DocumentEnd, DocumentEndExtend, DocumentStart, DocumentStartExtend, EditToggleOvertype, EmptyUndoBuffer, EndUndoAction, EnsureCaretVisible, EnsureVisible, EnsureVisibleEnforcePolicy, FindColumn, FindText, FormFeed, FormatRange, GetAnchor, GetBackSpaceUnIndents, GetBufferedDraw, GetCaretForeground, GetCaretLineBack, GetCaretLineBackAlpha, GetCaretLineBackground, GetCaretLineVisible, GetCaretPeriod, GetCaretSticky, GetCaretWidth, GetCharAt, GetCodePage, GetColumn, GetControlCharSymbol, GetCurLine, GetCurLineRaw, GetCurLineUTF8, GetCurrentLine, GetCurrentPos, GetDocPointer, GetEOLMode, GetEdgeColour, GetEdgeColumn, GetEdgeMode, GetEndAtLastLine, GetEndStyled, GetFirstVisibleLine, GetFoldExpanded, GetFoldLevel, GetFoldParent, GetHighlightGuide, GetIndent, GetIndentationGuides, GetLastChild, GetLastKeydownProcessed, GetLayoutCache, GetLength, GetLexer, GetLine, GetLineCount, GetLineEndPosition, GetLineIndentPosition, GetLineIndentation, GetLineRaw, GetLineSelEndPosition, GetLineSelStartPosition, GetLineState, GetLineUTF8, GetLineVisible, GetMarginLeft, GetMarginMask, GetMarginRight, GetMarginSensitive, GetMarginType, GetMarginWidth, GetMaxLineState, GetModEventMask, GetModify, GetMouseDownCaptures, GetMouseDwellTime, GetOvertype, GetPasteConvertEndings, GetPrintColourMode, GetPrintMagnification, GetPrintWrapMode, GetProperty, GetPropertyExpanded, GetPropertyInt, GetReadOnly, GetSTCCursor, GetSTCFocus, GetScrollWidth, GetSearchFlags, GetSelAlpha, GetSelectedText, GetSelectedTextRaw, GetSelectedTextUTF8, GetSelection, GetSelectionEnd, GetSelectionMode, GetSelectionStart, GetStatus, GetStyleAt, GetStyleBits, GetStyleBitsNeeded, GetStyledText, GetTabIndents, GetTabWidth, GetTargetEnd, GetTargetStart, GetText, GetTextLength, GetTextRange, GetTextRangeRaw, GetTextRangeUTF8, GetTextRaw, GetTextUTF8, GetTwoPhaseDraw, GetUndoCollection, GetUseAntiAliasing, GetUseHorizontalScrollBar, GetUseTabs, GetUseVerticalScrollBar, GetViewEOL, GetViewWhiteSpace, GetWrapMode, GetWrapStartIndent, GetWrapVisualFlags, GetWrapVisualFlagsLocation, GetXOffset, GetZoom, GotoLine, GotoPos, HideLines, HideSelection, Home, HomeDisplay, HomeDisplayExtend, HomeExtend, HomeRectExtend, HomeWrap, HomeWrapExtend, IndicatorGetForeground, IndicatorGetStyle, IndicatorSetForeground, IndicatorSetStyle, InsertText, InsertTextRaw, InsertTextUTF8, LineCopy, LineCut, LineDelete, LineDown, LineDownExtend, LineDownRectExtend, LineDuplicate, LineEnd, LineEndDisplay, LineEndDisplayExtend, LineEndExtend, LineEndRectExtend, LineEndWrap, LineEndWrapExtend, LineFromPosition, LineLength, LineScroll, LineScrollDown, LineScrollUp, LineTranspose, LineUp, LineUpExtend, LineUpRectExtend, LinesJoin, LinesOnScreen, LinesSplit, LoadFile, LowerCase, MarkerAdd, MarkerAddSet, MarkerDefine, MarkerDefineBitmap, MarkerDelete, MarkerDeleteAll, MarkerDeleteHandle, MarkerGet, MarkerLineFromHandle, MarkerNext, MarkerPrevious, MarkerSetAlpha, MarkerSetBackground, MarkerSetForeground, MoveCaretInsideView, NewLine, PageDown, PageDownExtend, PageDownRectExtend, PageUp, PageUpExtend, PageUpRectExtend, ParaDown, ParaDownExtend, ParaUp, ParaUpExtend, Paste, PointFromPosition, PositionAfter, PositionBefore, PositionFromLine, PositionFromPoint, PositionFromPointClose, Redo, RegisterImage, ReleaseDocument, ReplaceSelection, ReplaceTarget, ReplaceTargetRE, SaveFile, ScrollToColumn, ScrollToLine, SearchAnchor, SearchInTarget, SearchNext, SearchPrev, SelectAll, SelectionDuplicate, SelectionIsRectangle, SendMsg, SetAnchor, SetBackSpaceUnIndents, SetBufferedDraw, SetCaretForeground, SetCaretLineBack, SetCaretLineBackAlpha, SetCaretLineBackground, SetCaretLineVisible, SetCaretPeriod, SetCaretSticky, SetCaretWidth, SetCharsDefault, SetCodePage, SetControlCharSymbol, SetCurrentPos, SetDocPointer, SetEOLMode, SetEdgeColour, SetEdgeColumn, SetEdgeMode, SetEndAtLastLine, SetFoldExpanded, SetFoldFlags, SetFoldLevel, SetFoldMarginColour, SetFoldMarginHiColour, SetHScrollBar, SetHighlightGuide, SetHotspotActiveBackground, SetHotspotActiveForeground, SetHotspotActiveUnderline, SetHotspotSingleLine, SetIndent, SetIndentationGuides, SetKeyWords, SetLastKeydownProcessed, SetLayoutCache, SetLexer, SetLexerLanguage, SetLineIndentation, SetLineState, SetMarginLeft, SetMarginMask, SetMarginRight, SetMarginSensitive, SetMarginType, SetMarginWidth, SetMargins, SetModEventMask, SetMouseDownCaptures, SetMouseDwellTime, SetOvertype, SetPasteConvertEndings, SetPrintColourMode, SetPrintMagnification, SetPrintWrapMode, SetProperty, SetReadOnly, SetSTCCursor, SetSTCFocus, SetSavePoint, SetScrollWidth, SetSearchFlags, SetSelAlpha, SetSelBackground, SetSelForeground, SetSelection, SetSelectionEnd, SetSelectionMode, SetSelectionStart, SetStatus, SetStyleBits, SetStyleBytes, SetStyling, SetTabIndents, SetTabWidth, SetTargetEnd, SetTargetStart, SetText, SetTextRaw, SetTextUTF8, SetTwoPhaseDraw, SetUndoCollection, SetUseAntiAliasing, SetUseHorizontalScrollBar, SetUseTabs, SetUseVerticalScrollBar, SetVScrollBar, SetViewEOL, SetViewWhiteSpace, SetVisiblePolicy, SetWhitespaceBackground, SetWhitespaceChars, SetWhitespaceForeground, SetWordChars, SetWrapMode, SetWrapStartIndent, SetWrapVisualFlags, SetWrapVisualFlagsLocation, SetXCaretPolicy, SetXOffset, SetYCaretPolicy, SetZoom, ShowLines, StartRecord, StartStyling, StopRecord, StutteredPageDown, StutteredPageDownExtend, StutteredPageUp, StutteredPageUpExtend, StyleClearAll, StyleResetDefault, StyleSetBackground, StyleSetBold, StyleSetCase, StyleSetChangeable, StyleSetCharacterSet, StyleSetEOLFilled, StyleSetFaceName, StyleSetFont, StyleSetFontAttr, StyleSetFontEncoding, StyleSetForeground, StyleSetHotSpot, StyleSetItalic, StyleSetSize, StyleSetSpec, StyleSetUnderline, StyleSetVisible, Tab, TargetFromSelection, TextHeight, TextWidth, ToggleCaretSticky, ToggleFold, Undo, UpperCase, UsePopUp, UserListShow, VCHome, VCHomeExtend, VCHomeRectExtend, VCHomeWrap, VCHomeWrapExtend, VisibleFromDocLine, WordEndPosition, WordLeft, WordLeftEnd, WordLeftEndExtend, WordLeftExtend, WordPartLeft, WordPartLeftExtend, WordPartRight, WordPartRightExtend, WordRight, WordRightEnd, WordRightEndExtend, WordRightExtend, WordStartPosition, WrapCount, ZoomIn, ZoomOut, __repr__

Inherited from wx._core.Control: Command, GetAlignment, GetLabelText

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetToolTipString, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from wx._core.Control: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Properties [hide private]

Inherited from wx.stc.StyledTextCtrl: Anchor, BackSpaceUnIndents, BufferedDraw, CaretForeground, CaretLineBack, CaretLineBackAlpha, CaretLineBackground, CaretLineVisible, CaretPeriod, CaretSticky, CaretWidth, CodePage, ControlCharSymbol, CurLine, CurLineRaw, CurLineUTF8, CurrentLine, CurrentPos, DocPointer, EOLMode, EdgeColour, EdgeColumn, EdgeMode, EndAtLastLine, EndStyled, FirstVisibleLine, HighlightGuide, Indent, IndentationGuides, LastKeydownProcessed, LayoutCache, Length, Lexer, LineCount, MarginLeft, MarginRight, MaxLineState, ModEventMask, Modify, MouseDownCaptures, MouseDwellTime, Overtype, PasteConvertEndings, PrintColourMode, PrintMagnification, PrintWrapMode, ReadOnly, STCCursor, STCFocus, ScrollWidth, SearchFlags, SelAlpha, SelectedText, SelectedTextRaw, SelectedTextUTF8, Selection, SelectionEnd, SelectionMode, SelectionStart, Status, StyleBits, StyleBitsNeeded, TabIndents, TabWidth, TargetEnd, TargetStart, Text, TextLength, TextRaw, TextUTF8, TwoPhaseDraw, UndoCollection, UseAntiAliasing, UseHorizontalScrollBar, UseTabs, UseVerticalScrollBar, ViewEOL, ViewWhiteSpace, WrapMode, WrapStartIndent, WrapVisualFlags, WrapVisualFlagsLocation, XOffset, Zoom, thisown

Inherited from wx._core.Control: Alignment, LabelText

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, ToolTipString, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, controller, log_queue=None, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=134217728, name=u'stcwindow')
(Constructor)

source code 

Set up the log control.

Parameters:
  • parent (Window) - The parent wx window object.
  • controller (wx.Frame instance) - The controller window.
  • log_queue (Queue.Queue instance) - The queue of log messages.
  • id (int) - The wx ID.
  • pos (Point) - The window position.
  • size (Size) - The window size.
  • style (long) - The StyledTextCtrl to apply.
  • name (str) - The window name.
Returns: EvtHandler
Overrides: object.__init__

capture_keys(self, event)

source code 

Control which key events are active, preventing text insertion and deletion.

Parameters:
  • event (wx event) - The wx event.

find(self, event)

source code 

Find the text in the log control.

Parameters:
  • event (wx event) - The wx event.

find_close(self, event)

source code 

Close the find dialog.

Parameters:
  • event (wx event) - The wx event.

find_open(self, event)

source code 

Display the text finding dialog.

Parameters:
  • event (wx event) - The wx event.

find_next(self, event)

source code 

Find the next instance of the text.

Parameters:
  • event (wx event) - The wx event.

get_text(self)

source code 

Concatenate all of the text from the log queue and return it as a string.

Returns: list of str, list of int
A list of the text from the log queue and a list of the streams these correspond to.

limit_scrollback(self, prune=20)

source code 

Limit scroll back to the maximum number of lines.

Lines are deleted in blocks of 'prune' number of lines for faster operation.

on_copy(self, event)

source code 

Copy the selected text.

Parameters:
  • event (wx event) - The wx event.

on_goto_end(self, event)

source code 

Move to the end of the text.

Parameters:
  • event (wx event) - The wx event.

on_goto_start(self, event)

source code 

Move to the start of the text.

Parameters:
  • event (wx event) - The wx event.

on_select_all(self, event)

source code 

Select all text in the control.

Parameters:
  • event (wx event) - The wx event.

on_zoom_in(self, event)

source code 

Zoom in by increase the font by 1 point size.

Parameters:
  • event (wx event) - The wx event.

on_zoom_orig(self, event)

source code 

Zoom to the original zoom level.

Parameters:
  • event (wx event) - The wx event.

on_zoom_out(self, event)

source code 

Zoom out by decreasing the font by 1 point size.

Parameters:
  • event (wx event) - The wx event.

pop_up_menu(self, event)

source code 

Override the StyledTextCtrl pop up menu.

Parameters:
  • event (wx event) - The wx event.