bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / animations / SlideTransitionPane.hxx
blobfbfc3cf33e167521436b56cbb34c2561858722d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SD_SOURCE_UI_ANIMATIONS_SLIDETRANSITIONPANE_HXX
20 #define INCLUDED_SD_SOURCE_UI_ANIMATIONS_SLIDETRANSITIONPANE_HXX
22 #include "EventMultiplexer.hxx"
24 #include "SlideSorterViewShell.hxx"
26 #include <vcl/ctrl.hxx>
27 #include <vcl/lstbox.hxx>
28 #include <vcl/fixed.hxx>
29 #include <vcl/button.hxx>
30 #include <vcl/field.hxx>
31 #include <svx/sidebar/PanelLayout.hxx>
32 #include <sfx2/sidebar/ControlFactory.hxx>
33 #include <com/sun/star/drawing/XDrawView.hpp>
34 #include <com/sun/star/frame/XModel.hpp>
36 #include <vector>
37 #include <map>
39 class SdDrawDocument;
41 namespace sd
44 class ViewShellBase;
46 namespace impl
48 struct TransitionEffect;
51 class SlideTransitionPane : public PanelLayout
53 public:
54 explicit SlideTransitionPane(
55 Window * pParent,
56 ViewShellBase & rBase,
57 const Size& rMinSize,
58 SdDrawDocument* pDoc,
59 const css::uno::Reference<css::frame::XFrame>& rxFrame );
60 virtual ~SlideTransitionPane();
61 virtual void dispose() SAL_OVERRIDE;
63 // Window
64 virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
66 void onSelectionChanged();
67 void onChangeCurrentPage();
69 private:
70 void updateLayout();
71 void updateControls();
72 void updateControlState();
74 void updateSoundList();
75 void openSoundFileDialog();
77 impl::TransitionEffect getTransitionEffectFromControls() const;
79 void applyToSelectedPages();
80 void playCurrentEffect();
81 void stopEffects();
83 void addListener();
84 void removeListener();
86 ::sd::slidesorter::SharedPageSelection getSelectedPages() const;
88 void UpdateLook();
90 DECL_LINK( ApplyToAllButtonClicked, void * );
91 DECL_LINK( PlayButtonClicked, void * );
92 DECL_LINK( AutoPreviewClicked, void * );
94 DECL_LINK( TransitionSelected, void * );
95 DECL_LINK( AdvanceSlideRadioButtonToggled, void * );
96 DECL_LINK( AdvanceTimeModified, void * );
97 DECL_LINK( SpeedListBoxSelected, void * );
98 DECL_LINK( SoundListBoxSelected, void * );
99 DECL_LINK( LoopSoundBoxChecked, void * );
100 DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
101 DECL_LINK_TYPED(LateInitCallback, Timer *, void);
103 ViewShellBase & mrBase;
104 SdDrawDocument * mpDrawDoc;
105 Size maMinSize;
107 VclPtr<ListBox> mpLB_SLIDE_TRANSITIONS;
108 VclPtr<FixedText> mpFT_SPEED;
109 VclPtr<ListBox> mpLB_SPEED;
110 VclPtr<FixedText> mpFT_SOUND;
111 VclPtr<ListBox> mpLB_SOUND;
112 VclPtr<CheckBox> mpCB_LOOP_SOUND;
113 VclPtr<RadioButton> mpRB_ADVANCE_ON_MOUSE;
114 VclPtr<RadioButton> mpRB_ADVANCE_AUTO;
115 VclPtr<MetricField> mpMF_ADVANCE_AUTO_AFTER;
116 VclPtr<PushButton> mpPB_APPLY_TO_ALL;
117 VclPtr<PushButton> mpPB_PLAY;
118 VclPtr<CheckBox> mpCB_AUTO_PREVIEW;
120 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
121 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
123 bool mbHasSelection;
124 bool mbUpdatingControls;
125 bool mbIsMainViewChangePending;
127 typedef ::std::vector< OUString > tSoundListType;
128 tSoundListType maSoundList;
129 mutable OUString maCurrentSoundFile;
131 typedef ::std::map< sal_uInt16, sal_uInt16 > tPresetIndexesType;
132 tPresetIndexesType m_aPresetIndexes;
134 Timer maLateInitTimer;
137 } // namespace sd
139 // INCLUDED_SD_SOURCE_UI_ANIMATIONS_SLIDETRANSITIONPANE_HXX
140 #endif
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */