1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
20 #define INCLUDED_AVMEDIA_MEDIACONTROLBASE_HXX
22 #include <vcl/edit.hxx>
23 #include <vcl/toolbox.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/slider.hxx>
27 #include <avmedia/avmediadllapi.h>
29 namespace avmedia
{ class MediaItem
; }
31 #define AVMEDIA_TIME_RANGE 2048
32 #define AVMEDIA_DB_RANGE -40
33 #define AVMEDIA_LINEINCREMENT 1.0
34 #define AVMEDIA_PAGEINCREMENT 10.0
36 #define AVMEDIA_TOOLBOXITEM_PLAY 0x0001
37 #define AVMEDIA_TOOLBOXITEM_PAUSE 0x0004
38 #define AVMEDIA_TOOLBOXITEM_STOP 0x0008
39 #define AVMEDIA_TOOLBOXITEM_MUTE 0x0010
40 #define AVMEDIA_TOOLBOXITEM_LOOP 0x0011
41 #define AVMEDIA_TOOLBOXITEM_ZOOM 0x0012
42 #define AVMEDIA_TOOLBOXITEM_OPEN 0x0014
43 #define AVMEDIA_TOOLBOXITEM_INSERT 0x0018
45 #define AVMEDIA_ZOOMLEVEL_50 0
46 #define AVMEDIA_ZOOMLEVEL_100 1
47 #define AVMEDIA_ZOOMLEVEL_200 2
48 #define AVMEDIA_ZOOMLEVEL_FIT 3
49 #define AVMEDIA_ZOOMLEVEL_SCALED 4
50 #define AVMEDIA_ZOOMLEVEL_INVALID 65535
54 enum MediaControlStyle
56 MEDIACONTROLSTYLE_SINGLELINE
= 0,
57 MEDIACONTROLSTYLE_MULTILINE
= 1
60 class AVMEDIA_DLLPUBLIC MediaControlBase
64 virtual ~MediaControlBase(){};
67 VclPtr
<ToolBox
> mpPlayToolBox
;
68 VclPtr
<Slider
> mpTimeSlider
;
69 VclPtr
<ToolBox
> mpMuteToolBox
;
70 VclPtr
<Slider
> mpVolumeSlider
;
71 VclPtr
<ListBox
> mpZoomListBox
;
72 VclPtr
<Edit
> mpTimeEdit
;
73 static Image
GetImage(sal_Int32 nImageId
);
74 virtual void InitializeWidgets();
75 virtual void UpdateToolBoxes( MediaItem aMediaItem
);
76 void UpdateVolumeSlider( MediaItem
const & aMediaItem
);
77 void UpdateTimeSlider( MediaItem
const & aMediaItem
);
78 void UpdateTimeField( MediaItem
const & aMediaItem
, double fTime
);
79 void SelectPlayToolBoxItem( MediaItem
& aExecItem
, MediaItem
const & aItem
, sal_uInt16 nId
);
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */