LCOV - code coverage report
Current view: top level - sd/source/ui/slideshow - showwindow.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 3 0.0 %
Date: 2014-04-14 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef INCLUDED_SD_SOURCE_UI_SLIDESHOW_SHOWWINDOW_HXX
      21             : #define INCLUDED_SD_SOURCE_UI_SLIDESHOW_SHOWWINDOW_HXX
      22             : 
      23             : #include <rtl/ref.hxx>
      24             : #include <sal/types.h>
      25             : #include <vcl/timer.hxx>
      26             : #include <vcl/graph.hxx>
      27             : 
      28             : #include "Window.hxx"
      29             : 
      30             : #include "slideshowimpl.hxx"
      31             : 
      32             : namespace sd {
      33             : 
      34             : class SlideshowImpl;
      35             : 
      36             : #define SLIDE_NO_TIMEOUT SAL_MAX_INT32
      37             : 
      38             : enum ShowWindowMode
      39             : {
      40             :     SHOWWINDOWMODE_NORMAL = 0,
      41             :     SHOWWINDOWMODE_PAUSE = 1,
      42             :     SHOWWINDOWMODE_END = 2,
      43             :     SHOWWINDOWMODE_BLANK = 3,
      44             :     SHOWWINDOWMODE_PREVIEW = 4
      45             : };
      46             : 
      47             : class ShowWindow
      48             :     : public ::sd::Window
      49             : {
      50             : 
      51             : public:
      52             :     ShowWindow ( const ::rtl::Reference< ::sd::SlideshowImpl >& xController, ::Window* pParent );
      53             :     virtual ~ShowWindow (void);
      54             : 
      55             :     bool         SetEndMode();
      56             :     bool            SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
      57             :     bool            SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
      58             : 
      59           0 :     const Color&        GetBlankColor() const { return maShowBackground.GetColor(); }
      60             : 
      61             :     void            SetPreviewMode();
      62             :     void            SetPresentationArea( const Rectangle& rPresArea );
      63             : 
      64           0 :     void            SetMouseAutoHide( bool bMouseAutoHide ) { mbMouseAutoHide = bMouseAutoHide; }
      65             : 
      66           0 :     ShowWindowMode  GetShowWindowMode() const { return meShowWindowMode; }
      67             : 
      68             :     void            RestartShow( sal_Int32 nPageIndexToRestart );
      69             : 
      70             :     virtual void    Move() SAL_OVERRIDE;
      71             :     virtual void    Resize() SAL_OVERRIDE;
      72             :     virtual void    GetFocus() SAL_OVERRIDE;
      73             :     virtual void    LoseFocus() SAL_OVERRIDE;
      74             : 
      75             :     virtual void    KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
      76             :     virtual void    MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE;
      77             :     virtual void    MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
      78             :     virtual void    MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
      79             :     virtual void    Paint(const Rectangle& rRect) SAL_OVERRIDE;
      80             :     //Overload the sd::Window's CreateAccessible to create a different accessible object
      81             :     virtual ::com::sun::star::uno::Reference<
      82             :         ::com::sun::star::accessibility::XAccessible>
      83             :         CreateAccessible (void) SAL_OVERRIDE;
      84             : 
      85             :     void            TerminateShow();
      86             :     void            RestartShow();
      87             : 
      88             : private:
      89             :     void            DrawPauseScene( bool bTimeoutOnly );
      90             :     void            DrawEndScene();
      91             :     void            DrawBlankScene();
      92             : 
      93             :     void            DeleteWindowFromPaintView();
      94             :     void            AddWindowToPaintView();
      95             : 
      96             : private:
      97             :     Timer           maPauseTimer;
      98             :     Timer           maMouseTimer;
      99             :     Wallpaper       maShowBackground;
     100             :     Graphic         maLogo;
     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_uLong           mnFirstMouseMove;
     109             : 
     110             :                     DECL_LINK( PauseTimeoutHdl, Timer* pTimer );
     111             :                     DECL_LINK(MouseTimeoutHdl, void *);
     112             :                     DECL_LINK( EventHdl, VclWindowEvent* pEvent );
     113             : 
     114             :     ::rtl::Reference< SlideshowImpl > mxController;
     115             : };
     116             : 
     117             : } // end of namespace sd
     118             : 
     119             : #endif
     120             : 
     121             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10