LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/slideshow - showwindow.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-12-27 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 SD_SHOW_WINDOW_HXX
      21             : #define SD_SHOW_WINDOW_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             : // ----------------
      33             : // - SdShowWindow -
      34             : // ----------------
      35             : 
      36             : 
      37             : namespace sd {
      38             : 
      39             : class SlideshowImpl;
      40             : 
      41             : // -----------
      42             : // - Defines -
      43             : // -----------
      44             : 
      45             : #define SLIDE_NO_TIMEOUT SAL_MAX_INT32
      46             : 
      47             : // ---------
      48             : // - Enums -
      49             : // ---------
      50             : 
      51             : enum ShowWindowMode
      52             : {
      53             :     SHOWWINDOWMODE_NORMAL = 0,
      54             :     SHOWWINDOWMODE_PAUSE = 1,
      55             :     SHOWWINDOWMODE_END = 2,
      56             :     SHOWWINDOWMODE_BLANK = 3,
      57             :     SHOWWINDOWMODE_PREVIEW = 4
      58             : };
      59             : 
      60             : class ShowWindow
      61             :     : public ::sd::Window
      62             : {
      63             : 
      64             : public:
      65             :     ShowWindow ( const ::rtl::Reference< ::sd::SlideshowImpl >& xController, ::Window* pParent );
      66             :     virtual ~ShowWindow (void);
      67             : 
      68             :     bool         SetEndMode();
      69             :     bool            SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
      70             :     bool            SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
      71             : 
      72           0 :     const Color&        GetBlankColor() const { return maShowBackground.GetColor(); }
      73             : 
      74             :     void            SetPreviewMode();
      75             :     void            SetPresentationArea( const Rectangle& rPresArea );
      76             : 
      77           0 :     void            SetMouseAutoHide( bool bMouseAutoHide ) { mbMouseAutoHide = bMouseAutoHide; }
      78             : 
      79           0 :     ShowWindowMode  GetShowWindowMode() const { return meShowWindowMode; }
      80             : 
      81             :     void            RestartShow( sal_Int32 nPageIndexToRestart );
      82             : 
      83             :     virtual void    Move();
      84             :     virtual void    Resize();
      85             :     virtual void    GetFocus();
      86             :     virtual void    LoseFocus();
      87             : 
      88             :     virtual void    KeyInput(const KeyEvent& rKEvt);
      89             :     virtual void    MouseMove(const MouseEvent& rMEvt);
      90             :     virtual void    MouseButtonUp(const MouseEvent& rMEvt);
      91             :     virtual void    MouseButtonDown(const MouseEvent& rMEvt);
      92             :     virtual void    Paint(const Rectangle& rRect);
      93             :     virtual long    Notify(NotifyEvent& rNEvt);
      94             : 
      95             :     void            TerminateShow();
      96             :     void            RestartShow();
      97             : 
      98             : private:
      99             :     void            DrawPauseScene( bool bTimeoutOnly );
     100             :     void            DrawEndScene();
     101             :     void            DrawBlankScene();
     102             : 
     103             :     void            DeleteWindowFromPaintView();
     104             :     void            AddWindowToPaintView();
     105             : 
     106             : private:
     107             :     Timer           maPauseTimer;
     108             :     Timer           maMouseTimer;
     109             :     Wallpaper       maShowBackground;
     110             :     Graphic         maLogo;
     111             :     sal_uLong           mnPauseTimeout;
     112             :     sal_Int32       mnRestartPageIndex;
     113             :     ShowWindowMode  meShowWindowMode;
     114             :     bool            mbShowNavigatorAfterSpecialMode;
     115             :     Rectangle       maPresArea;
     116             :     bool            mbMouseAutoHide;
     117             :     bool            mbMouseCursorHidden;
     118             :     sal_uLong           mnFirstMouseMove;
     119             : 
     120             :                     DECL_LINK( PauseTimeoutHdl, Timer* pTimer );
     121             :                     DECL_LINK(MouseTimeoutHdl, void *);
     122             :                     DECL_LINK( EventHdl, VclWindowEvent* pEvent );
     123             : 
     124             :     ::rtl::Reference< SlideshowImpl > mxController;
     125             : };
     126             : 
     127             : } // end of namespace sd
     128             : 
     129             : #endif
     130             : 
     131             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10