fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / avmedia / source / viewer / mediawindow_impl.hxx
blobfe793170a010f95f4940485db5289acd25be71e7
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_MEDIAWINDOW_IMPL_HXX
21 #define _AVMEDIA_MEDIAWINDOW_IMPL_HXX
23 #include <svtools/transfer.hxx>
24 #include <vcl/syschild.hxx>
26 #include "mediawindowbase_impl.hxx"
27 #include "mediacontrol.hxx"
29 class BitmapEx;
31 namespace avmedia
33 namespace priv
35 // ----------------------
36 // - MediaWindowControl -
37 // ----------------------
39 class MediaWindowControl : public MediaControl
41 public:
43 MediaWindowControl( Window* pParent );
44 ~MediaWindowControl();
46 protected:
48 void update();
49 void execute( const MediaItem& rItem );
52 // --------------------
53 // - MediaChildWindow -
54 // --------------------
56 class MediaChildWindow : public SystemChildWindow
58 public:
60 MediaChildWindow( Window* pParent );
61 ~MediaChildWindow();
63 protected:
65 virtual void MouseMove( const MouseEvent& rMEvt );
66 virtual void MouseButtonDown( const MouseEvent& rMEvt );
67 virtual void MouseButtonUp( const MouseEvent& rMEvt );
68 virtual void KeyInput( const KeyEvent& rKEvt );
69 virtual void KeyUp( const KeyEvent& rKEvt );
70 virtual void Command( const CommandEvent& rCEvt );
73 // ------------------.
74 // - MediaWindowImpl -
75 // -------------------
77 class MediaEventListenersImpl;
79 class MediaWindowImpl : public Control,
80 public MediaWindowBaseImpl,
81 public DropTargetHelper,
82 public DragSourceHelper
85 public:
87 MediaWindowImpl( Window* parent, MediaWindow* pMediaWindow, bool bInternalMediaControl );
88 virtual ~MediaWindowImpl();
90 virtual void cleanUp();
91 virtual void onURLChanged();
93 public:
95 void setPosSize( const Rectangle& rRect );
97 void setPointer( const Pointer& rPointer );
99 protected:
101 // Window
102 virtual void MouseMove( const MouseEvent& rMEvt );
103 virtual void MouseButtonDown( const MouseEvent& rMEvt );
104 virtual void MouseButtonUp( const MouseEvent& rMEvt );
105 virtual void KeyInput( const KeyEvent& rKEvt );
106 virtual void KeyUp( const KeyEvent& rKEvt );
107 virtual void Command( const CommandEvent& rCEvt );
108 virtual void Resize();
109 virtual void StateChanged( StateChangedType );
110 virtual void Paint( const Rectangle& ); // const
111 virtual void GetFocus();
113 // DropTargetHelper
114 virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
115 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
117 // DragSourceHelper
118 virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
120 private:
122 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxEventsIf;
123 MediaEventListenersImpl* mpEvents;
124 MediaChildWindow maChildWindow;
125 MediaWindowControl* mpMediaWindowControl;
126 BitmapEx* mpEmptyBmpEx;
127 BitmapEx* mpAudioBmpEx;
132 #endif
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */