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 SD_SHOW_WINDOW_HXX
21 #define SD_SHOW_WINDOW_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
, ::Window
* pParent
);
53 virtual ~ShowWindow (void);
56 bool SetPauseMode( sal_Int32 nPageIndexToRestart
, sal_Int32 nTimeoutSec
= SLIDE_NO_TIMEOUT
, Graphic
* pLogo
= NULL
);
57 bool SetBlankMode( sal_Int32 nPageIndexToRestart
, const Color
& rBlankColor
);
59 const Color
& GetBlankColor() const { return maShowBackground
.GetColor(); }
61 void SetPreviewMode();
62 void SetPresentationArea( const Rectangle
& rPresArea
);
64 void SetMouseAutoHide( bool bMouseAutoHide
) { mbMouseAutoHide
= bMouseAutoHide
; }
66 ShowWindowMode
GetShowWindowMode() const { return meShowWindowMode
; }
68 void RestartShow( sal_Int32 nPageIndexToRestart
);
71 virtual void Resize();
72 virtual void GetFocus();
73 virtual void LoseFocus();
75 virtual void KeyInput(const KeyEvent
& rKEvt
);
76 virtual void MouseMove(const MouseEvent
& rMEvt
);
77 virtual void MouseButtonUp(const MouseEvent
& rMEvt
);
78 virtual void MouseButtonDown(const MouseEvent
& rMEvt
);
79 virtual void Paint(const Rectangle
& rRect
);
80 virtual long Notify(NotifyEvent
& rNEvt
);
86 void DrawPauseScene( bool bTimeoutOnly
);
88 void DrawBlankScene();
90 void DeleteWindowFromPaintView();
91 void AddWindowToPaintView();
96 Wallpaper maShowBackground
;
98 sal_uLong mnPauseTimeout
;
99 sal_Int32 mnRestartPageIndex
;
100 ShowWindowMode meShowWindowMode
;
101 bool mbShowNavigatorAfterSpecialMode
;
102 Rectangle maPresArea
;
103 bool mbMouseAutoHide
;
104 bool mbMouseCursorHidden
;
105 sal_uLong mnFirstMouseMove
;
107 DECL_LINK( PauseTimeoutHdl
, Timer
* pTimer
);
108 DECL_LINK(MouseTimeoutHdl
, void *);
109 DECL_LINK( EventHdl
, VclWindowEvent
* pEvent
);
111 ::rtl::Reference
< SlideshowImpl
> mxController
;
114 } // end of namespace sd
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */