1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SLIDESHOW_SLIDESHOWCONTEXT_HXX
25 #define INCLUDED_SLIDESHOW_SLIDESHOWCONTEXT_HXX
26 
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <boost/shared_ptr.hpp>
29 
30 namespace com{ namespace sun{ namespace star{ namespace uno
31 {
32     class XComponentContext;
33 }}}}
34 
35 
36 namespace slideshow
37 {
38     namespace internal
39     {
40         class ShapeManager;
41         class EventQueue;
42         class ActivitiesQueue;
43         class UserEventQueue;
44         class EventMultiplexer;
45         class ScreenUpdater;
46         class UnoViewContainer;
47         class CursorManager;
48         class SubsettableShapeManager;
49 
50         /** Common arguments for slideshow objects.
51 
52         	This struct combines a number of object references
53         	ubiquituously needed throughout the slideshow.
54          */
55 		struct SlideShowContext
56         {
57             /** Common context for node creation
58 
59 	            @param rShapeManager
60                 ShapeManager, which handles all shapes
61 
62                 @param rEventQueue
63                 Event queue, where time-based events are to be
64                 scheduled. A node must not schedule events there
65                 before it's not resolved.
66 
67                 @param rEventMultiplexer
68                 Event multiplexer. Clients can register there for
69                 about any event that happens in the slideshow
70 
71                 @param rScreenUpdater
72                 Screen updater. Gets notified of necessary screen
73                 updates.
74 
75                 @param rActivitiesQueue
76                 Activities queue, where repeating activities are
77                 to be scheduled.
78 
79                 @param rUserEventQueue
80                 User event queue
81 
82                 @param rViewContainer
83                 Holds all views added to slideshow
84 
85                 @param rComponentContext
86                 To create UNO services from
87             */
88             SlideShowContext( boost::shared_ptr<SubsettableShapeManager>&       rSubsettableShapeManager,
89                               EventQueue&                                       rEventQueue,
90                               EventMultiplexer&                                 rEventMultiplexer,
91                               ScreenUpdater&                                    rScreenUpdater,
92                               ActivitiesQueue&                                  rActivitiesQueue,
93                               UserEventQueue&                                   rUserEventQueue,
94                               CursorManager&                                    rCursorManager,
95                               const UnoViewContainer&                           rViewContainer,
96                               const ::com::sun::star::uno::Reference<
97                                   ::com::sun::star::uno::XComponentContext>&    rComponentContext );
98             void dispose();
99 
100             boost::shared_ptr<SubsettableShapeManager>&     mpSubsettableShapeManager;
101             EventQueue&										mrEventQueue;
102             EventMultiplexer&								mrEventMultiplexer;
103             ScreenUpdater&                                  mrScreenUpdater;
104             ActivitiesQueue&								mrActivitiesQueue;
105             UserEventQueue&									mrUserEventQueue;
106             CursorManager&                                  mrCursorManager;
107             const UnoViewContainer&                         mrViewContainer;
108             ::com::sun::star::uno::Reference<
109                 ::com::sun::star::uno::XComponentContext>	mxComponentContext;
110         };
111     }
112 }
113 
114 #endif /* INCLUDED_SLIDESHOW_SLIDESHOWCONTEXT_HXX */
115