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 INCLUDED_SD_SOURCE_UI_SLIDESHOW_SHOWWINDOW_HXX
21 #define INCLUDED_SD_SOURCE_UI_SLIDESHOW_SHOWWINDOW_HXX
23 #include <rtl/ref.hxx>
24 #include <sal/types.h>
25 #include <vcl/timer.hxx>
26 #include <vcl/graph.hxx>
30 #include "slideshowimpl.hxx"
36 #define SLIDE_NO_TIMEOUT SAL_MAX_INT32
40 SHOWWINDOWMODE_NORMAL
= 0,
41 SHOWWINDOWMODE_PAUSE
= 1,
42 SHOWWINDOWMODE_END
= 2,
43 SHOWWINDOWMODE_BLANK
= 3,
44 SHOWWINDOWMODE_PREVIEW
= 4
52 ShowWindow ( const ::rtl::Reference
< ::sd::SlideshowImpl
>& xController
, vcl::Window
* pParent
);
53 virtual ~ShowWindow();
54 virtual void dispose() SAL_OVERRIDE
;
57 bool SetPauseMode( sal_Int32 nPageIndexToRestart
, sal_Int32 nTimeoutSec
= SLIDE_NO_TIMEOUT
, Graphic
* pLogo
= NULL
);
58 bool SetBlankMode( sal_Int32 nPageIndexToRestart
, const Color
& rBlankColor
);
60 const Color
& GetBlankColor() const { return maShowBackground
.GetColor(); }
62 void SetPreviewMode();
63 void SetPresentationArea( const Rectangle
& rPresArea
);
65 void SetMouseAutoHide( bool bMouseAutoHide
) { mbMouseAutoHide
= bMouseAutoHide
; }
67 ShowWindowMode
GetShowWindowMode() const { return meShowWindowMode
; }
69 void RestartShow( sal_Int32 nPageIndexToRestart
);
71 virtual void Move() SAL_OVERRIDE
;
72 virtual void Resize() SAL_OVERRIDE
;
73 virtual void GetFocus() SAL_OVERRIDE
;
74 virtual void LoseFocus() SAL_OVERRIDE
;
76 virtual void KeyInput(const KeyEvent
& rKEvt
) SAL_OVERRIDE
;
77 virtual void MouseMove(const MouseEvent
& rMEvt
) SAL_OVERRIDE
;
78 virtual void MouseButtonUp(const MouseEvent
& rMEvt
) SAL_OVERRIDE
;
79 virtual void MouseButtonDown(const MouseEvent
& rMEvt
) SAL_OVERRIDE
;
80 virtual void Paint(vcl::RenderContext
& rRenderContext
, const Rectangle
& rRect
) SAL_OVERRIDE
;
81 /// Override the sd::Window's CreateAccessible to create a different accessible object
82 virtual ::com::sun::star::uno::Reference
<
83 ::com::sun::star::accessibility::XAccessible
>
84 CreateAccessible() SAL_OVERRIDE
;
90 void DrawPauseScene( bool bTimeoutOnly
);
93 void DeleteWindowFromPaintView();
94 void AddWindowToPaintView();
99 Wallpaper maShowBackground
;
101 sal_uLong mnPauseTimeout
;
102 sal_Int32 mnRestartPageIndex
;
103 ShowWindowMode meShowWindowMode
;
104 bool mbShowNavigatorAfterSpecialMode
;
105 Rectangle maPresArea
;
106 bool mbMouseAutoHide
;
107 bool mbMouseCursorHidden
;
108 sal_uInt64 mnFirstMouseMove
;
110 DECL_LINK_TYPED( PauseTimeoutHdl
, Timer
*, void );
111 DECL_LINK_TYPED(MouseTimeoutHdl
, Timer
*, void);
112 DECL_LINK( EventHdl
, VclWindowEvent
* pEvent
);
114 ::rtl::Reference
< SlideshowImpl
> mxController
;
117 } // end of namespace sd
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */