update dev300-m58
[ooovba.git] / soldep / source / depper.cxx
blobc6c3a84814990e83ecb6e4d4927c602cea186a88
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: depper.cxx,v $
10 * $Revision: 1.8 $
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 ************************************************************************/
32 #include <stdio.h>
33 #include <tools/stream.hxx>
34 #include <tools/debug.hxx>
35 #include <vcl/msgbox.hxx>
36 #include <svtools/prgsbar.hxx>
38 #include <soldep/depper.hxx>
39 #include <soldep/objwin.hxx>
41 #include "math.h"
42 #include "time.h"
43 #include "stdlib.h"
44 #include "dtsodcmp.hrc"
46 #include <vcl/svapp.hxx>
48 #define MIN(a,b) (a)<(b)?(a):(b)
49 #define MAX(a,b) (a)>(b)?(a):(b)
51 ByteString sDelimiterLine("#==========================================================================");
56 Depper::Depper( Window* pBaseWindow ):
57 Window( pBaseWindow ),
58 mbIsPrjView(FALSE),
59 maDefPos( 50, 50 ),
60 maDefSize( 60, 25 ),
61 mnViewMask( 1 ),
62 pSubBar( NULL ),
63 pMainBar( NULL ),
64 pSubText( NULL ),
65 pMainText( NULL ),
66 maArrangeDlg( pBaseWindow ),
67 mpPrjIdMapper( NULL ),
68 maToolBox( pBaseWindow, DtSodResId(TID_SOLDEP_MAIN) ),
69 maTaskBarFrame( pBaseWindow, 0)
71 maArrangeDlg.Hide();
73 mpProcessWin = pBaseWindow;
74 mpGraphWin = new GraphWin( mpProcessWin, this );
75 mpGraphPrjWin = new GraphWin( mpProcessWin, this );
76 //mpBaseWin paints into virtual OutputDevice
77 mpBaseWin = new DepWin( mpGraphWin->GetBufferWindow(), WB_NOBORDER | WB_SIZEABLE | WB_AUTOSIZE );
78 mpBasePrjWin = new DepWin( mpGraphPrjWin->GetBufferWindow(), WB_NOBORDER | WB_SIZEABLE | WB_AUTOSIZE );
80 mpGraphWin->SetBackground( Wallpaper( Color( COL_RED )));
81 mpGraphPrjWin->SetBackground( Wallpaper( Color( COL_BLUE )));
82 mpGraphPrjWin->Hide();
83 mpBaseWin->SetBackground( Wallpaper( Color( COL_WHITE )));
84 mpBasePrjWin->SetBackground( Wallpaper( Color( COL_LIGHTGRAY )));
86 mpGraphWin->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
87 mpGraphPrjWin->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
88 mpBaseWin->SetZOrder( NULL, WINDOW_ZORDER_FIRST );
90 mpGraphWin->EnableClipSiblings();
91 mpGraphPrjWin->EnableClipSiblings();
93 mpParentProcessWin = mpProcessWin->GetParent();
94 mpBaseWin->Show();
95 nZoomed = 0;
97 mpBaseWin->SetPopupHdl( this );
98 mpBasePrjWin->SetPopupHdl( this );
100 mpObjectList = new ObjectList(); //ObjectList unbekannt
101 mpObjectPrjList = new ObjectList();
104 Depper::~Depper()
106 // delete mpObjectList;
107 delete mpBaseWin;
108 delete mpGraphWin;
111 BOOL Depper::TogglePrjViewStatus()
113 GetDepWin()->Hide(); //Hide old content window
114 GetGraphWin()->Hide();
115 mbIsPrjView = !mbIsPrjView; //switch now
116 GetDepWin()->Invalidate();
117 GetGraphWin()->Show();
118 GetDepWin()->Show(); //Show new content window
119 return mbIsPrjView;
122 void Depper::HideObjectsAndConnections( ObjectList* pObjLst )
124 for ( ULONG i = 0; i < pObjLst->Count(); i ++ ) {
125 ObjectWin *pWin = pObjLst->GetObject( i );
126 pWin->Hide();
128 mpGraphWin->Hide();
129 mpBaseWin->Hide();
130 mpGraphPrjWin->Show();
131 mpBasePrjWin->Show();
134 void Depper::ShowObjectsAndConnections( ObjectList* pObjLst )
136 for ( ULONG i = 0; i < pObjLst->Count(); i ++ ) {
137 ObjectWin *pWin = pObjLst->GetObject( i );
138 pWin->Show();
140 mpBasePrjWin->Hide();
141 mpGraphPrjWin->Hide();
142 mpGraphWin->Show();
143 mpBaseWin->Show();
147 void Depper::RemoveAllObjects( ObjectList* pObjLst )
149 ULONG i;
151 for ( i = pObjLst->Count(); i > 0; i-- )
152 delete pObjLst->GetObject( i - 1 );
153 pObjLst->Clear();
156 USHORT Depper::Save( const ByteString& rFileName )
158 DBG_ASSERT( FALSE , "you are dead!" );
159 SvFileStream aOutFile( String( rFileName, RTL_TEXTENCODING_UTF8 ), STREAM_WRITE );
160 depper_head dh;
161 USHORT i;
162 ULONG nObjCount = mpObjectList->Count();
164 ConnectorList* pConList = GetDepWin()->GetConnectorList();
165 ULONG nCnctrCount = pConList->Count();
167 dh.nID = DEPPER_ID;
168 dh.nObjectCount = nObjCount;
169 dh.nCnctrCount = nCnctrCount;
171 aOutFile.Write( &dh, sizeof( dh ));
173 for ( i=0; i < nObjCount ; i++ )
175 mpObjectList->GetObject( i )->Save( aOutFile );
178 for ( i=0; i < nCnctrCount ; i++ )
180 pConList->GetObject( i )->Save( aOutFile );
183 return 0;
187 USHORT Depper::WriteSource()
189 DBG_ASSERT( FALSE , "overload it!" );
190 return 0;
193 USHORT Depper::ReadSource( BOOL bUpdater )
195 DBG_ASSERT( FALSE , "overload it!" );
196 return 0;
199 USHORT Depper::OpenSource()
201 DBG_ASSERT( FALSE , "overload it!" );
202 return 0;
205 ObjectWin* Depper::ObjIdToPtr( ObjectList* pObjLst, ULONG nId )
207 ULONG nObjCount = pObjLst->Count();
208 ULONG i = 0;
209 ObjectWin* pWin;
210 ULONG nWinId = 0;
214 pWin = pObjLst->GetObject( i );
215 nWinId = pWin->GetId();
216 i++;
218 while( i < nObjCount && pWin->GetId() != nId );
219 if ( pWin->GetId() == nId )
220 return pWin;
221 else
222 return NULL;
225 void Depper::SetMainProgressBar( USHORT i)
227 if ( pMainBar ) {
228 pMainBar->SetValue( 100 );
229 pMainBar->Update();
233 void Depper::UpdateMainProgressBar(USHORT i, USHORT nScaleVal, USHORT &nStep, BOOL bCountingDown )
235 ULONG val = 0;
236 if ( pMainBar ) {
237 // val = i * 50 / nScaleVal + 1;
238 val = bCountingDown ? 50 + ( nScaleVal - i ) * 50 / nScaleVal : i * 50 / nScaleVal;
240 pMainBar->SetValue( val );
241 pMainBar->Update();
242 String sText( String::CreateFromAscii( "Optimize step " ));
243 sText += String::CreateFromInt32( ++nStep );
244 pSubText->SetText( sText );
248 void Depper::UpdateSubProgrssBar(ULONG i)
250 if ( pSubBar )
252 pSubBar->SetValue( i );
253 pSubBar->Update();
254 GetpApp()->Reschedule();
259 USHORT Depper::AutoArrangeDlgStart()
261 pSubBar = maArrangeDlg.GetSubBar();
262 pMainBar = maArrangeDlg.GetMainBar();
263 pSubText = maArrangeDlg.GetSubText();
264 pMainText = maArrangeDlg.GetMainText();
265 pMainText->SetText( String::CreateFromAscii( "Overall status" ));
266 maArrangeDlg.Show();
267 GetDepWin()->Enable( FALSE );
268 GetDepWin()->Hide();
269 return 0;
272 USHORT Depper::AutoArrangeDlgStop()
274 maArrangeDlg.Hide();
275 GetDepWin()->Enable( TRUE );
276 GetDepWin()->Show();
277 pSubBar = NULL;
278 pMainBar = NULL;
279 pSubText = NULL;
280 pMainText = NULL;
281 return 0;
286 USHORT Depper::Zoom( MapMode& rMapMode )
288 ULONG i;
289 ObjectWin* pWin;
290 Point aPos;
291 Size aSize;
292 ObjectList* pObjList;
293 pObjList = GetObjectList();
294 // aSize = mpBaseWin->GetSizePixel();
295 // mpGraphWin->SetTotalSize( aSize );
296 // mpGraphWin->EndScroll( 0, 0 );
298 for ( i = pObjList->Count(); i > 0; i-- )
300 pWin = pObjList->GetObject( i - 1 );
301 aPos = pWin->PixelToLogic( pWin->GetPosPixel());
302 aSize = pWin->PixelToLogic( pWin->GetSizePixel());
303 pWin->SetMapMode( rMapMode );
304 aPos = pWin->LogicToPixel( aPos );
305 aSize = pWin->LogicToPixel( aSize );
306 pWin->SetPosSizePixel( aPos, aSize );
308 GetDepWin()->Invalidate();
309 return 0;
312 ULONG Depper::AddObjectToList( DepWin* pParentWin, ObjectList* pObjLst, ULONG &LastID, ULONG &WinCount, ByteString& rBodyText, BOOL bInteract )
314 Point aPos;
315 Size aSize = GetDefSize();
317 aPos = GetDepWin()->LogicToPixel( aPos );
318 aSize = GetDepWin()->LogicToPixel( aSize );
319 return AddObjectToList( pParentWin, pObjLst, LastID, WinCount, rBodyText, aPos, aSize );
322 ULONG Depper::AddObjectToList( DepWin* pParentWin, ObjectList* pObjLst, ULONG &LastID, ULONG &WinCount, ByteString& rBodyText, Point& rPos, Size& rSize )
324 ObjectWin* pWin = new ObjectWin( pParentWin, WB_BORDER );
325 //pWin->mpDepperDontuseme = this;
326 pWin->SetGlobalViewMask(mnViewMask); // Set ViewMask for all ObjectWin and Connector objects
328 Size aNewSize;
329 aNewSize.Width() = pWin->GetTextWidth( String( rBodyText, RTL_TEXTENCODING_UTF8 ));
330 aNewSize.Height() = pWin->GetTextHeight();
331 if ( aNewSize.Width() > rSize.Width() - 8 )
333 aNewSize.Width() = aNewSize.Width() + 8;
334 aNewSize.Height() = rSize.Height();
336 else
337 aNewSize = rSize;
338 pWin->SetPosSizePixel( rPos,aNewSize);
340 MapMode aMapMode = mpBaseWin->GetMapMode();
341 pWin->SetMapMode( aMapMode );
343 pObjLst->Insert( pWin, LIST_APPEND );
344 pWin->SetId( LastID );
345 LastID++;
346 WinCount++;
347 pWin->SetBodyText( rBodyText );
348 // pWin->Show();
349 return pWin->GetId();
352 /*void Depper::DrawOutput( OutputDevice* pDevice )
354 GetDepWin()->DrawOutput( pDevice );
355 ObjectList* pObjList = GetObjectList();
356 for ( USHORT i = pObjList->Count(); i > 0; i-- )
358 ObjectWin* pWin = pObjList->GetObject( i - 1 );
359 pWin->DrawOutput( pDevice );
363 ObjectWin* Depper::RemoveObjectFromList( ObjectList* pObjLst, ULONG &WinCount, USHORT nId, BOOL bDelete )
365 ObjectWin* pWin = ObjIdToPtr( pObjLst, nId );
367 if ( pWin )
369 pObjLst->Remove( pWin );
370 WinCount--;
371 if( bDelete )
372 delete pWin;
373 return pWin;
375 else
376 return NULL;
378 USHORT Depper::AddConnectorToObjects( ObjectList* pObjLst, ULONG nStartId, ULONG nEndId )
380 ObjectWin* pStartWin = ObjIdToPtr( pObjLst, nStartId );
382 if ( !pStartWin )
383 return DEP_STARTID_NOT_FOUND;
385 ObjectWin* pEndWin = ObjIdToPtr( pObjLst, nEndId );
387 if ( !pEndWin )
388 return DEP_STARTID_NOT_FOUND;
390 return AddConnectorToObjects( pStartWin, pEndWin );
393 USHORT Depper::RemoveConnectorFromObjects( ObjectList* pObjLst, ULONG nStartId, ULONG nEndId )
395 // DBG_ASSERT( FALSE , "noch nicht" );
396 ObjectWin* pStartWin = ObjIdToPtr( pObjLst, nStartId );
398 if ( !pStartWin )
399 return DEP_STARTID_NOT_FOUND;
401 ObjectWin* pEndWin = ObjIdToPtr( pObjLst, nEndId );
403 if ( !pEndWin )
404 return DEP_STARTID_NOT_FOUND;
406 return RemoveConnectorFromObjects( pStartWin, pEndWin );
409 USHORT Depper::AddConnectorToObjects( ObjectWin* pStartWin, ObjectWin* pEndWin )
411 if ( pStartWin->ConnectionExistsInAnyDirection( pEndWin ))
412 return 0;
414 Connector* pCon = new Connector( GetDepWin(), WB_NOBORDER );
415 // pCon->Initialize( pStartWin, pEndWin );
416 if (pStartWin->IsNullObject()) //null_project
417 pCon->Initialize( pStartWin, pEndWin, FALSE );
418 else
419 pCon->Initialize( pStartWin, pEndWin, TRUE );
420 return 0;
423 USHORT Depper::RemoveConnectorFromObjects( ObjectWin* pStartWin, ObjectWin* pEndWin )
425 Connector* pCon = pStartWin->GetConnector( pStartWin->GetId(), pEndWin->GetId() );
427 if ( !pCon )
428 return DEP_CONNECTOR_NOT_FOUND;
429 else
431 delete pCon;
432 return DEP_OK;
436 ULONG Depper::HandleNewPrjDialog( ByteString &rBodyText )
438 SolNewProjectDlg aNewProjectDlg( GetDepWin(), DtSodResId( RID_SD_DIALOG_NEWPROJECT ));
439 if ( aNewProjectDlg.Execute() )
441 rBodyText = ByteString( aNewProjectDlg.maEName.GetText(), RTL_TEXTENCODING_UTF8);
442 //hashtable auf stand halten
443 MyHashObject* pHObject;
444 ULONG nObjectId = AddObjectToList( mpBaseWin, mpObjectList, mnSolLastId, mnSolWinCount, rBodyText, FALSE );
445 pHObject = new MyHashObject( nObjectId, ObjIdToPtr( mpObjectList, nObjectId ));
446 mpSolIdMapper->Insert( rBodyText, pHObject );
448 ByteString sTokenLine( aNewProjectDlg.maEShort.GetText(), RTL_TEXTENCODING_UTF8 );
449 sTokenLine += '\t';
450 sTokenLine += ByteString( aNewProjectDlg.maEName.GetText(), RTL_TEXTENCODING_UTF8 );
451 sTokenLine += "\t:\t";
453 ByteString sDeps = ByteString( aNewProjectDlg.maEDeps.GetText(), RTL_TEXTENCODING_UTF8 );
455 if ( sDeps != "" )
457 USHORT i;
458 ByteString sDepName;
459 USHORT nToken = sDeps.GetTokenCount(' ');
460 for ( i = 0 ; i < nToken ; i++)
462 sDepName = sDeps.GetToken( i, ' ' );
463 sTokenLine += sDepName;
464 sTokenLine +='\t';
467 sTokenLine +="NULL";
469 mpStarWriter->InsertTokenLine( sTokenLine );
470 mpStarWriter->InsertTokenLine( sDelimiterLine );
472 if ( sDeps != "" )
474 USHORT i;
475 ByteString sDepName;
476 ULONG nObjectId_l, nHashedId;
477 MyHashObject* pHObject_l;
478 USHORT nToken = sDeps.GetTokenCount(' ');
479 for ( i = 0 ; i < nToken ; i++)
481 sDepName = sDeps.GetToken( i, ' ' );
483 pHObject_l = mpSolIdMapper->Find( sDepName );
484 if ( !pHObject_l )
486 String sMessage;
487 sMessage += String::CreateFromAscii("can't find ");
488 sMessage += String( sDepName, RTL_TEXTENCODING_UTF8 );
489 sMessage += String::CreateFromAscii(".\ndependency ignored");
490 WarningBox aBox( GetDepWin(), WB_OK, sMessage);
491 aBox.Execute();
493 else
495 nHashedId = pHObject_l->GetId();
496 pHObject_l = mpSolIdMapper->Find( rBodyText );
497 nObjectId_l = pHObject_l->GetId();
498 AddConnectorToObjects( mpObjectList, nHashedId, nObjectId_l );
502 return nObjectId;
504 return 0;
507 ULONG Depper::HandleNewDirectoryDialog(ByteString &rBodyText)
509 SolNewDirectoryDlg aNewDirectoryDlg( GetDepWin(), DtSodResId( RID_SD_DIALOG_NEWDIRECTORY ));
510 //todo: set defaults
511 if ( aNewDirectoryDlg.Execute() )
513 rBodyText = ByteString( aNewDirectoryDlg.maEFlag.GetText(), RTL_TEXTENCODING_UTF8 );
514 //hashtable auf stand halten
515 MyHashObject* pHObject;
516 ULONG nObjectId = AddObjectToList( GetDepWin(), mpObjectPrjList, mnSolLastId, mnSolWinCount, rBodyText );
517 pHObject = new MyHashObject( nObjectId, ObjIdToPtr( mpObjectPrjList, nObjectId ));
518 mpPrjIdMapper->Insert( rBodyText, pHObject ); // mpPrjIdMapper
520 String sTokenLine;
521 sTokenLine = String( mpPrj->GetPreFix(), RTL_TEXTENCODING_UTF8 );
522 sTokenLine += '\t';
523 String sNameConvert = aNewDirectoryDlg.maEName.GetText();
524 sNameConvert.SearchAndReplaceAll( '/', '\\' );
525 if ( sNameConvert.GetToken( 0, 0x5c ) != String( mpPrj->GetProjectName(), RTL_TEXTENCODING_UTF8 ))
527 sTokenLine += String( mpPrj->GetProjectName(), RTL_TEXTENCODING_UTF8 );
528 sTokenLine += String("\\", RTL_TEXTENCODING_UTF8 );
529 sTokenLine += sNameConvert;
531 else
532 sTokenLine += sNameConvert;
533 sTokenLine += '\t';
534 sTokenLine += aNewDirectoryDlg.maEAction.GetText();
535 sTokenLine += String( "\t-\t", RTL_TEXTENCODING_UTF8 );
536 sTokenLine += aNewDirectoryDlg.maEEnv.GetText();
537 sTokenLine += '\t';
538 sTokenLine += aNewDirectoryDlg.maEFlag.GetText();
539 sTokenLine += '\t';
541 sTokenLine += String( "NULL", RTL_TEXTENCODING_UTF8 );
543 ByteString bsTokenLine = ByteString( sTokenLine, RTL_TEXTENCODING_UTF8 );
544 mpStarWriter->InsertTokenLine( bsTokenLine );
546 if ( aNewDirectoryDlg.maEDeps.GetText() != String( "", RTL_TEXTENCODING_UTF8 ))
548 USHORT i;
549 ByteString sDeps = ByteString( aNewDirectoryDlg.maEDeps.GetText(), RTL_TEXTENCODING_UTF8 );
550 ByteString sDepName;
551 ULONG nObjectId_l, nHashedId;
552 MyHashObject* pHObject_l;
553 USHORT nToken = sDeps.GetTokenCount(' ');
554 for ( i = 0 ; i < nToken ; i++)
556 sDepName = sDeps.GetToken( i, ' ' );
558 pHObject_l = mpPrjIdMapper->Find( sDepName ); // mpPrjIdMapper
559 if ( !pHObject_l )
561 String sMessage;
562 sMessage += String::CreateFromAscii("can't find ");
563 sMessage += String( sDepName, RTL_TEXTENCODING_UTF8 );
564 sMessage += String::CreateFromAscii(".\ndependency ignored");
565 WarningBox aBox( mpBaseWin, WB_OK, sMessage);
566 aBox.Execute();
568 else
570 sTokenLine += String( sDepName, RTL_TEXTENCODING_UTF8 );
571 sTokenLine +='\t';
572 nHashedId = pHObject_l->GetId();
573 pHObject_l = mpPrjIdMapper->Find( rBodyText ); // mpPrjIdMapper
574 nObjectId_l = pHObject_l->GetId();
575 AddConnectorToObjects( mpObjectPrjList, nHashedId, nObjectId_l );
580 if ( mpPrj->Count() > 1 )
582 CommandData* pData = mpPrj->GetObject( mpPrj->Count() - 1 );
583 pData = mpPrj->Replace( pData, mpPrj->Count() - 2 );
584 mpPrj->Replace( pData, mpPrj->Count() - 1 );
587 return nObjectId;
589 return 0;
592 // Context-Menue
593 IMPL_LINK( Depper, PopupSelected, PopupMenu*, mpPopup )
595 USHORT nItemId = mpPopup->GetCurItemId();
597 switch( nItemId )
599 case DEPPOPUP_NEW :
601 ByteString sNewItem = ByteString("new");
602 //AddObject( mpObjectList, sNewItem , TRUE );
604 break;
605 case DEPPOPUP_AUTOARRANGE :
606 //AutoArrange( mpObjectList, mpObjectList, GetStart(), 0 );
607 break;
608 case DEPPOPUP_LOAD :
609 //Load( ByteString("test.dep"));
610 break;
611 case DEPPOPUP_SAVE :
612 Save( ByteString("test.dep"));
613 break;
614 case DEPPOPUP_WRITE_SOURCE :
615 WriteSource();
616 break;
617 case DEPPOPUP_READ_SOURCE :
618 ReadSource(TRUE);
619 break;
620 case DEPPOPUP_OPEN_SOURCE :
621 OpenSource();
622 break;
623 case DEPPOPUP_ZOOMIN :
625 // DBG_ASSERT( FALSE,"zoomin");
626 MapMode aMapMode = GetDepWin()->GetMapMode();
627 aMapMode.SetScaleX( aMapMode.GetScaleX() * Fraction( 1.25 ));
628 aMapMode.SetScaleY( aMapMode.GetScaleY() * Fraction( 1.25 ));
629 GetDepWin()->SetMapMode( aMapMode );
631 if ( nZoomed < 1 )
633 Size aZoomInSize( GetDepWin()->GetSizePixel());
634 aZoomInSize.Width() *= 1.25;
635 aZoomInSize.Height() *= 1.25;
636 GetDepWin()->SetSizePixel( aZoomInSize );
638 nZoomed--;
640 Zoom( aMapMode );
642 break;
643 case DEPPOPUP_ZOOMOUT :
645 // DBG_ASSERT( FALSE,"zoomout");
646 MapMode aMapMode = GetDepWin()->GetMapMode();
647 if ( aMapMode.GetScaleX() > Fraction( 0.25 ))
649 aMapMode.SetScaleX( aMapMode.GetScaleX() * Fraction( 0.8 ));
650 aMapMode.SetScaleY( aMapMode.GetScaleY() * Fraction( 0.8 ));
651 GetDepWin()->SetMapMode( aMapMode );
653 if ( nZoomed < 0 )
655 Size aZoomOutSize( mpBaseWin->GetSizePixel());
656 aZoomOutSize.Width() *= 0.8;
657 aZoomOutSize.Height() *= 0.8;
658 GetDepWin()->SetSizePixel( aZoomOutSize );
660 nZoomed++;
662 Zoom( aMapMode );
665 break;
666 case DEPPOPUP_CLEAR :
667 // DBG_ASSERT( FALSE,"clear");
668 // RemoveAllObjects( mpObjectList );
669 break;
670 case DEPPOPUP_CLOSE :
671 // DBG_ASSERT( FALSE,"close");
672 CloseWindow();
673 break;
674 case DEPPOPUP_HELP :
675 // DBG_ASSERT( FALSE,"help");
676 ShowHelp();
677 break;
678 case DEPPOPUP_TEST :
679 // DBG_ASSERT( FALSE,"TEST!");
680 // test();
681 break;
682 case DEPPOPUP_SHOW_TOOLBOX:
683 maToolBox.Show();
684 break;
685 default :
686 DBG_ASSERT( FALSE, "default" );
687 break;
689 return 0;