ScummVM API documentation
GUI::ImageAlbumImageSupplier Class Referenceabstract

Interface that supplies images to the image album dialog. More...

#include <imagealbum-dialog.h>

Public Member Functions

virtual bool loadImageSlot (uint slot, const Graphics::Surface *&outSurface, bool &outHasPalette, Graphics::Palette &outPalette, ImageAlbumImageMetadata &outMetadata)=0
 Loads and returns the image for a specified slot. More...
 
virtual void releaseImageSlot (uint slot)=0
 Releases any resources for an image loaded with loadImageSlot. More...
 
virtual bool getFileFormatForImageSlot (uint slot, Common::FormatInfo::FormatID &outFormat) const =0
 
virtual Common::SeekableReadStreamcreateReadStreamForSlot (uint slot)=0
 Opens a slot as a read stream containing raw file data. More...
 
virtual uint getNumSlots () const =0
 Returns the number of image slots. More...
 
virtual Common::U32String getDefaultFileNameForSlot (uint slot) const =0
 Returns the default filename, including extension, for the specified slot. More...
 

Detailed Description

Interface that supplies images to the image album dialog.

Member Function Documentation

◆ loadImageSlot()

virtual bool GUI::ImageAlbumImageSupplier::loadImageSlot ( uint  slot,
const Graphics::Surface *&  outSurface,
bool &  outHasPalette,
Graphics::Palette outPalette,
ImageAlbumImageMetadata outMetadata 
)
pure virtual

Loads and returns the image for a specified slot.

Parameters
slotThe image slot to load
outSurfaceAn outputted pointer to a surface containing the image data
outHasPaletteAn outputted boolean containing true if the image has a palette and false if not
outPaletteOutputted palette colors if the image has a palette
outMetadataOutputted metadata for the image
Returns
True if the image loaded successfully, false if it failed

◆ releaseImageSlot()

virtual void GUI::ImageAlbumImageSupplier::releaseImageSlot ( uint  slot)
pure virtual

Releases any resources for an image loaded with loadImageSlot.

Parameters
slotThe image slot to release

◆ getFileFormatForImageSlot()

virtual bool GUI::ImageAlbumImageSupplier::getFileFormatForImageSlot ( uint  slot,
Common::FormatInfo::FormatID &  outFormat 
) const
pure virtual

Returns the file format of the image in the specified image slot, if it's capable of being loaded as raw file data.

Parameters
slotThe image slot to load
outFormatA reference to a file format ID to set to the file format
Returns
true if the slot is loadable as raw data and has a MIME type available, false if not

◆ createReadStreamForSlot()

virtual Common::SeekableReadStream* GUI::ImageAlbumImageSupplier::createReadStreamForSlot ( uint  slot)
pure virtual

Opens a slot as a read stream containing raw file data.

Parameters
slotThe image slot to load
Returns
The created read stream, if it could be created, or nullptr if it failed

◆ getNumSlots()

virtual uint GUI::ImageAlbumImageSupplier::getNumSlots ( ) const
pure virtual

Returns the number of image slots.

Returns
The number of slots

◆ getDefaultFileNameForSlot()

virtual Common::U32String GUI::ImageAlbumImageSupplier::getDefaultFileNameForSlot ( uint  slot) const
pure virtual

Returns the default filename, including extension, for the specified slot.

Returns
The filename of the slot without an extension

The documentation for this class was generated from the following file: