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