xref: /trunk/main/sd/source/ui/inc/GraphicViewShell.hxx (revision 30acf5e8)
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 SD_GRAPHIC_VIEW_SHELL_HXX
25 #define SD_GRAPHIC_VIEW_SHELL_HXX
26 
27 #include "DrawViewShell.hxx"
28 
29 class Window;
30 
31 namespace sd {
32 
33 /** View shell of the Draw application.
34 
35     <p>This class is an example of how not to do it: specialization by
36     inheritance.  A graphic view shell is similar to a draw view shell
37     but lacks some of its features.  Thus is should be at most a base
38     class of DrawViewShell.  There even is special case code in
39     ViewShell that turns off some of the features for GraphicViewShell
40     instances.</p>
41 */
42 class GraphicViewShell
43     : public DrawViewShell
44 {
45 public:
46 	TYPEINFO();
47 
48 	SFX_DECL_VIEWFACTORY(GraphicViewShell);
49 	SFX_DECL_INTERFACE(SD_IF_SDGRAPHICVIEWSHELL)
50 
51     /** Create a new view shell for the Draw application.
52         @param rViewShellBase
53             The new object will be stacked on this view shell base.
54         @param pFrameView
55             The frame view that makes it possible to pass information from
56             one view shell to the next.
57     */
58     GraphicViewShell (
59         SfxViewFrame* pFrame,
60         ViewShellBase& rViewShellBase,
61         ::Window* pParentWindow,
62         FrameView* pFrameView = NULL);
63 
64 	virtual ~GraphicViewShell (void);
65 
66     /** This method is overloaded in order to have the layer mode always
67         active.
68     */
69 	virtual void ChangeEditMode (EditMode eMode, bool bIsLayerModeActive);
70 
71 protected:
72 	void ConstructGraphicViewShell (void);
73     virtual void ArrangeGUIElements (void);
74 
75 private:
76     DECL_LINK(TabBarSplitHandler, TabBar*);
77 };
78 
79 } // end of namespace sd
80 
81 #endif
82