LibreOffice Module sd (master) 1
showwindow.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <rtl/ref.hxx>
23#include <sal/types.h>
24#include <vcl/timer.hxx>
25#include <vcl/graph.hxx>
26
27#include <Window.hxx>
28
29namespace sd {
30
31class SlideshowImpl;
32
33#define SLIDE_NO_TIMEOUT SAL_MAX_INT32
34
36{
42};
43
45 : public ::sd::Window
46{
47
48public:
50 virtual ~ShowWindow() override;
51 virtual void dispose() override;
52
53 void SetEndMode();
54 bool SetPauseMode( sal_Int32 nTimeoutSec, Graphic const * pLogo = nullptr );
55 bool SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
56
57 const Color& GetBlankColor() const { return maShowBackground.GetColor(); }
58
59 void SetPreviewMode();
60
61 void SetMouseAutoHide( bool bMouseAutoHide ) { mbMouseAutoHide = bMouseAutoHide; }
62
64
65 void RestartShow( sal_Int32 nPageIndexToRestart );
66
67 virtual void LoseFocus() override;
68
69 virtual void KeyInput(const KeyEvent& rKEvt) override;
70 virtual void MouseMove(const MouseEvent& rMEvt) override;
71 virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
72 virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
73 virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
75 virtual css::uno::Reference<css::accessibility::XAccessible>
76 CreateAccessible() override;
77
78 void TerminateShow();
79 void RestartShow();
80
81private:
82 void DrawPauseScene( bool bTimeoutOnly );
83 void DrawEndScene();
84
87
88private:
99 sal_uInt64 mnFirstMouseMove;
100
101 DECL_LINK( PauseTimeoutHdl, Timer*, void );
102 DECL_LINK(MouseTimeoutHdl, Timer *, void);
103 DECL_LINK( EventHdl, VclWindowEvent&, void );
104
106};
107
108} // end of namespace sd
109
110/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const Color & GetColor() const
void AddWindowToPaintView()
Definition: showwin.cxx:598
virtual ~ShowWindow() override
Definition: showwin.cxx:87
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: showwin.cxx:99
Timer maPauseTimer
Definition: showwindow.hxx:89
bool mbMouseCursorHidden
Definition: showwindow.hxx:98
void SetEndMode()
Definition: showwin.cxx:303
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: showwin.cxx:238
void TerminateShow()
Definition: showwin.cxx:387
Wallpaper maShowBackground
Definition: showwindow.hxx:91
void DeleteWindowFromPaintView()
Definition: showwin.cxx:588
virtual void LoseFocus() override
Deactivate window.
Definition: showwin.cxx:295
void SetMouseAutoHide(bool bMouseAutoHide)
Definition: showwindow.hxx:61
ShowWindowMode meShowWindowMode
Definition: showwindow.hxx:95
void DrawEndScene()
Definition: showwin.cxx:531
bool SetBlankMode(sal_Int32 nPageIndexToRestart, const Color &rBlankColor)
Definition: showwin.cxx:360
void DrawPauseScene(bool bTimeoutOnly)
Definition: showwin.cxx:460
bool mbShowNavigatorAfterSpecialMode
Definition: showwindow.hxx:96
::rtl::Reference< SlideshowImpl > mxController
Definition: showwindow.hxx:105
DECL_LINK(PauseTimeoutHdl, Timer *, void)
sal_Int32 mnRestartPageIndex
Definition: showwindow.hxx:94
virtual void dispose() override
Definition: showwin.cxx:92
Graphic maLogo
Definition: showwindow.hxx:92
sal_uInt64 mnFirstMouseMove
Definition: showwindow.hxx:99
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: showwin.cxx:185
ShowWindowMode GetShowWindowMode() const
Definition: showwindow.hxx:63
virtual void MouseMove(const MouseEvent &rMEvt) override
Definition: showwin.cxx:197
Timer maMouseTimer
Definition: showwindow.hxx:90
ShowWindow(::rtl::Reference< ::sd::SlideshowImpl > xController, vcl::Window *pParent)
Definition: showwin.cxx:50
virtual void Paint(vcl::RenderContext &rRenderContext, const ::tools::Rectangle &rRect) override
if FuSlideShow is still available, forward it
Definition: showwin.cxx:263
bool SetPauseMode(sal_Int32 nTimeoutSec, Graphic const *pLogo=nullptr)
Definition: showwin.cxx:322
bool mbMouseAutoHide
Definition: showwindow.hxx:97
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Override the sd::Window's CreateAccessible to create a different accessible object.
Definition: showwin.cxx:610
sal_uLong mnPauseTimeout
Definition: showwindow.hxx:93
const Color & GetBlankColor() const
Definition: showwindow.hxx:57
DECL_LINK(EventHdl, VclWindowEvent &, void)
void RestartShow()
Definition: showwin.cxx:413
DECL_LINK(MouseTimeoutHdl, Timer *, void)
void SetPreviewMode()
Definition: showwin.cxx:382
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
ShowWindowMode
Definition: showwindow.hxx:36
@ SHOWWINDOWMODE_NORMAL
Definition: showwindow.hxx:37
@ SHOWWINDOWMODE_PAUSE
Definition: showwindow.hxx:38
@ SHOWWINDOWMODE_PREVIEW
Definition: showwindow.hxx:41
@ SHOWWINDOWMODE_END
Definition: showwindow.hxx:39
@ SHOWWINDOWMODE_BLANK
Definition: showwindow.hxx:40
sal_uIntPtr sal_uLong
Reference< XController > xController