1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SD_GRAPHIC_VIEW_SHELL_HXX
29 #define SD_GRAPHIC_VIEW_SHELL_HXX
30 
31 #include "DrawViewShell.hxx"
32 
33 class Window;
34 
35 namespace sd {
36 
37 /** View shell of the Draw application.
38 
39     <p>This class is an example of how not to do it: specialization by
40     inheritance.  A graphic view shell is similar to a draw view shell
41     but lacks some of its features.  Thus is should be at most a base
42     class of DrawViewShell.  There even is special case code in
43     ViewShell that turns off some of the features for GraphicViewShell
44     instances.</p>
45 */
46 class GraphicViewShell
47     : public DrawViewShell
48 {
49 public:
50 	TYPEINFO();
51 
52 	SFX_DECL_VIEWFACTORY(GraphicViewShell);
53 	SFX_DECL_INTERFACE(SD_IF_SDGRAPHICVIEWSHELL)
54 
55     /** Create a new view shell for the Draw application.
56         @param rViewShellBase
57             The new object will be stacked on this view shell base.
58         @param pFrameView
59             The frame view that makes it possible to pass information from
60             one view shell to the next.
61     */
62     GraphicViewShell (
63         SfxViewFrame* pFrame,
64         ViewShellBase& rViewShellBase,
65         ::Window* pParentWindow,
66         FrameView* pFrameView = NULL);
67 
68 	virtual ~GraphicViewShell (void);
69 
70     /** This method is overloaded in order to have the layer mode allways
71         active.
72     */
73 	virtual void ChangeEditMode (EditMode eMode, bool bIsLayerModeActive);
74 
75 protected:
76 	void ConstructGraphicViewShell (void);
77     virtual void ArrangeGUIElements (void);
78 
79 private:
80     DECL_LINK(TabBarSplitHandler, TabBar*);
81 };
82 
83 } // end of namespace sd
84 
85 #endif
86