android: Update app-specific/MIME type icons
[LibreOffice.git] / include / avmedia / MediaControlBase.hxx
blob7d687dfa61e56fcd8e83454fa924dd61c049ac81
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 <config_options.h>
22 #include <vcl/weld.hxx>
24 #include <avmedia/avmediadllapi.h>
26 namespace avmedia { class MediaItem; }
28 #define AVMEDIA_TIME_RANGE 2048
30 #define AVMEDIA_ZOOMLEVEL_50 0
31 #define AVMEDIA_ZOOMLEVEL_100 1
32 #define AVMEDIA_ZOOMLEVEL_200 2
33 #define AVMEDIA_ZOOMLEVEL_FIT 3
34 #define AVMEDIA_ZOOMLEVEL_SCALED 4
35 #define AVMEDIA_ZOOMLEVEL_INVALID 65535
37 namespace avmedia {
39 enum class MediaControlStyle
41 SingleLine = 0,
42 MultiLine = 1
45 class UNLESS_MERGELIBS(AVMEDIA_DLLPUBLIC) MediaControlBase
47 public:
48 MediaControlBase();
49 virtual ~MediaControlBase(){};
51 protected:
52 std::unique_ptr<weld::Toolbar> mxPlayToolBox;
53 std::unique_ptr<weld::Scale> mxTimeSlider;
54 std::unique_ptr<weld::Toolbar> mxMuteToolBox;
55 std::unique_ptr<weld::Scale> mxVolumeSlider;
56 std::unique_ptr<weld::ComboBox> mxZoomListBox;
57 std::unique_ptr<weld::Entry> mxTimeEdit;
58 bool mbCurrentlySettingZoom;
60 virtual void InitializeWidgets();
61 virtual void UpdateToolBoxes(const MediaItem& rMediaItem);
62 void UpdateVolumeSlider( MediaItem const & aMediaItem );
63 void UpdateTimeSlider( MediaItem const & aMediaItem );
64 void UpdateTimeField( MediaItem const & aMediaItem, double fTime );
65 void UpdatePlayState(const MediaItem& rMediaItem);
66 void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, std::u16string_view rId);
67 void disposeWidgets();
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */