phoenix_title wx.lib.agw.scrolledthumbnail.Thumb

This is an auxiliary class, to handle single thumbnail information for every thumb.

Used internally.


class_hierarchy Class Hierarchy

Inheritance diagram for class Thumb:

method_summary Methods Summary

__init__

Default class constructor.

BreakCaption

Breaks the caption in several lines of text (if needed).

GetBitmap

Returns the bitmap of the thumbnail

GetCaption

Returns the caption associated to a thumbnail.

GetCaptionLinesCount

Returns the number of lines for the caption.

GetCreationDate

Returns the file last modification date associated to a thumbnail.

GetDisplayFileSize

Return printable file size (with bytes, Kb, Mb suffix).

GetFileName

Returns the file name associated with this thumbnail.

GetFileSize

Returns the file size in bytes associated to a thumbnail.

GetFullFileName

Returns the full filename of the thumbnail.

GetHighlightBitmap

Returned highlighted bitmap of thumbnail.

GetId

Returns the thumbnail identifier.

GetImage

Returns the thumbnail image.

GetInfo

Returns info for thumbnain in display format.

GetOriginalSize

Returns a tuple containing the original image width and height, in pixels.

GetThumbnail

Returns the wx.Image of the thumbnail

LoadImage

Load image using imagehandler.

Rotate

Rotate image using imagehandler.

SetCaption

Sets the thumbnail caption.

SetFileName

Sets the file name associated with this thumbnail.

SetId

Sets the thumbnail identifier.

SetImage

Sets the thumbnail image.


api Class API

class Thumb(object)

This is an auxiliary class, to handle single thumbnail information for every thumb.

Used internally.


Methods

__init__(self, folder, filename, caption="", size=0, lastmod=0, imagehandler=None)

Default class constructor.

Parameters
  • folder – the directory containing the images;

  • filename – a file containing an image;

  • caption – the thumbnail caption string;

  • size – the file size;

  • lastmod – the file last modification time.



BreakCaption(self, width)

Breaks the caption in several lines of text (if needed).

Parameters

width – the maximum width, in pixels, available for the caption text.



GetBitmap(self, width, height)

Returns the bitmap of the thumbnail

Parameters
  • width – the associated bitmap width;

  • height – the associated bitmap height.



GetCaption(self, line)

Returns the caption associated to a thumbnail.

Parameters

line – the caption line we wish to retrieve (useful for multilines caption strings).



GetCaptionLinesCount(self, width)

Returns the number of lines for the caption.

Parameters

width – the maximum width, in pixels, available for the caption text.



GetCreationDate(self)

Returns the file last modification date associated to a thumbnail.



GetDisplayFileSize(self)

Return printable file size (with bytes, Kb, Mb suffix).



GetFileName(self)

Returns the file name associated with this thumbnail.



GetFileSize(self)

Returns the file size in bytes associated to a thumbnail.



GetFullFileName(self)

Returns the full filename of the thumbnail.



GetHighlightBitmap(self, width, height, factor)

Returned highlighted bitmap of thumbnail.



GetId(self)

Returns the thumbnail identifier.



GetImage(self)

Returns the thumbnail image.



GetInfo(self)

Returns info for thumbnain in display format.



GetOriginalSize(self)

Returns a tuple containing the original image width and height, in pixels.



GetThumbnail(self, width, height)

Returns the wx.Image of the thumbnail

Parameters
  • width – the associated bitmap width;

  • height – the associated bitmap height.



LoadImage(self)

Load image using imagehandler.



Rotate(self, angle)

Rotate image using imagehandler.



SetCaption(self, caption="")

Sets the thumbnail caption.

Parameters

caption – the thumbnail caption string.



SetFileName(self, filename)

Sets the file name associated with this thumbnail.

Parameters

filename – the file containing the image.



SetId(self, id=-1)

Sets the thumbnail identifier.

Parameters

id – an integer specifying the thumbnail identifier.



SetImage(self, image)

Sets the thumbnail image.

Parameters

image – a wx.Image object.