LCOV - code coverage report
Current view: top level - sd/source/ui/slideshow - showwindow.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-08-25 Functions: 0 3 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SD_SHOW_WINDOW_HXX
      30                 :            : #define SD_SHOW_WINDOW_HXX
      31                 :            : 
      32                 :            : #include <rtl/ref.hxx>
      33                 :            : #include <sal/types.h>
      34                 :            : #include <vcl/timer.hxx>
      35                 :            : #include <vcl/graph.hxx>
      36                 :            : 
      37                 :            : #include "Window.hxx"
      38                 :            : 
      39                 :            : #include "slideshowimpl.hxx"
      40                 :            : 
      41                 :            : // ----------------
      42                 :            : // - SdShowWindow -
      43                 :            : // ----------------
      44                 :            : 
      45                 :            : 
      46                 :            : namespace sd {
      47                 :            : 
      48                 :            : class SlideshowImpl;
      49                 :            : 
      50                 :            : // -----------
      51                 :            : // - Defines -
      52                 :            : // -----------
      53                 :            : 
      54                 :            : #define SLIDE_NO_TIMEOUT SAL_MAX_INT32
      55                 :            : 
      56                 :            : // ---------
      57                 :            : // - Enums -
      58                 :            : // ---------
      59                 :            : 
      60                 :            : enum ShowWindowMode
      61                 :            : {
      62                 :            :     SHOWWINDOWMODE_NORMAL = 0,
      63                 :            :     SHOWWINDOWMODE_PAUSE = 1,
      64                 :            :     SHOWWINDOWMODE_END = 2,
      65                 :            :     SHOWWINDOWMODE_BLANK = 3,
      66                 :            :     SHOWWINDOWMODE_PREVIEW = 4
      67                 :            : };
      68                 :            : 
      69                 :            : class ShowWindow
      70                 :            :     : public ::sd::Window
      71                 :            : {
      72                 :            : 
      73                 :            : public:
      74                 :            :     ShowWindow ( const ::rtl::Reference< ::sd::SlideshowImpl >& xController, ::Window* pParent );
      75                 :            :     virtual ~ShowWindow (void);
      76                 :            : 
      77                 :            :     bool         SetEndMode();
      78                 :            :     bool            SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
      79                 :            :     bool            SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
      80                 :            : 
      81                 :          0 :     const Color&        GetBlankColor() const { return maShowBackground.GetColor(); }
      82                 :            : 
      83                 :            :     void            SetPreviewMode();
      84                 :            :     void            SetPresentationArea( const Rectangle& rPresArea );
      85                 :            : 
      86                 :          0 :     void            SetMouseAutoHide( bool bMouseAutoHide ) { mbMouseAutoHide = bMouseAutoHide; }
      87                 :            : 
      88                 :          0 :     ShowWindowMode  GetShowWindowMode() const { return meShowWindowMode; }
      89                 :            : 
      90                 :            :     void            RestartShow( sal_Int32 nPageIndexToRestart );
      91                 :            : 
      92                 :            :     virtual void    Move();
      93                 :            :     virtual void    Resize();
      94                 :            :     virtual void    GetFocus();
      95                 :            :     virtual void    LoseFocus();
      96                 :            : 
      97                 :            :     virtual void    KeyInput(const KeyEvent& rKEvt);
      98                 :            :     virtual void    MouseMove(const MouseEvent& rMEvt);
      99                 :            :     virtual void    MouseButtonUp(const MouseEvent& rMEvt);
     100                 :            :     virtual void    MouseButtonDown(const MouseEvent& rMEvt);
     101                 :            :     virtual void    Paint(const Rectangle& rRect);
     102                 :            :     virtual long    Notify(NotifyEvent& rNEvt);
     103                 :            : 
     104                 :            :     void            TerminateShow();
     105                 :            :     void            RestartShow();
     106                 :            : 
     107                 :            : private:
     108                 :            :     void            DrawPauseScene( bool bTimeoutOnly );
     109                 :            :     void            DrawEndScene();
     110                 :            :     void            DrawBlankScene();
     111                 :            : 
     112                 :            :     void            DeleteWindowFromPaintView();
     113                 :            :     void            AddWindowToPaintView();
     114                 :            : 
     115                 :            : private:
     116                 :            :     Timer           maPauseTimer;
     117                 :            :     Timer           maMouseTimer;
     118                 :            :     Wallpaper       maShowBackground;
     119                 :            :     Graphic         maLogo;
     120                 :            :     sal_uLong           mnPauseTimeout;
     121                 :            :     sal_Int32       mnRestartPageIndex;
     122                 :            :     ShowWindowMode  meShowWindowMode;
     123                 :            :     bool            mbShowNavigatorAfterSpecialMode;
     124                 :            :     Rectangle       maPresArea;
     125                 :            :     bool            mbMouseAutoHide;
     126                 :            :     bool            mbMouseCursorHidden;
     127                 :            :     sal_uLong           mnFirstMouseMove;
     128                 :            : 
     129                 :            :                     DECL_LINK( PauseTimeoutHdl, Timer* pTimer );
     130                 :            :                     DECL_LINK(MouseTimeoutHdl, void *);
     131                 :            :                     DECL_LINK( EventHdl, VclWindowEvent* pEvent );
     132                 :            : 
     133                 :            :     ::rtl::Reference< SlideshowImpl > mxController;
     134                 :            : };
     135                 :            : 
     136                 :            : } // end of namespace sd
     137                 :            : 
     138                 :            : #endif
     139                 :            : 
     140                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10