Changeset 651 in dev for trunk/ab5.0/abdev
- Timestamp:
- Jun 17, 2008, 9:30:54 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/CFileInfo.cpp
r620 r651 3 3 #include "common.h" 4 4 5 CFileInfo::CFileInfo(char *path,HTREEITEM hTreeItem){ 6 m_path=(char *)HeapAlloc(hHeap,0,lstrlen(path)+1); 7 lstrcpy(m_path,path); 8 m_hTreeItem=hTreeItem; 9 } 10 CFileInfo::~CFileInfo(){ 11 HeapDefaultFree(m_path); 5 CFileInfo::CFileInfo( const std::string &filepath, HTREEITEM hTreeItem ) 6 : filepath( filepath ) 7 , m_hTreeItem( hTreeItem ) 8 { 12 9 } 13 10 void CFileInfo::GetFullPath(char *buffer){ 14 lstrcpy(buffer, m_path);11 lstrcpy(buffer,this->GetPath().c_str()); 15 12 lstrcpy( buffer, projectInfo.GetWorkDir().GetFullPath( buffer ).c_str() ); 16 13 } … … 46 43 for(;i<iNum;i++) ppobj_FileInfo[i]=ppobj_FileInfo[i+1]; 47 44 } 48 char *CDBFileInfo::GetPath(HTREEITEM hTreeItem){ 49 int i; 50 for(i=0;i<iNum;i++){ 51 if(ppobj_FileInfo[i]->m_hTreeItem==hTreeItem) break; 45 const std::string &CDBFileInfo::GetPath(HTREEITEM hTreeItem) 46 { 47 for( int i=0; i<iNum; i++ ) 48 { 49 if(ppobj_FileInfo[i]->m_hTreeItem==hTreeItem) 50 { 51 return ppobj_FileInfo[i]->GetPath(); 52 } 52 53 } 53 if(i==iNum) return 0; 54 return ppobj_FileInfo[i]->m_path; 54 55 _ASSERTE( false ); 56 throw; 55 57 } 56 58 BOOL CDBFileInfo::IsMainFile(HTREEITEM hTreeItem){ … … 68 70 TV_INSERTSTRUCT tv; 69 71 70 TreeView_DeleteAllItems(pobj_FileTree->hTree);72 pobj_FileTree->DeleteAllItems(); 71 73 72 74 tv.hInsertAfter=TVI_SORT; … … 77 79 tv.item.iSelectedImage=0; 78 80 tv.item.pszText="Source Files"; 79 tv.hParent =TreeView_InsertItem(pobj_FileTree->hTree,&tv);81 tv.hParent = pobj_FileTree->InsertItem( &tv ); 80 82 81 83 int i; 82 84 char temporary[MAX_PATH],temp2[MAX_PATH]; 83 85 for(i=0;i<iNum;i++){ 84 _splitpath(ppobj_FileInfo[i]-> m_path,0,0,temporary,temp2);86 _splitpath(ppobj_FileInfo[i]->GetPath().c_str(),0,0,temporary,temp2); 85 87 lstrcat(temporary,temp2); 86 88 tv.item.iImage=2; 87 89 tv.item.iSelectedImage=2; 88 90 tv.item.pszText=temporary; 89 ppobj_FileInfo[i]->m_hTreeItem =TreeView_InsertItem(pobj_FileTree->hTree,&tv);91 ppobj_FileInfo[i]->m_hTreeItem = pobj_FileTree->InsertItem( &tv ); 90 92 } 91 93 } … … 94 96 int i; 95 97 for(i=0;i<iNum;i++){ 96 if(lstrcmpi(ppobj_FileInfo[i]-> m_path,path)==0){98 if(lstrcmpi(ppobj_FileInfo[i]->GetPath().c_str(),path)==0){ 97 99 return 1; 98 100 } -
trunk/ab5.0/abdev/abdev/Common.h
r629 r651 28 28 #include "BREGEXP.H" 29 29 #include "../compiler_x86/CommandValue.h" 30 31 32 typedef struct _charrange {33 LONG cpMin;34 LONG cpMax;35 } CHARRANGE;36 30 37 31 … … 413 407 414 408 class CFileInfo{ 409 std::string filepath; 415 410 public: 416 char *m_path;417 411 HTREEITEM m_hTreeItem; 418 CFileInfo(char *path,HTREEITEM hTreeItem); 419 ~CFileInfo(); 412 CFileInfo( const std::string &filepath, HTREEITEM hTreeItem ); 413 414 const std::string &GetPath() const 415 { 416 return filepath; 417 } 420 418 421 419 void GetFullPath(char *buffer); … … 431 429 void add(char *path,HTREEITEM hTreeItem); 432 430 void del(HTREEITEM hTreeItem); 433 c har *GetPath(HTREEITEM hTreeItem);431 const std::string &GetPath(HTREEITEM hTreeItem); 434 432 BOOL IsMainFile(HTREEITEM hTreeItem); 435 433 … … 648 646 BOOL GetFilePathDialog(HWND hwnd,char *filename,LPSTR Filter,LPSTR Title,_int8 IsOpen); 649 647 BOOL GetFolder(HWND hWnd,char *folder,char *OpenFolderTitle); 650 int GetFileExtension( char *path);648 int GetFileExtension( const char *path ); 651 649 HWND OpenFileWithExtension( const std::string &filePath ); 652 650 BOOL SaveDocument(HWND hChild,char *SaveFileName); -
trunk/ab5.0/abdev/abdev/Debugger.cpp
r629 r651 281 281 ////////////////////////// 282 282 283 CFileBreakPoint::CFileBreakPoint(const char *lpszFileName,int iLineNum){283 BreakPointsPerFile::BreakPointsPerFile(const char *lpszFileName,int iLineNum){ 284 284 this->lpszFileName=(char *)HeapAlloc(hHeap,0,lstrlen(lpszFileName)+1); 285 285 lstrcpy(this->lpszFileName,lpszFileName); … … 289 289 num=1; 290 290 } 291 CFileBreakPoint::~CFileBreakPoint(){291 BreakPointsPerFile::~BreakPointsPerFile(){ 292 292 HeapDefaultFree(lpszFileName); 293 293 HeapDefaultFree(piLine); 294 294 } 295 void CFileBreakPoint::add(int iLineNum){295 void BreakPointsPerFile::add(int iLineNum){ 296 296 piLine=(int *)HeapReAlloc(hHeap,0,piLine,(num+1)*sizeof(int)); 297 297 … … 309 309 num++; 310 310 } 311 void CFileBreakPoint::remove(int iLineNum){311 void BreakPointsPerFile::remove(int iLineNum){ 312 312 int i; 313 313 for(i=0;i<num;i++){ … … 321 321 } 322 322 } 323 BOOL CFileBreakPoint::check(int iLineNum){323 BOOL BreakPointsPerFile::check(int iLineNum){ 324 324 int i; 325 325 for(i=0;i<num;i++){ … … 329 329 } 330 330 331 void CFileBreakPoint::replace(LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr){331 void BreakPointsPerFile::replace(LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr){ 332 332 int i; 333 333 … … 379 379 380 380 CDBBreakPoint::CDBBreakPoint(){ 381 ppItem=( CFileBreakPoint**)HeapAlloc(hHeap,0,1);381 ppItem=(BreakPointsPerFile **)HeapAlloc(hHeap,0,1); 382 382 num=0; 383 383 } … … 399 399 400 400 if(i==num){ 401 ppItem=( CFileBreakPoint **)HeapReAlloc(hHeap,0,ppItem,(num+1)*sizeof(CFileBreakPoint*));402 ppItem[num]=new CFileBreakPoint(lpszFileName,iLineNum);401 ppItem=(BreakPointsPerFile **)HeapReAlloc(hHeap,0,ppItem,(num+1)*sizeof(BreakPointsPerFile *)); 402 ppItem[num]=new BreakPointsPerFile(lpszFileName,iLineNum); 403 403 num++; 404 404 } … … 503 503 504 504 505 CFileBreakPoint*CDBBreakPoint::EnumLines(const char *lpszFilePath){505 BreakPointsPerFile *CDBBreakPoint::EnumLines(const char *lpszFilePath){ 506 506 int i; 507 507 for(i=0;i<num;i++){ -
trunk/ab5.0/abdev/abdev/Debugger.h
r625 r651 46 46 ///////////////////////////////// 47 47 48 class CFileBreakPoint{48 class BreakPointsPerFile{ 49 49 public: 50 50 char *lpszFileName; … … 53 53 int num; 54 54 55 CFileBreakPoint(const char *lpszFileName,int iLineNum);56 ~ CFileBreakPoint();55 BreakPointsPerFile(const char *lpszFileName,int iLineNum); 56 ~BreakPointsPerFile(); 57 57 58 58 void add(int iLineNum); … … 65 65 66 66 class CDBBreakPoint{ 67 CFileBreakPoint**ppItem;67 BreakPointsPerFile **ppItem; 68 68 int num; 69 69 … … 78 78 void SaveToTempFile(void); 79 79 80 CFileBreakPoint*EnumLines(const char *lpszFilePath);80 BreakPointsPerFile *EnumLines(const char *lpszFilePath); 81 81 82 82 void replace(const char *lpszFilePath,LPSTR lpszBuffer,CHARRANGE *pDelRange,CHARRANGE *pRange,LPSTR lpszNewStr); -
trunk/ab5.0/abdev/abdev/DrawBuffer.cpp
r629 r651 190 190 191 191 //ブレークポイントの描画を準備 192 CFileBreakPoint*pobj_FileBreakPoint=0;192 BreakPointsPerFile *pobj_FileBreakPoint=0; 193 193 if( projectInfo.IsOpened() ){ 194 194 pobj_FileBreakPoint= -
trunk/ab5.0/abdev/abdev/FileOperation.cpp
r629 r651 271 271 } 272 272 273 int GetFileExtension(char *path){ 273 int GetFileExtension( const char *path ) 274 { 274 275 char temporary[MAX_PATH]; 275 276 _splitpath(path,0,0,0,temporary); -
trunk/ab5.0/abdev/abdev/FileTree.cpp
r620 r651 3 3 #include "common.h" 4 4 5 CFileTree*pobj_FileTree;5 FileListTreeViewCtrl *pobj_FileTree; 6 6 7 7 WNDPROC OldFileTreeViewProc; … … 17 17 switch(message){ 18 18 case WM_INITDIALOG: 19 SetPosCenter(hwnd); 20 21 hTreeItem=TreeView_GetSelection(pobj_FileTree->hTree); 22 23 char *path; 24 path=projectInfo.pobj_DBFileInfo->GetPath(hTreeItem); 25 26 //絶対パス、相対パスを表示 27 lstrcpy(temporary,path); 28 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 29 SetDlgItemText(hwnd,IDC_USING_FILE,temporary); 30 SetDlgItemText(hwnd,IDC_DEFINED_FILE,path); 31 32 //最終更新日時を表示 33 hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 34 if(hFile==INVALID_HANDLE_VALUE){ 35 //"エラー" 36 lstrcpy(temporary,STRING_ERROR); 37 } 38 else{ 39 GetFileTime(hFile,NULL,NULL,&LastWriteTime); 40 FileTimeToLocalFileTime(&LastWriteTime,&LocalTime); 41 FileTimeToSystemTime(&LocalTime,&SystemTime); 42 if(SystemTime.wHour>=12){ 43 //"午後 " 44 lstrcpy(temporary,STRING_AFTERNOON); 45 lstrcat(temporary," "); 46 SystemTime.wHour-=12; 19 { 20 SetPosCenter(hwnd); 21 22 hTreeItem = pobj_FileTree->GetSelectedItem(); 23 24 std::string tempPath = projectInfo.pobj_DBFileInfo->GetPath(hTreeItem); 25 26 //絶対パス、相対パスを表示 27 lstrcpy( temporary, tempPath.c_str() ); 28 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 29 SetDlgItemText(hwnd,IDC_USING_FILE,temporary); 30 SetDlgItemText(hwnd,IDC_DEFINED_FILE,tempPath.c_str()); 31 32 //最終更新日時を表示 33 hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 34 if(hFile==INVALID_HANDLE_VALUE){ 35 //"エラー" 36 lstrcpy(temporary,STRING_ERROR); 47 37 } 48 38 else{ 49 //"午前 " 50 lstrcpy(temporary,STRING_MORNING); 51 lstrcat(temporary," "); 39 GetFileTime(hFile,NULL,NULL,&LastWriteTime); 40 FileTimeToLocalFileTime(&LastWriteTime,&LocalTime); 41 FileTimeToSystemTime(&LocalTime,&SystemTime); 42 if(SystemTime.wHour>=12){ 43 //"午後 " 44 lstrcpy(temporary,STRING_AFTERNOON); 45 lstrcat(temporary," "); 46 SystemTime.wHour-=12; 47 } 48 else{ 49 //"午前 " 50 lstrcpy(temporary,STRING_MORNING); 51 lstrcat(temporary," "); 52 } 53 sprintf(temporary+5,"%02d:%02d:%02d %04d/%02d/%02d", 54 SystemTime.wHour,SystemTime.wMinute,SystemTime.wSecond, 55 SystemTime.wYear,SystemTime.wMonth,SystemTime.wDay); 56 CloseHandle(hFile); 52 57 } 53 sprintf(temporary+5,"%02d:%02d:%02d %04d/%02d/%02d", 54 SystemTime.wHour,SystemTime.wMinute,SystemTime.wSecond, 55 SystemTime.wYear,SystemTime.wMonth,SystemTime.wDay); 56 CloseHandle(hFile); 57 } 58 SetDlgItemText(hwnd,IDC_UPDATE_TIME,temporary); 59 60 61 ////////////// 62 // 形式を表示 63 ////////////// 64 i=GetFileExtension(path); 65 66 //"Basic プログラム" 67 if(i==FT_BASICPROGRAM) lstrcpy(temporary,STRING_FILETYPE_BASICPROGRAM); 68 //"サブ プログラム" 69 else if(i==FT_SUBPROGRAM) lstrcpy(temporary,STRING_FILETYPE_SUBPROGRAM); 70 //"テキスト ドキュメント" 71 else if(i==FT_TEXT) lstrcpy(temporary,STRING_FILETYPE_TEXT); 72 //"判別できません" 73 else lstrcpy(temporary,STRING_FILETYPE_UNKNOWN); 74 75 SetDlgItemText(hwnd,IDC_FILETYPE,temporary); 76 77 break; 58 SetDlgItemText(hwnd,IDC_UPDATE_TIME,temporary); 59 60 61 ////////////// 62 // 形式を表示 63 ////////////// 64 i=GetFileExtension(tempPath.c_str()); 65 66 //"Basic プログラム" 67 if(i==FT_BASICPROGRAM) lstrcpy(temporary,STRING_FILETYPE_BASICPROGRAM); 68 //"サブ プログラム" 69 else if(i==FT_SUBPROGRAM) lstrcpy(temporary,STRING_FILETYPE_SUBPROGRAM); 70 //"テキスト ドキュメント" 71 else if(i==FT_TEXT) lstrcpy(temporary,STRING_FILETYPE_TEXT); 72 //"判別できません" 73 else lstrcpy(temporary,STRING_FILETYPE_UNKNOWN); 74 75 SetDlgItemText(hwnd,IDC_FILETYPE,temporary); 76 77 break; 78 } 78 79 case WM_COMMAND: 79 80 switch(LOWORD(wParam)){ … … 93 94 HTREEITEM hTreeItem; 94 95 char temporary[MAX_PATH]; 95 char *path;96 96 switch(message){ 97 97 case WM_COMMAND: … … 104 104 break; 105 105 case IDM_FILETREE_OPEN: 106 hTreeItem=TreeView_GetSelection(hwnd); 107 108 path=projectInfo.pobj_DBFileInfo->GetPath(hTreeItem); 109 if(!path) break; 110 111 lstrcpy(temporary,path); 112 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 113 OpenFileWithExtension(temporary); 114 break; 106 { 107 hTreeItem=TreeView_GetSelection(hwnd); 108 109 std::string tempPath = projectInfo.pobj_DBFileInfo->GetPath(hTreeItem); 110 111 lstrcpy( temporary, tempPath.c_str() ); 112 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 113 OpenFileWithExtension(temporary); 114 break; 115 } 115 116 case IDM_FILETREE_DELETE: 116 117 hTreeItem=TreeView_GetSelection(hwnd); … … 141 142 } 142 143 143 CFileTree::CFileTree(HWND hParent){ 144 hTree=CreateWindowEx(WS_EX_CLIENTEDGE,WC_TREEVIEW,"", 145 WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_LINESATROOT|TVS_SHOWSELALWAYS, 146 0,0,0,0, 147 hParent,0,hInst,0); 148 OldFileTreeViewProc=(WNDPROC)GetWindowLongPtr(hTree,GWLP_WNDPROC); 149 SetWindowLongPtr(hTree,GWLP_WNDPROC,(long)FileTreeViewProc); 144 FileListTreeViewCtrl::FileListTreeViewCtrl( HWND hParent ) 145 : CTreeViewCtrl() 146 { 147 this->Create( hParent, NULL, NULL, 148 WS_CHILD | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS, 149 WS_EX_CLIENTEDGE 150 ); 151 152 OldFileTreeViewProc=(WNDPROC)this->GetWindowLongPtr(GWLP_WNDPROC); 153 this->SetWindowLongPtr(GWLP_WNDPROC,(long)FileTreeViewProc); 150 154 151 155 //イメージリスト読み込み、設定 … … 154 158 ImageList_AddIcon(hImageList,LoadIcon(hResInst,MAKEINTRESOURCE(IDI_FOLDER_OPEN))); 155 159 ImageList_AddIcon(hImageList,LoadIcon(hResInst,MAKEINTRESOURCE(IDI_TEXTDOCUMENT))); 156 TreeView_SetImageList(hTree,hImageList,TVSIL_NORMAL); 157 } 158 CFileTree::~CFileTree(){ 159 DestroyWindow(hTree); 160 this->SetImageList(hImageList,TVSIL_NORMAL); 161 } 162 FileListTreeViewCtrl::~FileListTreeViewCtrl() 163 { 164 this->DestroyWindow(); 160 165 ImageList_Destroy(hImageList); 161 166 } 162 167 163 void CFileTree::ContextMenu(POINT *pPos){ 168 void FileListTreeViewCtrl::ContextMenu(POINT *pPos) 169 { 164 170 //右クリックによるメニューを表示 165 171 TV_HITTESTINFO tvHitTestInfo; 166 172 tvHitTestInfo.pt=*pPos; 167 ScreenToClient(hTree,&tvHitTestInfo.pt); 168 169 HTREEITEM hTreeItem; 170 hTreeItem=TreeView_HitTest(hTree,&tvHitTestInfo); 173 this->ScreenToClient(&tvHitTestInfo.pt); 174 175 HTREEITEM hTreeItem = this->HitTest(&tvHitTestInfo); 171 176 if(hTreeItem){ 172 TreeView_SelectItem(hTree,hTreeItem);177 this->SelectItem(hTreeItem); 173 178 174 179 extern HMENU hFileTreeMenuBase; 175 if(TreeView_GetRoot(hTree)==hTreeItem) 176 TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,0),TPM_LEFTALIGN,pPos->x,pPos->y,0,hTree,0); 177 else TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,1),TPM_LEFTALIGN,pPos->x,pPos->y,0,hTree,0); 180 if(this->GetRootItem()==hTreeItem) 181 { 182 TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,0),TPM_LEFTALIGN,pPos->x,pPos->y,0,this->m_hWnd,0); 183 } 184 else 185 { 186 TrackPopupMenu(GetSubMenu(hFileTreeMenuBase,1),TPM_LEFTALIGN,pPos->x,pPos->y,0,this->m_hWnd,0); 187 } 178 188 } 179 189 } 180 190 181 HTREEITEM CFileTree::insert(char *str){191 HTREEITEM FileListTreeViewCtrl::insert(char *str){ 182 192 ////////////////////// 183 193 //ツリービューに追加 … … 188 198 tv.item.iImage=2; 189 199 tv.item.iSelectedImage=2; 190 tv.hParent= TreeView_GetRoot(hTree);200 tv.hParent=this->GetRootItem(); 191 201 tv.item.pszText=str; 192 202 193 return TreeView_InsertItem(hTree,&tv); 194 } 195 196 void CFileTree::resize(int x,int y,int cx,int cy){ 197 MoveWindow(hTree,x,y,cx,cy,1); 198 } 203 return this->InsertItem(&tv); 204 } -
trunk/ab5.0/abdev/abdev/FileTree.h
r3 r651 1 1 2 2 3 class CFileTree{ 3 class FileListTreeViewCtrl 4 : public CTreeViewCtrl 5 { 4 6 HIMAGELIST hImageList; 5 7 public: 6 HWND hTree; 7 CFileTree(HWND hParent); 8 ~CFileTree(); 8 FileListTreeViewCtrl(HWND hParent); 9 ~FileListTreeViewCtrl(); 9 10 10 11 void ContextMenu(POINT *pPos); 11 12 12 13 HTREEITEM insert(char *str); 13 14 void resize(int x,int y,int cx,int cy);15 14 }; 16 15 17 extern CFileTree*pobj_FileTree;16 extern FileListTreeViewCtrl *pobj_FileTree; -
trunk/ab5.0/abdev/abdev/ParameterHint.cpp
r629 r651 35 35 if( projectInfo.IsOpened() ){ 36 36 //プロジェクトが開かれているとき 37 lstrcpy(temporary,projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]-> m_path);37 lstrcpy(temporary,projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->GetPath().c_str()); 38 38 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 39 39 -
trunk/ab5.0/abdev/abdev/ProjectControl.cpp
r629 r651 135 135 // 対象ファイルを開く 136 136 lstrcpy(temporary, 137 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]-> m_path);137 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]->GetPath().c_str()); 138 138 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 139 139 hChild=OpenFileWithExtension(temporary); … … 403 403 void ShowFileView(){ 404 404 TabCtrl_SetCurSel(hProjectViewTab,0); 405 ShowWindow(pobj_FileTree->hTree,SW_SHOW);405 pobj_FileTree->ShowWindow( SW_SHOW ); 406 406 ShowWindow(hProcedureTreeView,SW_HIDE); 407 407 ShowWindow(hMaterialTreeView,SW_HIDE); … … 409 409 void ShowClassView(){ 410 410 TabCtrl_SetCurSel(hProjectViewTab,1); 411 ShowWindow(pobj_FileTree->hTree,SW_HIDE);411 pobj_FileTree->ShowWindow( SW_HIDE ); 412 412 ShowWindow(hMaterialTreeView,SW_HIDE); 413 413 ShowWindow(hProcedureTreeView,SW_SHOW); … … 415 415 void ShowMaterialView(){ 416 416 TabCtrl_SetCurSel(hProjectViewTab,2); 417 ShowWindow(pobj_FileTree->hTree,SW_HIDE);417 pobj_FileTree->ShowWindow( SW_HIDE ); 418 418 ShowWindow(hProcedureTreeView,SW_HIDE); 419 419 ShowWindow(hMaterialTreeView,SW_SHOW); … … 455 455 456 456 //ファイルツリービューを作成 457 pobj_FileTree =new CFileTree(hProjectViewTab);457 pobj_FileTree = new FileListTreeViewCtrl( hProjectViewTab ); 458 458 459 459 //クラスツリービューを作成 … … 494 494 TreeView_SetImageList(hMaterialTreeView,hMaterialTreeViewImageList,TVSIL_NORMAL); 495 495 496 ShowWindow(pobj_FileTree->hTree,SW_SHOW);496 pobj_FileTree->ShowWindow( SW_SHOW ); 497 497 GetClientRect(hwnd,&rect); 498 498 SendMessage(hwnd,WM_SIZE,0,MAKELONG(rect.right,rect.bottom)); … … 605 605 rect.bottom++; 606 606 607 pobj_FileTree-> resize(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top);607 pobj_FileTree->MoveWindow(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top); 608 608 MoveWindow(hProcedureTreeView, 609 609 rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,1); … … 623 623 TabCtrl_AdjustRect(hProjectViewTab,FALSE,&rect); 624 624 625 pobj_FileTree-> resize(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top);625 pobj_FileTree->MoveWindow(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top); 626 626 MoveWindow(hProcedureTreeView, 627 627 rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,1); … … 687 687 688 688 //ツリービューから削除 689 TreeView_DeleteItem(pobj_FileTree->hTree,hTreeItem);689 pobj_FileTree->DeleteItem( hTreeItem ); 690 690 691 691 //projectInfo.pobj_DBFileInfoオブジェクトから削除 … … 1407 1407 temporary[i2]=buffer[i]; 1408 1408 } 1409 if(temporary[0]=='1') TreeView_Expand(pobj_FileTree->hTree,TreeView_GetRoot(pobj_FileTree->hTree),TVE_EXPAND); 1409 if(temporary[0]=='1') 1410 { 1411 pobj_FileTree->Expand( pobj_FileTree->GetRootItem(), TVE_EXPAND ); 1412 } 1410 1413 1411 1414 for(i+=2,i2=0;;i++,i2++){ … … 1529 1532 temporary[i2]=buffer[i]; 1530 1533 } 1531 if(temporary[0]=='1') TreeView_Expand(pobj_FileTree->hTree,TreeView_GetRoot(pobj_FileTree->hTree),TVE_EXPAND); 1534 if(temporary[0]=='1') 1535 { 1536 pobj_FileTree->Expand( pobj_FileTree->GetRootItem(), TVE_EXPAND ); 1537 } 1532 1538 1533 1539 for(i+=2,i2=0;;i++,i2++){ … … 1664 1670 1665 1671 sprintf(buffer+i2,"text,\"%s\",%d,%d,%d,%d\r\n", 1666 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]-> m_path,1672 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str(), 1667 1673 pos.x, 1668 1674 pos.y, … … 1718 1724 memset(&tvItem,0,sizeof(TVITEM)); 1719 1725 tvItem.mask=TVIF_HANDLE|TVIF_STATE; 1720 tvItem.hItem =TreeView_GetRoot(pobj_FileTree->hTree);1721 TreeView_GetItem(pobj_FileTree->hTree,&tvItem);1726 tvItem.hItem = pobj_FileTree->GetRootItem(); 1727 pobj_FileTree->GetItem( &tvItem ); 1722 1728 if(tvItem.state&TVIS_EXPANDED) i=1; 1723 1729 else i=0; -
trunk/ab5.0/abdev/abdev/abdev.vcproj
r629 r651 2814 2814 Name="ProjectManager" 2815 2815 > 2816 <File 2817 RelativePath=".\include\ProjectManager\FileManager.h" 2818 > 2819 </File> 2816 2820 <File 2817 2821 RelativePath=".\include\ProjectManager\ProjectManager.h" -
trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
r629 r651 343 343 i2+=lstrlen(buffer+i2); 344 344 for(i=0;i<this->pobj_DBFileInfo->iNum;i++){ 345 sprintf(buffer+i2,"%s\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]-> m_path);345 sprintf(buffer+i2,"%s\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str()); 346 346 i2+=lstrlen(buffer+i2); 347 347 } … … 476 476 for(i=1;i<this->pobj_DBFileInfo->iNum;i++){ 477 477 //メインファイルは含まない 478 sprintf(buffer+i2,"#include \"%s\"\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]-> m_path);478 sprintf(buffer+i2,"#include \"%s\"\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str()); 479 479 i2+=lstrlen(buffer+i2); 480 480 lstrcpy(buffer+i2,"_ClearNamespaceImported\r\n"); … … 624 624 extern HWND hProcedureTreeView; 625 625 extern HWND hMaterialTreeView; 626 TreeView_DeleteAllItems(pobj_FileTree->hTree);626 pobj_FileTree->DeleteAllItems(); 627 627 TreeView_DeleteAllItems(hProcedureTreeView); 628 628 TreeView_DeleteAllItems(hMaterialTreeView); -
trunk/ab5.0/abdev/abdev/stdafx.h
r615 r651 26 26 #include <atlcrack.h> 27 27 #include <atlmisc.h> 28 #include <atlctrls.h> 28 29 29 30 //boost libraries … … 56 57 #include "Common.h" 57 58 59 #include <ProjectManager/FileManager.h> 58 60 #include <ProjectManager/ProjectManager.h>
Note:
See TracChangeset
for help on using the changeset viewer.