LibreOffice Module sd (master) 1
SlideTransitionPane.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
22
23#include <svtools/valueset.hxx>
26#include <vcl/weld.hxx>
27
28#include <vector>
29#include <map>
30
31class SdDrawDocument;
32
33namespace com::sun::star::drawing { class XDrawView; }
34namespace com::sun::star::frame { class XModel; }
35namespace sd::tools { class EventMultiplexerEvent; }
36
37namespace sd
38{
39
40class TransitionPane;
41class ViewShellBase;
42
43namespace impl
44{
45 struct TransitionEffect;
46}
47
48class SlideTransitionPane final : public PanelLayout
49 , public sfx2::sidebar::ILayoutableWindow
50{
51public:
52 explicit SlideTransitionPane(
53 weld::Widget* pParent,
54 ViewShellBase & rBase);
55 virtual ~SlideTransitionPane() override;
56
57 // ILayoutableWindow
58 virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override;
59
60 void onSelectionChanged();
62
63private:
64 void updateControls();
65 void updateControlState();
66 void updateVariants(size_t nPresetOffset);
67
68 void updateSoundList();
70
72
73 void applyToSelectedPages(bool bPreview);
74 void playCurrentEffect();
75
76 void addListener();
77 void removeListener();
78
80
81 void Initialize(SdDrawDocument* pDoc);
82
83 DECL_LINK( ApplyToAllButtonClicked, weld::Button&, void );
84 DECL_LINK( PlayButtonClicked, weld::Button&, void );
85 DECL_LINK( AutoPreviewClicked, weld::Toggleable&, void );
86
87 DECL_LINK( TransitionSelected, ValueSet*, void );
88 DECL_LINK( AdvanceSlideRadioButtonToggled, weld::Toggleable&, void );
89 DECL_LINK( AdvanceTimeModified, weld::MetricSpinButton&, void );
90 DECL_LINK( VariantListBoxSelected, weld::ComboBox&, void );
91 DECL_LINK( DurationModifiedHdl, weld::MetricSpinButton&, void );
92 DECL_LINK( DurationLoseFocusHdl, weld::Widget&, void );
93 DECL_LINK( SoundListBoxSelected, weld::ComboBox&, void );
94 DECL_LINK( LoopSoundBoxChecked, weld::Toggleable&, void );
95 DECL_LINK( EventMultiplexerListener, tools::EventMultiplexerEvent&, void );
96 DECL_LINK(LateInitCallback, Timer *, void);
97
100
101 std::unique_ptr<TransitionPane> mxVS_TRANSITION_ICONS;
102 std::unique_ptr<weld::CustomWeld> mxVS_TRANSITION_ICONSWin;
103 std::unique_ptr<weld::ComboBox> mxLB_VARIANT;
104 std::unique_ptr<weld::MetricSpinButton> mxCBX_duration;
105 std::unique_ptr<weld::Label> mxFT_SOUND;
106 std::unique_ptr<weld::ComboBox> mxLB_SOUND;
107 std::unique_ptr<weld::CheckButton> mxCB_LOOP_SOUND;
108 std::unique_ptr<weld::RadioButton> mxRB_ADVANCE_ON_MOUSE;
109 std::unique_ptr<weld::RadioButton> mxRB_ADVANCE_AUTO;
110 std::unique_ptr<weld::MetricSpinButton> mxMF_ADVANCE_AUTO_AFTER;
111 std::unique_ptr<weld::Button> mxPB_APPLY_TO_ALL;
112 std::unique_ptr<weld::Button> mxPB_PLAY;
113 std::unique_ptr<weld::CheckButton> mxCB_AUTO_PREVIEW;
114
115 css::uno::Reference< css::drawing::XDrawView > mxView;
116 css::uno::Reference< css::frame::XModel > mxModel;
117
121
122 std::vector<OUString> maSoundList;
123 mutable OUString maCurrentSoundFile;
124
125 // How many variants each transition set has
126 std::map< OUString, int > m_aNumVariants;
127
129};
130
131} // namespace sd
132
133// INCLUDED_SD_SOURCE_UI_ANIMATIONS_SLIDETRANSITIONPANE_HXX
134
135/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SlideTransitionPane() override
impl::TransitionEffect getTransitionEffectFromControls() const
void applyToSelectedPages(bool bPreview)
DECL_LINK(PlayButtonClicked, weld::Button &, void)
::sd::slidesorter::SharedPageSelection getSelectedPages() const
DECL_LINK(LoopSoundBoxChecked, weld::Toggleable &, void)
std::unique_ptr< weld::Button > mxPB_PLAY
std::map< OUString, int > m_aNumVariants
std::unique_ptr< weld::RadioButton > mxRB_ADVANCE_ON_MOUSE
std::unique_ptr< weld::CustomWeld > mxVS_TRANSITION_ICONSWin
std::unique_ptr< weld::ComboBox > mxLB_SOUND
std::vector< OUString > maSoundList
DECL_LINK(SoundListBoxSelected, weld::ComboBox &, void)
DECL_LINK(AdvanceSlideRadioButtonToggled, weld::Toggleable &, void)
DECL_LINK(ApplyToAllButtonClicked, weld::Button &, void)
std::unique_ptr< weld::ComboBox > mxLB_VARIANT
DECL_LINK(DurationModifiedHdl, weld::MetricSpinButton &, void)
SlideTransitionPane(weld::Widget *pParent, ViewShellBase &rBase)
void Initialize(SdDrawDocument *pDoc)
DECL_LINK(VariantListBoxSelected, weld::ComboBox &, void)
std::unique_ptr< TransitionPane > mxVS_TRANSITION_ICONS
std::unique_ptr< weld::Label > mxFT_SOUND
std::unique_ptr< weld::CheckButton > mxCB_AUTO_PREVIEW
std::unique_ptr< weld::MetricSpinButton > mxCBX_duration
std::unique_ptr< weld::CheckButton > mxCB_LOOP_SOUND
DECL_LINK(DurationLoseFocusHdl, weld::Widget &, void)
virtual css::ui::LayoutSize GetHeightForWidth(const sal_Int32 nWidth) override
css::uno::Reference< css::frame::XModel > mxModel
DECL_LINK(LateInitCallback, Timer *, void)
DECL_LINK(AutoPreviewClicked, weld::Toggleable &, void)
DECL_LINK(TransitionSelected, ValueSet *, void)
std::unique_ptr< weld::Button > mxPB_APPLY_TO_ALL
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent &, void)
std::unique_ptr< weld::MetricSpinButton > mxMF_ADVANCE_AUTO_AFTER
std::unique_ptr< weld::RadioButton > mxRB_ADVANCE_AUTO
DECL_LINK(AdvanceTimeModified, weld::MetricSpinButton &, void)
void updateVariants(size_t nPresetOffset)
we use an integer offset into the list of transition presets
css::uno::Reference< css::drawing::XDrawView > mxView
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
std::shared_ptr< SlideSorterViewShell::PageSelection > SharedPageSelection