OOO330
[LibreOffice.git] / soldep / source / depper.cxx
blob11610ea1fcef886ae5d6a003eda9b217846b8825
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
29 #include <stdio.h>
30 #include <tools/stream.hxx>
31 #include <tools/debug.hxx>
32 #include <vcl/msgbox.hxx>
33 #include <svtools/prgsbar.hxx>
35 #include <soldep/depper.hxx>
36 #include <soldep/objwin.hxx>
38 #include "math.h"
39 #include "time.h"
40 #include "stdlib.h"
41 #include "dtsodcmp.hrc"
43 #include <vcl/svapp.hxx>
45 #define MIN(a,b) (a)<(b)?(a):(b)
46 #define MAX(a,b) (a)>(b)?(a):(b)
48 ByteString sDelimiterLine("#==========================================================================");
53 Depper::Depper( Window* pBaseWindow ):
54 Window( pBaseWindow ),
55 mbIsPrjView(FALSE),
56 maDefPos( 50, 50 ),
57 maDefSize( 60, 25 ),
58 mnViewMask( 1 ),
59 pSubBar( NULL ),
60 pMainBar( NULL ),
61 pSubText( NULL ),
62 pMainText( NULL ),
63 maArrangeDlg( pBaseWindow ),
64 mpPrjIdMapper( NULL ),
65 maToolBox( pBaseWindow, DtSodResId(TID_SOLDEP_MAIN) ),
66 maTaskBarFrame( pBaseWindow, 0)
68 maArrangeDlg.Hide();
70 mpProcessWin = pBaseWindow;
71 mpGraphWin = new GraphWin( mpProcessWin, this );
72 mpGraphPrjWin = new GraphWin( mpProcessWin, this );
73 //mpBaseWin paints into virtual OutputDevice
74 mpBaseWin = new DepWin( mpGraphWin->GetBufferWindow(), WB_NOBORDER | WB_SIZEABLE | WB_AUTOSIZE );
75 mpBasePrjWin = new DepWin( mpGraphPrjWin->GetBufferWindow(), WB_NOBORDER | WB_SIZEABLE | WB_AUTOSIZE );
77 mpGraphWin->SetBackground( Wallpaper( Color( COL_RED )));
78 mpGraphPrjWin->SetBackground( Wallpaper( Color( COL_BLUE )));
79 mpGraphPrjWin->Hide();
80 mpBaseWin->SetBackground( Wallpaper( Color( COL_WHITE )));
81 mpBasePrjWin->SetBackground( Wallpaper( Color( COL_LIGHTGRAY )));
83 mpGraphWin->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
84 mpGraphPrjWin->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
85 mpBaseWin->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
87 mpGraphWin->EnableClipSiblings();
88 mpGraphPrjWin->EnableClipSiblings();
90 mpParentProcessWin = mpProcessWin->GetParent();
91 mpBaseWin->Show();
92 nZoomed = 0;
94 mpBaseWin->SetPopupHdl( this );
95 mpBasePrjWin->SetPopupHdl( this );
97 mpObjectList = new ObjectList(); //ObjectList unbekannt
98 mpObjectPrjList = new ObjectList();
101 Depper::~Depper()
103 // delete mpObjectList;
104 delete mpBaseWin;
105 delete mpGraphWin;
108 BOOL Depper::TogglePrjViewStatus()
110 GetDepWin()->Hide(); //Hide old content window
111 GetGraphWin()->Hide();
112 mbIsPrjView = !mbIsPrjView; //switch now
113 GetDepWin()->Invalidate();
114 GetGraphWin()->Show();
115 GetDepWin()->Show(); //Show new content window
116 return mbIsPrjView;
119 void Depper::HideObjectsAndConnections( ObjectList* pObjLst )
121 for ( ULONG i = 0; i < pObjLst->Count(); i ++ ) {
122 ObjectWin *pWin = pObjLst->GetObject( i );
123 pWin->Hide();
125 mpGraphWin->Hide();
126 mpBaseWin->Hide();
127 mpGraphPrjWin->Show();
128 mpBasePrjWin->Show();
131 void Depper::ShowObjectsAndConnections( ObjectList* pObjLst )
133 for ( ULONG i = 0; i < pObjLst->Count(); i ++ ) {
134 ObjectWin *pWin = pObjLst->GetObject( i );
135 pWin->Show();
137 mpBasePrjWin->Hide();
138 mpGraphPrjWin->Hide();
139 mpGraphWin->Show();
140 mpBaseWin->Show();
144 void Depper::RemoveAllObjects( ObjectList* pObjLst )
146 ULONG i;
148 for ( i = pObjLst->Count(); i > 0; i-- )
149 delete pObjLst->GetObject( i - 1 );
150 pObjLst->Clear();
153 USHORT Depper::Save( const ByteString& rFileName )
155 DBG_ASSERT( FALSE , "you are dead!" );
156 SvFileStream aOutFile( String( rFileName, RTL_TEXTENCODING_UTF8 ), STREAM_WRITE );
157 depper_head dh;
158 USHORT i;
159 ULONG nObjCount = mpObjectList->Count();
161 ConnectorList* pConList = GetDepWin()->GetConnectorList();
162 ULONG nCnctrCount = pConList->Count();
164 dh.nID = DEPPER_ID;
165 dh.nObjectCount = nObjCount;
166 dh.nCnctrCount = nCnctrCount;
168 aOutFile.Write( &dh, sizeof( dh ));
170 for ( i=0; i < nObjCount ; i++ )
172 mpObjectList->GetObject( i )->Save( aOutFile );
175 for ( i=0; i < nCnctrCount ; i++ )
177 pConList->GetObject( i )->Save( aOutFile );
180 return 0;
184 USHORT Depper::WriteSource()
186 DBG_ASSERT( FALSE , "overload it!" );
187 return 0;
190 USHORT Depper::ReadSource( BOOL bUpdater )
192 DBG_ASSERT( FALSE , "overload it!" );
193 return 0;
196 USHORT Depper::OpenSource()
198 DBG_ASSERT( FALSE , "overload it!" );
199 return 0;
202 ObjectWin* Depper::ObjIdToPtr( ObjectList* pObjLst, ULONG nId )
204 ULONG nObjCount = pObjLst->Count();
205 ULONG i = 0;
206 ObjectWin* pWin;
207 ULONG nWinId = 0;
211 pWin = pObjLst->GetObject( i );
212 nWinId = pWin->GetId();
213 i++;
215 while( i < nObjCount && pWin->GetId() != nId );
216 if ( pWin->GetId() == nId )
217 return pWin;
218 else
219 return NULL;
222 void Depper::SetMainProgressBar( USHORT i)
224 if ( pMainBar ) {
225 pMainBar->SetValue( 100 );
226 pMainBar->Update();
230 void Depper::UpdateMainProgressBar(USHORT i, USHORT nScaleVal, USHORT &nStep, BOOL bCountingDown )
232 ULONG val = 0;
233 if ( pMainBar ) {
234 // val = i * 50 / nScaleVal + 1;
235 val = bCountingDown ? 50 + ( nScaleVal - i ) * 50 / nScaleVal : i * 50 / nScaleVal;
237 pMainBar->SetValue( val );
238 pMainBar->Update();
239 String sText( String::CreateFromAscii( "Optimize step " ));
240 sText += String::CreateFromInt32( ++nStep );
241 pSubText->SetText( sText );
245 void Depper::UpdateSubProgrssBar(ULONG i)
247 if ( pSubBar )
249 pSubBar->SetValue( i );
250 pSubBar->Update();
251 GetpApp()->Reschedule();
256 USHORT Depper::AutoArrangeDlgStart()
258 pSubBar = maArrangeDlg.GetSubBar();
259 pMainBar = maArrangeDlg.GetMainBar();
260 pSubText = maArrangeDlg.GetSubText();
261 pMainText = maArrangeDlg.GetMainText();
262 pMainText->SetText( String::CreateFromAscii( "Overall status" ));
263 maArrangeDlg.Show();
264 GetDepWin()->Enable( FALSE );
265 GetDepWin()->Hide();
266 return 0;
269 USHORT Depper::AutoArrangeDlgStop()
271 maArrangeDlg.Hide();
272 GetDepWin()->Enable( TRUE );
273 GetDepWin()->Show();
274 pSubBar = NULL;
275 pMainBar = NULL;
276 pSubText = NULL;
277 pMainText = NULL;
278 return 0;
283 USHORT Depper::Zoom( MapMode& rMapMode )
285 ULONG i;
286 ObjectWin* pWin;
287 Point aPos;
288 Size aSize;
289 ObjectList* pObjList;
290 pObjList = GetObjectList();
291 // aSize = mpBaseWin->GetSizePixel();
292 // mpGraphWin->SetTotalSize( aSize );
293 // mpGraphWin->EndScroll( 0, 0 );
295 for ( i = pObjList->Count(); i > 0; i-- )
297 pWin = pObjList->GetObject( i - 1 );
298 aPos = pWin->PixelToLogic( pWin->GetPosPixel());
299 aSize = pWin->PixelToLogic( pWin->GetSizePixel());
300 pWin->SetMapMode( rMapMode );
301 aPos = pWin->LogicToPixel( aPos );
302 aSize = pWin->LogicToPixel( aSize );
303 pWin->SetPosSizePixel( aPos, aSize );
305 GetDepWin()->Invalidate();
306 return 0;
309 ULONG Depper::AddObjectToList( DepWin* pParentWin, ObjectList* pObjLst, ULONG &LastID, ULONG &WinCount, ByteString& rBodyText, BOOL bInteract )
311 Point aPos;
312 Size aSize = GetDefSize();
314 aPos = GetDepWin()->LogicToPixel( aPos );
315 aSize = GetDepWin()->LogicToPixel( aSize );
316 return AddObjectToList( pParentWin, pObjLst, LastID, WinCount, rBodyText, aPos, aSize );
319 ULONG Depper::AddObjectToList( DepWin* pParentWin, ObjectList* pObjLst, ULONG &LastID, ULONG &WinCount, ByteString& rBodyText, Point& rPos, Size& rSize )
321 ObjectWin* pWin = new ObjectWin( pParentWin, WB_BORDER );
322 //pWin->mpDepperDontuseme = this;
323 pWin->SetGlobalViewMask(mnViewMask); // Set ViewMask for all ObjectWin and Connector objects
325 Size aNewSize;
326 aNewSize.Width() = pWin->GetTextWidth( String( rBodyText, RTL_TEXTENCODING_UTF8 ));
327 aNewSize.Height() = pWin->GetTextHeight();
328 if ( aNewSize.Width() > rSize.Width() - 8 )
330 aNewSize.Width() = aNewSize.Width() + 8;
331 aNewSize.Height() = rSize.Height();
333 else
334 aNewSize = rSize;
335 pWin->SetPosSizePixel( rPos,aNewSize);
337 MapMode aMapMode = mpBaseWin->GetMapMode();
338 pWin->SetMapMode( aMapMode );
340 pObjLst->Insert( pWin, LIST_APPEND );
341 pWin->SetId( LastID );
342 LastID++;
343 WinCount++;
344 pWin->SetBodyText( rBodyText );
345 // pWin->Show();
346 return pWin->GetId();
349 /*void Depper::DrawOutput( OutputDevice* pDevice )
351 GetDepWin()->DrawOutput( pDevice );
352 ObjectList* pObjList = GetObjectList();
353 for ( USHORT i = pObjList->Count(); i > 0; i-- )
355 ObjectWin* pWin = pObjList->GetObject( i - 1 );
356 pWin->DrawOutput( pDevice );
360 ObjectWin* Depper::RemoveObjectFromList( ObjectList* pObjLst, ULONG &WinCount, USHORT nId, BOOL bDelete )
362 ObjectWin* pWin = ObjIdToPtr( pObjLst, nId );
364 if ( pWin )
366 pObjLst->Remove( pWin );
367 WinCount--;
368 if( bDelete )
369 delete pWin;
370 return pWin;
372 else
373 return NULL;
375 USHORT Depper::AddConnectorToObjects( ObjectList* pObjLst, ULONG nStartId, ULONG nEndId )
377 ObjectWin* pStartWin = ObjIdToPtr( pObjLst, nStartId );
379 if ( !pStartWin )
380 return DEP_STARTID_NOT_FOUND;
382 ObjectWin* pEndWin = ObjIdToPtr( pObjLst, nEndId );
384 if ( !pEndWin )
385 return DEP_STARTID_NOT_FOUND;
387 return AddConnectorToObjects( pStartWin, pEndWin );
390 USHORT Depper::RemoveConnectorFromObjects( ObjectList* pObjLst, ULONG nStartId, ULONG nEndId )
392 // DBG_ASSERT( FALSE , "noch nicht" );
393 ObjectWin* pStartWin = ObjIdToPtr( pObjLst, nStartId );
395 if ( !pStartWin )
396 return DEP_STARTID_NOT_FOUND;
398 ObjectWin* pEndWin = ObjIdToPtr( pObjLst, nEndId );
400 if ( !pEndWin )
401 return DEP_STARTID_NOT_FOUND;
403 return RemoveConnectorFromObjects( pStartWin, pEndWin );
406 USHORT Depper::AddConnectorToObjects( ObjectWin* pStartWin, ObjectWin* pEndWin )
408 if ( pStartWin->ConnectionExistsInAnyDirection( pEndWin ))
409 return 0;
411 Connector* pCon = new Connector( GetDepWin(), WB_NOBORDER );
412 // pCon->Initialize( pStartWin, pEndWin );
413 if (pStartWin->IsNullObject()) //null_project
414 pCon->Initialize( pStartWin, pEndWin, FALSE );
415 else
416 pCon->Initialize( pStartWin, pEndWin, TRUE );
417 return 0;
420 USHORT Depper::RemoveConnectorFromObjects( ObjectWin* pStartWin, ObjectWin* pEndWin )
422 Connector* pCon = pStartWin->GetConnector( pStartWin->GetId(), pEndWin->GetId() );
424 if ( !pCon )
425 return DEP_CONNECTOR_NOT_FOUND;
426 else
428 delete pCon;
429 return DEP_OK;
433 ULONG Depper::HandleNewPrjDialog( ByteString &rBodyText )
435 SolNewProjectDlg aNewProjectDlg( GetDepWin(), DtSodResId( RID_SD_DIALOG_NEWPROJECT ));
436 if ( aNewProjectDlg.Execute() )
438 rBodyText = ByteString( aNewProjectDlg.maEName.GetText(), RTL_TEXTENCODING_UTF8);
439 //hashtable auf stand halten
440 MyHashObject* pHObject;
441 ULONG nObjectId = AddObjectToList( mpBaseWin, mpObjectList, mnSolLastId, mnSolWinCount, rBodyText, FALSE );
442 pHObject = new MyHashObject( nObjectId, ObjIdToPtr( mpObjectList, nObjectId ));
443 mpSolIdMapper->Insert( rBodyText, pHObject );
445 ByteString sTokenLine( aNewProjectDlg.maEShort.GetText(), RTL_TEXTENCODING_UTF8 );
446 sTokenLine += '\t';
447 sTokenLine += ByteString( aNewProjectDlg.maEName.GetText(), RTL_TEXTENCODING_UTF8 );
448 sTokenLine += "\t:\t";
450 ByteString sDeps = ByteString( aNewProjectDlg.maEDeps.GetText(), RTL_TEXTENCODING_UTF8 );
452 if ( sDeps != "" )
454 USHORT i;
455 ByteString sDepName;
456 USHORT nToken = sDeps.GetTokenCount(' ');
457 for ( i = 0 ; i < nToken ; i++)
459 sDepName = sDeps.GetToken( i, ' ' );
460 sTokenLine += sDepName;
461 sTokenLine +='\t';
464 sTokenLine +="NULL";
466 mpStarWriter->InsertTokenLine( sTokenLine );
467 mpStarWriter->InsertTokenLine( sDelimiterLine );
469 if ( sDeps != "" )
471 USHORT i;
472 ByteString sDepName;
473 ULONG nObjectId_l, nHashedId;
474 MyHashObject* pHObject_l;
475 USHORT nToken = sDeps.GetTokenCount(' ');
476 for ( i = 0 ; i < nToken ; i++)
478 sDepName = sDeps.GetToken( i, ' ' );
480 pHObject_l = mpSolIdMapper->Find( sDepName );
481 if ( !pHObject_l )
483 String sMessage;
484 sMessage += String::CreateFromAscii("can't find ");
485 sMessage += String( sDepName, RTL_TEXTENCODING_UTF8 );
486 sMessage += String::CreateFromAscii(".\ndependency ignored");
487 WarningBox aBox( GetDepWin(), WB_OK, sMessage);
488 aBox.Execute();
490 else
492 nHashedId = pHObject_l->GetId();
493 pHObject_l = mpSolIdMapper->Find( rBodyText );
494 nObjectId_l = pHObject_l->GetId();
495 AddConnectorToObjects( mpObjectList, nHashedId, nObjectId_l );
499 return nObjectId;
501 return 0;
504 ULONG Depper::HandleNewDirectoryDialog(ByteString &rBodyText)
506 SolNewDirectoryDlg aNewDirectoryDlg( GetDepWin(), DtSodResId( RID_SD_DIALOG_NEWDIRECTORY ));
507 //todo: set defaults
508 if ( aNewDirectoryDlg.Execute() )
510 rBodyText = ByteString( aNewDirectoryDlg.maEFlag.GetText(), RTL_TEXTENCODING_UTF8 );
511 //hashtable auf stand halten
512 MyHashObject* pHObject;
513 ULONG nObjectId = AddObjectToList( GetDepWin(), mpObjectPrjList, mnSolLastId, mnSolWinCount, rBodyText );
514 pHObject = new MyHashObject( nObjectId, ObjIdToPtr( mpObjectPrjList, nObjectId ));
515 mpPrjIdMapper->Insert( rBodyText, pHObject ); // mpPrjIdMapper
517 String sTokenLine;
518 sTokenLine = String( mpPrj->GetPreFix(), RTL_TEXTENCODING_UTF8 );
519 sTokenLine += '\t';
520 String sNameConvert = aNewDirectoryDlg.maEName.GetText();
521 sNameConvert.SearchAndReplaceAll( '/', '\\' );
522 if ( sNameConvert.GetToken( 0, 0x5c ) != String( mpPrj->GetProjectName(), RTL_TEXTENCODING_UTF8 ))
524 sTokenLine += String( mpPrj->GetProjectName(), RTL_TEXTENCODING_UTF8 );
525 sTokenLine += String("\\", RTL_TEXTENCODING_UTF8 );
526 sTokenLine += sNameConvert;
528 else
529 sTokenLine += sNameConvert;
530 sTokenLine += '\t';
531 sTokenLine += aNewDirectoryDlg.maEAction.GetText();
532 sTokenLine += String( "\t-\t", RTL_TEXTENCODING_UTF8 );
533 sTokenLine += aNewDirectoryDlg.maEEnv.GetText();
534 sTokenLine += '\t';
535 sTokenLine += aNewDirectoryDlg.maEFlag.GetText();
536 sTokenLine += '\t';
538 sTokenLine += String( "NULL", RTL_TEXTENCODING_UTF8 );
540 ByteString bsTokenLine = ByteString( sTokenLine, RTL_TEXTENCODING_UTF8 );
541 mpStarWriter->InsertTokenLine( bsTokenLine );
543 if ( aNewDirectoryDlg.maEDeps.GetText() != String( "", RTL_TEXTENCODING_UTF8 ))
545 USHORT i;
546 ByteString sDeps = ByteString( aNewDirectoryDlg.maEDeps.GetText(), RTL_TEXTENCODING_UTF8 );
547 ByteString sDepName;
548 ULONG nObjectId_l, nHashedId;
549 MyHashObject* pHObject_l;
550 USHORT nToken = sDeps.GetTokenCount(' ');
551 for ( i = 0 ; i < nToken ; i++)
553 sDepName = sDeps.GetToken( i, ' ' );
555 pHObject_l = mpPrjIdMapper->Find( sDepName ); // mpPrjIdMapper
556 if ( !pHObject_l )
558 String sMessage;
559 sMessage += String::CreateFromAscii("can't find ");
560 sMessage += String( sDepName, RTL_TEXTENCODING_UTF8 );
561 sMessage += String::CreateFromAscii(".\ndependency ignored");
562 WarningBox aBox( mpBaseWin, WB_OK, sMessage);
563 aBox.Execute();
565 else
567 sTokenLine += String( sDepName, RTL_TEXTENCODING_UTF8 );
568 sTokenLine +='\t';
569 nHashedId = pHObject_l->GetId();
570 pHObject_l = mpPrjIdMapper->Find( rBodyText ); // mpPrjIdMapper
571 nObjectId_l = pHObject_l->GetId();
572 AddConnectorToObjects( mpObjectPrjList, nHashedId, nObjectId_l );
577 if ( mpPrj->Count() > 1 )
579 CommandData* pData = mpPrj->GetObject( mpPrj->Count() - 1 );
580 pData = mpPrj->Replace( pData, mpPrj->Count() - 2 );
581 mpPrj->Replace( pData, mpPrj->Count() - 1 );
584 return nObjectId;
586 return 0;
589 // Context-Menue
590 IMPL_LINK( Depper, PopupSelected, PopupMenu*, mpPopup )
592 USHORT nItemId = mpPopup->GetCurItemId();
594 switch( nItemId )
596 case DEPPOPUP_NEW :
598 ByteString sNewItem = ByteString("new");
599 //AddObject( mpObjectList, sNewItem , TRUE );
601 break;
602 case DEPPOPUP_AUTOARRANGE :
603 //AutoArrange( mpObjectList, mpObjectList, GetStart(), 0 );
604 break;
605 case DEPPOPUP_LOAD :
606 //Load( ByteString("test.dep"));
607 break;
608 case DEPPOPUP_SAVE :
609 Save( ByteString("test.dep"));
610 break;
611 case DEPPOPUP_WRITE_SOURCE :
612 WriteSource();
613 break;
614 case DEPPOPUP_READ_SOURCE :
615 ReadSource(TRUE);
616 break;
617 case DEPPOPUP_OPEN_SOURCE :
618 OpenSource();
619 break;
620 case DEPPOPUP_ZOOMIN :
622 // DBG_ASSERT( FALSE,"zoomin");
623 MapMode aMapMode = GetDepWin()->GetMapMode();
624 aMapMode.SetScaleX( aMapMode.GetScaleX() * Fraction( 1.25 ));
625 aMapMode.SetScaleY( aMapMode.GetScaleY() * Fraction( 1.25 ));
626 GetDepWin()->SetMapMode( aMapMode );
628 if ( nZoomed < 1 )
630 Size aZoomInSize( GetDepWin()->GetSizePixel());
631 aZoomInSize.Width() *= 1.25;
632 aZoomInSize.Height() *= 1.25;
633 GetDepWin()->SetSizePixel( aZoomInSize );
635 nZoomed--;
637 Zoom( aMapMode );
639 break;
640 case DEPPOPUP_ZOOMOUT :
642 // DBG_ASSERT( FALSE,"zoomout");
643 MapMode aMapMode = GetDepWin()->GetMapMode();
644 if ( aMapMode.GetScaleX() > Fraction( 0.25 ))
646 aMapMode.SetScaleX( aMapMode.GetScaleX() * Fraction( 0.8 ));
647 aMapMode.SetScaleY( aMapMode.GetScaleY() * Fraction( 0.8 ));
648 GetDepWin()->SetMapMode( aMapMode );
650 if ( nZoomed < 0 )
652 Size aZoomOutSize( mpBaseWin->GetSizePixel());
653 aZoomOutSize.Width() *= 0.8;
654 aZoomOutSize.Height() *= 0.8;
655 GetDepWin()->SetSizePixel( aZoomOutSize );
657 nZoomed++;
659 Zoom( aMapMode );
662 break;
663 case DEPPOPUP_CLEAR :
664 // DBG_ASSERT( FALSE,"clear");
665 // RemoveAllObjects( mpObjectList );
666 break;
667 case DEPPOPUP_CLOSE :
668 // DBG_ASSERT( FALSE,"close");
669 CloseWindow();
670 break;
671 case DEPPOPUP_HELP :
672 // DBG_ASSERT( FALSE,"help");
673 ShowHelp();
674 break;
675 case DEPPOPUP_TEST :
676 // DBG_ASSERT( FALSE,"TEST!");
677 // test();
678 break;
679 case DEPPOPUP_SHOW_TOOLBOX:
680 maToolBox.Show();
681 break;
682 default :
683 DBG_ASSERT( FALSE, "default" );
684 break;
686 return 0;