merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / inc / LayerTabBar.hxx
blob57e99dfadf3348f0cc349f5b6bd077798a7095b9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: LayerTabBar.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_LAYER_TAB_BAR_HXX
32 #define SD_LAYER_TAB_BAR_HXX
34 #include <svtools/tabbar.hxx>
35 #include <svtools/transfer.hxx>
37 namespace sd {
39 /*************************************************************************
41 |* TabBar fuer die Layerverwaltung
43 \************************************************************************/
45 class DrawViewShell;
47 class LayerTabBar
48 : public TabBar,
49 public DropTargetHelper
51 public:
52 LayerTabBar (
53 DrawViewShell* pDrViewSh,
54 ::Window* pParent);
55 LayerTabBar (
56 DrawViewShell* pDrViewSh,
57 ::Window* pParent,
58 const ResId& rResId);
59 virtual ~LayerTabBar (void);
61 /** Inform all listeners of this control that the current layer has been
62 activated. Call this method after switching the current layer and is
63 not done elsewhere (like when using ctrl + page up/down keys).
65 void SendActivatePageEvent (void);
67 /** Inform all listeners of this control that the current layer has been
68 deactivated. Call this method before switching the current layer
69 and is not done elsewhere (like when using ctrl page up/down keys).
71 void SendDeactivatePageEvent (void);
73 protected:
74 DrawViewShell* pDrViewSh;
76 // TabBar
77 virtual void Select();
78 virtual void DoubleClick();
79 virtual void MouseButtonDown(const MouseEvent& rMEvt);
81 virtual void Command(const CommandEvent& rCEvt);
83 virtual long StartRenaming();
84 virtual long AllowRenaming();
85 virtual void EndRenaming();
87 virtual void ActivatePage();
89 // DropTargetHelper
90 virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
91 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
94 } // end of namespace sd
96 #endif