xref: /aoo4110/main/sd/source/ui/inc/LayerTabBar.hxx (revision b1cdbd2c)
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_LAYER_TAB_BAR_HXX
25 #define SD_LAYER_TAB_BAR_HXX
26 
27 #include <svtools/tabbar.hxx>
28 #include <svtools/transfer.hxx>
29 
30 namespace sd {
31 
32 /*************************************************************************
33 |*
34 |* TabBar fuer die Layerverwaltung
35 |*
36 \************************************************************************/
37 
38 class DrawViewShell;
39 
40 class LayerTabBar
41     : public TabBar,
42       public DropTargetHelper
43 {
44 public:
45     LayerTabBar (
46         DrawViewShell* pDrViewSh,
47         ::Window* pParent);
48     LayerTabBar (
49         DrawViewShell* pDrViewSh,
50         ::Window* pParent,
51         const ResId& rResId);
52     virtual ~LayerTabBar (void);
53 
54     /** Inform all listeners of this control that the current layer has been
55         activated.  Call this method after switching the current layer and is
56         not done elsewhere (like when using ctrl + page up/down keys).
57     */
58     void SendActivatePageEvent (void);
59 
60     /** Inform all listeners of this control that the current layer has been
61         deactivated.  Call this method before switching the current layer
62         and is not done elsewhere (like when using ctrl page up/down keys).
63     */
64     void SendDeactivatePageEvent (void);
65 
66 protected:
67 	DrawViewShell* pDrViewSh;
68 
69 	// TabBar
70 	virtual void		Select();
71 	virtual void		DoubleClick();
72 	virtual void		MouseButtonDown(const MouseEvent& rMEvt);
73 
74 	virtual void		Command(const CommandEvent& rCEvt);
75 
76 	virtual long		StartRenaming();
77 	virtual long		AllowRenaming();
78 	virtual void		EndRenaming();
79 
80 	virtual void		ActivatePage();
81 
82 	// DropTargetHelper
83 	virtual sal_Int8	AcceptDrop( const AcceptDropEvent& rEvt );
84 	virtual sal_Int8	ExecuteDrop( const ExecuteDropEvent& rEvt );
85 };
86 
87 } // end of namespace sd
88 
89 #endif
90