reduce verbosity
[gnash.git] / libcore / BitmapMovie.h
blobf2c55e4f48995da30fdc9053ff721d6ad3399501
1 //
2 // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GNASH_BITMAP_MOVIE_H
20 #define GNASH_BITMAP_MOVIE_H
22 #include <string>
23 #include "BitmapMovieDefinition.h"
24 #include "Movie.h" // for inheritance
26 // Forward declarations
27 namespace gnash {
28 class DisplayObject;
31 namespace gnash
35 /// A top-level movie displaying a still bitmap.
37 /// A loaded BitmapMovie is tested in misc-ming.all/loadMovieTest.swf to
38 /// have a DisplayList, so it is appropriate that it inherits from MovieClip.
39 class BitmapMovie : public Movie
42 public:
44 BitmapMovie(as_object* object, const BitmapMovieDefinition* def,
45 DisplayObject* parent);
47 virtual ~BitmapMovie() {}
49 /// BitmapMovies do need an advance method.
51 /// This may be for play() or other inherited methods.
52 virtual void advance() { MovieClip::advance(); }
54 virtual float frameRate() const {
55 return _def->get_frame_rate();
58 virtual size_t widthPixels() const {
59 return _def->get_width_pixels();
62 virtual size_t heightPixels() const {
63 return _def->get_height_pixels();
66 virtual const std::string& url() const {
67 return _def->get_url();
70 virtual int version() const {
71 return _def->get_version();
74 virtual const movie_definition* definition() const {
75 return _def;
78 private:
80 const BitmapMovieDefinition* const _def;
84 } // end of namespace gnash
86 #endif // GNASH_BITMAPMOVIEINSTANCE_H