Package wx :: Package lib :: Package agw :: Module thumbnailctrl :: Class ScrolledThumbnail

[frames | no frames]

## Type ScrolledThumbnail

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
                     Panel --+
                             |
                ScrolledWindow --+
                                 |
                                ScrolledThumbnail

Method Summary
| ``__init__`(self, parent, id, pos, size, thumboutline, thumbfilter)` Default class constructor.
| ``CalculateBestCaption`(self, dc, caption, sw, width)` Calculate the best caption based on the actual zoom.
| ``Clear`(self)` Clears ThumbnailCtrl.
| ``DeleteFiles`(self)` Deletes the selected thumbs and their associated files.
| ``DrawThumbnail`(self, bmp, thumb, index)` Draws the visible thumbnails.
| ``EnableDragging`(self, enable)` Enables/disables thumbs drag and drop.
| ``EnableToolTips`(self, enable)` Globally enables/disables thumb file information.
| ``GetCaption`(self)` Not used at present.
| ``GetCaptionFont`(self)` Returns the font for all the thumb captions.
| ``GetCaptionHeight`(self, begRow, count)` Returns the height for the file name caption.
| ``GetGlobalPopupMenu`(self)` Returns global thumbs popup menu (no need of thumb selection).
| ``GetHighlightPointed`(self)` Returns whether the thumb pointed should be highlighted or not.
| ``GetItem`(self, index)` Returns the item at position "index".
| ``GetItemCount`(self)` Returns the number of thumbs.
| ``GetItemIndex`(self, x, y)` Returns the thumb index at position (x, y).
| ``GetOriginalImage`(self, index)` Returns the bitmap associated to a thumb.
| ``GetPaintRect`(self)` Returns the Paint bounding rect for the OnPaint() method.
| ``GetPointed`(self)` Returns the pointed thumb index.
| ``GetPointedItem`(self)` Returns the pointed thumb.
| ``GetPopupMenu`(self)` Returns thumbs popup menu when at least one thumb is selected.
| ``GetSelectedItem`(self, index)` Returns the selected thumb.
| ``GetSelection`(self, selIndex)` Returns the selected thumb.
| ``GetSelectionColour`(self)` Returns the colour used to indicate a selected thumb.
| ``GetShowDir`(self)` Returns the working directory with images.
| ``GetThumbBorder`(self)` Returns the thumb border.
| ``GetThumbHeight`(self)` Returns the thumb height.
| ``GetThumbInfo`(self, thumb)` Returns thumbs information.
| ``GetThumbOutline`(self)` Returns the thumb outline style on selection.
| ``GetThumbSize`(self)` Returns the thumb size as width, height and border.
| ``GetThumbWidth`(self)` Returns the thumb width.
| ``GetZoomFactor`(self)` Returns the zoom factor.
| ``InsertItem`(self, thumb, pos)` Inserts thumb in the specified position "pos".
| ``IsAudio`(self, fname)` Not used at present.
| ``IsAudioVideo`(self, fname)` Not used at present.
| ``IsSelected`(self, indx)` Returns whether a thumb is selected or not.
| ``IsVideo`(self, fname)` Not used at present.
| ``ListDirectory`(self, directory, fileExtList)` Gets list of file info objects for files of particular extensions.
| ``LoadImages`(self, newfile, imagecount)` Threaded method to load images.
| ``OnChar`(self, event)` Handles the wx.EVT_CHAR event for ThumbnailCtrl.
| ``OnMouseDClick`(self, event)` Handles the wx.EVT_LEFT_DCLICK event for ThumbnailCtrl.
| ``OnMouseDown`(self, event)` Handles the wx.EVT_LEFT_DOWN and wx.EVT_RIGHT_DOWN events for ThumbnailCtrl.
| ``OnMouseLeave`(self, event)` Handles the wx.EVT_LEAVE_WINDOW event for ThumbnailCtrl.
| ``OnMouseMove`(self, event)` Handles the wx.EVT_MOTION event for ThumbnailCtrl.
| ``OnMouseUp`(self, event)` Handles the wx.EVT_LEFT_UP and wx.EVT_RIGHT_UP events for ThumbnailCtrl.
| ``OnMouseWheel`(self, event)` Handles the wx.EVT_MOUSEWHEEL event for ThumbnailCtrl.
| ``OnPaint`(self, event)` Handles the wx.EVT_PAINT event for ThumbnailCtrl.
| ``OnResize`(self, event)` Handles the wx.EVT_SIZE event for ThumbnailCtrl.
| ``OnThumbChanged`(self, event)` Handles the wxEVT_THUMBNAILS_THUMB_CHANGED event for ThumbnailCtrl.
| ``RemoveItemAt`(self, pos, count)` Removes thumbs in the specified position "pos".
| ``Rotate`(self, angle)` Rotates the selected thumbs by the angle specified by "angle" (in degrees!!!).
| ``ScrollToSelected`(self)` Scrolls the wx.ScrolledWindow to the thumb selected.
| ``SetCaption`(self, caption)` Not used at present.
| ``SetCaptionFont`(self, font)` Sets the font for all the thumb captions.
| ``SetGlobalPopupMenu`(self, gpmenu)` Sets global thumbs popup menu (no need of thumb selection).
| ``SetHighlightPointed`(self, highlight)` Sets whether the thumb pointed should be highlighted or not.
| ``SetLabelControl`(self, statictext)` Not used at present.
| ``SetOrientation`(self, orient)` Not used at present.
| ``SetPopupMenu`(self, menu)` Sets thumbs popup menu when at least one thumb is selected.
| ``SetSelection`(self, value)` Sets thumb selection.
| ``SetSelectionColour`(self, colour)` Sets the colour used to indicate a selected thumb.
| ``SetThumbOutline`(self, outline)` Sets the thumb outline style on selection.
| ``SetThumbSize`(self, width, height, border)` Sets the thumb size as width, height and border.
| ``SetZoomFactor`(self, zoom)` Sets the zoom factor.
| ``ShowDir`(self, dir, filter)` Shows thumbnails for a particular folder.
| ``ShowFileNames`(self, show)` Sets whether the user wants to show file names under the thumbs or not.
| ``SortItems`(self)` Sorts the items accordingly to the cmpthumb function.
| ``ThreadImage`(self, filenames)` Threaded method to load images.
| ``UpdateItems`(self)` Updates thumb items.
| ``UpdateProp`(self, checkSize)` Updates ThumbnailCtrl wx.ScrolledWindow and visible thumbs.
| ``UpdateShow`(self)` Updates thumb items.
| ``ZoomIn`(self)` Zooms the thumbs in.
| ``ZoomOut`(self)` Zooms the thumbs out.

Property Summary

Instance Method Details

### __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), thumboutline=4, thumbfilter=1)
(Constructor)

    Default class constructor. Non-default parameters are:
    - thumboutline: outline style for ThumbnailCtrl, which may be:
      a) THUMB_OUTLINE_NONE: no outline is drawn on selection;
      b) THUMB_OUTLINE_FULL: full outline (image+caption) is drawn on
         selection;
      c) THUMB_OUTLINE_RECT: only thimb bounding rect is drawn on selection
         (default);
      d) THUMB_OUTLINE_IMAGE: only image bounding rect is drwan.

    - thumbfilter: filter for image/video/audio files. Actually only
      THUMB_FILTER_IMAGES is implemented.

  Overrides:
    `wx.ScrolledWindow.__init__`

### CalculateBestCaption(self, dc, caption, sw, width)

Calculate the best caption based on the actual zoom.

### Clear(self)

Clears ThumbnailCtrl.

### DeleteFiles(self)

Deletes the selected thumbs and their associated files. Be careful!!!

### DrawThumbnail(self, bmp, thumb, index)

Draws the visible thumbnails.

### EnableDragging(self, enable=True)

Enables/disables thumbs drag and drop.

### EnableToolTips(self, enable=True)

Globally enables/disables thumb file information.

### GetCaption(self)

Not used at present.

### GetCaptionFont(self)

Returns the font for all the thumb captions.

### GetCaptionHeight(self, begRow, count=1)

Returns the height for the file name caption.

### GetGlobalPopupMenu(self)

Returns global thumbs popup menu (no need of thumb selection).

### GetHighlightPointed(self)

Returns whether the thumb pointed should be highlighted or not. Please be aware that this functionality may be slow on slower computers.

### GetItem(self, index)

Returns the item at position "index".

### GetItemCount(self)

Returns the number of thumbs.

### GetItemIndex(self, x, y)

Returns the thumb index at position (x, y).

### GetOriginalImage(self, index=None)

Returns the bitmap associated to a thumb.

### GetPaintRect(self)

Returns the Paint bounding rect for the OnPaint() method.

### GetPointed(self)

Returns the pointed thumb index.

### GetPointedItem(self)

Returns the pointed thumb.

### GetPopupMenu(self)

Returns thumbs popup menu when at least one thumb is selected.

### GetSelectedItem(self, index)

Returns the selected thumb.

### GetSelection(self, selIndex=-1)

Returns the selected thumb.

### GetSelectionColour(self)

Returns the colour used to indicate a selected thumb.

### GetShowDir(self)

Returns the working directory with images.

### GetThumbBorder(self)

Returns the thumb border.

### GetThumbHeight(self)

Returns the thumb height.

### GetThumbInfo(self, thumb=-1)

Returns thumbs information.

### GetThumbOutline(self)

Returns the thumb outline style on selection.

### GetThumbSize(self)

Returns the thumb size as width, height and border.

### GetThumbWidth(self)

Returns the thumb width.

### GetZoomFactor(self)

Returns the zoom factor.

### InsertItem(self, thumb, pos)

Inserts thumb in the specified position "pos".

### IsAudio(self, fname)

Not used at present.

### IsAudioVideo(self, fname)

Not used at present.

### IsSelected(self, indx)

Returns whether a thumb is selected or not.

### IsVideo(self, fname)

Not used at present.

### ListDirectory(self, directory, fileExtList)

Gets list of file info objects for files of particular extensions.

### LoadImages(self, newfile, imagecount)

Threaded method to load images. Used internally.

### OnChar(self, event)

Handles the wx.EVT_CHAR event for ThumbnailCtrl. You have these choices:

1. "d" key rotates 90 degrees clockwise the selected thumbs;
2. "s" key rotates 90 degrees counter-clockwise the selected thumbs;
3. "a" key rotates 180 degrees the selected thumbs;
4. "Del" key deletes the selected thumbs;
5. "+" key zooms in;
6. "-" key zooms out.

### OnMouseDClick(self, event)

Handles the wx.EVT_LEFT_DCLICK event for ThumbnailCtrl.

### OnMouseDown(self, event)

Handles the wx.EVT_LEFT_DOWN and wx.EVT_RIGHT_DOWN events for ThumbnailCtrl.

### OnMouseLeave(self, event)

Handles the wx.EVT_LEAVE_WINDOW event for ThumbnailCtrl.

### OnMouseMove(self, event)

Handles the wx.EVT_MOTION event for ThumbnailCtrl.

### OnMouseUp(self, event)

Handles the wx.EVT_LEFT_UP and wx.EVT_RIGHT_UP events for ThumbnailCtrl.

### OnMouseWheel(self, event)

Handles the wx.EVT_MOUSEWHEEL event for ThumbnailCtrl. If you hold down the ctrl key, you can zoom in/out with the mouse wheel.

### OnPaint(self, event)

Handles the wx.EVT_PAINT event for ThumbnailCtrl.

### OnResize(self, event)

Handles the wx.EVT_SIZE event for ThumbnailCtrl.

### OnThumbChanged(self, event)

Handles the wxEVT_THUMBNAILS_THUMB_CHANGED event for ThumbnailCtrl.

### RemoveItemAt(self, pos, count)

Removes thumbs in the specified position "pos".

### Rotate(self, angle=90)

Rotates the selected thumbs by the angle specified by "angle" (in degrees!!!).

### ScrollToSelected(self)

Scrolls the wx.ScrolledWindow to the thumb selected.

### SetCaption(self, caption='')

Not used at present.

### SetCaptionFont(self, font=None)

Sets the font for all the thumb captions.

### SetGlobalPopupMenu(self, gpmenu)

Sets global thumbs popup menu (no need of thumb selection).

### SetHighlightPointed(self, highlight=True)

Sets whether the thumb pointed should be highlighted or not. Please be aware that this functionality may be slow on slower computers.

### SetLabelControl(self, statictext)

Not used at present.

### SetOrientation(self, orient=8)

Not used at present.

### SetPopupMenu(self, menu)

Sets thumbs popup menu when at least one thumb is selected.

### SetSelection(self, value=-1)

Sets thumb selection.

### SetSelectionColour(self, colour=None)

Sets the colour used to indicate a selected thumb.

### SetThumbOutline(self, outline)

Sets the thumb outline style on selection.

### SetThumbSize(self, width, height, border=6)

Sets the thumb size as width, height and border.

### SetZoomFactor(self, zoom=1.3999999999999999)

Sets the zoom factor.

### ShowDir(self, dir, filter=1)

Shows thumbnails for a particular folder.

### ShowFileNames(self, show=True)

Sets whether the user wants to show file names under the thumbs or not.

### SortItems(self)

Sorts the items accordingly to the cmpthumb function.

### ThreadImage(self, filenames)

Threaded method to load images. Used internally.

### UpdateItems(self)

Updates thumb items.

### UpdateProp(self, checkSize=True)

Updates ThumbnailCtrl wx.ScrolledWindow and visible thumbs.

### UpdateShow(self)

Updates thumb items.

### ZoomIn(self)

Zooms the thumbs in.

### ZoomOut(self)

Zooms the thumbs out.

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:52:03 2009 | http://epydoc.sf.net