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: showwindow.hxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef SD_SHOW_WINDOW_HXX
33 #define SD_SHOW_WINDOW_HXX
35 #include <rtl/ref.hxx>
36 #include <sal/types.h>
37 #include <vcl/timer.hxx>
38 #include <vcl/graph.hxx>
44 #include "slideshowimpl.hxx"
61 #define SLIDE_NO_TIMEOUT SAL_MAX_INT32
69 SHOWWINDOWMODE_NORMAL
= 0,
70 SHOWWINDOWMODE_PAUSE
= 1,
71 SHOWWINDOWMODE_END
= 2,
72 SHOWWINDOWMODE_BLANK
= 3,
73 SHOWWINDOWMODE_PREVIEW
= 4
76 //class ShowWindowImpl;
81 // friend class ShowWindowImpl;
83 ShowWindow ( const ::rtl::Reference
< ::sd::SlideshowImpl
>& xController
, ::Window
* pParent
);
84 virtual ~ShowWindow (void);
87 BOOL
SetPauseMode( sal_Int32 nPageIndexToRestart
, sal_Int32 nTimeoutSec
= SLIDE_NO_TIMEOUT
, Graphic
* pLogo
= NULL
);
88 BOOL
SetBlankMode( sal_Int32 nPageIndexToRestart
, const Color
& rBlankColor
);
90 const Color
& GetBlankColor() const { return maShowBackground
.GetColor(); }
92 void SetPreviewMode();
93 void SetPresentationArea( const Rectangle
& rPresArea
);
95 void SetMouseAutoHide( bool bMouseAutoHide
) { mbMouseAutoHide
= bMouseAutoHide
; }
97 ShowWindowMode
GetShowWindowMode() const { return meShowWindowMode
; }
99 void RestartShow( sal_Int32 nPageIndexToRestart
);
102 virtual void Resize();
103 virtual void GetFocus();
104 virtual void LoseFocus();
105 // virtual void GrabFocus();
107 virtual void KeyInput(const KeyEvent
& rKEvt
);
108 virtual void MouseMove(const MouseEvent
& rMEvt
);
109 virtual void MouseButtonUp(const MouseEvent
& rMEvt
);
110 virtual void MouseButtonDown(const MouseEvent
& rMEvt
);
111 virtual void Paint(const Rectangle
& rRect
);
112 virtual long Notify(NotifyEvent
& rNEvt
);
114 void TerminateShow();
118 void DrawPauseScene( BOOL bTimeoutOnly
);
120 void DrawBlankScene();
122 void DeleteWindowFromPaintView();
123 void AddWindowToPaintView();
128 Wallpaper maShowBackground
;
130 ULONG mnPauseTimeout
;
131 sal_Int32 mnRestartPageIndex
;
132 ShowWindowMode meShowWindowMode
;
133 BOOL mbShowNavigatorAfterSpecialMode
;
134 Rectangle maPresArea
;
135 bool mbMouseAutoHide
;
136 bool mbMouseCursorHidden
;
137 ULONG mnFirstMouseMove
;
139 DECL_LINK( PauseTimeoutHdl
, Timer
* pTimer
);
140 DECL_LINK( MouseTimeoutHdl
, Timer
* pTimer
);
141 DECL_LINK( EventHdl
, VclWindowEvent
* pEvent
);
143 ::rtl::Reference
< SlideshowImpl
> mxController
;
146 } // end of namespace sd