ScummVM API documentation
imagealbum-dialog.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef IMAGEALBUM_DIALOG_H
23#define IMAGEALBUM_DIALOG_H
24
25#include "common/formats/formatinfo.h"
26#include "common/str.h"
27#include "common/rational.h"
28
29namespace Common {
30
31class SeekableReadStream;
32
33} // End of namespace Common
34
35namespace Graphics {
36
37class Palette;
38struct Surface;
39
40} // End of namespace Graphics
41
42namespace GUI {
43
44class Dialog;
45
46enum ImageAlbumImageOrientation {
47 kImageAlbumImageOrientationUnspecified,
48
49 kImageAlbumImageOrientationLandscape,
50 kImageAlbumImageOrientationPortrait,
51};
52
53enum ImageAlbumViewTransformation {
54 kImageAlbumViewTransformationNone,
55 kImageAlbumViewTransformationRotate90CCW,
56 kImageAlbumViewTransformationRotate90CW,
57 kImageAlbumViewTransformationRotate180,
58};
59
61 ImageAlbumImageMetadata() : _orientation(kImageAlbumImageOrientationUnspecified), _viewTransformation(kImageAlbumViewTransformationNone), _hdpi(72, 1), _vdpi(72, 1) {}
62
63 ImageAlbumViewTransformation _viewTransformation;
64 ImageAlbumImageOrientation _orientation;
67};
68
73public:
75
85 virtual bool loadImageSlot(uint slot, const Graphics::Surface *&outSurface, bool &outHasPalette, Graphics::Palette &outPalette, ImageAlbumImageMetadata &outMetadata) = 0;
86
91 virtual void releaseImageSlot(uint slot) = 0;
92
100 virtual bool getFileFormatForImageSlot(uint slot, Common::FormatInfo::FormatID &outFormat) const = 0;
101
108
113 virtual uint getNumSlots() const = 0;
114
119 virtual Common::U32String getDefaultFileNameForSlot(uint slot) const = 0;
120};
121
122Dialog *createImageAlbumDialog(const Common::U32String &title, ImageAlbumImageSupplier *imageSupplier, uint initialSlot);
123
124} // End of namespace GUI
125
126#endif
Definition: rational.h:40
Definition: stream.h:745
Definition: ustr.h:57
Definition: dialog.h:49
Interface that supplies images to the image album dialog.
Definition: imagealbum-dialog.h:72
virtual void releaseImageSlot(uint slot)=0
Releases any resources for an image loaded with loadImageSlot.
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.
virtual bool getFileFormatForImageSlot(uint slot, Common::FormatInfo::FormatID &outFormat) const =0
virtual uint getNumSlots() const =0
Returns the number of image slots.
virtual Common::SeekableReadStream * createReadStreamForSlot(uint slot)=0
Opens a slot as a read stream containing raw file data.
virtual Common::U32String getDefaultFileNameForSlot(uint slot) const =0
Returns the default filename, including extension, for the specified slot.
Simple class for handling a palette data.
Definition: palette.h:61
Definition: atari-screen.h:42
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: imagealbum-dialog.h:60
ImageAlbumViewTransformation _viewTransformation
Transformation required to present the image at its normal intended viewing orientation.
Definition: imagealbum-dialog.h:63
Common::Rational _hdpi
Horizontal DPI of the image.
Definition: imagealbum-dialog.h:65
ImageAlbumImageOrientation _orientation
Orientation of the image after view transformation.
Definition: imagealbum-dialog.h:64
Common::Rational _vdpi
Vertical DPI of the image.
Definition: imagealbum-dialog.h:66
Definition: surface.h:67