bump product version to 4.1.6.2
[LibreOffice.git] / avmedia / inc / mediacontrol.hxx
blob773b5fea69582f1cf46b998801820cef4d8b6db3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
33 class ListBox;
35 namespace avmedia
38 // ---------------------
39 // - MediaControlStyle -
40 // ---------------------
42 enum MediaControlStyle
44 MEDIACONTROLSTYLE_SINGLELINE = 0,
45 MEDIACONTROLSTYLE_MULTILINE = 1
48 // ----------------
49 // - MediaControl -
50 // ---------------
52 class MediaItem;
54 class MediaControl : public Control
56 public:
58 MediaControl( Window* pParent, MediaControlStyle eControlStyle );
59 virtual ~MediaControl();
61 const Size& getMinSizePixel() const;
63 void setState( const MediaItem& rItem );
65 protected:
67 virtual void update() = 0;
68 virtual void execute( const MediaItem& rItem ) = 0;
70 virtual void Resize();
72 private:
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;
89 Timer maTimer;
90 MediaItem maItem;
91 ToolBox maPlayToolBox;
92 Slider maTimeSlider;
93 ToolBox maMuteToolBox;
94 Slider maVolumeSlider;
95 ToolBox maZoomToolBox;
96 ListBox* mpZoomListBox;
97 Edit maTimeEdit;
98 Size maMinSize;
99 MediaControlStyle meControlStyle;
100 bool mbLocked;
105 #endif
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */