fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / avmedia / inc / mediacontrol.hxx
blob0348d29d1706fddbaacfd9af77bf5f4b606bb9ef
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 INCLUDED_AVMEDIA_INC_MEDIACONTROL_HXX
21 #define INCLUDED_AVMEDIA_INC_MEDIACONTROL_HXX
23 #include <avmedia/mediaitem.hxx>
25 #include <vcl/timer.hxx>
26 #include <vcl/idle.hxx>
27 #include <vcl/slider.hxx>
28 #include <vcl/toolbox.hxx>
29 #include <vcl/edit.hxx>
30 #include <vcl/image.hxx>
32 #define AVMEDIA_CONTROLOFFSET 6
34 class ListBox;
36 namespace avmedia
40 // - MediaControlStyle -
43 enum MediaControlStyle
45 MEDIACONTROLSTYLE_SINGLELINE = 0,
46 MEDIACONTROLSTYLE_MULTILINE = 1
50 // - MediaControl -
53 class MediaItem;
55 class MediaControl : public Control
57 public:
59 MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyle );
60 virtual ~MediaControl();
61 virtual void dispose() SAL_OVERRIDE;
63 const Size& getMinSizePixel() const;
65 void setState( const MediaItem& rItem );
67 protected:
69 virtual void update() = 0;
70 virtual void execute( const MediaItem& rItem ) = 0;
72 virtual void Resize() SAL_OVERRIDE;
74 private:
76 void implUpdateToolboxes();
77 void implUpdateTimeSlider();
78 void implUpdateVolumeSlider();
79 void implUpdateTimeField( double fCurTime );
80 Image implGetImage( sal_Int32 nImageId ) const;
82 DECL_LINK( implTimeHdl, Slider* );
83 DECL_LINK( implTimeEndHdl, Slider* );
84 DECL_LINK( implVolumeHdl, Slider* );
85 DECL_STATIC_LINK(MediaControl, implVolumeEndHdl, void *);
86 DECL_LINK_TYPED( implSelectHdl, ToolBox*, void );
87 DECL_LINK( implZoomSelectHdl, ListBox* );
88 DECL_LINK_TYPED(implTimeoutHdl, Idle *, void);
90 ImageList maImageList;
91 Idle maIdle;
92 MediaItem maItem;
93 VclPtr<ToolBox> maPlayToolBox;
94 VclPtr<Slider> maTimeSlider;
95 VclPtr<ToolBox> maMuteToolBox;
96 VclPtr<Slider> maVolumeSlider;
97 VclPtr<ToolBox> maZoomToolBox;
98 VclPtr<ListBox> mpZoomListBox;
99 VclPtr<Edit> maTimeEdit;
100 Size maMinSize;
101 MediaControlStyle meControlStyle;
102 bool mbLocked;
107 #endif
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */