Update ooo320-m1
[ooovba.git] / slideshow / source / inc / event.hxx
blob6b109f58f9f36475b4ea50885964535b92d0e11d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: event.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef INCLUDED_SLIDESHOW_EVENT_HXX
31 #define INCLUDED_SLIDESHOW_EVENT_HXX
33 #include "disposable.hxx"
35 #include <boost/shared_ptr.hpp>
36 #include <vector>
38 namespace slideshow {
39 namespace internal {
41 /** Definition of Event interface
43 class Event : public Disposable
45 public:
46 /** Execute the event.
48 @return true, if event was successfully executed.
50 virtual bool fire() = 0;
52 /** Query whether this event is still charged, i.e. able
53 to fire.
55 Inactive events are ignored by the normal event
56 containers (EventQueue, UserEventQueue etc.), and no
57 explicit fire() is called upon them.
59 @return true, if this event has already been fired.
61 virtual bool isCharged() const = 0;
63 /** Query the activation time instant this event shall be
64 fired, if it was inserted at instant nCurrentTime into
65 the queue.
67 @param nCurrentTime
68 The time from which the activation time is to be
69 calculated from.
71 @return the time instant in seconds, on which this
72 event is to be fired.
74 virtual double getActivationTime( double nCurrentTime ) const = 0;
77 typedef ::boost::shared_ptr< Event > EventSharedPtr;
78 typedef ::std::vector< EventSharedPtr > VectorOfEvents;
80 } // namespace internal
81 } // namespace presentation
83 #endif /* INCLUDED_SLIDESHOW_EVENT_HXX */