Package peppy :: Package plugins :: Module image_mode :: Class ImageViewMode
[frames] | no frames]

Class ImageViewMode

     object --+                        
              |                        
wx._core.Object --+                    
                  |                    
wx._core.EvtHandler --+                
                      |                
        wx._core.Window --+            
                          |            
          wx._windows.Panel --+        
                              |        
     wx._windows.ScrolledWindow --+    
                                  |    
  lib.bitmapscroller.BitmapScroller --+
                                      |
                         object --+   |
                                  |   |
          stcinterface.STCInterface --+
                                      |
                     object --+       |
                              |       |
      lib.userparams.ClassPrefs --+   |
                                  |   |
                     object --+   |   |
                              |   |   |
               debug.debugmixin --+   |
                                  |   |
                    major.MajorMode --+
                                      |
                                     ImageViewMode

Major mode for viewing images. Eventually this may contain more image manipulation commands like rotation, reflection, zooming, etc., but not pixel editing features. Pixel editing features will mean that the image will have to be decompressed into raw pixels. This mode leaves the image in its native format.

Nested Classes

Inherited from major.MajorMode: stc_class

Inherited from lib.userparams.ClassPrefs: __metaclass__

Instance Methods
EvtHandler
__init__(self, parent, wrapper, buffer, frame)
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, ...
 
update(self)
 
createListenersPostHook(self)
Hook to add custom listeners.
 
removeListenersPostHook(self)
Clean up the event manager hook that we needed to find out when the buffer had been changed by some other view of the buffer.
 
underlyingSTCChanged(self, evt)
Update the image when it has been changed by another view of the data.
 
CanCopy(self)
 
Copy(self)
Copy the image to the clipboard by overriding the STC's copy

Inherited from lib.bitmapscroller.BitmapScroller: OnMouseEvent, OnPaint, OnPaintHook, autoScroll, autoScrollCallback, blankCursor, convertEventCoords, copyToClipboard, endActiveSelector, getActiveSelector, getBoundedCoords, getImageCoords, getSelectorCoordsOnImage, inOrigImage, isEventInClientArea, isInBounds, setBitmap, setCrop, setCursor, setImage, setSelector, startSelector, zoomIn, zoomOut

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

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, 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: AddRefDocument, CanCut, CanEdit, CanPaste, CanRedo, CanSave, CanUndo, Clear, CreateDocument, Cut, EmptyUndoBuffer, GetBinaryData, GetFoldColumn, GetFoldLevel, GetLength, GetModify, GetPrevLineIndentation, GetText, GetTextLength, GotoPos, GuessBinary, Paste, Redo, ReleaseDocument, SetDocPointer, SetSavePoint, Undo, getShortDisplayName, open, openSuccess, prepareEncoding, readFrom, showStyle, writeTo

Inherited from major.MajorMode: OnContextMenu, OnUpdateUI, OnUpdateUIHook, __del__, applySettings, createEditWindow, createEventBindings, createEventBindingsPostHook, createListeners, createPostHook, 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._windows.ScrolledWindow: GetClassDefaultAttributes

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

Class Variables
  keyword = 'ImageView'
The single-word keyword representing this major mode
  icon = 'icons/picture.png'
Pointer to the icon representing this major mode
  regex = '\\.(jpg|jpeg|gif|bmp|png|ico)'
Filenames are matched against this regex in the class method verifyFilename when peppy tries to determine which mode to use to edit the file.
  classprefs = <peppy.lib.userparams.PrefsProxy object at 0x8bf6...

Inherited from lib.bitmapscroller.BitmapScroller: dbg_call_seq

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

Inherited from lib.userparams.ClassPrefs: preferences_sort_weight

Properties

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

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)

 

__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, 
    Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL, 
    String name=PanelNameStr) -> ScrolledWindow

Returns: EvtHandler
Overrides: object.__init__
(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)

 

Clean up the event manager hook that we needed to find out when the buffer had been changed by some other view of the buffer.

Overrides: major.MajorMode.removeListenersPostHook

underlyingSTCChanged(self, evt)

 

Update the image when it has been changed by another view of the data.

Parameters:
  • evt - EVT_STC_MODIFIED event

CanCopy(self)

 
Overrides: stcinterface.STCInterface.CanCopy

Copy(self)

 

Copy the image to the clipboard by overriding the STC's copy

Overrides: stcinterface.STCInterface.Copy

Class Variable Details

classprefs

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