diff options
Diffstat (limited to 'avmedia/inc')
-rw-r--r-- | avmedia/inc/bitmaps.hlst | 15 | ||||
-rw-r--r-- | avmedia/inc/helpids.h | 36 | ||||
-rw-r--r-- | avmedia/inc/mediacontrol.hxx | 73 | ||||
-rw-r--r-- | avmedia/inc/strings.hrc | 40 |
4 files changed, 164 insertions, 0 deletions
diff --git a/avmedia/inc/bitmaps.hlst b/avmedia/inc/bitmaps.hlst new file mode 100644 index 0000000000..2730761ecb --- /dev/null +++ b/avmedia/inc/bitmaps.hlst @@ -0,0 +1,15 @@ +/* -*- 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/. + */ + +#pragma once + +inline constexpr OUString AVMEDIA_BMP_AUDIOLOGO = u"avmedia/res/avaudiologo.png"_ustr; +inline constexpr OUString AVMEDIA_BMP_EMPTYLOGO = u"avmedia/res/avemptylogo.png"_ustr; + +/* 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 0000000000..a20267998a --- /dev/null +++ b/avmedia/inc/helpids.h @@ -0,0 +1,36 @@ +/* -*- 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 <rtl/ustring.hxx> + +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_PLAY = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY"_ustr; +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_PAUSE = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PAUSE"_ustr; +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_STOP = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_STOP"_ustr; +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_MUTE = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_MUTE"_ustr; +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_LOOP = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_LOOP"_ustr; +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_OPEN = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_OPEN"_ustr; +inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_INSERT = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_INSERT"_ustr; +inline constexpr OUString HID_AVMEDIA_ZOOMLISTBOX = u"AVMEDIA_HID_AVMEDIA_ZOOMLISTBOX"_ustr; +inline constexpr OUString HID_AVMEDIA_TIMEEDIT = u"AVMEDIA_HID_AVMEDIA_TIMEEDIT"_ustr; +inline constexpr OUString HID_AVMEDIA_VOLUMESLIDER = u"AVMEDIA_HID_AVMEDIA_VOLUMESLIDER"_ustr; +inline constexpr OUString HID_AVMEDIA_PLAYERWINDOW = u"AVMEDIA_HID_AVMEDIA_PLAYERWINDOW"_ustr; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx new file mode 100644 index 0000000000..f168ef5668 --- /dev/null +++ b/avmedia/inc/mediacontrol.hxx @@ -0,0 +1,73 @@ +/* -*- 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 OUString&, void); + DECL_LINK(implZoomSelectHdl, weld::ComboBox&, void); + DECL_LINK(implTimeoutHdl, Timer*, void); + + Idle maIdle; + Idle maChangeTimeIdle; + MediaItem maItem; + bool mbLocked; + MediaControlStyle meControlStyle; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/inc/strings.hrc b/avmedia/inc/strings.hrc new file mode 100644 index 0000000000..1edbe24a00 --- /dev/null +++ b/avmedia/inc/strings.hrc @@ -0,0 +1,40 @@ +/* -*- 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 + +#define NC_(Context, String) TranslateId(Context, u8##String) + +#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") + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |