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 _FMRWRK_SOLDEP_HXX 25 #define _FMRWRK_SOLDEP_HXX 26 27 #define SOURCEROOT "SOLARSRC" 28 29 #include <tools/string.hxx> 30 31 #include <soldep/depper.hxx> 32 33 #define SOURCEROOT "SOLARSRC" 34 35 class ObjectWin; 36 37 class SolDep : public Depper 38 { 39 sal_Bool mbBServer; //call from build server 40 sal_uIntPtr mnMinDynXOffs; 41 sal_uIntPtr mnLevelOffset; 42 sal_uIntPtr mnXOffset; 43 ObjWinList* mpTravellerList; 44 45 String msSourceName; 46 ByteString msVersionMajor; 47 ByteString msVersionMinor; 48 ByteString msProject; 49 ObjectWin* mpFocusWin; 50 sal_Bool mbIsHide; 51 52 GenericInformationList *mpStandLst; 53 54 DECL_LINK( ChildWindowEventListener, VclSimpleEvent* ); 55 DECL_LINK( ToolSelect, SoldepToolBox* ); 56 57 SolarFileList* GetPrjListFromDir(); 58 59 Point CalcPos( sal_uInt16 nSet, sal_uInt16 nIndex ); 60 sal_uIntPtr CalcXOffset( sal_uIntPtr nObjectsToFit ); 61 double CalcDistSum( ObjWinList* pObjList, DistType eDistType = TOPDOWN ); 62 sal_uInt16 Impl_Traveller( ObjectWin* pWin, sal_uInt16 nDepth ); 63 double Impl_PermuteMin( ObjWinList& rObjList, Point* pPosArray, ObjWinList& rResultList, 64 double dMinDist, sal_uIntPtr nStart, sal_uIntPtr nSize, DistType eDisType = TOPDOWN ); 65 sal_uInt16 Load( const ByteString& rFileName ); 66 void WriteToErrorFile(); 67 sal_Bool MarkObjects( ObjectWin* pObjectWin ); 68 void InitContextMenueMainWnd(); 69 void InitContextMenuePrjViewWnd(DepWin* pWin); 70 protected: 71 /// will be called for any VclWindowEvent events broadcasted by our VCL window 72 virtual void ProcessChildWindowEvent( const VclWindowEvent& _rVclWindowEvent ); isAlive() const73 inline bool isAlive() const { return NULL != mpProcessWin; } 74 75 76 public: 77 SolDep( Window* pBaseWindow ); 78 ~SolDep(); IsHideMode()79 sal_Bool IsHideMode() { return mbIsHide;}; 80 void ToggleHideDependency(); 81 82 virtual sal_uIntPtr GetStart(SolIdMapper* pIdMapper, ObjectList* pObjList); 83 sal_uIntPtr GetStartPrj(SolIdMapper* pIdMapper, ObjectList* pObjList); 84 virtual sal_uInt16 ReadSource( sal_Bool bUpdater = sal_False ); 85 virtual sal_uInt16 WriteSource(); 86 virtual sal_uInt16 OpenSource(); 87 sal_Bool GetVersion(); 88 void Init(); 89 void Init( ByteString &rVersion, GenericInformationList *pVersionList = NULL ); 90 sal_Bool InitPrj( ByteString& rListName ); 91 // using Depper::AddObject; 92 virtual sal_uIntPtr AddObject( ByteString& rBodyText, sal_Bool Interact=sal_True ); 93 sal_uIntPtr AddPrjObject( ByteString& rBodyText, sal_Bool Interact=sal_True ); 94 virtual ObjectWin* RemoveObject( sal_uInt16 nId, sal_Bool bDelete = sal_True ); 95 virtual void RemoveAllObjects( ObjectList* pObjLst ); 96 virtual sal_uInt16 AddConnector( ObjectWin* pStartWin, ObjectWin* pEndWin ); 97 sal_uInt16 AddConnectorPrjView( ObjectWin* pStartWin, ObjectWin* pEndWin ); 98 virtual sal_uInt16 RemoveConnector( ObjectWin* pStartWin, ObjectWin* pEndWin ); 99 sal_uInt16 RemoveConnectorPrjView( ObjectWin* pStartWin, ObjectWin* pEndWin ); 100 sal_uInt16 AutoArrange( SolIdMapper* pIdMapper, ObjectList* pObjLst, sal_uIntPtr nTopId, sal_uIntPtr nBottmId, sal_uIntPtr aObjID ); 101 sal_uInt16 OptimizePos( SolIdMapper* pIdMapper, ObjectList* pObjLst, sal_uIntPtr nTopId, sal_uIntPtr nBottmId, sal_uIntPtr aObjID ); 102 virtual sal_Bool ViewContent( ByteString& rObjectName ); 103 virtual sal_uInt16 CloseWindow(); 104 virtual void ShowHelp(); GetTaskBarFrame()105 FloatingWindow* GetTaskBarFrame() { return &maTaskBarFrame; } GetSoldepToolBox()106 SoldepToolBox* GetSoldepToolBox() { return &maToolBox; } 107 108 sal_Bool FindProject(); 109 void Resize(); 110 }; 111 112 #endif 113