1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mediawindow_impl.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _AVMEDIA_MEDIAWINDOW_IMPL_HXX
32 #define _AVMEDIA_MEDIAWINDOW_IMPL_HXX
34 #include <svtools/transfer.hxx>
36 #include <vcl/syschild.hxx>
38 #include <vcl/javachild.hxx>
41 #include "mediawindowbase_impl.hxx"
42 #include "mediacontrol.hxx"
50 // ----------------------
51 // - MediaWindowControl -
52 // ----------------------
54 class MediaWindowControl
: public MediaControl
58 MediaWindowControl( Window
* pParent
);
59 ~MediaWindowControl();
64 void execute( const MediaItem
& rItem
);
67 // --------------------
68 // - MediaChildWindow -
69 // --------------------
72 class MediaChildWindow
: public SystemChildWindow
74 class MediaChildWindow
: public JavaChildWindow
79 MediaChildWindow( Window
* pParent
);
84 virtual void MouseMove( const MouseEvent
& rMEvt
);
85 virtual void MouseButtonDown( const MouseEvent
& rMEvt
);
86 virtual void MouseButtonUp( const MouseEvent
& rMEvt
);
87 virtual void KeyInput( const KeyEvent
& rKEvt
);
88 virtual void KeyUp( const KeyEvent
& rKEvt
);
89 virtual void Command( const CommandEvent
& rCEvt
);
92 // ------------------.
93 // - MediaWindowImpl -
94 // -------------------
96 class MediaEventListenersImpl
;
98 class MediaWindowImpl
: public Control
,
99 public MediaWindowBaseImpl
,
100 public DropTargetHelper
,
101 public DragSourceHelper
106 MediaWindowImpl( Window
* parent
, MediaWindow
* pMediaWindow
, bool bInternalMediaControl
);
107 virtual ~MediaWindowImpl();
109 virtual void cleanUp();
110 virtual void onURLChanged();
116 void setPosSize( const Rectangle
& rRect
);
118 void setPointer( const Pointer
& rPointer
);
119 const Pointer
& getPointer() const;
121 bool hasInternalMediaControl() const;
126 virtual void MouseMove( const MouseEvent
& rMEvt
);
127 virtual void MouseButtonDown( const MouseEvent
& rMEvt
);
128 virtual void MouseButtonUp( const MouseEvent
& rMEvt
);
129 virtual void KeyInput( const KeyEvent
& rKEvt
);
130 virtual void KeyUp( const KeyEvent
& rKEvt
);
131 virtual void Command( const CommandEvent
& rCEvt
);
132 virtual void Resize();
133 virtual void StateChanged( StateChangedType
);
134 virtual void Paint( const Rectangle
& ); // const
135 virtual void GetFocus();
138 virtual sal_Int8
AcceptDrop( const AcceptDropEvent
& rEvt
);
139 virtual sal_Int8
ExecuteDrop( const ExecuteDropEvent
& rEvt
);
142 virtual void StartDrag( sal_Int8 nAction
, const Point
& rPosPixel
);
146 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> mxEventsIf
;
147 MediaEventListenersImpl
* mpEvents
;
148 MediaChildWindow maChildWindow
;
149 MediaWindowControl
* mpMediaWindowControl
;
150 BitmapEx
* mpEmptyBmpEx
;
151 BitmapEx
* mpAudioBmpEx
;