Package peppy :: Module fundamental :: Class FundamentalMode
[frames] | no frames]

Class FundamentalMode

                             object --+    
                                      |    
                    BraceHighlightMixin --+
                                          |
                             object --+   |
                                      |   |
                    StandardReturnMixin --+
                                          |
                         object --+       |
                                  |       |
                       ReindentBase --+   |
                                      |   |
                  StandardReindentMixin --+
                                          |
                             object --+   |
                                      |   |
                 StandardParagraphMixin --+
                                          |
                             object --+   |
                                      |   |
              GenericFoldHierarchyMixin --+
                                          |
                             object --+   |
                                      |   |
     lib.foldexplorer.FoldExplorerMixin --+
                                          |
                         object --+       |
                                  |       |
           editra.ed_style.StyleMgr --+   |
                                      |   |
                         object --+   |   |
                                  |   |   |
                   debug.debugmixin --+   |
                                      |   |
         editra.stcmixin.EditraSTCMixin --+
                                          |
     object --+                           |
              |                           |
wx._core.Object --+                       |
                  |                       |
wx._core.EvtHandler --+                   |
                      |                   |
        wx._core.Window --+               |
                          |               |
           wx._core.Control --+           |
                              |           |
          wx.stc.StyledTextCtrl --+       |
                                  |       |
                     object --+   |       |
                              |   |       |
      stcinterface.STCInterface --+       |
                                  |       |
                     object --+   |       |
                              |   |       |
               debug.debugmixin --+       |
                                  |       |
               stcbase.PeppyBaseSTC --+   |
                                      |   |
                       stcbase.PeppySTC --+
                                          |
                         object --+       |
                                  |       |
          lib.userparams.ClassPrefs --+   |
                                      |   |
                         object --+   |   |
                                  |   |   |
                   debug.debugmixin --+   |
                                      |   |
                        major.MajorMode --+
                                          |
                                         FundamentalMode
Known Subclasses:

Major mode for editing generic text files.

This is the most generic major mode used for editing text files. This uses a PeppySTC as the editing window, and is linked to a Buffer object that in turn is linked to the backend storage of a PeppyBaseSTC.

All major modes that are edit text using an STC should be subclasses of this mode. Major modes that provide editing windows that aren't an STC (like the HexEdit view or an image viewer) will not be subclasses of this mode; rather, they will be subclasses of MajorMode and will only use an STC as the backend storage within the Buffer attribute that is associated with every major mode.

The STC uses the Editra system for styling text and fonts; it is based on matching the filename or extension with values from its database. Documentation on the Editra interface is forthcoming.

FundamentalMode is a subclass of PeppySTC, so all of the STC methods are availble here for user interfacing. In addition, some mixins are used, like the BraceHighlightMixin to provide language customizable brace highlighting, and the StandardParagraphMixin used to determine the start and end of a paragraph based on the major mode.

Two mixins in particular will need attention when subclassing FundamentalMode for new types of text files: StandardReturnMixin and StandardReindentMixin. The StandardReturnMixin provides handling for the return key and indenting the following line to the correct tab stop. The StandardReindentMixin is used to indent a line to its proper column based on the language supported by the major mode. FundamentalMode subclasses should override both of these classes and provide them as mixins in order to customize the major mode.

Because the FundamentalMode serves as the base class for all text editing modes, there are many defaults specified in the default_classprefs class attribute. These defaults are based on the ClassPrefs metaclass that associates keywords with values and serializes them to the peppy configuration file. ClassPrefs are a transparent way to handle the application preferences, and you'll find them used all over peppy. But, as their name suggests, ClassPrefs belong to the class, not the instance, so this is not for instance variable storage. See the ClassPrefs documentation for more information.

Nested Classes

Inherited from major.MajorMode: stc_class

Inherited from lib.userparams.ClassPrefs: __metaclass__

Instance Methods
 
OnUpdateUI(self, evt)
Specific OnUpdateUI callback for those modes that use an actual STC for their edit window.
EvtHandler
__init__(self, parent, wrapper, buffer, frame)
Create the STC and apply styling settings.
 
applyDefaultSettings(self)
 
applySettings(self)
Apply settings to the view
 
createStatusIcons(self)
Create any icons in the status bar.
 
getPopupActions(self, x, y)
Return the list of action classes to use as a context menu.
 
onMarginClick(self, evt)
 
setCaretStyle(self)
 
setEdgeStyle(self)
 
setFolding(self, enable=None)
 
setLineNumbers(self, enable=None)
 
setTabStyle(self)
 
setViewEOL(self, enable=None)
 
setWordWrap(self, enable=None, style=None)
 
showInitialPosition(self, url)
Hook to scroll to a non-default initial position if desired.

Inherited from BraceHighlightMixin: braceHighlight

Inherited from StandardReturnMixin: electricReturn, findIndent

Inherited from StandardReindentMixin: getReindentColumn

Inherited from ReindentBase: reindentLine

Inherited from StandardParagraphMixin: findParagraph, findParagraphEnd, findParagraphStart

Inherited from GenericFoldHierarchyMixin: OnFoldChanged, getFoldEntryFunctionName, getFoldHierarchy, updateFoldHierarchy

Inherited from lib.foldexplorer.FoldExplorerMixin: computeFoldHierarchy, findRecomputeStart, getFoldEntry, recomputeFoldHierarchy

Inherited from editra.stcmixin.EditraSTCMixin: ConfigureLexer, DefineMarkers, FindLexer, FindTagById, RefreshStyles, SetKeyWords, SetProperties, SetSyntax, StyleDefault, UpdateAllStyles, UpdateBaseStyles, getEditraSyntaxData, getEditraSyntaxProperties

Inherited from editra.ed_style.StyleMgr: BlankStyleDictionary, DefaultStyleDictionary, GetDefaultBackColour, GetDefaultFont, GetDefaultForeColour, GetFontDictionary, GetItemByName, GetStyleByName, GetStyleFont, GetStyleSet, HasNamedStyle, LoadStyleSheet, MergeFonts, MergeStyles, PackStyleSet, ParseStyleData, SetGlobalFont, SetStyleFont, SetStyleTag, SetStyles

Inherited from stcbase.PeppySTC: OnDestroy, OnDoDrop, OnDragOver, OnModified, OnMousePaste, OnMouseWheel, OnSelectionEnd, OnStartDrag, addUpdateUIEvent, sendEvents, transModType

Inherited from stcbase.PeppyBaseSTC: CanCopy, CanCut, CanEdit, ConvertEOLs, GetBinaryData, GetFoldColumn, GetIndentString, GetLineRegion, GetPrevLineIndentation, GetSelection2, GuessBinary, PasteAtColumn, Redo, SelectAll, Undo, addLinePrefixAndSuffix, addSubordinate, checkUndoEOL, commentRegion, convertStringEOL, decodeText, detectLineEndings, getLinesep, getSharedClassInfo, getWordFromPosition, isStyleComment, isStyleString, open, openSuccess, prepareEncoding, readFrom, readThreaded, removeDocumentView, removeLinePrefixAndSuffix, setCommentDelimiters, showLine, showStyle, splitCommentLine, updateSubordinateClasses, writeTo

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, 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, RegisterImage, ReleaseDocument, ReplaceSelection, ReplaceTarget, ReplaceTargetRE, SaveFile, ScrollToColumn, ScrollToLine, SearchAnchor, SearchInTarget, SearchNext, SearchPrev, 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, 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, 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, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, 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, 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

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

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from stcinterface.STCInterface: CanSave, getShortDisplayName

Inherited from major.MajorMode: OnContextMenu, OnUpdateUIHook, __del__, createEditWindow, createEventBindings, createEventBindingsPostHook, createListeners, createListenersPostHook, createPostHook, createStatusBarInfo, createWindowPostHook, deleteWindow, deleteWindowPostHook, deleteWindowPre, deleteWindowPreHook, findMinorMode, focus, focusPostHook, getIcon, getStatusBarWidths, getTabName, getTitle, getWelcomeMessage, idleHandler, idlePostHook, loadMinorModesPostHook, removeListeners, removeListenersPostHook, removeMinibuffer, resetStatusBar, save, savePostHook, savePreHook, setMinibuffer, setStatusText, settingsChanged, showBusy, showModified, tabActivatedHook, updateAui

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

Class Methods
 
verifyEditraType(cls, ext, file_type)
Hook to verify the mode can handle the specified Editra type.
 
verifyMimetype(cls, mimetype)
Verify that the mimetype is text/plain.

Inherited from major.MajorMode: verifyFilename, verifyMagic, verifyMetadata, verifyProtocol

Inherited from debug.debugmixin: dprint

Static Methods

Inherited from wx._core.Control: GetClassDefaultAttributes

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

Class Variables
  classprefs = <peppy.lib.userparams.PrefsProxy object at 0x59f2...
  default_classprefs = StrParam('editra_style_sheet', '', 'Mode ...
Default class preferences that relate to all instances of this major mode
  editra_synonym = None
If the editra file_type (defined as the LANG_* keywords in the editra source file peppy/editra/synglob.py) doesn't match the class attribute 'keyword', specify the editra file type here.
  end_line_comment = ''
  keyword = 'Fundamental'
The single-word keyword representing this major mode
  start_line_comment = ''
Default comment characters in case the Editra styling database doesn't have any information about the mode

Inherited from editra.ed_style.StyleMgr: FONT_PRIMARY, FONT_SECONDARY, FONT_SIZE, FONT_SIZE2, FONT_SIZE3, styles

Inherited from stcbase.PeppyBaseSTC: eol2int, int2eol

Inherited from major.MajorMode: allow_threaded_loading, debuglevel, emacs_synonyms, icon, localkeymaps, mimetype, preferences_tab, regex, temporary

Inherited from lib.userparams.ClassPrefs: preferences_sort_weight

Properties

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, 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

OnUpdateUI(self, evt)

 

Specific OnUpdateUI callback for those modes that use an actual STC for their edit window.

Adds things like fold level and style display.

Parameters:
  • evt - some event of undetermined type
Overrides: major.MajorMode.OnUpdateUI

__init__(self, parent, wrapper, buffer, frame)
(Constructor)

 

Create the STC and apply styling settings.

Everything that subclasses from FundamentalMode will use an STC instance for displaying the user interaction window.

Parameters:
  • custom - path to custom style sheet to use
Returns: EvtHandler
Overrides: object.__init__

applySettings(self)

 

Apply settings to the view

This is the place where settings for the class show their effects. Calling this should update the view to reflect any changes in the settings.

Overrides: major.MajorMode.applySettings
(inherited documentation)

createStatusIcons(self)

 

Create any icons in the status bar.

This is called after making the major mode the active mode in the frame. The status bar will be cleared to its initial empty state, so all this method has to do is add any icons that it needs.

Overrides: major.MajorMode.createStatusIcons
(inherited documentation)

getPopupActions(self, x, y)

 

Return the list of action classes to use as a context menu.

If the subclass is capable of displaying a popup menu, it needs to return a list of action classes. The x, y pixel coordinates (relative to the origin of major mode window) are included in case the subclass can display different popup items depending on the position in the editing window.

Overrides: major.MajorMode.getPopupActions
(inherited documentation)

showInitialPosition(self, url)

 

Hook to scroll to a non-default initial position if desired.

Overrides: major.MajorMode.showInitialPosition
(inherited documentation)

verifyEditraType(cls, ext, file_type)
Class Method

 

Hook to verify the mode can handle the specified Editra type.

Parameters:
  • ext - filename extension without the '.', or an empty string
  • file_type - Editra file type string as given in the file peppy/editra/synglob.py, or None if not recognized by Editra
Returns:
either the boolean False, indicating Editra doesn't support this mode, or a string. The string can either be the same as the input value ext if it matches a specific type supported by this mode or 'generic' if Editra supports the mode but if the mode doesn't provide any additional functionality (this usually only happens in Fundamental mode).
Overrides: major.MajorMode.verifyEditraType
(inherited documentation)

verifyMimetype(cls, mimetype)
Class Method

 

Verify that the mimetype is text/plain.

The class attribute mimetype is not used so that subclasses that extend Fundamental but forget to declare a MIME type won't also get added to the list of modes that handle text/plain.

This default implementation will call MajorMode.verifyMimetype if not overridden by the subclass.

Overrides: major.MajorMode.verifyMimetype

Class Variable Details

classprefs

Value:
<peppy.lib.userparams.PrefsProxy object at 0x59f2d90>

default_classprefs

Default class preferences that relate to all instances of this major mode

Value:
StrParam('editra_style_sheet', '', 'Mode specific filename in the conf\
ig directory containing\nEditra style sheet information.  Used to over\
ride\ndefault styles with custom styles for this mode.'), BoolParam('u\
se_tab_characters', False, 'True: insert tab characters when tab is pr\
essed\nFalse: insert the equivalent number of spaces instead.'), IntPa\
ram('tab_size', 4, 'Number of spaces in each tab'), IndexChoiceParam('\
tab_highlight_style', ['ignore', 'inconsistent', 'mixed', 'spaces are \
bad', 'tabs are bad'], 4, 'Highlight bad intentation'), BoolParam('lin\
...

editra_synonym

If the editra file_type (defined as the LANG_* keywords in the editra source file peppy/editra/synglob.py) doesn't match the class attribute 'keyword', specify the editra file type here. In other words, None here means that the editra file_type *does* match the keyword

Value:
None