Package peppy :: Package plugins :: Module hexedit_mode :: Class HexEditMode
[frames] | no frames]

Class HexEditMode

                         object --+    
                                  |    
          stcinterface.STCInterface --+
                                      |
     object --+                       |
              |                       |
wx._core.Object --+                   |
                  |                   |
wx._core.EvtHandler --+               |
                      |               |
        wx._core.Window --+           |
                          |           |
          wx._windows.Panel --+       |
                              |       |
     wx._windows.ScrolledWindow --+   |
                                  |   |
                       wx.grid.Grid --+
                                      |
                     object --+       |
                              |       |
      lib.userparams.ClassPrefs --+   |
                                  |   |
                     object --+   |   |
                              |   |   |
               debug.debugmixin --+   |
                                  |   |
                    major.MajorMode --+
                                      |
                                     HexEditMode

View for editing in hexidecimal notation.

Nested Classes

Inherited from major.MajorMode: stc_class

Inherited from lib.userparams.ClassPrefs: __metaclass__

Instance Methods
EvtHandler
__init__(self, parent, wrapper, buffer, frame)
Create the HexEdit viewer
 
createPostHook(self)
Hook called when everything has been created.
 
createListenersPostHook(self)
Hook to add custom listeners.
 
removeListenersPostHook(self)
Hook to remove custom listeners.
 
Update(self, stc=None, format=None, col_labels=None)
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.
 
OnUnderlyingUpdate(self, evt, loc=None)
Data has changed in some other view, so we need to update the grid and reset the grid's cursor to the updated position if the location is given.
 
OnRightDown(self, evt)
 
OnLeftDown(self, evt)
 
OnSelectCell(self, evt)
 
OnKeyDown(self, evt)
 
abortEdit(self)
 
advanceCursor(self)
 
GetCurrentLine(self)
 
GetCurrentPos(self)
 
GetColumn(self, pos)
 
GotoPos(self, pos)
Move the cursor to the specified position and scroll the position into the view if necessary.
 
addUpdateUIEvent(self, callback)
Add the equivalent to STC_UPDATEUI event for UI changes.
 
doUpdateUICallback(self)
 
transModType(self, modType)
 
underlyingSTCChanged(self, evt)

Inherited from stcinterface.STCInterface: AddRefDocument, CanCopy, CanCut, CanEdit, CanPaste, CanRedo, CanSave, CanUndo, Clear, Copy, CreateDocument, Cut, EmptyUndoBuffer, GetBinaryData, GetFoldColumn, GetFoldLevel, GetLength, GetModify, GetPrevLineIndentation, GetText, GetTextLength, GuessBinary, Paste, Redo, ReleaseDocument, SetDocPointer, SetSavePoint, Undo, getShortDisplayName, open, openSuccess, prepareEncoding, readFrom, showStyle, writeTo

Inherited from wx.grid.Grid: AppendCols, AppendRows, AutoSize, AutoSizeColLabelSize, AutoSizeColumn, AutoSizeColumns, AutoSizeRow, AutoSizeRowLabelSize, AutoSizeRows, BeginBatch, BlockToDeviceRect, CanDragCell, CanDragColMove, CanDragColSize, CanDragGridSize, CanDragRowSize, CanEnableCellControl, CellToRect, ClearGrid, ClearSelection, Create, CreateGrid, DeleteCols, DeleteRows, DeselectCell, DeselectCol, DeselectRow, DisableCellEditControl, DisableDragCell, DisableDragColMove, DisableDragColSize, DisableDragGridSize, DisableDragRowSize, DrawCellHighlight, DrawTextRectangle, EnableCellEditControl, EnableDragCell, EnableDragColMove, EnableDragColSize, EnableDragGridSize, EnableDragRowSize, EnableEditing, EnableGridLines, EndBatch, ForceRefresh, GetBatchCount, GetCellAlignment, GetCellBackgroundColour, GetCellEditor, GetCellFont, GetCellHighlightColour, GetCellHighlightPenWidth, GetCellHighlightROPenWidth, GetCellOverflow, GetCellRenderer, GetCellSize, GetCellTextColour, GetCellValue, GetColAt, GetColGridLinePen, GetColLabelAlignment, GetColLabelSize, GetColLabelTextOrientation, GetColLabelValue, GetColMinimalAcceptableWidth, GetColPos, GetColSize, GetDefaultCellAlignment, GetDefaultCellBackgroundColour, GetDefaultCellFont, GetDefaultCellOverflow, GetDefaultCellTextColour, GetDefaultColLabelSize, GetDefaultColSize, GetDefaultEditor, GetDefaultEditorForCell, GetDefaultEditorForType, GetDefaultGridLinePen, GetDefaultRenderer, GetDefaultRendererForCell, GetDefaultRendererForType, GetDefaultRowLabelSize, GetDefaultRowSize, GetGridColLabelWindow, GetGridCornerLabelWindow, GetGridCursorCol, GetGridCursorRow, GetGridLineColour, GetGridRowLabelWindow, GetGridWindow, GetLabelBackgroundColour, GetLabelFont, GetLabelTextColour, GetNumberCols, GetNumberRows, GetOrCreateCellAttr, GetRowGridLinePen, GetRowLabelAlignment, GetRowLabelSize, GetRowLabelValue, GetRowMinimalAcceptableHeight, GetRowSize, GetScrollLineX, GetScrollLineY, GetScrollX, GetScrollY, GetSelectedCells, GetSelectedCols, GetSelectedRows, GetSelectionBackground, GetSelectionBlockBottomRight, GetSelectionBlockTopLeft, GetSelectionForeground, GetSelectionMode, GetTable, GetTextBoxSize, GridLinesEnabled, HideCellEditControl, InsertCols, InsertRows, IsCellEditControlEnabled, IsCellEditControlShown, IsCurrentCellReadOnly, IsEditable, IsInSelection, IsReadOnly, IsSelection, IsVisible, MakeCellVisible, MoveCursorDown, MoveCursorDownBlock, MoveCursorLeft, MoveCursorLeftBlock, MoveCursorRight, MoveCursorRightBlock, MoveCursorUp, MoveCursorUpBlock, MovePageDown, MovePageUp, ProcessTableMessage, RegisterDataType, SaveEditControlValue, SelectAll, SelectBlock, SelectCol, SelectRow, SetAttr, SetCellAlignment, SetCellBackgroundColour, SetCellEditor, SetCellFont, SetCellHighlightColour, SetCellHighlightPenWidth, SetCellHighlightROPenWidth, SetCellOverflow, SetCellRenderer, SetCellSize, SetCellTextColour, SetCellValue, SetColAttr, SetColFormatBool, SetColFormatCustom, SetColFormatFloat, SetColFormatNumber, SetColLabelAlignment, SetColLabelSize, SetColLabelTextOrientation, SetColLabelValue, SetColMinimalAcceptableWidth, SetColMinimalWidth, SetColPos, SetColSize, SetDefaultCellAlignment, SetDefaultCellBackgroundColour, SetDefaultCellFont, SetDefaultCellOverflow, SetDefaultCellTextColour, SetDefaultColSize, SetDefaultEditor, SetDefaultRenderer, SetDefaultRowSize, SetGridCursor, SetGridLineColour, SetLabelBackgroundColour, SetLabelFont, SetLabelTextColour, SetMargins, SetReadOnly, SetRowAttr, SetRowLabelAlignment, SetRowLabelSize, SetRowLabelValue, SetRowMinimalAcceptableHeight, SetRowMinimalHeight, SetRowSize, SetScrollLineX, SetScrollLineY, SetSelectionBackground, SetSelectionForeground, SetSelectionMode, SetTable, ShowCellEditControl, XToCol, XToEdgeOfCol, XYToCell, YToEdgeOfRow, YToRow, __repr__

Inherited from wx._windows.ScrolledWindow: AdjustScrollbars, CalcScrollInc, CalcScrolledPosition, CalcUnscrolledPosition, DoPrepareDC, EnableScrolling, GetScaleX, GetScaleY, GetScrollPageSize, GetScrollPixelsPerUnit, GetTargetWindow, GetViewStart, Scroll, SetScale, SetScrollPageSize, SetScrollRate, SetScrollbars, SetTargetWindow

Inherited from wx._windows.Panel: SetFocusIgnoringChildren

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, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, 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, 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 major.MajorMode: OnContextMenu, OnUpdateUI, OnUpdateUIHook, __del__, applySettings, createEditWindow, createEventBindings, createEventBindingsPostHook, createListeners, createStatusBarInfo, createStatusIcons, createWindowPostHook, deleteWindow, deleteWindowPostHook, deleteWindowPre, deleteWindowPreHook, findMinorMode, focus, focusPostHook, getIcon, getPopupActions, getStatusBarWidths, getTabName, getTitle, getWelcomeMessage, idleHandler, idlePostHook, loadMinorModesPostHook, removeListeners, removeMinibuffer, resetStatusBar, save, savePostHook, savePreHook, setMinibuffer, setStatusText, settingsChanged, showBusy, showInitialPosition, showModified, tabActivatedHook, updateAui

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

Class Methods

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

Inherited from debug.debugmixin: dprint

Static Methods

Inherited from wx.grid.Grid: GetClassDefaultAttributes

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

Class Variables
  keyword = 'HexEdit'
The single-word keyword representing this major mode
  emacs_synonyms = 'hexl'
If there are additional emacs synonyms for this mode, list them here as a string for a single synonym, or in a list of strings for multiple.
  icon = 'icons/tux.png'
Pointer to the icon representing this major mode
  mimetype = 'application/octet-stream'
The VFS also provides metadata, including MIME type, and the MIME types supported by the major mode can be listed here.
  classprefs = <peppy.lib.userparams.PrefsProxy object at 0x7b05...

Inherited from wx.grid.Grid: SelectCells, SelectColumns, SelectRows, wxGridSelectCells, wxGridSelectColumns, wxGridSelectRows

Inherited from major.MajorMode: allow_threaded_loading, debuglevel, default_classprefs, localkeymaps, preferences_tab, regex, temporary

Inherited from lib.userparams.ClassPrefs: preferences_sort_weight

Properties

Inherited from wx.grid.Grid: BatchCount, CellHighlightColour, CellHighlightPenWidth, CellHighlightROPenWidth, CellSize, ColLabelAlignment, ColLabelSize, ColLabelTextOrientation, ColMinimalAcceptableWidth, DefaultCellAlignment, DefaultCellBackgroundColour, DefaultCellFont, DefaultCellOverflow, DefaultCellTextColour, DefaultColLabelSize, DefaultColSize, DefaultEditor, DefaultGridLinePen, DefaultRenderer, DefaultRowLabelSize, DefaultRowSize, GridColLabelWindow, GridCornerLabelWindow, GridCursorCol, GridCursorRow, GridLineColour, GridRowLabelWindow, GridWindow, LabelBackgroundColour, LabelFont, LabelTextColour, NumberCols, NumberRows, RowLabelAlignment, RowLabelSize, RowMinimalAcceptableHeight, ScrollLineX, ScrollLineY, SelectedCells, SelectedCols, SelectedRows, SelectionBackground, SelectionBlockBottomRight, SelectionBlockTopLeft, SelectionForeground, SelectionMode, Table, thisown

Inherited from wx._windows.ScrolledWindow: ScaleX, ScaleY, TargetWindow, ViewStart

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

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

 

Create the HexEdit viewer

Returns: EvtHandler
Overrides: object.__init__

createPostHook(self)

 

Hook called when everything has been created.

This hook is called just before control is returned to the main application loop, i.e. after the edit window, minor modes, and all bindings and other hooks are called.

Overrides: major.MajorMode.createPostHook
(inherited documentation)

createListenersPostHook(self)

 

Hook to add custom listeners.

Subclasses should override this method rather than createListeners to add their own listeners.

Overrides: major.MajorMode.createListenersPostHook
(inherited documentation)

removeListenersPostHook(self)

 

Hook to remove custom listeners.

Any listeners added by subclasses in createListenersPostHook should be removed here.

Overrides: major.MajorMode.removeListenersPostHook
(inherited documentation)

Update(self, stc=None, format=None, col_labels=None)

 

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.

Overrides: wx._core.Window.Update
(inherited documentation)

GotoPos(self, pos)

 

Move the cursor to the specified position and scroll the position into the view if necessary.

Overrides: stcinterface.STCInterface.GotoPos
(inherited documentation)

addUpdateUIEvent(self, callback)

 

Add the equivalent to STC_UPDATEUI event for UI changes.

The STC supplies the EVT_STC_UPDATEUI event that fires for every change that could be used to update the user interface: a text change, a style change, or a selection change. If the editing (viewing) window does not use the STC to display information, you should supply the equivalent event for the edit window.

Parameters:
  • callback - event handler to execute on event

Class Variable Details

classprefs

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