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 .
20 #ifndef _AVMEDIA_MEDIACONTROL_HXX
21 #define _AVMEDIA_MEDIACONTROL_HXX
23 #include <avmedia/mediaitem.hxx>
25 #include <vcl/timer.hxx>
26 #include <vcl/slider.hxx>
27 #include <vcl/toolbox.hxx>
28 #include <vcl/edit.hxx>
29 #include <vcl/image.hxx>
31 #define AVMEDIA_CONTROLOFFSET 6
38 // ---------------------
39 // - MediaControlStyle -
40 // ---------------------
42 enum MediaControlStyle
44 MEDIACONTROLSTYLE_SINGLELINE
= 0,
45 MEDIACONTROLSTYLE_MULTILINE
= 1
54 class MediaControl
: public Control
58 MediaControl( Window
* pParent
, MediaControlStyle eControlStyle
);
59 virtual ~MediaControl();
61 const Size
& getMinSizePixel() const;
63 void setState( const MediaItem
& rItem
);
67 virtual void update() = 0;
68 virtual void execute( const MediaItem
& rItem
) = 0;
70 virtual void Resize();
74 void implUpdateToolboxes();
75 void implUpdateTimeSlider();
76 void implUpdateVolumeSlider();
77 void implUpdateTimeField( double fCurTime
);
78 Image
implGetImage( sal_Int32 nImageId
) const;
80 DECL_LINK( implTimeHdl
, Slider
* );
81 DECL_LINK( implTimeEndHdl
, Slider
* );
82 DECL_LINK( implVolumeHdl
, Slider
* );
83 DECL_LINK(implVolumeEndHdl
, void *);
84 DECL_LINK( implSelectHdl
, ToolBox
* );
85 DECL_LINK( implZoomSelectHdl
, ListBox
* );
86 DECL_LINK(implTimeoutHdl
, void *);
88 ImageList maImageList
;
91 ToolBox maPlayToolBox
;
93 ToolBox maMuteToolBox
;
94 Slider maVolumeSlider
;
95 ToolBox maZoomToolBox
;
96 ListBox
* mpZoomListBox
;
99 MediaControlStyle meControlStyle
;
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */