1 /************************************************************************* 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * 4 * Copyright 2009 by Sun Microsystems, Inc. 5 * 6 * OpenOffice.org - a multi-platform office productivity suite 7 * 8 * This file is part of OpenOffice.org. 9 * 10 * OpenOffice.org is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License version 3 12 * only, as published by the Free Software Foundation. 13 * 14 * OpenOffice.org is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License version 3 for more details 18 * (a copy is included in the LICENSE file that accompanied this code). 19 * 20 * You should have received a copy of the GNU Lesser General Public License 21 * version 3 along with OpenOffice.org. If not, see 22 * <http://www.openoffice.org/license.html> 23 * for a copy of the LGPLv3 License. 24 ************************************************************************/ 25 26 #ifndef SFX2_IMPVIEWFRAME_HXX 27 #define SFX2_IMPVIEWFRAME_HXX 28 29 #include "sfx2/viewfrm.hxx" 30 31 #include <svtools/asynclink.hxx> 32 #include <vcl/window.hxx> 33 34 #include <boost/optional.hpp> 35 36 struct SfxViewFrame_Impl 37 { 38 SvBorder aBorder; 39 Size aMargin; 40 Size aSize; 41 String aFrameTitle; 42 TypeId aLastType; 43 String aActualURL; 44 SfxFrame& rFrame; 45 svtools::AsynchronLink* pReloader; 46 Window* pWindow; 47 SfxViewFrame* pActiveChild; 48 Window* pFocusWin; 49 sal_uInt16 nDocViewNo; 50 sal_uInt16 nCurViewId; 51 sal_Bool bResizeInToOut:1; 52 sal_Bool bDontOverwriteResizeInToOut:1; 53 sal_Bool bObjLocked:1; 54 sal_Bool bReloading:1; 55 sal_Bool bIsDowning:1; 56 sal_Bool bModal:1; 57 sal_Bool bEnabled:1; 58 sal_Bool bWindowWasEnabled:1; 59 sal_Bool bActive; 60 String aFactoryName; 61 ::boost::optional< bool > 62 aHasToolPanels; 63 64 SfxViewFrame_Impl( SfxFrame& i_rFrame ) 65 : rFrame( i_rFrame ) 66 , pReloader(0 ) 67 , pWindow( 0 ) 68 , bWindowWasEnabled(sal_True) 69 , bActive( sal_False ) 70 { 71 } 72 73 ~SfxViewFrame_Impl() 74 { 75 delete pReloader; 76 } 77 }; 78 79 class SfxFrameViewWindow_Impl : public Window 80 { 81 sal_Bool bActive; 82 SfxViewFrame* pFrame; 83 84 public: 85 SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) : 86 Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ), 87 bActive( sal_False ), 88 pFrame( p ) 89 { 90 p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER ); 91 } 92 93 virtual void Resize(); 94 virtual void StateChanged( StateChangedType nStateChange ); 95 }; 96 97 #endif // SFX2_IMPVIEWFRAME_HXX 98 99