Update ooo320-m1
[ooovba.git] / sd / source / ui / slidesorter / inc / controller / SlsSlotManager.hxx
blob6d4c2ca0add54f316de7024f7363c029568b9564
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: SlsSlotManager.hxx,v $
10 * $Revision: 1.2 $
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 SD_SLIDESORTER_SLOT_MANAGER_HXX
31 #define SD_SLIDESORTER_SLOT_MANAGER_HXX
33 #include <tools/link.hxx>
34 #include <memory>
35 #include <queue>
37 class AbstractSvxNameDialog;
38 class SfxItemSet;
39 class SfxRequest;
40 class String;
42 namespace sd { namespace slidesorter {
43 class SlideSorter;
44 } }
47 namespace sd { namespace slidesorter { namespace controller {
49 class Command;
51 /** This manager takes over the work of handling slot calls from the
52 controller of the slide sorter.
54 class SlotManager
56 public:
57 /** Create a new slot manager that handles slot calls for the controller
58 of a slide sorter.
59 @param rController
60 The controller for which to handle the slot calls.
62 SlotManager (SlideSorter& rSlideSorter);
64 ~SlotManager (void);
66 void FuTemporary (SfxRequest& rRequest);
67 void FuPermanent (SfxRequest& rRequest);
68 void FuSupport (SfxRequest& rRequest);
69 void GetCtrlState (SfxItemSet &rSet);
70 void GetMenuState (SfxItemSet &rSet);
71 void GetClipboardState (SfxItemSet &rSet);
72 void GetStatusBarState (SfxItemSet& rSet);
73 void ExecCtrl (SfxRequest& rRequest);
74 void GetAttrState (SfxItemSet& rSet);
76 void ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand);
78 private:
79 /// The controller for which we manage the slot calls.
80 SlideSorter& mrSlideSorter;
82 typedef ::std::queue<Command*> CommandQueue;
83 CommandQueue maCommandQueue;
85 /** Called by FuTemporary to show the slide show.
87 void ShowSlideShow (SfxRequest& rRequest);
89 /** The implementation is a copy of the code for SID_RENAMEPAGE in
90 drviews2.cxx.
92 void RenameSlide (void);
93 DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog*);
94 bool RenameSlideFromDrawViewShell( USHORT nPageId, const String& rName);
96 /** Handle SID_INSERTPAGE slot calls.
98 void InsertSlide (SfxRequest& rRequest);
100 void AssignTransitionEffect (void);
102 DECL_LINK(UserEventCallback, void*);
105 } } } // end of namespace ::sd::slidesorter::controller
107 #endif