.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2017 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.agw.thumbnailctrl
.. highlight:: python
.. _wx.lib.agw.thumbnailctrl.ScrolledThumbnail:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.thumbnailctrl.ScrolledThumbnail**
==========================================================================================================================================
This is the main class implementation of :class:`ThumbnailCtrl`.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
Inheritance diagram for class
ScrolledThumbnail:
|
|super_classes| Known Superclasses
==================================
:class:`wx.ScrolledWindow`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.__init__` Default class constructor.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.CalculateBestCaption` Calculates the best caption string to show based on the actual zoom factor.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.Clear` Clears :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.DeleteFiles` Deletes the selected thumbnails and their associated files.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.DrawThumbnail` Draws a visible thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.EnableDragging` Enables/disables thumbnails drag and drop.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.EnableToolTips` Globally enables/disables thumbnail file information.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetCaption` Returns the thumbnail caption.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetCaptionFont` Returns the font for all the thumbnail captions.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetCaptionHeight` Returns the height for the file name caption.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetDropShadow` Returns whether to drop a shadow behind thumbnails or not.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetGlobalPopupMenu` Returns the global thumbnailss popup menu (no need of thumbnail selection).
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetHighlightPointed` Returns whether the thumbnail pointed should be highlighted or not.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetItem` Returns the item at position `index`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetItemCount` Returns the number of thumbnails.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetItemIndex` Returns the thumbnail index at position (x, y).
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetOriginalImage` Returns the original image associated to a thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetPaintRect` Returns the paint bounding rect for the :meth:`~ScrolledThumbnail.OnPaint` method.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetPointed` Returns the pointed thumbnail index.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetPointedItem` Returns the pointed thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetPopupMenu` Returns the thumbnails popup menu when at least one thumbnail is selected.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetSelectedItem` Returns the selected thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetSelection` Returns the selected thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetSelectionColour` Returns the colour used to indicate a selected thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetShowDir` Returns the working directory with images.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetThumbBorder` Returns the thumbnail border.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetThumbHeight` Returns the thumbnail height.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetThumbInfo` Returns the thumbnail information.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetThumbOutline` Returns the thumbnail outline style on selection.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetThumbSize` Returns the thumbnail size as width, height and border.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetThumbWidth` Returns the thumbnail width.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.GetZoomFactor` Returns the zoom factor.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.InsertItem` Inserts a thumbnail in the specified position.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.IsAudio` Returns ``True`` if a file contains audio data.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.IsAudioVideo` Returns ``True`` if a file contains either audio or video data.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.IsSelected` Returns whether a thumbnail is selected or not.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.IsVideo` Returns ``True`` if a file contains video data.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ListDirectory` Returns list of file info objects for files of particular extensions.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.LoadImages` Threaded method to load images. Used internally.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnChar` Handles the ``wx.EVT_CHAR`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnMouseDClick` Handles the ``wx.EVT_LEFT_DCLICK`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnMouseDown` Handles the ``wx.EVT_LEFT_DOWN`` and ``wx.EVT_RIGHT_DOWN`` events for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnMouseLeave` Handles the ``wx.EVT_LEAVE_WINDOW`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnMouseMove` Handles the ``wx.EVT_MOTION`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnMouseUp` Handles the ``wx.EVT_LEFT_UP`` and ``wx.EVT_RIGHT_UP`` events for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnMouseWheel` Handles the ``wx.EVT_MOUSEWHEEL`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnPaint` Handles the ``wx.EVT_PAINT`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnResize` Handles the ``wx.EVT_SIZE`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.OnThumbChanged` Handles the ``EVT_THUMBNAILS_THUMB_CHANGED`` event for :class:`ThumbnailCtrl`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.RemoveItemAt` Removes a thumbnail at the specified position.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.Rotate` Rotates the selected thumbnails by the angle specified by `angle`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ScrollToSelected` Scrolls the :class:`ScrolledWindow` to the selected thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetCaption` Sets the current caption string.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetCaptionFont` Sets the font for all the thumbnail captions.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetDropShadow` Sets whether to drop a shadow behind thumbnails or not.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetGlobalPopupMenu` Sets the global thumbnails popup menu (no need of thumbnail selection).
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetHighlightPointed` Sets whether the thumbnail pointed should be highlighted or not.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetLabelControl` Sets the thumbnail label as :class:`StaticText`.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetOrientation` Set the :class:`ThumbnailCtrl` orientation (partially implemented).
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetPopupMenu` Sets the thumbnails popup menu when at least one thumbnail is selected.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetSelection` Sets thumbnail selection.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetSelectionColour` Sets the colour used to indicate a selected thumbnail.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetThumbOutline` Sets the thumbnail outline style on selection.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetThumbSize` Sets the thumbnail size as width, height and border.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SetZoomFactor` Sets the zoom factor.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ShowDir` Shows thumbnails for a particular folder.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ShowFileNames` Sets whether the user wants to show file names under the thumbnails or not.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ShowThumbs` Shows all the thumbnails.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.SortItems` Sorts the items accordingly to the :func:`~CmpThumb` function.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ThreadImage` Threaded method to load images. Used internally.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.UpdateItems` Updates thumbnail items.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.UpdateProp` Updates :class:`ThumbnailCtrl` and its visible thumbnails.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.UpdateShow` Updates thumbnail items.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ZoomIn` Zooms the thumbnails in.
:meth:`~wx.lib.agw.thumbnailctrl.ScrolledThumbnail.ZoomOut` Zooms the thumbnails out.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: ScrolledThumbnail(wx.ScrolledWindow)
This is the main class implementation of :class:`ThumbnailCtrl`.
.. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, thumboutline=THUMB_OUTLINE_IMAGE, thumbfilter=THUMB_FILTER_IMAGES, imagehandler=PILImageHandler)
Default class constructor.
:param `parent`: parent window. Must not be ``None``;
:param `id`: window identifier. A value of -1 indicates a default value;
:param `pos`: the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform;
:param `size`: the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform;
:param `thumboutline`: outline style for :class:`ScrolledThumbnail`, which may be:
=========================== ======= ==================================
Outline Flag Value Description
=========================== ======= ==================================
``THUMB_OUTLINE_NONE`` 0 No outline is drawn on selection
``THUMB_OUTLINE_FULL`` 1 Full outline (image+caption) is drawn on selection
``THUMB_OUTLINE_RECT`` 2 Only thumbnail bounding rectangle is drawn on selection (default)
``THUMB_OUTLINE_IMAGE`` 4 Only image bounding rectangle is drawn.
=========================== ======= ==================================
:param `thumbfilter`: filter for image/video/audio files. Actually only
``THUMB_FILTER_IMAGES`` is implemented;
:param `imagehandler`: can be :class:`PILImageHandler` if PIL is installed (faster), or
:class:`NativeImageHandler` which only uses wxPython image methods.
.. method:: CalculateBestCaption(self, dc, caption, sw, width)
Calculates the best caption string to show based on the actual zoom factor.
:param `dc`: an instance of :class:`wx.DC`;
:param `caption`: the original caption string;
:param `sw`: the maximum width allowed for the caption string, in pixels;
:param `width`: the caption string width, in pixels.
.. method:: Clear(self)
Clears :class:`ThumbnailCtrl`.
.. method:: DeleteFiles(self)
Deletes the selected thumbnails and their associated files.
.. warning:: This method deletes the original files too.
.. method:: DrawThumbnail(self, bmp, thumb, index)
Draws a visible thumbnail.
:param `bmp`: the thumbnail version of the original image;
:param `thumb`: an instance of :class:`Thumb`;
:param `index`: the index of the thumbnail to draw.
.. method:: EnableDragging(self, enable=True)
Enables/disables thumbnails drag and drop.
:param `enable`: ``True`` to enable drag and drop, ``False`` to disable it.
.. method:: EnableToolTips(self, enable=True)
Globally enables/disables thumbnail file information.
:param `enable`: ``True`` to enable thumbnail file information, ``False`` to disable it.
.. method:: GetCaption(self)
Returns the thumbnail caption.
.. method:: GetCaptionFont(self)
Returns the font for all the thumbnail captions.
.. method:: GetCaptionHeight(self, begRow, count=1)
Returns the height for the file name caption.
:param `begRow`: the caption line at which we start measuring the height;
:param `count`: the number of lines to measure.
.. method:: GetDropShadow(self)
Returns whether to drop a shadow behind thumbnails or not.
.. method:: GetGlobalPopupMenu(self)
Returns the global thumbnailss popup menu (no need of thumbnail selection).
.. method:: GetHighlightPointed(self)
Returns whether the thumbnail pointed should be highlighted or not.
.. note:: Please be aware that this functionality may be slow on slower computers.
.. method:: GetItem(self, index)
Returns the item at position `index`.
:param `index`: the thumbnail index position.
.. method:: GetItemCount(self)
Returns the number of thumbnails.
.. method:: GetItemIndex(self, x, y)
Returns the thumbnail index at position (x, y).
:param `x`: the mouse `x` position;
:param `y`: the mouse `y` position.
.. method:: GetOriginalImage(self, index=None)
Returns the original image associated to a thumbnail.
:param `index`: the index of the thumbnail. If defaulted to ``None``, the current
selection is used.
.. method:: GetPaintRect(self)
Returns the paint bounding rect for the :meth:`~ScrolledThumbnail.OnPaint` method.
.. method:: GetPointed(self)
Returns the pointed thumbnail index.
.. method:: GetPointedItem(self)
Returns the pointed thumbnail.
.. method:: GetPopupMenu(self)
Returns the thumbnails popup menu when at least one thumbnail is selected.
.. method:: GetSelectedItem(self, index)
Returns the selected thumbnail.
:param `index`: the thumbnail index (i.e., the selection).
.. method:: GetSelection(self, selIndex=-1)
Returns the selected thumbnail.
:param `selIndex`: if not equal to -1, the index of the selected thumbnail.
.. method:: GetSelectionColour(self)
Returns the colour used to indicate a selected thumbnail.
.. method:: GetShowDir(self)
Returns the working directory with images.
.. method:: GetThumbBorder(self)
Returns the thumbnail border.
.. method:: GetThumbHeight(self)
Returns the thumbnail height.
.. method:: GetThumbInfo(self, thumb=-1)
Returns the thumbnail information.
:param `thumb`: the index of the thumbnail for which we are collecting information.
.. method:: GetThumbOutline(self)
Returns the thumbnail outline style on selection.
.. seealso:: :meth:`~ScrolledThumbnail.SetThumbOutline` for a list of possible return values.
.. method:: GetThumbSize(self)
Returns the thumbnail size as width, height and border.
.. method:: GetThumbWidth(self)
Returns the thumbnail width.
.. method:: GetZoomFactor(self)
Returns the zoom factor.
.. method:: InsertItem(self, thumb, pos)
Inserts a thumbnail in the specified position.
:param `pos`: the index at which we wish to insert the new thumbnail.
.. method:: IsAudio(self, fname)
Returns ``True`` if a file contains audio data.
Currently unused as :class:`ThumbnailCtrl` recognizes only image files.
:param `fname`: a file name.
.. todo:: Find a way to create thumbnails of video, audio and other formats.
.. method:: IsAudioVideo(self, fname)
Returns ``True`` if a file contains either audio or video data.
Currently unused as :class:`ThumbnailCtrl` recognizes only image files.
:param `fname`: a file name.
.. todo:: Find a way to create thumbnails of video, audio and other formats.
.. method:: IsSelected(self, indx)
Returns whether a thumbnail is selected or not.
:param `indx`: the index of the thumbnail to check for selection.
.. method:: IsVideo(self, fname)
Returns ``True`` if a file contains video data.
Currently unused as :class:`ThumbnailCtrl` recognizes only image files.
:param `fname`: a file name.
.. todo:: Find a way to create thumbnails of video, audio and other formats.
.. method:: ListDirectory(self, directory, fileExtList)
Returns list of file info objects for files of particular extensions.
:param `directory`: the folder containing the images to thumbnail;
:param `fileExtList`: a Python list of file extensions to consider.
.. method:: LoadImages(self, newfile, imagecount)
Threaded method to load images. Used internally.
:param `newfile`: a file name containing an image to thumbnail;
:param `imagecount`: the number of images loaded until now.
.. method:: OnChar(self, event)
Handles the ``wx.EVT_CHAR`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`KeyEvent` event to be processed.
.. note:: You have these choices:
(1) ``d`` key rotates 90 degrees clockwise the selected thumbnails;
(2) ``s`` key rotates 90 degrees counter-clockwise the selected thumbnails;
(3) ``a`` key rotates 180 degrees the selected thumbnails;
(4) ``Del`` key deletes the selected thumbnails;
(5) ``+`` key zooms in;
(6) ``-`` key zooms out.
.. method:: OnMouseDClick(self, event)
Handles the ``wx.EVT_LEFT_DCLICK`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: OnMouseDown(self, event)
Handles the ``wx.EVT_LEFT_DOWN`` and ``wx.EVT_RIGHT_DOWN`` events for :class:`ThumbnailCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: OnMouseLeave(self, event)
Handles the ``wx.EVT_LEAVE_WINDOW`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: OnMouseMove(self, event)
Handles the ``wx.EVT_MOTION`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: OnMouseUp(self, event)
Handles the ``wx.EVT_LEFT_UP`` and ``wx.EVT_RIGHT_UP`` events for :class:`ThumbnailCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. method:: OnMouseWheel(self, event)
Handles the ``wx.EVT_MOUSEWHEEL`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`MouseEvent` event to be processed.
.. note:: If you hold down the ``Ctrl`` key, you can zoom in/out with the mouse wheel.
.. method:: OnPaint(self, event)
Handles the ``wx.EVT_PAINT`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`PaintEvent` event to be processed.
.. method:: OnResize(self, event)
Handles the ``wx.EVT_SIZE`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`wx.SizeEvent` event to be processed.
.. method:: OnThumbChanged(self, event)
Handles the ``EVT_THUMBNAILS_THUMB_CHANGED`` event for :class:`ThumbnailCtrl`.
:param `event`: a :class:`ThumbnailEvent` event to be processed.
.. method:: RemoveItemAt(self, pos)
Removes a thumbnail at the specified position.
:param `pos`: the index at which we wish to remove the thumbnail.
.. method:: Rotate(self, angle=90)
Rotates the selected thumbnails by the angle specified by `angle`.
:param `angle`: the rotation angle for the thumbnail, in degrees.
.. method:: ScrollToSelected(self)
Scrolls the :class:`ScrolledWindow` to the selected thumbnail.
.. method:: SetCaption(self, caption="")
Sets the current caption string.
:param `caption`: the current caption string.
.. method:: SetCaptionFont(self, font=None)
Sets the font for all the thumbnail captions.
:param `font`: a valid :class:`wx.Font` object. If defaulted to ``None``, a standard
font will be generated.
.. method:: SetDropShadow(self, drop)
Sets whether to drop a shadow behind thumbnails or not.
:param `drop`: ``True`` to drop a shadow behind each thumbnail, ``False`` otheriwise.
.. method:: SetGlobalPopupMenu(self, gpmenu)
Sets the global thumbnails popup menu (no need of thumbnail selection).
:param `gpmenu`: an instance of :class:`wx.Menu`.
.. method:: SetHighlightPointed(self, highlight=True)
Sets whether the thumbnail pointed should be highlighted or not.
:param `highlight`: ``True`` to enable highlight-on-point with the mouse,
``False`` otherwise.
.. note:: Please be aware that this functionality may be slow on slower computers.
.. method:: SetLabelControl(self, statictext)
Sets the thumbnail label as :class:`StaticText`.
:param `statictext`: an instance of :class:`StaticText`.
.. method:: SetOrientation(self, orient=THUMB_VERTICAL)
Set the :class:`ThumbnailCtrl` orientation (partially implemented).
:param `orient`: one of ``THUMB_VERTICAL``, ``THUMB_HORIZONTAL``.
.. todo:: Correctly implement the ``THUMB_HORIZONTAL`` orientation.
.. method:: SetPopupMenu(self, menu)
Sets the thumbnails popup menu when at least one thumbnail is selected.
:param `menu`: an instance of :class:`wx.Menu`.
.. method:: SetSelection(self, value=-1)
Sets thumbnail selection.
:param `value`: the thumbnail index to select.
.. method:: SetSelectionColour(self, colour=None)
Sets the colour used to indicate a selected thumbnail.
:param `colour`: a valid :class:`wx.Colour` object. If defaulted to ``None``, it
will be taken from the system settings.
.. method:: SetThumbOutline(self, outline)
Sets the thumbnail outline style on selection.
:param `outline`: the outline to use on selection. This can be one of the following
bits:
=========================== ======= ==================================
Outline Flag Value Description
=========================== ======= ==================================
``THUMB_OUTLINE_NONE`` 0 No outline is drawn on selection
``THUMB_OUTLINE_FULL`` 1 Full outline (image+caption) is drawn on selection
``THUMB_OUTLINE_RECT`` 2 Only thumbnail bounding rectangle is drawn on selection (default)
``THUMB_OUTLINE_IMAGE`` 4 Only image bounding rectangle is drawn.
=========================== ======= ==================================
.. method:: SetThumbSize(self, width, height, border=6)
Sets the thumbnail size as width, height and border.
:param `width`: the desired thumbnail width;
:param `height`: the desired thumbnail height;
:param `border`: the spacing between thumbnails.
.. method:: SetZoomFactor(self, zoom=1.4)
Sets the zoom factor.
:param `zoom`: a floating point number representing the zoom factor. Must be
greater than or equal to 1.0.
.. method:: ShowDir(self, folder, filter=THUMB_FILTER_IMAGES)
Shows thumbnails for a particular folder.
:param `folder`: a directory containing the images to thumbnail;
:param `filter`: filter images, video audio (currently implemented only for
images).
.. todo:: Find a way to create thumbnails of video, audio and other formats.
.. method:: ShowFileNames(self, show=True)
Sets whether the user wants to show file names under the thumbnails or not.
:param `show`: ``True`` to show file names under the thumbnails, ``False`` otherwise.
.. method:: ShowThumbs(self, thumbs, caption)
Shows all the thumbnails.
:param `thumbs`: should be a sequence with instances of :class:`Thumb`;
:param `caption`: the caption text for the current selected thumbnail.
.. method:: SortItems(self)
Sorts the items accordingly to the :func:`~CmpThumb` function.
.. method:: ThreadImage(self, filenames)
Threaded method to load images. Used internally.
:param `filenames`: a Python list of file names containing images.
.. method:: UpdateItems(self)
Updates thumbnail items.
.. method:: UpdateProp(self, checkSize=True)
Updates :class:`ThumbnailCtrl` and its visible thumbnails.
:param `checkSize`: ``True`` to update the items visibility if the window
size has changed.
.. method:: UpdateShow(self)
Updates thumbnail items.
.. method:: ZoomIn(self)
Zooms the thumbnails in.
.. method:: ZoomOut(self)
Zooms the thumbnails out.