AGW Logo

agw_title Thumb

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

Used internally.

hierarchy Inheritance Diagram

Inheritance diagram for: Thumb

Inheritance diagram of Thumb


method_summary Methods Summary

__init__Default class constructor.
BreakCaptionBreaks the caption in several lines of text (if needed).
GetBitmapReturns the associated bitmap.
GetCaptionReturns the caption associated to a thumbnail.
GetCaptionLinesCountReturns the number of lines for the caption.
GetCreationDateReturns the file last modification date associated to a thumbnail.
GetFileNameReturns the file name associated with this thumbnail.
GetFileSizeReturns the file size associated to a thumbnail.
GetFullFileNameReturns the full filename of the thumbnail.
GetIdReturns the thumbnail identifier.
GetImageReturns the thumbnail image.
GetOriginalImageReturns the bitmap associated to a thumbnail, as a file name.
GetOriginalSizeReturns a tuple containing the original image width and height, in pixels.
GetRotatedImageReturns a rotated image.
GetRotationReturns the thumbnail rotation, in radians.
SetBitmapSets the thumbnail bitmap.
SetCaptionSets the thumbnail caption.
SetFileNameSets the file name associated with this thumbnail.
SetIdSets the thumbnail identifier.
SetImageSets the thumbnail image.
SetRotatedImageSets the image as rotated (fast).
SetRotationSets the thumbnail rotation.

API Class API

class Thumb(object)[source]

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

Used internally.



__init__(parent, folder, filename, caption='', size=0, lastmod=0)[source]

Default class constructor.

Parameters:
  • parent – the main ThumbnailCtrl window;
  • 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(width)[source]

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

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


GetBitmap(width, height)[source]

Returns the associated bitmap.

Parameters:
  • width – the associated bitmap width;
  • height – the associated bitmap height.


GetCaption(line)[source]

Returns the caption associated to a thumbnail.

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


GetCaptionLinesCount(width)[source]

Returns the number of lines for the caption.

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


GetCreationDate()[source]

Returns the file last modification date associated to a thumbnail.



GetFileName()[source]

Returns the file name associated with this thumbnail.



GetFileSize()[source]

Returns the file size associated to a thumbnail.



GetFullFileName()[source]

Returns the full filename of the thumbnail.



GetId()[source]

Returns the thumbnail identifier.



GetImage()[source]

Returns the thumbnail image.



GetOriginalImage()[source]

Returns the bitmap associated to a thumbnail, as a file name.



GetOriginalSize()[source]

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



GetRotatedImage()[source]

Returns a rotated image.



GetRotation()[source]

Returns the thumbnail rotation, in radians.



SetBitmap(bmp)[source]

Sets the thumbnail bitmap.

Parameters:bmp – a wx.Bitmap object.


SetCaption(caption='')[source]

Sets the thumbnail caption.

Parameters:caption – the thumbnail caption string.


SetFileName(filename)[source]

Sets the file name associated with this thumbnail.

Parameters:filename – the file containing the image.


SetId(id=-1)[source]

Sets the thumbnail identifier.

Parameters:id – an integer specifying the thumbnail identifier.


SetImage(image)[source]

Sets the thumbnail image.

Parameters:image – a wx.Image object.


SetRotatedImage(image)[source]

Sets the image as rotated (fast).

Parameters:image – the rotated image, an instance of wx.Image.



SetRotation(angle=0)[source]

Sets the thumbnail rotation.

Parameters:angle – the thumbnail rotation, in radians.
Tree

Table Of Contents

Previous topic

ScrolledThumbnail

Next topic

ThumbnailCtrl