1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SlsSlotManager.hxx,v $
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>
37 class AbstractSvxNameDialog
;
42 namespace sd
{ namespace slidesorter
{
47 namespace sd
{ namespace slidesorter
{ namespace controller
{
51 /** This manager takes over the work of handling slot calls from the
52 controller of the slide sorter.
57 /** Create a new slot manager that handles slot calls for the controller
60 The controller for which to handle the slot calls.
62 SlotManager (SlideSorter
& rSlideSorter
);
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
);
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
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