LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/sfx2 - dockwin.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 12 50.0 %
Date: 2013-07-09 Functions: 6 12 50.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 _SFXDOCKWIN_HXX
      20             : #define _SFXDOCKWIN_HXX
      21             : 
      22             : #include "sal/config.h"
      23             : #include "sal/types.h"
      24             : #include <vcl/dockwin.hxx>
      25             : 
      26             : #include <com/sun/star/uno/Reference.hxx>
      27             : #include <com/sun/star/awt/XWindow.hpp>
      28             : #include <com/sun/star/frame/XFrame.hpp>
      29             : 
      30             : #include "sfx2/dllapi.h"
      31             : #include <sfx2/childwin.hxx>
      32             : 
      33             : class SfxSplitWindow;
      34             : class SfxDockingWindow_Impl;
      35             : 
      36             : void SFX2_DLLPUBLIC SAL_CALL SfxDockingWindowFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const OUString& rDockingWindowName );
      37             : bool SFX2_DLLPUBLIC SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const OUString& rDockingWindowName );
      38             : 
      39             : class SFX2_DLLPUBLIC SfxDockingWindow : public DockingWindow
      40             : {
      41             : private:
      42             :     Rectangle               aInnerRect;
      43             :     Rectangle               aOuterRect;
      44             :     SfxBindings*            pBindings;
      45             :     Size                    aFloatSize;
      46             :     SfxChildWindow*         pMgr;
      47             :     SfxDockingWindow_Impl*  pImp;
      48             : 
      49             :     SAL_DLLPRIVATE SfxDockingWindow(SfxDockingWindow &); // not defined
      50             :     SAL_DLLPRIVATE void operator =(SfxDockingWindow &); // not defined
      51             : 
      52             : protected:
      53             :     SfxChildAlignment   CalcAlignment(const Point& rPos, Rectangle& rRect );
      54             :     void                CalcSplitPosition(const Point rPos, Rectangle& rRect,
      55             :                             SfxChildAlignment eAlign);
      56             :     virtual Size        CalcDockingSize(SfxChildAlignment);
      57             :     virtual SfxChildAlignment
      58             :                         CheckAlignment(SfxChildAlignment,SfxChildAlignment);
      59             : 
      60             :     virtual void        Resize();
      61             :     virtual sal_Bool        PrepareToggleFloatingMode();
      62             :     virtual void        ToggleFloatingMode();
      63             :     virtual void        StartDocking();
      64             :     virtual sal_Bool        Docking( const Point& rPos, Rectangle& rRect );
      65             :     virtual void        EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
      66             :     virtual void        Resizing( Size& rSize );
      67             :     virtual void        Paint( const Rectangle& rRect );
      68             :     virtual sal_Bool        Close();
      69             :     virtual void        Move();
      70             : 
      71           0 :     SAL_DLLPRIVATE SfxChildWindow* GetChildWindow_Impl()    { return pMgr; }
      72             : 
      73             : public:
      74             :                         SfxDockingWindow( SfxBindings *pBindings,
      75             :                                           SfxChildWindow *pCW,
      76             :                                           Window* pParent,
      77             :                                           WinBits nWinBits=0);
      78             :                         SfxDockingWindow( SfxBindings *pBindings,
      79             :                                           SfxChildWindow *pCW,
      80             :                                           Window* pParent,
      81             :                                           const ResId& rResId);
      82             :                         ~SfxDockingWindow();
      83             : 
      84             :     void                Initialize (SfxChildWinInfo* pInfo);
      85             :     virtual void        FillInfo(SfxChildWinInfo&) const;
      86             :     virtual void        StateChanged( StateChangedType nStateChange );
      87             : 
      88           0 :     void                SetDockingRects(const Rectangle& rOuter, const Rectangle& rInner)
      89           0 :                             { aInnerRect = rInner; aOuterRect = rOuter; }
      90           0 :     const Rectangle&    GetInnerRect() const                    { return aInnerRect; }
      91           0 :     const Rectangle&    GetOuterRect() const                    { return aOuterRect; }
      92         449 :     SfxBindings&        GetBindings() const                     { return *pBindings; }
      93        1326 :     sal_uInt16              GetType() const                         { return pMgr->GetType(); }
      94        1718 :     SfxChildAlignment   GetAlignment() const                    { return pMgr->GetAlignment(); }
      95         152 :     void                SetAlignment(SfxChildAlignment eAlign)  { pMgr->SetAlignment(eAlign); }
      96         173 :     Size                GetFloatingSize() const                 { return aFloatSize; }
      97         173 :     void                SetFloatingSize(const Size& rSize)      { aFloatSize=rSize; }
      98             : 
      99             :     void                SetMinOutputSizePixel( const Size& rSize );
     100             :     Size                GetMinOutputSizePixel() const;
     101             :     virtual long        Notify( NotifyEvent& rNEvt );
     102             :     virtual void        FadeIn( sal_Bool );
     103             :     void                AutoShow( sal_Bool bShow = sal_True );
     104             :     DECL_LINK(TimerHdl, void *);
     105             : 
     106             :     SAL_DLLPRIVATE void Initialize_Impl();
     107             :     SAL_DLLPRIVATE sal_uInt16 GetWinBits_Impl() const;
     108             :     SAL_DLLPRIVATE void SetItemSize_Impl( const Size& rSize );
     109             :     SAL_DLLPRIVATE void Disappear_Impl();
     110             :     SAL_DLLPRIVATE void Reappear_Impl();
     111             :     SAL_DLLPRIVATE sal_Bool IsAutoHide_Impl() const;
     112             :     SAL_DLLPRIVATE void AutoShow_Impl( sal_Bool bShow = sal_True );
     113             :     SAL_DLLPRIVATE void Pin_Impl( sal_Bool bPinned );
     114             :     SAL_DLLPRIVATE void ReleaseChildWindow_Impl();
     115             : };
     116             : 
     117           0 : class SfxDockingWrapper : public SfxChildWindow
     118             : {
     119             :     public:
     120             :         SfxDockingWrapper( Window* pParent ,
     121             :                            sal_uInt16 nId ,
     122             :                            SfxBindings* pBindings ,
     123             :                            SfxChildWinInfo* pInfo );
     124             : 
     125             :         SFX_DECL_CHILDWINDOW(SfxDockingWrapper);
     126             : };
     127             : 
     128             : #endif // #ifndef _SFXDOCKWIN_HXX
     129             : 
     130             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10