1*353d8f4dSAndrew Rist /************************************************************** 2*353d8f4dSAndrew Rist * 3*353d8f4dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*353d8f4dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*353d8f4dSAndrew Rist * distributed with this work for additional information 6*353d8f4dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*353d8f4dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*353d8f4dSAndrew Rist * "License"); you may not use this file except in compliance 9*353d8f4dSAndrew Rist * with the License. You may obtain a copy of the License at 10*353d8f4dSAndrew Rist * 11*353d8f4dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*353d8f4dSAndrew Rist * 13*353d8f4dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*353d8f4dSAndrew Rist * software distributed under the License is distributed on an 15*353d8f4dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*353d8f4dSAndrew Rist * KIND, either express or implied. See the License for the 17*353d8f4dSAndrew Rist * specific language governing permissions and limitations 18*353d8f4dSAndrew Rist * under the License. 19*353d8f4dSAndrew Rist * 20*353d8f4dSAndrew Rist *************************************************************/ 21*353d8f4dSAndrew Rist 22*353d8f4dSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SFX2_IMPVIEWFRAME_HXX 25cdf0e10cSrcweir #define SFX2_IMPVIEWFRAME_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "sfx2/viewfrm.hxx" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <svtools/asynclink.hxx> 30cdf0e10cSrcweir #include <vcl/window.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir #include <boost/optional.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir struct SfxViewFrame_Impl 35cdf0e10cSrcweir { 36cdf0e10cSrcweir SvBorder aBorder; 37cdf0e10cSrcweir Size aMargin; 38cdf0e10cSrcweir Size aSize; 39cdf0e10cSrcweir String aFrameTitle; 40cdf0e10cSrcweir TypeId aLastType; 41cdf0e10cSrcweir String aActualURL; 42cdf0e10cSrcweir SfxFrame& rFrame; 43cdf0e10cSrcweir svtools::AsynchronLink* pReloader; 44cdf0e10cSrcweir Window* pWindow; 45cdf0e10cSrcweir SfxViewFrame* pActiveChild; 46cdf0e10cSrcweir Window* pFocusWin; 47cdf0e10cSrcweir sal_uInt16 nDocViewNo; 48cdf0e10cSrcweir sal_uInt16 nCurViewId; 49cdf0e10cSrcweir sal_Bool bResizeInToOut:1; 50cdf0e10cSrcweir sal_Bool bDontOverwriteResizeInToOut:1; 51cdf0e10cSrcweir sal_Bool bObjLocked:1; 52cdf0e10cSrcweir sal_Bool bReloading:1; 53cdf0e10cSrcweir sal_Bool bIsDowning:1; 54cdf0e10cSrcweir sal_Bool bModal:1; 55cdf0e10cSrcweir sal_Bool bEnabled:1; 56cdf0e10cSrcweir sal_Bool bWindowWasEnabled:1; 57cdf0e10cSrcweir sal_Bool bActive; 58cdf0e10cSrcweir String aFactoryName; 59cdf0e10cSrcweir ::boost::optional< bool > 60cdf0e10cSrcweir aHasToolPanels; 61cdf0e10cSrcweir SfxViewFrame_ImplSfxViewFrame_Impl62cdf0e10cSrcweir SfxViewFrame_Impl( SfxFrame& i_rFrame ) 63cdf0e10cSrcweir : rFrame( i_rFrame ) 64cdf0e10cSrcweir , pReloader(0 ) 65cdf0e10cSrcweir , pWindow( 0 ) 66cdf0e10cSrcweir , bWindowWasEnabled(sal_True) 67cdf0e10cSrcweir , bActive( sal_False ) 68cdf0e10cSrcweir { 69cdf0e10cSrcweir } 70cdf0e10cSrcweir ~SfxViewFrame_ImplSfxViewFrame_Impl71cdf0e10cSrcweir ~SfxViewFrame_Impl() 72cdf0e10cSrcweir { 73cdf0e10cSrcweir delete pReloader; 74cdf0e10cSrcweir } 75cdf0e10cSrcweir }; 76cdf0e10cSrcweir 77cdf0e10cSrcweir class SfxFrameViewWindow_Impl : public Window 78cdf0e10cSrcweir { 79cdf0e10cSrcweir sal_Bool bActive; 80cdf0e10cSrcweir SfxViewFrame* pFrame; 81cdf0e10cSrcweir 82cdf0e10cSrcweir public: SfxFrameViewWindow_Impl(SfxViewFrame * p,Window & rParent,WinBits nBits=0)83cdf0e10cSrcweir SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) : 84cdf0e10cSrcweir Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ), 85cdf0e10cSrcweir bActive( sal_False ), 86cdf0e10cSrcweir pFrame( p ) 87cdf0e10cSrcweir { 88cdf0e10cSrcweir p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER ); 89cdf0e10cSrcweir } 90cdf0e10cSrcweir 91cdf0e10cSrcweir virtual void Resize(); 92cdf0e10cSrcweir virtual void StateChanged( StateChangedType nStateChange ); 93cdf0e10cSrcweir }; 94cdf0e10cSrcweir 95cdf0e10cSrcweir #endif // SFX2_IMPVIEWFRAME_HXX 96cdf0e10cSrcweir 97