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 
29 namespace Common {
30 
31 class SeekableReadStream;
32 
33 } // End of namespace Common
34 
35 namespace Graphics {
36 
37 class Palette;
38 struct Surface;
39 
40 } // End of namespace Graphics
41 
42 namespace GUI {
43 
44 class Dialog;
45 
46 enum ImageAlbumImageOrientation {
47  kImageAlbumImageOrientationUnspecified,
48 
49  kImageAlbumImageOrientationLandscape,
50  kImageAlbumImageOrientationPortrait,
51 };
52 
53 enum 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 
73 public:
74  virtual ~ImageAlbumImageSupplier();
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 
107  virtual Common::SeekableReadStream *createReadStreamForSlot(uint slot) = 0;
108 
113  virtual uint getNumSlots() const = 0;
114 
119  virtual Common::U32String getDefaultFileNameForSlot(uint slot) const = 0;
120 };
121 
122 Dialog *createImageAlbumDialog(const Common::U32String &title, ImageAlbumImageSupplier *imageSupplier, uint initialSlot);
123 
124 } // End of namespace GUI
125 
126 #endif
Common::Rational _vdpi
Vertical DPI of the image.
Definition: imagealbum-dialog.h:66
Definition: surface.h:67
Definition: stream.h:745
Common::Rational _hdpi
Horizontal DPI of the image.
Definition: imagealbum-dialog.h:65
Definition: system.h:46
Definition: rational.h:40
Definition: ustr.h:57
Definition: algorithm.h:29
Definition: formatinfo.h:28
ImageAlbumViewTransformation _viewTransformation
Transformation required to present the image at its normal intended viewing orientation.
Definition: imagealbum-dialog.h:63
ImageAlbumImageOrientation _orientation
Orientation of the image after view transformation.
Definition: imagealbum-dialog.h:64
Definition: dialog.h:49
Simple class for handling a palette data.
Definition: palette.h:45
Definition: imagealbum-dialog.h:60
Interface that supplies images to the image album dialog.
Definition: imagealbum-dialog.h:72
Definition: atari-screen.h:44