filters

presentation.h
1/* libppt - library to read PowerPoint presentation
2 Copyright (C) 2005 Yolla Indria <yolla.indria@gmail.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA
18*/
19
20#ifndef LIBPPT_PRESENTATION
21#define LIBPPT_PRESENTATION
22
23
24namespace Libppt
25{
26
27class Slide;
28
29class Presentation
30{
31public:
32
33 /*
34 * Constructs a new presentation.
35 */
36 Presentation();
37
38 /*
39 * Destroys the presentation.
40 */
41 ~Presentation();
42
43 /*
44 * Clears the presentation, i.e. makes it as if it is just constructed.
45 */
46 void clear();
47
48 /*
49 * Loads the presentation file. Returns false if error occurred.
50 */
51 bool load( const char* filename );
52
53 /*
54 * Appends a new slide.
55 */
56 void appendSlide( Slide* slide );
57
58 /*
59 * Returns the number of slides in this presentation. A newly created
60 * presentation has no slide, i.e. slideCount() returns 0.
61 */
62 unsigned slideCount() const;
63
64 /*
65 * Returns a slide at given index. If index is invalid (e.g. larger
66 * than total number of slides), this function returns NULL.
67 */
68
69 Slide* slide( unsigned index );
70
71 Slide* masterSlide();
72 void setMasterSlide( Slide* master );
73
74private:
75 // no copy or assign
76 Presentation( const Presentation& );
77 Presentation& operator=( const Presentation& );
78
79 class Private;
80 Private* d;
81};
82
83
84}
85
86#endif /* LIBPPT_PRESENTATION */