diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /avmedia/inc | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'avmedia/inc')
-rw-r--r-- | avmedia/inc/bitmaps.hlst | 18 | ||||
-rw-r--r-- | avmedia/inc/helpids.h | 37 | ||||
-rw-r--r-- | avmedia/inc/mediacontrol.hxx | 74 | ||||
-rw-r--r-- | avmedia/inc/strings.hrc | 50 |
4 files changed, 179 insertions, 0 deletions
diff --git a/avmedia/inc/bitmaps.hlst b/avmedia/inc/bitmaps.hlst new file mode 100644 index 000000000..682d090fe --- /dev/null +++ b/avmedia/inc/bitmaps.hlst @@ -0,0 +1,18 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_AVMEDIA_INC_BITMAPS_HRC +#define INCLUDED_AVMEDIA_INC_BITMAPS_HRC + +#define AVMEDIA_BMP_AUDIOLOGO "avmedia/res/avaudiologo.png" +#define AVMEDIA_BMP_EMPTYLOGO "avmedia/res/avemptylogo.png" + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/avmedia/inc/helpids.h b/avmedia/inc/helpids.h new file mode 100644 index 000000000..3d9a8c782 --- /dev/null +++ b/avmedia/inc/helpids.h @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_AVMEDIA_INC_HELPIDS_H +#define INCLUDED_AVMEDIA_INC_HELPIDS_H + +#define HID_AVMEDIA_TOOLBOXITEM_PLAY "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY" +#define HID_AVMEDIA_TOOLBOXITEM_PAUSE "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PAUSE" +#define HID_AVMEDIA_TOOLBOXITEM_STOP "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_STOP" +#define HID_AVMEDIA_TOOLBOXITEM_MUTE "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_MUTE" +#define HID_AVMEDIA_TOOLBOXITEM_LOOP "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_LOOP" +#define HID_AVMEDIA_TOOLBOXITEM_OPEN "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_OPEN" +#define HID_AVMEDIA_TOOLBOXITEM_INSERT "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_INSERT" +#define HID_AVMEDIA_ZOOMLISTBOX "AVMEDIA_HID_AVMEDIA_ZOOMLISTBOX" +#define HID_AVMEDIA_TIMEEDIT "AVMEDIA_HID_AVMEDIA_TIMEEDIT" +#define HID_AVMEDIA_VOLUMESLIDER "AVMEDIA_HID_AVMEDIA_VOLUMESLIDER" +#define HID_AVMEDIA_PLAYERWINDOW "AVMEDIA_HID_AVMEDIA_PLAYERWINDOW" + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx new file mode 100644 index 000000000..33c063fc9 --- /dev/null +++ b/avmedia/inc/mediacontrol.hxx @@ -0,0 +1,74 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <avmedia/mediaitem.hxx> + +#include <vcl/InterimItemWindow.hxx> +#include <vcl/timer.hxx> +#include <vcl/idle.hxx> +#include <vcl/weld.hxx> +#include <avmedia/MediaControlBase.hxx> + +#define AVMEDIA_CONTROLOFFSET 6 + +namespace avmedia +{ + +class MediaItem; + +class MediaControl : public InterimItemWindow, public MediaControlBase +{ +public: + MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyle ); + virtual ~MediaControl() override; + virtual void dispose() override; + + void setState( const MediaItem& rItem ); + void UpdateURLField( MediaItem const & maItem ); + +protected: + + virtual void update() = 0; + virtual void execute( const MediaItem& rItem ) = 0; + + virtual void InitializeWidgets() override; + std::unique_ptr<weld::Label> mxMediaPath; + +private: + + DECL_LINK(implTimeHdl, weld::Scale&, void); + DECL_LINK(implTimeEndHdl, Timer*, void); + DECL_LINK(implVolumeHdl, weld::Scale&, void); + DECL_LINK(implSelectHdl, const OString&, void); + DECL_LINK(implZoomSelectHdl, weld::ComboBox&, void); + DECL_LINK(implTimeoutHdl, Timer*, void); + + Idle maIdle; + Idle maChangeTimeIdle; + MediaItem maItem; + bool mbLocked; + MediaControlStyle meControlStyle; + double mfTime; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/inc/strings.hrc b/avmedia/inc/strings.hrc new file mode 100644 index 000000000..2b1b23412 --- /dev/null +++ b/avmedia/inc/strings.hrc @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_AVMEDIA_INC_STRINGS_HRC +#define INCLUDED_AVMEDIA_INC_STRINGS_HRC + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +#define AVMEDIA_STR_OPEN NC_("AVMEDIA_STR_OPEN", "Open") +#define AVMEDIA_STR_INSERT NC_("AVMEDIA_STR_INSERT", "Apply") +#define AVMEDIA_STR_PLAY NC_("AVMEDIA_STR_PLAY", "Play") +#define AVMEDIA_STR_PAUSE NC_("AVMEDIA_STR_PAUSE", "Pause") +#define AVMEDIA_STR_STOP NC_("AVMEDIA_STR_STOP", "Stop") +#define AVMEDIA_STR_LOOP NC_("AVMEDIA_STR_LOOP", "Repeat") +#define AVMEDIA_STR_MUTE NC_("AVMEDIA_STR_MUTE", "Mute") +#define AVMEDIA_STR_ZOOM_50 NC_("AVMEDIA_STR_ZOOM_50", "50%") +#define AVMEDIA_STR_ZOOM_100 NC_("AVMEDIA_STR_ZOOM_100", "100%") +#define AVMEDIA_STR_ZOOM_200 NC_("AVMEDIA_STR_ZOOM_200", "200%") +#define AVMEDIA_STR_ZOOM_FIT NC_("AVMEDIA_STR_ZOOM_FIT", "Scaled") +#define AVMEDIA_STR_VOLUME NC_("AVMEDIA_STR_VOLUME", "Volume") +#define AVMEDIA_STR_POSITION NC_("AVMEDIA_STR_POSITION", "Position") +#define AVMEDIA_STR_MEDIAPLAYER NC_("AVMEDIA_STR_MEDIAPLAYER", "Media Player") +#define AVMEDIA_MEDIA_PATH NC_("AVMEDIA_MEDIA_PATH", "Media Path") +#define AVMEDIA_MEDIA_PATH_DEFAULT NC_("AVMEDIA_MEDIA_PATH_DEFAULT", "No Media Selected") +#define AVMEDIA_STR_INSERTMEDIA_DLG NC_("AVMEDIA_STR_INSERTMEDIA_DLG", "Insert Audio or Video") +#define AVMEDIA_STR_OPENMEDIA_DLG NC_("AVMEDIA_STR_OPENMEDIA_DLG", "Open Audio or Video") +#define AVMEDIA_STR_ALL_MEDIAFILES NC_("AVMEDIA_STR_ALL_MEDIAFILES", "All audio and video files") +#define AVMEDIA_STR_ALL_FILES NC_("AVMEDIA_STR_ALL_FILES", "All files") +#define AVMEDIA_STR_ERR_URL NC_("AVMEDIA_STR_ERR_URL", "The format of the selected file is not supported.") +#define AVMEDIA_STR_ZOOM_TOOLTIP NC_("AVMEDIA_STR_ZOOM_TOOLTIP", "View") + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |