xref: /trunk/main/sd/source/ui/dlg/LayerTabBar.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_sd.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "LayerTabBar.hxx"
32*cdf0e10cSrcweir #include <svx/svdlayer.hxx>
33*cdf0e10cSrcweir #include <svx/svdpagv.hxx>
34*cdf0e10cSrcweir #include <vcl/msgbox.hxx>
35*cdf0e10cSrcweir #include <sfx2/dispatch.hxx>
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir #include "sdattr.hxx"
39*cdf0e10cSrcweir #include "app.hxx"
40*cdf0e10cSrcweir #include "helpids.h"
41*cdf0e10cSrcweir #include "app.hrc"
42*cdf0e10cSrcweir #include "glob.hrc"
43*cdf0e10cSrcweir #include "strings.hrc"
44*cdf0e10cSrcweir #include "res_bmp.hrc"
45*cdf0e10cSrcweir #include "DrawViewShell.hxx"
46*cdf0e10cSrcweir #include "Window.hxx"
47*cdf0e10cSrcweir #include "View.hxx"
48*cdf0e10cSrcweir #include "drawdoc.hxx"
49*cdf0e10cSrcweir #include "sdresid.hxx"
50*cdf0e10cSrcweir #include "DrawDocShell.hxx"
51*cdf0e10cSrcweir #include "drawview.hxx"
52*cdf0e10cSrcweir #include "undolayer.hxx"
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir namespace sd {
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir #define SWITCH_TIMEOUT  20
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir /*************************************************************************
61*cdf0e10cSrcweir |*
62*cdf0e10cSrcweir |* Standard-Konstruktor
63*cdf0e10cSrcweir |*
64*cdf0e10cSrcweir \************************************************************************/
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir LayerTabBar::LayerTabBar(DrawViewShell* pViewSh, Window* pParent)
67*cdf0e10cSrcweir     : TabBar( pParent, WinBits( WB_BORDER | WB_3DLOOK | WB_SCROLL | WB_SIZEABLE ) ),
68*cdf0e10cSrcweir     DropTargetHelper( this ),
69*cdf0e10cSrcweir     pDrViewSh(pViewSh)
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir     EnableEditMode();
72*cdf0e10cSrcweir     SetSizePixel(Size(0, 0));
73*cdf0e10cSrcweir     SetMaxPageWidth( 150 );
74*cdf0e10cSrcweir     SetHelpId( HID_SD_TABBAR_LAYERS );
75*cdf0e10cSrcweir }
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir LayerTabBar::LayerTabBar (
79*cdf0e10cSrcweir     DrawViewShell* pViewSh,
80*cdf0e10cSrcweir     Window* pParent,
81*cdf0e10cSrcweir     const ResId& rResId)
82*cdf0e10cSrcweir     : TabBar (pParent, rResId.GetWinBits()),
83*cdf0e10cSrcweir     DropTargetHelper( this ),
84*cdf0e10cSrcweir     pDrViewSh(pViewSh)
85*cdf0e10cSrcweir {
86*cdf0e10cSrcweir     EnableEditMode();
87*cdf0e10cSrcweir }
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir /*************************************************************************
90*cdf0e10cSrcweir |*
91*cdf0e10cSrcweir |* Destruktor
92*cdf0e10cSrcweir |*
93*cdf0e10cSrcweir \************************************************************************/
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir LayerTabBar::~LayerTabBar()
96*cdf0e10cSrcweir {
97*cdf0e10cSrcweir }
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir /*************************************************************************
100*cdf0e10cSrcweir |*
101*cdf0e10cSrcweir \************************************************************************/
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir void LayerTabBar::Select()
104*cdf0e10cSrcweir {
105*cdf0e10cSrcweir     SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
106*cdf0e10cSrcweir     pDispatcher->Execute(SID_SWITCHLAYER, SFX_CALLMODE_ASYNCHRON);
107*cdf0e10cSrcweir }
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir /*************************************************************************
110*cdf0e10cSrcweir |*
111*cdf0e10cSrcweir \************************************************************************/
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir void LayerTabBar::MouseButtonDown(const MouseEvent& rMEvt)
114*cdf0e10cSrcweir {
115*cdf0e10cSrcweir     sal_Bool bSetPageID=sal_False;
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir     if (rMEvt.IsLeft() && !rMEvt.IsMod1() && !rMEvt.IsMod2())
118*cdf0e10cSrcweir     {
119*cdf0e10cSrcweir         Point aPosPixel = rMEvt.GetPosPixel();
120*cdf0e10cSrcweir         sal_uInt16 aLayerId = GetPageId( PixelToLogic(aPosPixel) );
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir         if (aLayerId == 0)
123*cdf0e10cSrcweir         {
124*cdf0e10cSrcweir             SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
125*cdf0e10cSrcweir             pDispatcher->Execute(SID_INSERTLAYER, SFX_CALLMODE_SYNCHRON);
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir             bSetPageID=sal_True;
128*cdf0e10cSrcweir         }
129*cdf0e10cSrcweir         else if (rMEvt.IsShift())
130*cdf0e10cSrcweir         {
131*cdf0e10cSrcweir             // Toggle zw. Layer sichtbar / unsichtbar
132*cdf0e10cSrcweir             String aName(GetPageText(aLayerId));
133*cdf0e10cSrcweir             SdrPageView* pPV = pDrViewSh->GetView()->GetSdrPageView();
134*cdf0e10cSrcweir             sal_Bool bVisible = pPV->IsLayerVisible(aName);
135*cdf0e10cSrcweir             pPV->SetLayerVisible(aName, !bVisible);
136*cdf0e10cSrcweir             pDrViewSh->ResetActualLayer();
137*cdf0e10cSrcweir         }
138*cdf0e10cSrcweir     }
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir     // If you insert a new layer you must not call TabBar::MouseButtonDown(rMEvt);
141*cdf0e10cSrcweir     // because you want to activate the new layer
142*cdf0e10cSrcweir     if( !bSetPageID )
143*cdf0e10cSrcweir         TabBar::MouseButtonDown(rMEvt);
144*cdf0e10cSrcweir }
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir /*************************************************************************
147*cdf0e10cSrcweir |*
148*cdf0e10cSrcweir \************************************************************************/
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir void LayerTabBar::DoubleClick()
151*cdf0e10cSrcweir {
152*cdf0e10cSrcweir     if (GetCurPageId() != 0)
153*cdf0e10cSrcweir     {
154*cdf0e10cSrcweir         SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
155*cdf0e10cSrcweir         pDispatcher->Execute( SID_MODIFYLAYER, SFX_CALLMODE_SYNCHRON );
156*cdf0e10cSrcweir     }
157*cdf0e10cSrcweir }
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir /*************************************************************************
161*cdf0e10cSrcweir |*
162*cdf0e10cSrcweir |* AcceptDrop-Event
163*cdf0e10cSrcweir |*
164*cdf0e10cSrcweir \************************************************************************/
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
167*cdf0e10cSrcweir {
168*cdf0e10cSrcweir     sal_Int8 nRet = DND_ACTION_NONE;
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir     if( rEvt.mbLeaving )
171*cdf0e10cSrcweir         EndSwitchPage();
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir     if( !pDrViewSh->GetDocSh()->IsReadOnly() )
174*cdf0e10cSrcweir     {
175*cdf0e10cSrcweir         sal_uInt16          nPageId = SDRPAGE_NOTFOUND;
176*cdf0e10cSrcweir         Point           aPos( PixelToLogic( rEvt.maPosPixel ) );
177*cdf0e10cSrcweir         sal_uInt16          nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( aPos ) ), sal_False );
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir         nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, nPageId, nLayerId );
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir         SwitchPage( aPos );
182*cdf0e10cSrcweir     }
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir     return nRet;
185*cdf0e10cSrcweir }
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir /*************************************************************************
188*cdf0e10cSrcweir |*
189*cdf0e10cSrcweir |* ExecuteDrop-Event
190*cdf0e10cSrcweir |*
191*cdf0e10cSrcweir \************************************************************************/
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt )
194*cdf0e10cSrcweir {
195*cdf0e10cSrcweir     sal_uInt16          nPageId = SDRPAGE_NOTFOUND;
196*cdf0e10cSrcweir     sal_uInt16          nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ), sal_False );
197*cdf0e10cSrcweir     sal_Int8        nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, nPageId, nLayerId );
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir     EndSwitchPage();
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir     return nRet;
202*cdf0e10cSrcweir 
203*cdf0e10cSrcweir }
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir /*************************************************************************
206*cdf0e10cSrcweir |*
207*cdf0e10cSrcweir \************************************************************************/
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir void  LayerTabBar::Command(const CommandEvent& rCEvt)
210*cdf0e10cSrcweir {
211*cdf0e10cSrcweir     if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
212*cdf0e10cSrcweir     {
213*cdf0e10cSrcweir         SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
214*cdf0e10cSrcweir         pDispatcher->ExecutePopup(SdResId(RID_LAYERTAB_POPUP));
215*cdf0e10cSrcweir     }
216*cdf0e10cSrcweir }
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir /*************************************************************************
220*cdf0e10cSrcweir |*
221*cdf0e10cSrcweir \************************************************************************/
222*cdf0e10cSrcweir long LayerTabBar::StartRenaming()
223*cdf0e10cSrcweir {
224*cdf0e10cSrcweir     sal_Bool bOK = sal_True;
225*cdf0e10cSrcweir     String aLayerName = GetPageText( GetEditPageId() );
226*cdf0e10cSrcweir     String aLayoutLayer ( SdResId(STR_LAYER_LAYOUT) );
227*cdf0e10cSrcweir     String aControlsLayer ( SdResId(STR_LAYER_CONTROLS) );
228*cdf0e10cSrcweir     String aMeasureLinesLayer ( SdResId(STR_LAYER_MEASURELINES) );
229*cdf0e10cSrcweir     String aBackgroundLayer( SdResId(STR_LAYER_BCKGRND) );
230*cdf0e10cSrcweir     String aBackgroundObjLayer( SdResId(STR_LAYER_BCKGRNDOBJ) );
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir     if ( aLayerName == aLayoutLayer       || aLayerName == aControlsLayer  ||
233*cdf0e10cSrcweir          aLayerName == aMeasureLinesLayer ||
234*cdf0e10cSrcweir          aLayerName == aBackgroundLayer   || aLayerName == aBackgroundObjLayer )
235*cdf0e10cSrcweir     {
236*cdf0e10cSrcweir         // Diese Namen duerfen nicht veraendert werden
237*cdf0e10cSrcweir         bOK = sal_False;
238*cdf0e10cSrcweir     }
239*cdf0e10cSrcweir     else
240*cdf0e10cSrcweir     {
241*cdf0e10cSrcweir         ::sd::View* pView = pDrViewSh->GetView();
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir         if ( pView->IsTextEdit() )
244*cdf0e10cSrcweir         {
245*cdf0e10cSrcweir             pView->SdrEndTextEdit();
246*cdf0e10cSrcweir         }
247*cdf0e10cSrcweir     }
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir     return(bOK);
250*cdf0e10cSrcweir }
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir /*************************************************************************
253*cdf0e10cSrcweir |*
254*cdf0e10cSrcweir \************************************************************************/
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir long LayerTabBar::AllowRenaming()
257*cdf0e10cSrcweir {
258*cdf0e10cSrcweir     sal_Bool bOK = sal_True;
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir     // Ueberpruefung auf schon vorhandene Namen
261*cdf0e10cSrcweir     ::sd::View* pView = pDrViewSh->GetView();
262*cdf0e10cSrcweir     SdDrawDocument* pDoc = pView->GetDoc();
263*cdf0e10cSrcweir     String aLayerName = pView->GetActiveLayer();
264*cdf0e10cSrcweir     SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
265*cdf0e10cSrcweir     String aNewName( GetEditText() );
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir     if ( aNewName.Len() == 0 ||
268*cdf0e10cSrcweir         (rLayerAdmin.GetLayer( aNewName, sal_False ) && aLayerName != aNewName) )
269*cdf0e10cSrcweir     {
270*cdf0e10cSrcweir         // Name ist schon vorhanden
271*cdf0e10cSrcweir         WarningBox aWarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
272*cdf0e10cSrcweir                                 String(SdResId( STR_WARN_NAME_DUPLICATE ) ) );
273*cdf0e10cSrcweir         aWarningBox.Execute();
274*cdf0e10cSrcweir         bOK = sal_False;
275*cdf0e10cSrcweir     }
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir     if (bOK)
278*cdf0e10cSrcweir     {
279*cdf0e10cSrcweir         String aLayoutLayer ( SdResId(STR_LAYER_LAYOUT) );
280*cdf0e10cSrcweir         String aControlsLayer ( SdResId(STR_LAYER_CONTROLS) );
281*cdf0e10cSrcweir         String aMeasureLinesLayer ( SdResId(STR_LAYER_MEASURELINES) );
282*cdf0e10cSrcweir         String aBackgroundLayer( SdResId(STR_LAYER_BCKGRND) );
283*cdf0e10cSrcweir         String aBackgroundObjLayer( SdResId(STR_LAYER_BCKGRNDOBJ) );
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir         if ( aNewName == aLayoutLayer       || aNewName == aControlsLayer  ||
286*cdf0e10cSrcweir              aNewName == aMeasureLinesLayer ||
287*cdf0e10cSrcweir              aNewName == aBackgroundLayer   || aNewName == aBackgroundObjLayer )
288*cdf0e10cSrcweir         {
289*cdf0e10cSrcweir             // Diese Namen duerfen nicht vergeben werden
290*cdf0e10cSrcweir             bOK = sal_False;
291*cdf0e10cSrcweir         }
292*cdf0e10cSrcweir     }
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir     return(bOK);
295*cdf0e10cSrcweir }
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir /*************************************************************************
298*cdf0e10cSrcweir |*
299*cdf0e10cSrcweir \************************************************************************/
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir void LayerTabBar::EndRenaming()
302*cdf0e10cSrcweir {
303*cdf0e10cSrcweir     if( !IsEditModeCanceled() )
304*cdf0e10cSrcweir     {
305*cdf0e10cSrcweir         ::sd::View* pView = pDrViewSh->GetView();
306*cdf0e10cSrcweir         DrawView* pDrView = PTR_CAST( DrawView, pView );
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir         SdDrawDocument* pDoc = pView->GetDoc();
309*cdf0e10cSrcweir         String aLayerName = pView->GetActiveLayer();
310*cdf0e10cSrcweir         SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
311*cdf0e10cSrcweir         SdrLayer* pLayer = rLayerAdmin.GetLayer(aLayerName, sal_False);
312*cdf0e10cSrcweir 
313*cdf0e10cSrcweir         if (pLayer)
314*cdf0e10cSrcweir         {
315*cdf0e10cSrcweir             String aNewName( GetEditText() );
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir             DBG_ASSERT( pDrView, "Rename layer undo action is only working with a SdDrawView" );
318*cdf0e10cSrcweir             if( pDrView )
319*cdf0e10cSrcweir             {
320*cdf0e10cSrcweir                 ::svl::IUndoManager* pManager = pDoc->GetDocSh()->GetUndoManager();
321*cdf0e10cSrcweir                 SdLayerModifyUndoAction* pAction = new SdLayerModifyUndoAction(
322*cdf0e10cSrcweir                     pDoc,
323*cdf0e10cSrcweir                     pLayer,
324*cdf0e10cSrcweir                     aLayerName,
325*cdf0e10cSrcweir                     pLayer->GetTitle(),
326*cdf0e10cSrcweir                     pLayer->GetDescription(),
327*cdf0e10cSrcweir                     pDrView->IsLayerVisible(aLayerName),
328*cdf0e10cSrcweir                     pDrView->IsLayerLocked(aLayerName),
329*cdf0e10cSrcweir                     pDrView->IsLayerPrintable(aLayerName),
330*cdf0e10cSrcweir                     aNewName,
331*cdf0e10cSrcweir                     pLayer->GetTitle(),
332*cdf0e10cSrcweir                     pLayer->GetDescription(),
333*cdf0e10cSrcweir                     pDrView->IsLayerVisible(aLayerName),
334*cdf0e10cSrcweir                     pDrView->IsLayerLocked(aLayerName),
335*cdf0e10cSrcweir                     pDrView->IsLayerPrintable(aLayerName)
336*cdf0e10cSrcweir                     );
337*cdf0e10cSrcweir                 pManager->AddUndoAction( pAction );
338*cdf0e10cSrcweir             }
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir             // Zuerst View benachrichtigen, da innerhalb von SetName() schon
341*cdf0e10cSrcweir             // ResetActualLayer() gerufen wird und an der View der Layer dann
342*cdf0e10cSrcweir             // schon bekannt sein muss.
343*cdf0e10cSrcweir             pView->SetActiveLayer(aNewName);
344*cdf0e10cSrcweir             pLayer->SetName(aNewName);
345*cdf0e10cSrcweir             pDoc->SetChanged(sal_True);
346*cdf0e10cSrcweir         }
347*cdf0e10cSrcweir     }
348*cdf0e10cSrcweir }
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir /*************************************************************************
352*cdf0e10cSrcweir |*
353*cdf0e10cSrcweir \************************************************************************/
354*cdf0e10cSrcweir 
355*cdf0e10cSrcweir void LayerTabBar::ActivatePage()
356*cdf0e10cSrcweir {
357*cdf0e10cSrcweir     if ( /*IsInSwitching*/ 1 && pDrViewSh!=NULL)
358*cdf0e10cSrcweir     {
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir         SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
361*cdf0e10cSrcweir         pDispatcher->Execute(SID_SWITCHLAYER, SFX_CALLMODE_ASYNCHRON);
362*cdf0e10cSrcweir     }
363*cdf0e10cSrcweir }
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir 
367*cdf0e10cSrcweir 
368*cdf0e10cSrcweir void LayerTabBar::SendActivatePageEvent (void)
369*cdf0e10cSrcweir {
370*cdf0e10cSrcweir     CallEventListeners (VCLEVENT_TABBAR_PAGEACTIVATED,
371*cdf0e10cSrcweir         reinterpret_cast<void*>(GetCurPageId()));
372*cdf0e10cSrcweir }
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir void LayerTabBar::SendDeactivatePageEvent (void)
378*cdf0e10cSrcweir {
379*cdf0e10cSrcweir     CallEventListeners (VCLEVENT_TABBAR_PAGEDEACTIVATED,
380*cdf0e10cSrcweir         reinterpret_cast<void*>(GetCurPageId()));
381*cdf0e10cSrcweir }
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir } // end of namespace sd
384