Update ooo320-m1
[ooovba.git] / sd / source / ui / animations / AnimationSchemesPane.hxx
blob1c4ec7ef8c46163a61852e6bcd6d8c7581788d6a
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: AnimationSchemesPane.hxx,v $
10 * $Revision: 1.5 $
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_ANIMATIONSCHEMESPANE_HXX
31 #define SD_ANIMATIONSCHEMESPANE_HXX
33 #include <vcl/ctrl.hxx>
34 #include <vcl/lstbox.hxx>
35 #include <vcl/fixed.hxx>
36 #ifndef _SV_BUTTON_HXX
37 #include <vcl/button.hxx>
38 #endif
39 #include <vcl/field.hxx>
40 #include <com/sun/star/drawing/XDrawView.hpp>
41 #include <com/sun/star/frame/XModel.hpp>
43 #include <vector>
45 class SdDrawDocument;
46 class SdPage;
48 namespace sd { namespace tools {
49 class EventMultiplexerEvent;
50 } }
52 namespace sd
55 class ViewShellBase;
57 class AnimationSchemesPane : public Control
59 public:
60 explicit AnimationSchemesPane(
61 ::Window * pParent,
62 ViewShellBase & rBase,
63 SdDrawDocument* pDoc );
64 virtual ~AnimationSchemesPane();
66 virtual void Resize();
68 void onSelectionChanged();
69 void onChangeCurrentPage();
71 private:
72 void updateLayout();
73 void updateControls();
74 void updateControlState();
76 void applyToSelectedPages();
77 void playCurrentScheme();
79 void addListener();
80 void removeListener();
82 void getAnimationSchemeFromControls() const;
84 DECL_LINK( ApplyToAllButtonClicked, void * );
85 DECL_LINK( PlayButtonClicked, void * );
86 DECL_LINK( SlideShowButtonClicked, void * );
88 DECL_LINK( SchemeSelected, void * );
89 DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
91 private:
92 ViewShellBase & mrBase;
93 SdDrawDocument * mpDrawDoc;
95 FixedLine maFL_APPLY_SCHEME;
96 ListBox maLB_ANIMATION_SCHEMES;
97 FixedLine maFL_EMPTY1;
98 PushButton maPB_APPLY_TO_ALL;
99 PushButton maPB_PLAY;
100 PushButton maPB_SLIDE_SHOW;
101 FixedLine maFL_EMPTY2;
102 CheckBox maCB_AUTO_PREVIEW;
104 String maSTR_NO_SCHEME;
106 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
107 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
109 bool mbHasSelection;
110 bool mbUpdatingControls;
111 bool mbIsMainViewChangePending;
114 } // namespace sd
116 // SD_ANIMATIONSCHEMESPANE_HXX
117 #endif