android: Update app-specific/MIME type icons
[LibreOffice.git] / sd / source / ui / inc / SlideTransitionPane.hxx
blob2672bfa630ef2196c51760855d0d9b2c6b051539
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 #pragma once
21 #include "SlideSorterViewShell.hxx"
23 #include <svtools/valueset.hxx>
24 #include <sfx2/sidebar/ILayoutableWindow.hxx>
25 #include <sfx2/sidebar/PanelLayout.hxx>
26 #include <vcl/weld.hxx>
28 #include <vector>
29 #include <map>
31 class SdDrawDocument;
33 namespace com::sun::star::drawing { class XDrawView; }
34 namespace com::sun::star::frame { class XModel; }
35 namespace sd::tools { class EventMultiplexerEvent; }
37 namespace sd
40 class TransitionPane;
41 class ViewShellBase;
43 namespace impl
45 struct TransitionEffect;
48 class SlideTransitionPane final : public PanelLayout
49 , public sfx2::sidebar::ILayoutableWindow
51 public:
52 explicit SlideTransitionPane(
53 weld::Widget* pParent,
54 ViewShellBase & rBase);
55 virtual ~SlideTransitionPane() override;
57 // ILayoutableWindow
58 virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override;
60 void onSelectionChanged();
61 void onChangeCurrentPage();
63 private:
64 void updateControls();
65 void updateControlState();
66 void updateVariants(size_t nPresetOffset);
68 void updateSoundList();
69 void openSoundFileDialog();
71 impl::TransitionEffect getTransitionEffectFromControls() const;
73 void applyToSelectedPages(bool bPreview);
74 void playCurrentEffect();
76 void addListener();
77 void removeListener();
79 ::sd::slidesorter::SharedPageSelection getSelectedPages() const;
81 void Initialize(SdDrawDocument* pDoc);
83 DECL_LINK( ApplyToAllButtonClicked, weld::Button&, void );
84 DECL_LINK( PlayButtonClicked, weld::Button&, void );
85 DECL_LINK( AutoPreviewClicked, weld::Toggleable&, void );
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);
98 ViewShellBase & mrBase;
99 SdDrawDocument * mpDrawDoc;
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;
115 css::uno::Reference< css::drawing::XDrawView > mxView;
116 css::uno::Reference< css::frame::XModel > mxModel;
118 bool mbHasSelection;
119 bool mbUpdatingControls;
120 bool mbIsMainViewChangePending;
122 std::vector<OUString> maSoundList;
123 mutable OUString maCurrentSoundFile;
125 // How many variants each transition set has
126 std::map< OUString, int > m_aNumVariants;
128 Timer maLateInitTimer;
131 } // namespace sd
133 // INCLUDED_SD_SOURCE_UI_ANIMATIONS_SLIDETRANSITIONPANE_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */