1 /* 2 This file is part of Browse Tracker, a plugin for Code::Blocks 3 Copyright (C) 2007 Pecan Heber 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License 7 as published by the Free Software Foundation; either version 2 8 of the License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 // RCS-ID: $Id: ProjectData.h 11347 2018-03-26 14:24:13Z pecanh $ 20 #ifndef PROJECTDATA_H 21 #define PROJECTDATA_H 22 23 #include "BrowseTrackerDefs.h" 24 25 WX_DEFINE_ARRAY_PTR(cbEditor*, ArrayOfcbEditorPtrs); 26 WX_DEFINE_ARRAY_PTR(cbStyledTextCtrl*, ArrayOfcbSTCPtrs); 27 // ---------------------------------------------------------------------------- 28 class ProjectData 29 // ---------------------------------------------------------------------------- 30 { 31 public: 32 ProjectData(cbProject* pcbProject); 33 ~ProjectData(); 34 35 wxString GetProjectFilename(); 36 37 void AddEditor( wxString filePath ); 38 BrowseMarks* GetBrowse_MarksFromHash( wxString filePath); 39 BrowseMarks* GetPointerToBrowse_MarksArray(FileBrowse_MarksHash& hash ,wxString filePath); 40 bool FindFilename( const wxString filePath); 41 void IncrementActivationCount(); 42 int GetActivationCount(); 43 44 BrowseMarks* HashAddBrowse_Marks( const wxString filePath ); 45 46 47 void SaveLayout(); 48 void LoadLayout(); IsLayoutLoaded()49 bool IsLayoutLoaded(){return m_bLayoutLoaded;} 50 51 void DumpHash( const wxString hashType); 52 void DumpBrowse_Marks( const wxString hashType ); 53 protected: 54 private: 55 ProjectData(); 56 57 EditorManager* m_pEdMgr; 58 wxString m_ProjectFilename; 59 cbProject* m_pCBProject; 60 61 // Hash: filePath, BrowseMarks* array 62 FileBrowse_MarksHash m_FileBrowse_MarksArchive; 63 64 int m_CurrIndexEntry; 65 int m_LastIndexEntry; 66 67 int m_ActivationCount; 68 bool m_bLayoutLoaded; 69 70 }; 71 72 73 74 #endif // PROJECTDATA_H 75