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>
34 #define SLIDE_NO_TIMEOUT SAL_MAX_INT32
38 SHOWWINDOWMODE_NORMAL
= 0,
39 SHOWWINDOWMODE_PAUSE
= 1,
40 SHOWWINDOWMODE_END
= 2,
41 SHOWWINDOWMODE_BLANK
= 3,
42 SHOWWINDOWMODE_PREVIEW
= 4
50 ShowWindow ( const ::rtl::Reference
< ::sd::SlideshowImpl
>& xController
, vcl::Window
* pParent
);
51 virtual ~ShowWindow() override
;
52 virtual void dispose() override
;
55 bool SetPauseMode( sal_Int32 nTimeoutSec
, Graphic
const * pLogo
= nullptr );
56 bool SetBlankMode( sal_Int32 nPageIndexToRestart
, const Color
& rBlankColor
);
58 const Color
& GetBlankColor() const { return maShowBackground
.GetColor(); }
60 void SetPreviewMode();
62 void SetMouseAutoHide( bool bMouseAutoHide
) { mbMouseAutoHide
= bMouseAutoHide
; }
64 ShowWindowMode
GetShowWindowMode() const { return meShowWindowMode
; }
66 void RestartShow( sal_Int32 nPageIndexToRestart
);
68 virtual void LoseFocus() override
;
70 virtual void KeyInput(const KeyEvent
& rKEvt
) override
;
71 virtual void MouseMove(const MouseEvent
& rMEvt
) override
;
72 virtual void MouseButtonUp(const MouseEvent
& rMEvt
) override
;
73 virtual void MouseButtonDown(const MouseEvent
& rMEvt
) override
;
74 virtual void Paint(vcl::RenderContext
& rRenderContext
, const ::tools::Rectangle
& rRect
) override
;
75 /// Override the sd::Window's CreateAccessible to create a different accessible object
76 virtual css::uno::Reference
<css::accessibility::XAccessible
>
77 CreateAccessible() override
;
83 void DrawPauseScene( bool bTimeoutOnly
);
86 void DeleteWindowFromPaintView();
87 void AddWindowToPaintView();
92 Wallpaper maShowBackground
;
94 sal_uLong mnPauseTimeout
;
95 sal_Int32 mnRestartPageIndex
;
96 ShowWindowMode meShowWindowMode
;
97 bool mbShowNavigatorAfterSpecialMode
;
99 bool mbMouseCursorHidden
;
100 sal_uInt64 mnFirstMouseMove
;
102 DECL_LINK( PauseTimeoutHdl
, Timer
*, void );
103 DECL_LINK(MouseTimeoutHdl
, Timer
*, void);
104 DECL_LINK( EventHdl
, VclWindowEvent
&, void );
106 ::rtl::Reference
< SlideshowImpl
> mxController
;
109 } // end of namespace sd
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */