summaryrefslogtreecommitdiffstats
path: root/avmedia/inc
diff options
context:
space:
mode:
Diffstat (limited to 'avmedia/inc')
-rw-r--r--avmedia/inc/bitmaps.hlst15
-rw-r--r--avmedia/inc/helpids.h36
-rw-r--r--avmedia/inc/mediacontrol.hxx73
-rw-r--r--avmedia/inc/strings.hrc40
4 files changed, 164 insertions, 0 deletions
diff --git a/avmedia/inc/bitmaps.hlst b/avmedia/inc/bitmaps.hlst
new file mode 100644
index 000000000..758471fbd
--- /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 OUStringLiteral AVMEDIA_BMP_AUDIOLOGO = u"avmedia/res/avaudiologo.png";
+inline constexpr OUStringLiteral AVMEDIA_BMP_EMPTYLOGO = u"avmedia/res/avemptylogo.png";
+
+/* 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..1f9a4c305
--- /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/string.hxx>
+
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_PLAY = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_PAUSE = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PAUSE";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_STOP = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_STOP";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_MUTE = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_MUTE";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_LOOP = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_LOOP";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_OPEN = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_OPEN";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_INSERT = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_INSERT";
+inline constexpr OStringLiteral HID_AVMEDIA_ZOOMLISTBOX = "AVMEDIA_HID_AVMEDIA_ZOOMLISTBOX";
+inline constexpr OStringLiteral HID_AVMEDIA_TIMEEDIT = "AVMEDIA_HID_AVMEDIA_TIMEEDIT";
+inline constexpr OStringLiteral HID_AVMEDIA_VOLUMESLIDER = "AVMEDIA_HID_AVMEDIA_VOLUMESLIDER";
+inline constexpr OStringLiteral HID_AVMEDIA_PLAYERWINDOW = "AVMEDIA_HID_AVMEDIA_PLAYERWINDOW";
+
+/* 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..6b004626f
--- /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 OString&, 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 000000000..f9f52fa3a
--- /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, reinterpret_cast<char const *>(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: */