LCOV - code coverage report
Current view: top level - sfx2/source/inc - splitwin.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 5 5 100.0 %
Date: 2014-04-11 Functions: 2 2 100.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             : #ifndef INCLUDED_SFX2_SOURCE_INC_SPLITWIN_HXX
      20             : #define INCLUDED_SFX2_SOURCE_INC_SPLITWIN_HXX
      21             : 
      22             : #include <vcl/splitwin.hxx>
      23             : #include <sfx2/childwin.hxx>
      24             : 
      25             : class SfxWorkWindow;
      26             : class SfxDockingWindow;
      27             : class SfxDockArr_Impl;
      28             : class SfxEmptySplitWin_Impl;
      29             : struct SfxDock_Impl;
      30             : 
      31             : class SfxSplitWindow : public SplitWindow
      32             : {
      33             : friend class SfxEmptySplitWin_Impl;
      34             : 
      35             : private:
      36             :     SfxChildAlignment   eAlign;
      37             :     SfxWorkWindow*      pWorkWin;
      38             :     SfxDockArr_Impl*    pDockArr;
      39             :     bool                bLocked;
      40             :     bool                bPinned;
      41             :     SfxEmptySplitWin_Impl*  pEmptyWin;
      42             :     SfxDockingWindow*   pActive;
      43             : 
      44             :     void                InsertWindow_Impl( SfxDock_Impl* pDockWin,
      45             :                             const Size& rSize,
      46             :                             sal_uInt16 nLine,
      47             :                             sal_uInt16 nPos,
      48             :                             bool bNewLine=false );
      49             : 
      50             :     DECL_LINK(          TimerHdl, Timer* );
      51             :     bool                CursorIsOverRect( bool bForceAdding = false ) const;
      52             :     void                SetPinned_Impl( bool );
      53             :     void                SetFadeIn_Impl( bool );
      54             :     void                SaveConfig_Impl();
      55             :     void                FadeOut_Impl();
      56             : 
      57             : protected:
      58             : 
      59             :     virtual void        StartSplit() SAL_OVERRIDE;
      60             :     virtual void        SplitResize() SAL_OVERRIDE;
      61             :     virtual void        Split() SAL_OVERRIDE;
      62             :     virtual void        Command ( const CommandEvent& rCEvt ) SAL_OVERRIDE;
      63             :     virtual void        MouseButtonDown ( const MouseEvent& ) SAL_OVERRIDE;
      64             : 
      65             : public:
      66             :                         SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
      67             :                             SfxWorkWindow *pW, bool bWithButtons,
      68             :                             WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK );
      69             : 
      70             :                         virtual ~SfxSplitWindow();
      71             : 
      72             :     void                ReleaseWindow_Impl(SfxDockingWindow *pWin, bool bSaveConfig=true);
      73             : 
      74             :     void                InsertWindow( SfxDockingWindow* pDockWin,
      75             :                             const Size& rSize);
      76             : 
      77             :     void                InsertWindow( SfxDockingWindow* pDockWin,
      78             :                             const Size& rSize,
      79             :                             sal_uInt16 nLine,
      80             :                             sal_uInt16 nPos,
      81             :                             bool bNewLine=false );
      82             : 
      83             :     void                MoveWindow( SfxDockingWindow* pDockWin,
      84             :                             const Size& rSize,
      85             :                             sal_uInt16 nLine,
      86             :                             sal_uInt16 nPos,
      87             :                             bool bNewLine=false );
      88             : 
      89             :     void                RemoveWindow( SfxDockingWindow* pDockWin, bool bHide=true);
      90             : 
      91         753 :     void                Lock( bool bLock=true )
      92             :                         {
      93         753 :                             bLocked = bLock;
      94         753 :                             SetUpdateMode( !bLock );
      95         753 :                         }
      96             :         using Window::IsLocked;
      97             :     bool                IsLocked() const { return bLocked; }
      98             :     bool                GetWindowPos( const SfxDockingWindow* pWindow,
      99             :                                       sal_uInt16& rLine, sal_uInt16& rPos ) const;
     100             :     bool                GetWindowPos( const Point& rTestPos,
     101             :                                       sal_uInt16& rLine, sal_uInt16& rPos ) const;
     102             :     sal_uInt16              GetLineCount() const;
     103             :     long                GetLineSize( sal_uInt16 ) const;
     104             :     sal_uInt16              GetWindowCount(sal_uInt16 nLine) const;
     105             :     sal_uInt16              GetWindowCount() const;
     106             : 
     107       31496 :     bool                IsPinned() const { return bPinned; }
     108             :     bool                IsFadeIn() const;
     109             :     bool                IsAutoHide( bool bSelf = false ) const;
     110             :     SplitWindow*        GetSplitWindow();
     111             : 
     112             :     virtual void        AutoHide() SAL_OVERRIDE;
     113             :     virtual void        FadeOut() SAL_OVERRIDE;
     114             :     virtual void        FadeIn() SAL_OVERRIDE;
     115             :     void                Show_Impl();
     116             :     void                Pin_Impl( bool bPinned );
     117             :     bool                ActivateNextChild_Impl( bool bForward = true );
     118             :     void                SetActiveWindow_Impl( SfxDockingWindow* pWin );
     119             : };
     120             : 
     121             : #endif // INCLUDED_SFX2_SOURCE_INC_SPLITWIN_HXX
     122             : 
     123             : 
     124             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10