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: SlideTransitionPane.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_SLIDETRANSITIONPANE_HXX
31 #define SD_SLIDETRANSITIONPANE_HXX
33 #include "EventMultiplexer.hxx"
35 #include "SlideSorterViewShell.hxx"
37 #include <vcl/ctrl.hxx>
38 #include <vcl/lstbox.hxx>
39 #include <vcl/fixed.hxx>
40 #include <vcl/button.hxx>
41 #include <vcl/field.hxx>
42 #include <com/sun/star/drawing/XDrawView.hpp>
43 #include <com/sun/star/frame/XModel.hpp>
58 struct TransitionEffect
;
61 class SlideTransitionPane
: public Control
64 explicit SlideTransitionPane(
66 ViewShellBase
& rBase
,
68 SdDrawDocument
* pDoc
);
69 virtual ~SlideTransitionPane();
71 virtual void Resize();
73 void onSelectionChanged();
74 void onChangeCurrentPage();
78 void updateControls();
79 void updateControlState();
81 void updateSoundList();
82 void openSoundFileDialog();
84 impl::TransitionEffect
getTransitionEffectFromControls() const;
86 void applyToSelectedPages();
87 void playCurrentEffect();
90 void removeListener();
92 ::sd::slidesorter::SharedPageSelection
getSelectedPages (void) const;
94 DECL_LINK( ApplyToAllButtonClicked
, void * );
95 DECL_LINK( PlayButtonClicked
, void * );
96 DECL_LINK( SlideShowButtonClicked
, void * );
97 DECL_LINK( AutoPreviewClicked
, void * );
99 DECL_LINK( TransitionSelected
, void * );
100 DECL_LINK( AdvanceSlideRadioButtonToggled
, void * );
101 DECL_LINK( AdvanceTimeModified
, void * );
102 DECL_LINK( SpeedListBoxSelected
, void * );
103 DECL_LINK( SoundListBoxSelected
, void * );
104 DECL_LINK( LoopSoundBoxChecked
, void * );
105 DECL_LINK(EventMultiplexerListener
, tools::EventMultiplexerEvent
*);
106 DECL_LINK(LateInitCallback
, Timer
*);
109 ViewShellBase
& mrBase
;
110 SdDrawDocument
* mpDrawDoc
;
113 FixedLine maFL_APPLY_TRANSITION
;
114 ListBox maLB_SLIDE_TRANSITIONS
;
115 FixedLine maFL_MODIFY_TRANSITION
;
116 FixedText maFT_SPEED
;
118 FixedText maFT_SOUND
;
120 CheckBox maCB_LOOP_SOUND
;
121 FixedLine maFL_ADVANCE_SLIDE
;
122 RadioButton maRB_ADVANCE_ON_MOUSE
;
123 RadioButton maRB_ADVANCE_AUTO
;
124 MetricField maMF_ADVANCE_AUTO_AFTER
;
125 FixedLine maFL_EMPTY1
;
126 PushButton maPB_APPLY_TO_ALL
;
127 PushButton maPB_PLAY
;
128 PushButton maPB_SLIDE_SHOW
;
129 FixedLine maFL_EMPTY2
;
130 CheckBox maCB_AUTO_PREVIEW
;
132 String maSTR_NO_TRANSITION
;
134 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawView
> mxView
;
135 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
> mxModel
;
138 bool mbUpdatingControls
;
139 bool mbIsMainViewChangePending
;
141 typedef ::std::vector
< String
> tSoundListType
;
142 tSoundListType maSoundList
;
143 mutable String maCurrentSoundFile
;
145 typedef ::std::map
< sal_uInt16
, sal_uInt16
> tPresetIndexesType
;
146 tPresetIndexesType m_aPresetIndexes
;
148 Timer maLateInitTimer
;
153 // SD_SLIDETRANSITIONPANE_HXX