Changeset 24 in dev for ProjectEditor
- Timestamp:
- Dec 30, 2006, 10:18:01 AM (18 years ago)
- Location:
- ProjectEditor
- Files:
-
- 2 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/Backup.cpp
r22 r24 55 55 //ファイルを保存 56 56 sprintf(temporary,"%sdocument%02d.txt",szBackupDirPath,iNum); 57 WriteBuffer(temporary,MdiInfo[WndNum].p mti->buffer,lstrlen(MdiInfo[WndNum].pmti->buffer));57 WriteBuffer(temporary,MdiInfo[WndNum].pMdiTextEdit->buffer,lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer)); 58 58 59 59 //情報を追加 … … 142 142 COLORREF TabColor; 143 143 TabColor=pobj_nv->pobj_ExtLink->GetTabColorFromFilePath(MdiInfo[WndNum].path); 144 pobj_MainTab-> delete_item(szOldTitle,0);145 pobj_MainTab-> insert(MdiInfo[WndNum].title,0,TabColor);146 147 MdiInfo[WndNum].p mti->bModify=1;144 pobj_MainTab->DeleteItem( szOldTitle, false ); 145 pobj_MainTab->InsertItem( MdiInfo[WndNum].title, false, TabColor ); 146 147 MdiInfo[WndNum].pMdiTextEdit->Modify(); 148 148 149 149 -
ProjectEditor/Caret.cpp
r3 r24 123 123 124 124 pCharRange->cpMin=GetBufferIndexFromCaretPos( 125 MdiInfo[WndNum].p mti->buffer,126 MdiInfo[WndNum].p mti->StartCaretPos.x,127 MdiInfo[WndNum].p mti->StartCaretPos.y);128 129 if(MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&130 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y){125 MdiInfo[WndNum].pMdiTextEdit->buffer, 126 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 127 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 128 129 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 130 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y){ 131 131 //選択されていないとき 132 132 pCharRange->cpMax=pCharRange->cpMin; … … 134 134 else{ 135 135 pCharRange->cpMax=GetBufferIndexFromCaretPos( 136 MdiInfo[WndNum].p mti->buffer,137 MdiInfo[WndNum].p mti->EndCaretPos.x,138 MdiInfo[WndNum].p mti->EndCaretPos.y);136 MdiInfo[WndNum].pMdiTextEdit->buffer, 137 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x, 138 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y); 139 139 } 140 140 … … 150 150 151 151 memcpy(buffer, 152 MdiInfo[WndNum].p mti->buffer+pCharRange->cpMin,152 MdiInfo[WndNum].pMdiTextEdit->buffer+pCharRange->cpMin, 153 153 pCharRange->cpMax-pCharRange->cpMin); 154 154 buffer[pCharRange->cpMax-pCharRange->cpMin]=0; … … 159 159 160 160 HWND hEdit; 161 hEdit=MdiInfo[WndNum].p mti->hEdit;161 hEdit=MdiInfo[WndNum].pMdiTextEdit->hEdit; 162 162 163 163 //垂直スクロールバーの位置 … … 195 195 196 196 GetCaretPosFromBufferIndex( 197 MdiInfo[WndNum].p mti->buffer,197 MdiInfo[WndNum].pMdiTextEdit->buffer, 198 198 StartIndex, 199 &MdiInfo[WndNum].p mti->StartCaretPos);199 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 200 200 201 201 GetCaretPosFromBufferIndex( 202 MdiInfo[WndNum].p mti->buffer,202 MdiInfo[WndNum].pMdiTextEdit->buffer, 203 203 EndIndex, 204 &MdiInfo[WndNum].p mti->EndCaretPos);204 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 205 205 206 206 HWND hEdit; … … 222 222 int iStartPos; 223 223 iStartPos=code_pos; 224 while(MdiInfo[WndNum].p mti->buffer[iStartPos]!='\n'&&iStartPos>0) iStartPos--;225 if(MdiInfo[WndNum].p mti->buffer[iStartPos]=='\n') iStartPos++;224 while(MdiInfo[WndNum].pMdiTextEdit->buffer[iStartPos]!='\n'&&iStartPos>0) iStartPos--; 225 if(MdiInfo[WndNum].pMdiTextEdit->buffer[iStartPos]=='\n') iStartPos++; 226 226 227 227 int iEndPos; 228 228 iEndPos=code_pos; 229 while(MdiInfo[WndNum].p mti->buffer[iEndPos]!='\r'&&MdiInfo[WndNum].pmti->buffer[iEndPos]!='\0') iEndPos++;229 while(MdiInfo[WndNum].pMdiTextEdit->buffer[iEndPos]!='\r'&&MdiInfo[WndNum].pMdiTextEdit->buffer[iEndPos]!='\0') iEndPos++; 230 230 231 231 TextEdit_SetSel(WndNum,iStartPos,iEndPos,bShowCenter); … … 239 239 GetCaretPos(&OldPos); 240 240 241 x=MdiInfo[WndNum].p mti->StartCaretPos.x;242 y=MdiInfo[WndNum].p mti->StartCaretPos.y;241 x=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x; 242 y=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y; 243 243 GetScrollBaseCaretPos(WndNum,&x,&y); 244 244 245 245 //エディタ画面左端のコントロールタブ 246 246 int iControlTabSpace; 247 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;247 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 248 248 249 249 //コントロールタブ上にカーソルがきたときに、非表示にする 250 if(OldPos.x>=iControlTabSpace&&x<0) HideCaret(MdiInfo[WndNum].p mti->hEdit);251 else if(OldPos.x<iControlTabSpace&&x>=0) ShowCaret(MdiInfo[WndNum].p mti->hEdit);250 if(OldPos.x>=iControlTabSpace&&x<0) HideCaret(MdiInfo[WndNum].pMdiTextEdit->hEdit); 251 else if(OldPos.x<iControlTabSpace&&x>=0) ShowCaret(MdiInfo[WndNum].pMdiTextEdit->hEdit); 252 252 253 253 SetCaretPos( … … 263 263 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 264 264 int start,end; 265 if(MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&266 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y){265 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 266 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y){ 267 267 //文字列を選択中でないとき 268 268 269 269 int sw=0; 270 270 if(bInputAndReset){ 271 if(MdiInfo[WndNum].p mti->StartCaretPos.x>1){272 MdiInfo[WndNum].p mti->StartCaretPos.x-=2;271 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x>1){ 272 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x-=2; 273 273 sw=1; 274 274 } … … 276 276 277 277 TextEdit_GetWordCaret( 278 MdiInfo[WndNum].p mti->hEdit,278 MdiInfo[WndNum].pMdiTextEdit->hEdit, 279 279 WndNum, 280 &MdiInfo[WndNum].p mti->StartCaretPos,280 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos, 281 281 &start,&end, 282 282 WORDCARET_BEFORE); 283 283 284 if(sw) MdiInfo[WndNum].p mti->StartCaretPos.x+=2;284 if(sw) MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x+=2; 285 285 286 286 //半角文字列を選択時の全角とのズレを修正 287 287 POINT pos; 288 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,start,&pos);289 start=GetBufferIndexFromCaretPos(MdiInfo[WndNum].p mti->buffer,pos.x,pos.y);290 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,end,&pos);291 end=GetBufferIndexFromCaretPos(MdiInfo[WndNum].p mti->buffer,pos.x,pos.y);288 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,start,&pos); 289 start=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer,pos.x,pos.y); 290 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,end,&pos); 291 end=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer,pos.x,pos.y); 292 292 } 293 293 else{ 294 294 //文字列を選択中のとき 295 295 start=GetBufferIndexFromCaretPos( 296 MdiInfo[WndNum].p mti->buffer,297 MdiInfo[WndNum].p mti->StartCaretPos.x,298 MdiInfo[WndNum].p mti->StartCaretPos.y);296 MdiInfo[WndNum].pMdiTextEdit->buffer, 297 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 298 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 299 299 end=GetBufferIndexFromCaretPos( 300 MdiInfo[WndNum].p mti->buffer,301 MdiInfo[WndNum].p mti->EndCaretPos.x,302 MdiInfo[WndNum].p mti->EndCaretPos.y);300 MdiInfo[WndNum].pMdiTextEdit->buffer, 301 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x, 302 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y); 303 303 } 304 304 … … 315 315 if(length<0) length=0; 316 316 pTemp=(char *)HeapAlloc(hHeap,0,length+1024); 317 memcpy(pTemp,MdiInfo[WndNum].p mti->buffer+start,length);317 memcpy(pTemp,MdiInfo[WndNum].pMdiTextEdit->buffer+start,length); 318 318 pTemp[length]=0; 319 319 … … 359 359 char *pTemp,temporary[VN_SIZE]; 360 360 361 i=GetBufferIndexFromCaretPos(MdiInfo[WndNum].p mti->buffer,362 MdiInfo[WndNum].p mti->StartCaretPos.x,363 MdiInfo[WndNum].p mti->StartCaretPos.y);361 i=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer, 362 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 363 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 364 364 365 365 if(i<ComplementWndInfo.iPos||ComplementWndInfo.iPos+ComplementWndInfo.iLength<i){ … … 384 384 pTemp=(char *)HeapAlloc(hHeap,0,ComplementWndInfo.iLength+1); 385 385 memcpy(pTemp, 386 MdiInfo[WndNum].p mti->buffer+ComplementWndInfo.iPos,386 MdiInfo[WndNum].pMdiTextEdit->buffer+ComplementWndInfo.iPos, 387 387 ComplementWndInfo.iLength); 388 388 pTemp[ComplementWndInfo.iLength]=0; … … 437 437 pTemp=(char *)HeapAlloc(hHeap,0,ComplementWndInfo.iLength+1); 438 438 memcpy(pTemp, 439 MdiInfo[WndNum].p mti->buffer+ComplementWndInfo.iPos,439 MdiInfo[WndNum].pMdiTextEdit->buffer+ComplementWndInfo.iPos, 440 440 ComplementWndInfo.iLength); 441 441 pTemp[ComplementWndInfo.iLength]=0; … … 468 468 469 469 HWND hEdit; 470 hEdit=MdiInfo[WndNum].p mti->hEdit;471 472 x=MdiInfo[WndNum].p mti->StartCaretPos.x;473 y=MdiInfo[WndNum].p mti->StartCaretPos.y;470 hEdit=MdiInfo[WndNum].pMdiTextEdit->hEdit; 471 472 x=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x; 473 y=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y; 474 474 GetScrollBaseCaretPos(WndNum,&x,&y); 475 475 … … 544 544 if(loose_y<0) loose_y=0; 545 545 546 pBuf=MdiInfo[WndNum].p mti->buffer;546 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 547 547 548 548 // 行の確認 … … 668 668 669 669 POINT *pCaretPos; 670 pCaretPos=&MdiInfo[WndNum].p mti->StartCaretPos;670 pCaretPos=&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 671 671 672 672 if(pCaretPos->x==0&&pCaretPos->y==0){ … … 675 675 } 676 676 677 pBuf=MdiInfo[WndNum].p mti->buffer;677 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 678 678 679 679 i=GetBufferIndexFromCaretPos(pBuf, … … 721 721 char *pBuf; 722 722 723 pBuf=MdiInfo[WndNum].p mti->buffer;723 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 724 724 725 725 i=GetBufferIndexFromCaretPos(pBuf, … … 779 779 780 780 //上下のキャレット移動時には、左右方向の位置を保持する 781 if(MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos==-1)782 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=pCaretPos->x;781 if(MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 782 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 783 783 784 784 pCaretPos->y--; 785 785 786 786 CaretPos_LooseToNatural(WndNum, 787 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos,787 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos, 788 788 pCaretPos->y, 789 789 pCaretPos); … … 796 796 797 797 //上下のキャレット移動時には、左右方向の位置を保持する 798 if(MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos==-1)799 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=pCaretPos->x;798 if(MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 799 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 800 800 801 801 pCaretPos->y++; 802 802 803 803 CaretPos_LooseToNatural(WndNum, 804 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos,804 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos, 805 805 pCaretPos->y, 806 806 pCaretPos); … … 818 818 819 819 //上下のキャレット移動時には、左右方向の位置を保持する 820 if(MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos==-1)821 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=pCaretPos->x;820 if(MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 821 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 822 822 823 823 SCROLLINFO si; 824 824 si.cbSize=sizeof(SCROLLINFO); 825 825 si.fMask=SIF_PAGE; 826 GetScrollInfo(MdiInfo[WndNum].p mti->hEdit,SB_VERT,&si);826 GetScrollInfo(MdiInfo[WndNum].pMdiTextEdit->hEdit,SB_VERT,&si); 827 827 pCaretPos->y-=si.nPage; 828 828 if(pCaretPos->y<0) pCaretPos->y=0; 829 829 830 830 CaretPos_LooseToNatural(WndNum, 831 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos,831 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos, 832 832 pCaretPos->y, 833 833 pCaretPos); … … 840 840 841 841 //上下のキャレット移動時には、左右方向の位置を保持する 842 if(MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos==-1)843 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=pCaretPos->x;842 if(MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 843 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 844 844 845 845 SCROLLINFO si; 846 846 si.cbSize=sizeof(SCROLLINFO); 847 847 si.fMask=SIF_PAGE; 848 GetScrollInfo(MdiInfo[WndNum].p mti->hEdit,SB_VERT,&si);848 GetScrollInfo(MdiInfo[WndNum].pMdiTextEdit->hEdit,SB_VERT,&si); 849 849 pCaretPos->y+=si.nPage; 850 850 851 851 CaretPos_LooseToNatural(WndNum, 852 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos,852 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos, 853 853 pCaretPos->y, 854 854 pCaretPos); -
ProjectEditor/ClassTree.cpp
r3 r24 335 335 if(hChild){ 336 336 //すでに指定されたファイルが開かれている場合 337 pBuf=MdiInfo[WndNum].p mti->buffer;337 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 338 338 } 339 339 else{ -
ProjectEditor/CodeFormatter.cpp
r3 r24 36 36 37 37 char *pBuf; 38 pBuf=MdiInfo[WndNum].p mti->buffer;38 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 39 39 40 40 //カーソルバッファ位置を取得 41 41 int i,i2; 42 42 i=GetBufferIndexFromCaretPos(pBuf, 43 MdiInfo[WndNum].p mti->StartCaretPos.x,44 MdiInfo[WndNum].p mti->StartCaretPos.y);45 int StartX=MdiInfo[WndNum].p mti->StartCaretPos.x;43 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 44 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 45 int StartX=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x; 46 46 47 47 //現在の行のインデントをコピー(iFirstIndent_Speciallyにタブ数を格納) -
ProjectEditor/Common.h
r22 r24 23 23 #include "menu.h" 24 24 #include "LuxCtrl.h" 25 #include "MdiTextEdit.h" 25 26 #include "BREGEXP.H" 26 27 #include "../BasicCompiler32/CommandValue.h" … … 380 381 }; 381 382 382 struct MDITEXTEDITINFO{383 HWND hEdit;384 385 //Web検索ウィンドウ386 CWebResult *pobj_WebResult;387 388 //ルーラーウィンドウ389 CRuler *pobj_Ruler;390 391 //アイコン392 HICON hIcon;393 394 char *buffer;395 COLORREF *pColorRef;396 int iUnderStart;397 int iUnderEnd;398 399 POINT StartCaretPos;400 POINT EndCaretPos;401 int Temp_UpDown_CaretXPos;402 BOOL bAutoScroll;403 404 //コントロールタブスペースの幅と行番号の文字数405 int iWidth_ControlTabSpace;406 int iLineNumberTextCount;407 408 int iCharCode;409 int iLfCode;410 411 BOOL bModify;412 };413 414 383 struct MDIINFO{ 415 384 HWND hwnd; … … 422 391 MDIMENUINFO *MdiMenuInfo; 423 392 MDIICONEDITINFO *MdiIconEditInfo; 424 MDITEXTEDITINFO *pmti;393 CMdiTextEdit *pMdiTextEdit; 425 394 }; 426 395 427 396 char *IndentStr; 428 TEXTEDIT_UNDOSTATE *edit_undo;429 397 }; 430 398 extern MDIINFO MdiInfo[MAX_WNDNUM]; … … 958 926 void TextEdit_RedoCommand(int WndNum); 959 927 void TextEdit_NoticeChanging(int WndNum,int Command,char *KeyStr,char *DelStr,CHARRANGE *Range,CHARRANGE *DelRange); 960 void TextEdit_DeleteUndoData( int WndNum,int pos);928 void TextEdit_DeleteUndoData(TEXTEDIT_UNDOSTATE *pUndoState,int pos); 961 929 962 930 //Search.cpp -
ProjectEditor/Complement.cpp
r3 r24 384 384 //エディタ画面左端のコントロールタブ 385 385 int iControlTabSpace; 386 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;386 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 387 387 388 388 extern MDIINFO MdiInfo[MAX_WNDNUM]; 389 389 extern int font_width,font_height; 390 390 POINT pos; 391 pos=MdiInfo[WndNum].p mti->StartCaretPos;391 pos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 392 392 GetScrollBaseCaretPos(WndNum,(int *)&pos.x,(int *)&pos.y); 393 393 … … 395 395 pos.y=(pos.y+1)*font_height; 396 396 397 ClientToScreen(MdiInfo[WndNum].p mti->hEdit,&pos);397 ClientToScreen(MdiInfo[WndNum].pMdiTextEdit->hEdit,&pos); 398 398 399 399 extern HINSTANCE hInst; … … 621 621 //フォーカスをエディタに戻す 622 622 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 623 SetFocus(MdiInfo[WndNum].p mti->hEdit);623 SetFocus(MdiInfo[WndNum].pMdiTextEdit->hEdit); 624 624 return 0; 625 625 case WM_KEYDOWN: … … 633 633 //フォーカスをエディタに戻す 634 634 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 635 SetFocus(MdiInfo[WndNum].p mti->hEdit);635 SetFocus(MdiInfo[WndNum].pMdiTextEdit->hEdit); 636 636 637 637 LVHITTESTINFO lvHitTest; … … 659 659 660 660 for(i=ComplementWndInfo.iPos-1;;i--){ 661 if(MdiInfo[WndNum].p mti->buffer[i]!='\t'){661 if(MdiInfo[WndNum].pMdiTextEdit->buffer[i]!='\t'){ 662 662 i++; 663 663 break; … … 665 665 } 666 666 667 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,667 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 668 668 i, 669 &MdiInfo[WndNum].p mti->StartCaretPos);669 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 670 670 671 671 //インデント … … 684 684 //クラスメンバ補完 685 685 686 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,686 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 687 687 ComplementWndInfo.iPos, 688 &MdiInfo[WndNum].p mti->StartCaretPos);688 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 689 689 690 690 //リプレース前に補完機能を破棄する -
ProjectEditor/Debugger.cpp
r22 r24 252 252 253 253 char temporary[MAX_PATH]; 254 sprintf(temporary,"\"%s\",%d",MdiInfo[WndNum].path,MdiInfo[WndNum].p mti->StartCaretPos.y);254 sprintf(temporary,"\"%s\",%d",MdiInfo[WndNum].path,MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 255 255 256 256 char temp2[MAX_PATH]; … … 436 436 if(lstrcmpi(MdiInfo[WndNum].path,ppItem[i]->lpszFileName)==0){ 437 437 for(i2=0;i2<ppItem[i]->num;i2++){ 438 if(MdiInfo[WndNum].p mti->StartCaretPos.y==ppItem[i]->piLine[i2]){438 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==ppItem[i]->piLine[i2]){ 439 439 sw=1; 440 440 break; … … 447 447 if(sw==0){ 448 448 //ブレークポイントを追加 449 insert(MdiInfo[WndNum].path,MdiInfo[WndNum].p mti->StartCaretPos.y);449 insert(MdiInfo[WndNum].path,MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 450 450 } 451 451 else{ 452 452 //ブレークポイントを削除 453 remove(MdiInfo[WndNum].path,MdiInfo[WndNum].p mti->StartCaretPos.y);453 remove(MdiInfo[WndNum].path,MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 454 454 } 455 455 … … 462 462 463 463 //エディタを再描画 464 InvalidateRect(MdiInfo[WndNum].p mti->hEdit,NULL,0);464 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->hEdit,NULL,0); 465 465 } 466 466 void CDBBreakPoint::SaveToTempFile(void){ -
ProjectEditor/DocumentAdvice.cpp
r3 r24 201 201 else{ 202 202 //エディタから読み取る 203 FileSize=lstrlen(MdiInfo[i3].p mti->buffer);203 FileSize=lstrlen(MdiInfo[i3].pMdiTextEdit->buffer); 204 204 205 205 temp3=(char *)HeapAlloc(hHeap,0,FileSize+MEM_SPACE); 206 memcpy(temp3,MdiInfo[i3].p mti->buffer,FileSize);206 memcpy(temp3,MdiInfo[i3].pMdiTextEdit->buffer,FileSize); 207 207 temp3[FileSize]=0; 208 208 } -
ProjectEditor/DrawBuffer.cpp
r3 r24 283 283 int iControlTabSpace; 284 284 int iLineNumberTextCount; 285 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;286 iLineNumberTextCount=MdiInfo[WndNum].p mti->iLineNumberTextCount;285 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 286 iLineNumberTextCount=MdiInfo[WndNum].pMdiTextEdit->iLineNumberTextCount; 287 287 288 288 //一ページ中に表示できる行数を取得 … … 301 301 302 302 //テキストバッファをコード内で参照しやすいようにポインタ変数を利用する 303 pBuf=MdiInfo[WndNum].p mti->buffer;303 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 304 304 305 305 //選択範囲を取得 … … 335 335 if(pBuf[i]=='\0'){ 336 336 if(0<=y&&y<=OnePage_CharHeight){ 337 if(MdiInfo[WndNum].p mti->StartCaretPos.y==y-BaseY){337 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==y-BaseY){ 338 338 //////////////////////////////////// 339 339 // カーソル行では余白を塗りつぶす … … 375 375 ///////////////// 376 376 377 if(MdiInfo[WndNum].p mti->StartCaretPos.y==y-BaseY){377 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==y-BaseY){ 378 378 /////////////////////////////////////////////////////////// 379 379 //改行コードよりも右側は白いブラシで塗りつぶす(カーソル行用) … … 446 446 447 447 //ハイパーリンク用下線 448 if(MdiInfo[WndNum].p mti->iUnderStart<=i&&i<MdiInfo[WndNum].pmti->iUnderEnd)448 if(MdiInfo[WndNum].pMdiTextEdit->iUnderStart<=i&&i<MdiInfo[WndNum].pMdiTextEdit->iUnderEnd) 449 449 bHyperLinkUnderBar=1; 450 450 else bHyperLinkUnderBar=0; … … 463 463 else{ 464 464 //通常カラー 465 NextColor=MdiInfo[WndNum].p mti->pColorRef[i];465 NextColor=MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]; 466 466 } 467 467 … … 472 472 } 473 473 else{ 474 if(MdiInfo[WndNum].p mti->StartCaretPos.y==y-BaseY){474 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==y-BaseY){ 475 475 //カーソル行 476 476 NextBackColor=CaretBackColor; … … 523 523 524 524 525 if(MdiInfo[WndNum].p mti->StartCaretPos.y==y-BaseY){525 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==y-BaseY){ 526 526 /////////////////////////////////////////////////////////// 527 527 //改行コードよりも右側は白いブラシで塗りつぶす(カーソル行用) -
ProjectEditor/FileOperation.cpp
r22 r24 423 423 //文字コードを復元 424 424 char *pBuf; 425 pBuf=nkf.RestoreBuffer(MdiInfo[WndNum].p mti->buffer,MdiInfo[WndNum].pmti->iCharCode);425 pBuf=nkf.RestoreBuffer(MdiInfo[WndNum].pMdiTextEdit->buffer,MdiInfo[WndNum].pMdiTextEdit->iCharCode); 426 426 427 427 //改行コードを復元 428 if(MdiInfo[WndNum].p mti->iLfCode==LFCODE_LF) nkf.ToLF(pBuf);429 else if(MdiInfo[WndNum].p mti->iLfCode==LFCODE_CR) nkf.ToCR(pBuf);428 if(MdiInfo[WndNum].pMdiTextEdit->iLfCode==LFCODE_LF) nkf.ToLF(pBuf); 429 else if(MdiInfo[WndNum].pMdiTextEdit->iLfCode==LFCODE_CR) nkf.ToCR(pBuf); 430 430 431 431 … … 446 446 HeapDefaultFree(pBuf); 447 447 448 //変更フラグ に0をセット449 MdiInfo[WndNum].p mti->bModify=0;448 //変更フラグをオフにする 449 MdiInfo[WndNum].pMdiTextEdit->UnModify(); 450 450 } 451 451 else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){ … … 496 496 COLORREF color; 497 497 color=pobj_MainTab->GetItemColor(szOldTitle); 498 pobj_MainTab-> delete_item(szOldTitle,0);499 pobj_MainTab-> insert(MdiInfo[WndNum].title,0,color);498 pobj_MainTab->DeleteItem( szOldTitle, false ); 499 pobj_MainTab->InsertItem( MdiInfo[WndNum].title, false, color ); 500 500 } 501 501 else{ 502 pobj_MainTab-> reset_item(szOldTitle,MdiInfo[WndNum].title);502 pobj_MainTab->RenameItem( szOldTitle, MdiInfo[WndNum].title ); 503 503 } 504 504 -
ProjectEditor/IconEditor.cpp
r21 r24 383 383 else MdiInfo[i].path=(char *)GlobalAlloc(GPTR,1); 384 384 385 MdiInfo[i].edit_undo=(TEXTEDIT_UNDOSTATE *)GlobalAlloc(GPTR,sizeof(TEXTEDIT_UNDOSTATE));386 MdiInfo[i].edit_undo->NowPos=0;387 388 385 MdiInfo[i].MdiIconEditInfo=(MDIICONEDITINFO *)HeapAlloc(hHeap,0,sizeof(MDIICONEDITINFO)); 389 386 MdiInfo[i].MdiIconEditInfo->hMain=hMain; … … 442 439 443 440 //タブに追加 444 pobj_MainTab-> insert(str,1);441 pobj_MainTab->InsertItem( str, true ); 445 442 446 443 SetStatusText(NULL); -
ProjectEditor/MenuProc.cpp
r3 r24 297 297 298 298 //タブに追加 299 pobj_MainTab-> insert(pMenuInfo->IdName,1);299 pobj_MainTab->InsertItem( pMenuInfo->IdName, true ); 300 300 301 301 SetFocus(hListWnd); -
ProjectEditor/MessageCallOperation.cpp
r3 r24 135 135 WndNum=GetWndNum(hChild); 136 136 137 pBuf=MdiInfo[WndNum].p mti->buffer;137 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 138 138 139 139 for(i=0;;i++){ … … 190 190 TextEdit_SetSel(WndNum,i+2,i+i2); 191 191 } 192 SetFocus(MdiInfo[WndNum].p mti->hEdit);192 SetFocus(MdiInfo[WndNum].pMdiTextEdit->hEdit); 193 193 } 194 194 void InsertEventToList(HWND hList,int ItemNum,char *EventName,char *MessageName,char *OutLine){ -
ProjectEditor/NonVolatile.cpp
r3 r24 332 332 //ドキュメントを保存したときにタブを先頭に再配置するかどうか 333 333 if(!GetWholeValue("IsSaveTabToHead",&bSaveTabToHead)){ 334 #ifdef THETEXT335 334 bSaveTabToHead=0; 336 #else337 bSaveTabToHead=1;338 #endif339 335 } 340 336 … … 608 604 height_ClipCompileView=130; 609 605 width_WebSearchView=230; 610 #ifdef THETEXT611 606 bSaveTabToHead=0; 612 #else613 bSaveTabToHead=1;614 #endif615 607 616 608 BackNum_PairStatementComplement=100; -
ProjectEditor/ParameterHint.cpp
r3 r24 49 49 else{ 50 50 //エディタから読み込む 51 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[i].p mti->buffer)+1);52 lstrcpy(pBuf,MdiInfo[i].p mti->buffer);51 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[i].pMdiTextEdit->buffer)+1); 52 lstrcpy(pBuf,MdiInfo[i].pMdiTextEdit->buffer); 53 53 } 54 54 } … … 60 60 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 61 61 62 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[WndNum].p mti->buffer)+1);63 lstrcpy(pBuf,MdiInfo[WndNum].p mti->buffer);62 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer)+1); 63 lstrcpy(pBuf,MdiInfo[WndNum].pMdiTextEdit->buffer); 64 64 } 65 65 … … 686 686 char temp2[8192]; 687 687 688 pBuf=MdiInfo[WndNum].p mti->buffer;688 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 689 689 690 690 //キャレットが示すバッファインデックスを取得 691 691 iPos=GetBufferIndexFromCaretPos( 692 692 pBuf, 693 MdiInfo[WndNum].p mti->StartCaretPos.x,694 MdiInfo[WndNum].p mti->StartCaretPos.y);693 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 694 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 695 695 696 696 static int Before_StartCaretY; 697 697 BOOL Before_StartCaretSwitch=0; 698 if(MdiInfo[WndNum].p mti->StartCaretPos.y!=Before_StartCaretY){699 Before_StartCaretY=MdiInfo[WndNum].p mti->StartCaretPos.y;698 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y!=Before_StartCaretY){ 699 Before_StartCaretY=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y; 700 700 Before_StartCaretSwitch=1; 701 701 } … … 967 967 else{ 968 968 if(MethodCheckInfo.hWnd){ 969 UpdateWindow(MdiInfo[WndNum].p mti->hEdit); //ちらつき防止969 UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit); //ちらつき防止 970 970 971 971 DestroyWindow(MethodCheckInfo.hWnd); … … 1258 1258 GetWindowRect(MdiInfo[i].hwnd,&rect); 1259 1259 GetCaretPos(&pos); 1260 ClientToScreen(MdiInfo[i].p mti->hEdit,&pos);1260 ClientToScreen(MdiInfo[i].pMdiTextEdit->hEdit,&pos); 1261 1261 rect.left=pos.x-20; 1262 1262 rect.top=pos.y-pobj_nv->lf.lfHeight; -
ProjectEditor/Print.cpp
r3 r24 91 91 92 92 char *buffer; 93 buffer=MdiInfo[WndNum].p mti->buffer;93 buffer=MdiInfo[WndNum].pMdiTextEdit->buffer; 94 94 int i=0,i2=0,iPage=0; 95 95 for(i=0,i2=0;;i++,i2++){ -
ProjectEditor/ProjectControl.cpp
r3 r24 137 137 //ResetScrollbarが再描画時に呼び出されるので、再描画する 138 138 WndNum=GetWndNum(hChild); 139 InvalidateRect(MdiInfo[WndNum].p mti->hEdit,NULL,0);140 UpdateWindow(MdiInfo[WndNum].p mti->hEdit);139 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->hEdit,NULL,0); 140 UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit); 141 141 TextEdit_SelectOneLine(WndNum,pobj_ClassTreeView->pProcInfo[i].code_pos,TRUE); 142 142 … … 1491 1491 1492 1492 //ResetScrollbarが再描画時に呼び出されるので、再描画する 1493 InvalidateRect(MdiInfo[WndNum].p mti->hEdit,NULL,0);1494 UpdateWindow(MdiInfo[WndNum].p mti->hEdit);1493 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->hEdit,NULL,0); 1494 UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit); 1495 1495 1496 1496 if(temp2[i2]=='\0') goto EndToSetWorkFile; … … 1520 1520 si.fMask=SIF_POS; 1521 1521 si.nPos=pos.x; 1522 SetScrollInfo(MdiInfo[WndNum].p mti->hEdit,SB_HORZ,&si,1);1522 SetScrollInfo(MdiInfo[WndNum].pMdiTextEdit->hEdit,SB_HORZ,&si,1); 1523 1523 si.nPos=pos.y; 1524 SetScrollInfo(MdiInfo[WndNum].p mti->hEdit,SB_VERT,&si,1);1524 SetScrollInfo(MdiInfo[WndNum].pMdiTextEdit->hEdit,SB_VERT,&si,1); 1525 1525 1526 1526 if(temp2[i2]=='\0') goto EndToSetWorkFile; … … 1802 1802 sw=0; 1803 1803 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 1804 if( MdiInfo[WndNum].pmti->bModify){1804 if( MdiInfo[WndNum].pMdiTextEdit->IsModified() ){ 1805 1805 for(i=0;i<ProjectInfo.pobj_DBFileInfo->iNum;i++){ 1806 1806 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); … … 1859 1859 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 1860 1860 if(lstrcmpi(MdiInfo[WndNum].path,temporary)==0){ 1861 MdiInfo[WndNum].pmti->bModify=0; 1861 1862 //変更フラグをオフにする 1863 MdiInfo[WndNum].pMdiTextEdit->UnModify(); 1864 1862 1865 SendMessage(hCloseChild,WM_CLOSE,0,0); 1863 1866 break; … … 1993 1996 si.cbSize=sizeof(SCROLLINFO); 1994 1997 si.fMask=SIF_POS; 1995 GetScrollInfo(MdiInfo[WndNum].p mti->hEdit,SB_HORZ,&si);1998 GetScrollInfo(MdiInfo[WndNum].pMdiTextEdit->hEdit,SB_HORZ,&si); 1996 1999 pos.x=si.nPos; 1997 GetScrollInfo(MdiInfo[WndNum].p mti->hEdit,SB_VERT,&si);2000 GetScrollInfo(MdiInfo[WndNum].pMdiTextEdit->hEdit,SB_VERT,&si); 1998 2001 pos.y=si.nPos; 1999 2002 … … 2102 2105 WndNum=GetWndNum(hChild); 2103 2106 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 2104 if( MdiInfo[WndNum].pmti->bModify){2107 if( MdiInfo[WndNum].pMdiTextEdit->IsModified() ){ 2105 2108 for(i=0;i<ProjectInfo.pobj_DBFileInfo->iNum;i++){ 2106 2109 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); -
ProjectEditor/ProjectEditor.cpp
r22 r24 135 135 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 136 136 //コントロールタブスペースの幅と行番号の文字数を更新 137 MdiInfo[WndNum].p mti->iWidth_ControlTabSpace=138 GetControlTabSpace(WndNum,&MdiInfo[WndNum].p mti->iLineNumberTextCount);139 140 InvalidateRect(MdiInfo[WndNum].p mti->hEdit,NULL,0);141 InvalidateRect(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd,NULL,0);137 MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace= 138 GetControlTabSpace(WndNum,&MdiInfo[WndNum].pMdiTextEdit->iLineNumberTextCount); 139 140 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->hEdit,NULL,0); 141 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd,NULL,0); 142 142 143 143 SendTextEditResizeEvent(MdiInfo[WndNum].hwnd); … … 160 160 sw=0; 161 161 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 162 if( MdiInfo[WndNum].pmti->bModify) sw=1;162 if( MdiInfo[WndNum].pMdiTextEdit->IsModified() ) sw=1; 163 163 } 164 164 else if(MdiInfo[WndNum].DocType==WNDTYPE_ICONEDIT){ … … 205 205 206 206 //サイズ 207 BufSize=(double)lstrlen(MdiInfo[WndNum].p mti->buffer);207 BufSize=(double)lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer); 208 208 if(IsWindow(hChild)){ 209 209 if(BufSize<1024) sprintf(temporary,"%s: %.0fByte",STRING_SIZE,BufSize); … … 225 225 //日本語 226 226 sprintf(temporary,"%d 行、%d 列", 227 MdiInfo[WndNum].p mti->StartCaretPos.y+1,228 MdiInfo[WndNum].p mti->StartCaretPos.x+1);227 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y+1, 228 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x+1); 229 229 #else 230 230 //英語 231 231 sprintf(temporary,"%d : %d", 232 MdiInfo[WndNum].p mti->StartCaretPos.y+1,233 MdiInfo[WndNum].p mti->StartCaretPos.x+1);232 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y+1, 233 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x+1); 234 234 #endif 235 235 } … … 238 238 239 239 //文字コード 240 nkf.GetCharCodeName(MdiInfo[WndNum].p mti->iCharCode,temporary);240 nkf.GetCharCodeName(MdiInfo[WndNum].pMdiTextEdit->iCharCode,temporary); 241 241 SendMessage(hStatusBar,SB_SETTEXT,3,(LPARAM)temporary); 242 242 243 243 //文字コード 244 nkf.GetLfCodeName(MdiInfo[WndNum].p mti->iLfCode,temporary);244 nkf.GetLfCodeName(MdiInfo[WndNum].pMdiTextEdit->iLfCode,temporary); 245 245 SendMessage(hStatusBar,SB_SETTEXT,4,(LPARAM)temporary); 246 246 } … … 310 310 } 311 311 else if(IS_DOCUMENT_TEXT(MdiInfo[i].DocType)){ 312 i2=MdiInfo[i]. edit_undo->NowPos-1;312 i2=MdiInfo[i].pMdiTextEdit->pTextEditUndoState->NowPos-1; 313 313 if(i2==-1) i2=MAX_UNDONUM-1; 314 if(!MdiInfo[i]. edit_undo->Command[i2]){314 if(!MdiInfo[i].pMdiTextEdit->pTextEditUndoState->Command[i2]){ 315 315 pobj_MainMenu->EnableItem(IDM_UNDO,MF_BYCOMMAND|MF_GRAYED); 316 316 EnableMenuItem(hEditMenu,IDM_UNDO,MF_BYCOMMAND|MF_GRAYED); … … 322 322 pobj_StandardToolbar->EnableItem(IDM_UNDO,1); 323 323 } 324 if(!MdiInfo[i]. edit_undo->Command[MdiInfo[i].edit_undo->NowPos]){324 if(!MdiInfo[i].pMdiTextEdit->pTextEditUndoState->Command[MdiInfo[i].pMdiTextEdit->pTextEditUndoState->NowPos]){ 325 325 pobj_MainMenu->EnableItem(IDM_REDO,MF_BYCOMMAND|MF_GRAYED); 326 326 EnableMenuItem(hEditMenu,IDM_REDO,MF_BYCOMMAND|MF_GRAYED); … … 461 461 hChild=GetWindow(hChild,GW_CHILD); 462 462 if(!( 463 MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&464 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y463 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 464 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y 465 465 )){ 466 466 MenuMsg=MF_BYCOMMAND|MF_ENABLED; … … 901 901 } 902 902 903 MdiInfo[i].pmti=(MDITEXTEDITINFO *)HeapAlloc(hHeap,0,sizeof(MDITEXTEDITINFO)); 904 905 MdiInfo[i].pmti->hEdit=hEdit; 906 MdiInfo[i].pmti->pobj_WebResult=new CWebResult(hChild); 907 MdiInfo[i].pmti->pobj_Ruler=new CRuler(hChild,i); 908 MdiInfo[i].pmti->hIcon=shfi.hIcon; 909 MdiInfo[i].pmti->buffer=buffer; 910 MdiInfo[i].pmti->pColorRef=(COLORREF *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(COLORREF)*lstrlen(buffer)); 911 MdiInfo[i].pmti->iUnderStart=-1; 912 MdiInfo[i].pmti->iUnderEnd=-1; 913 MdiInfo[i].pmti->StartCaretPos.x=0; 914 MdiInfo[i].pmti->StartCaretPos.y=0; 915 MdiInfo[i].pmti->EndCaretPos.x=0; 916 MdiInfo[i].pmti->EndCaretPos.y=0; 917 MdiInfo[i].pmti->Temp_UpDown_CaretXPos=-1; 918 MdiInfo[i].pmti->bAutoScroll=0; 919 MdiInfo[i].pmti->iWidth_ControlTabSpace= 920 GetControlTabSpace(i,&MdiInfo[i].pmti->iLineNumberTextCount); 921 MdiInfo[i].pmti->iCharCode=iCharCode; 922 MdiInfo[i].pmti->iLfCode=iLfCode; 923 MdiInfo[i].pmti->bModify=0; 903 MdiInfo[i].pMdiTextEdit = new CMdiTextEdit( &MdiInfo[i] ); 904 905 MdiInfo[i].pMdiTextEdit->hEdit=hEdit; 906 MdiInfo[i].pMdiTextEdit->pobj_WebResult=new CWebResult(hChild); 907 MdiInfo[i].pMdiTextEdit->pobj_Ruler=new CRuler(hChild,i); 908 MdiInfo[i].pMdiTextEdit->hIcon=shfi.hIcon; 909 MdiInfo[i].pMdiTextEdit->buffer=buffer; 910 MdiInfo[i].pMdiTextEdit->pColorRef=(COLORREF *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(COLORREF)*lstrlen(buffer)); 911 MdiInfo[i].pMdiTextEdit->iUnderStart=-1; 912 MdiInfo[i].pMdiTextEdit->iUnderEnd=-1; 913 MdiInfo[i].pMdiTextEdit->StartCaretPos.x=0; 914 MdiInfo[i].pMdiTextEdit->StartCaretPos.y=0; 915 MdiInfo[i].pMdiTextEdit->EndCaretPos.x=0; 916 MdiInfo[i].pMdiTextEdit->EndCaretPos.y=0; 917 MdiInfo[i].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 918 MdiInfo[i].pMdiTextEdit->bAutoScroll=0; 919 MdiInfo[i].pMdiTextEdit->iWidth_ControlTabSpace= 920 GetControlTabSpace(i,&MdiInfo[i].pMdiTextEdit->iLineNumberTextCount); 921 MdiInfo[i].pMdiTextEdit->iCharCode=iCharCode; 922 MdiInfo[i].pMdiTextEdit->iLfCode=iLfCode; 924 923 925 924 MdiInfo[i].IndentStr=0; 926 927 MdiInfo[i].edit_undo=(TEXTEDIT_UNDOSTATE *)GlobalAlloc(GPTR,sizeof(TEXTEDIT_UNDOSTATE));928 MdiInfo[i].edit_undo->NowPos=0;929 925 930 926 int flag; … … 945 941 946 942 //タブに追加 947 pobj_MainTab-> insert(str,1,TabColor);943 pobj_MainTab->InsertItem( str, true, TabColor ); 948 944 949 945 SetFocus(hEdit); … … 1018 1014 1019 1015 //タブコントロールからアイテムを消去 1020 if(pobj_MainTab) pobj_MainTab-> delete_item(MdiInfo[WndNum].title,1);1016 if(pobj_MainTab) pobj_MainTab->DeleteItem( MdiInfo[WndNum].title, true ); 1021 1017 1022 1018 … … 1036 1032 } 1037 1033 1038 for(i2=0;i2<MAX_UNDONUM;i2++){ 1039 if(MdiInfo[WndNum].edit_undo->Command[i2]) 1040 TextEdit_DeleteUndoData(WndNum,i2); 1041 } 1042 GlobalFree(MdiInfo[WndNum].edit_undo); 1043 1044 HeapDefaultFree(MdiInfo[WndNum].pmti->buffer); 1045 HeapDefaultFree(MdiInfo[WndNum].pmti->pColorRef); 1034 HeapDefaultFree(MdiInfo[WndNum].pMdiTextEdit->buffer); 1035 HeapDefaultFree(MdiInfo[WndNum].pMdiTextEdit->pColorRef); 1046 1036 1047 1037 if(MdiInfo[WndNum].IndentStr) HeapDefaultFree(MdiInfo[WndNum].IndentStr); 1048 1038 1049 1039 //エディットコントロールを破棄 1050 DestroyWindow(MdiInfo[WndNum].p mti->hEdit);1040 DestroyWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit); 1051 1041 1052 1042 //Web検索ウィンドウを破棄 1053 delete MdiInfo[WndNum].p mti->pobj_WebResult;1054 MdiInfo[WndNum].p mti->pobj_WebResult=0;1043 delete MdiInfo[WndNum].pMdiTextEdit->pobj_WebResult; 1044 MdiInfo[WndNum].pMdiTextEdit->pobj_WebResult=0; 1055 1045 1056 1046 //ルーラーウィンドウを破棄 1057 delete MdiInfo[WndNum].p mti->pobj_Ruler;1058 MdiInfo[WndNum].p mti->pobj_Ruler=0;1047 delete MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler; 1048 MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler=0; 1059 1049 1060 1050 //アイコンを破棄 1061 if(MdiInfo[WndNum].p mti->hIcon) DestroyIcon(MdiInfo[WndNum].pmti->hIcon);1062 1063 HeapDefaultFree(MdiInfo[WndNum].pmti);1064 MdiInfo[WndNum].p mti=0;1051 if(MdiInfo[WndNum].pMdiTextEdit->hIcon) DestroyIcon(MdiInfo[WndNum].pMdiTextEdit->hIcon); 1052 1053 delete MdiInfo[WndNum].pMdiTextEdit; 1054 MdiInfo[WndNum].pMdiTextEdit=0; 1065 1055 } 1066 1056 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){ … … 1122 1112 if(pobj_nv->bEditor_Ruler){ 1123 1113 //ルーラー 1124 MdiInfo[WndNum].p mti->pobj_Ruler->resize(1114 MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->resize( 1125 1115 0, 1126 1116 0, … … 1130 1120 iHeightRuler=HEIGHT_RULER; 1131 1121 1132 ShowWindow(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd,SW_SHOW);1122 ShowWindow(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd,SW_SHOW); 1133 1123 } 1134 1124 else{ 1135 1125 iHeightRuler=0; 1136 1126 1137 ShowWindow(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd,SW_HIDE);1127 ShowWindow(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd,SW_HIDE); 1138 1128 } 1139 1129 1140 1130 //エディットウィンドウ 1141 MoveWindow(MdiInfo[WndNum].p mti->hEdit,1131 MoveWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit, 1142 1132 0, 1143 1133 iHeightRuler, … … 1147 1137 1148 1138 //Web検索ウィンドウ 1149 MdiInfo[WndNum].p mti->pobj_WebResult->resize(1139 MdiInfo[WndNum].pMdiTextEdit->pobj_WebResult->resize( 1150 1140 0, 1151 1141 cy-WebResultWndHeight, … … 1687 1677 hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,CharRange.cpMax-CharRange.cpMin+1); 1688 1678 pTemp=(char *)GlobalLock(hGlobal); 1689 memcpy(pTemp,MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin);1679 memcpy(pTemp,MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin); 1690 1680 pTemp[CharRange.cpMax-CharRange.cpMin]=0; 1691 1681 GlobalUnlock(hGlobal); … … 1743 1733 hGlobal=(char *)GlobalAlloc(GMEM_MOVEABLE,CharRange.cpMax-CharRange.cpMin+1); 1744 1734 pTemp=(char *)GlobalLock(hGlobal); 1745 memcpy(pTemp,MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin);1735 memcpy(pTemp,MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin,CharRange.cpMax-CharRange.cpMin); 1746 1736 pTemp[CharRange.cpMax-CharRange.cpMin]=0; 1747 1737 GlobalUnlock(hGlobal); … … 1853 1843 hEdit=GetWindow(hChild,GW_CHILD); 1854 1844 1855 MdiInfo[WndNum].p mti->StartCaretPos.x=0;1856 MdiInfo[WndNum].p mti->StartCaretPos.y=0;1845 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0; 1846 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y=0; 1857 1847 1858 1848 GetCaretPosFromBufferIndex( 1859 MdiInfo[WndNum].p mti->buffer,1860 lstrlen(MdiInfo[WndNum].p mti->buffer),1861 &MdiInfo[WndNum].p mti->EndCaretPos);1849 MdiInfo[WndNum].pMdiTextEdit->buffer, 1850 lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer), 1851 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 1862 1852 1863 1853 InvalidateRect(hEdit,NULL,0); … … 2443 2433 2444 2434 //閉じる 2445 MdiInfo[WndNum].p mti->bModify=0;2435 MdiInfo[WndNum].pMdiTextEdit->UnModify(); 2446 2436 SendMessage(MdiInfo[WndNum].hwnd,WM_CLOSE,0,0); 2447 2437 … … 2552 2542 UpdateWindow(hChild); 2553 2543 2554 pTemp=MdiInfo[WndNum].p mti->buffer;2544 pTemp=MdiInfo[WndNum].pMdiTextEdit->buffer; 2555 2545 2556 2546 //行の先頭インデックスを取得(取得する行の番号はwParamで渡される) -
ProjectEditor/ProjectEditor.sln
r3 r24 11 11 TheText_Debug|Win32 = TheText_Debug|Win32 12 12 TheText_Release|Win32 = TheText_Release|Win32 13 TheText_Share_Debug|Win32 = TheText_Share_Debug|Win3214 TheText_Share_Release|Win32 = TheText_Share_Release|Win3215 13 EndGlobalSection 16 14 GlobalSection(ProjectConfigurationPlatforms) = postSolution … … 25 23 {DC1B787E-510F-4F7D-8F9A-182600904D83}.TheText_Release|Win32.ActiveCfg = TheText_Release|Win32 26 24 {DC1B787E-510F-4F7D-8F9A-182600904D83}.TheText_Release|Win32.Build.0 = TheText_Release|Win32 27 {DC1B787E-510F-4F7D-8F9A-182600904D83}.TheText_Share_Debug|Win32.ActiveCfg = TheText_Share_Debug|Win3228 {DC1B787E-510F-4F7D-8F9A-182600904D83}.TheText_Share_Debug|Win32.Build.0 = TheText_Share_Debug|Win3229 {DC1B787E-510F-4F7D-8F9A-182600904D83}.TheText_Share_Release|Win32.ActiveCfg = TheText_Share_Release|Win3230 {DC1B787E-510F-4F7D-8F9A-182600904D83}.TheText_Share_Release|Win32.Build.0 = TheText_Share_Release|Win3231 25 EndGlobalSection 32 26 GlobalSection(SolutionProperties) = preSolution -
ProjectEditor/ProjectEditor.vcproj
r3 r24 3797 3797 /> 3798 3798 </FileConfiguration> 3799 </File> 3800 </Filter> 3801 <Filter 3802 Name="MDIクライアント管理クラス" 3803 > 3804 <File 3805 RelativePath=".\MdiTextEdit.cpp" 3806 > 3807 </File> 3808 <File 3809 RelativePath=".\MdiTextEdit.h" 3810 > 3799 3811 </File> 3800 3812 </Filter> -
ProjectEditor/RadProc.cpp
r3 r24 146 146 147 147 //タブに追加 148 pobj_MainTab-> insert(pWindowInfo->name,1);148 pobj_MainTab->InsertItem( pWindowInfo->name, true ); 149 149 150 150 //メニュー状態を設定 -
ProjectEditor/Replace.cpp
r22 r24 8 8 CHARRANGE Range,cr2; 9 9 10 pBuf=MdiInfo[WndNum].p mti->buffer;10 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 11 11 12 12 //行の先頭位置を取得 … … 30 30 //初期化(すべて黒色に戻す) 31 31 for(i=Range.cpMin;i<Range.cpMax;i++){ 32 MdiInfo[WndNum].p mti->pColorRef[i]=tci.rgbDefault;32 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbDefault; 33 33 } 34 34 … … 59 59 if(bResult){ 60 60 for(i2=cr2.cpMin;i2<cr2.cpMax;i2++){ 61 MdiInfo[WndNum].p mti->pColorRef[i2]=tci.rgbStatement;61 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i2]=tci.rgbStatement; 62 62 } 63 63 } … … 65 65 if(IsStr||pBuf[i]=='\"'&&IsStr==0){ 66 66 //文字列カラー(""で囲まれる範囲) 67 MdiInfo[WndNum].p mti->pColorRef[i]=tci.rgbString;67 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbString; 68 68 } 69 69 if(pBuf[i]=='\0') break; … … 90 90 //バッファ長を取得 91 91 int length; 92 length=lstrlen(MdiInfo[WndNum].p mti->buffer);92 length=lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer); 93 93 94 94 int delta; … … 99 99 //////////////////// 100 100 101 MdiInfo[WndNum].p mti->buffer=(char *)HeapReAlloc(hHeap,101 MdiInfo[WndNum].pMdiTextEdit->buffer=(char *)HeapReAlloc(hHeap, 102 102 0, 103 MdiInfo[WndNum].p mti->buffer,103 MdiInfo[WndNum].pMdiTextEdit->buffer, 104 104 length+1+delta); 105 105 106 MdiInfo[WndNum].p mti->pColorRef=(COLORREF *)HeapReAlloc(hHeap,106 MdiInfo[WndNum].pMdiTextEdit->pColorRef=(COLORREF *)HeapReAlloc(hHeap, 107 107 0, 108 MdiInfo[WndNum].p mti->pColorRef,108 MdiInfo[WndNum].pMdiTextEdit->pColorRef, 109 109 (length+1+delta)*sizeof(COLORREF)); 110 110 } … … 115 115 ProjectInfo.pobj_DBBreakPoint->replace( 116 116 MdiInfo[WndNum].path, 117 MdiInfo[WndNum].p mti->buffer,117 MdiInfo[WndNum].pMdiTextEdit->buffer, 118 118 &DelRange, 119 119 &Range, … … 124 124 pobj_DBBreakPoint->replace( 125 125 MdiInfo[WndNum].path, 126 MdiInfo[WndNum].p mti->buffer,126 MdiInfo[WndNum].pMdiTextEdit->buffer, 127 127 &DelRange, 128 128 &Range, … … 132 132 133 133 //文字列バッファをスライドして、挿入 134 SlideString(MdiInfo[WndNum].p mti->buffer+DelRange.cpMax,134 SlideString(MdiInfo[WndNum].pMdiTextEdit->buffer+DelRange.cpMax, 135 135 delta); 136 memcpy(MdiInfo[WndNum].p mti->buffer+Range.cpMin,str,lstrlen(str));136 memcpy(MdiInfo[WndNum].pMdiTextEdit->buffer+Range.cpMin,str,lstrlen(str)); 137 137 138 138 //文字カラーバッファをスライド 139 SlideBuffer(((char *)MdiInfo[WndNum].p mti->pColorRef)+DelRange.cpMax*sizeof(COLORREF),139 SlideBuffer(((char *)MdiInfo[WndNum].pMdiTextEdit->pColorRef)+DelRange.cpMax*sizeof(COLORREF), 140 140 (length-DelRange.cpMax) * sizeof(COLORREF), 141 141 delta*sizeof(COLORREF)); … … 144 144 145 145 //新しいキャレット位置に変更 146 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,146 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 147 147 Range.cpMax, 148 &MdiInfo[WndNum].p mti->StartCaretPos);149 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;148 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 149 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 150 150 151 151 //コントロールタブスペースの幅と行番号の文字数を更新 152 MdiInfo[WndNum].p mti->iWidth_ControlTabSpace=153 GetControlTabSpace(WndNum,&MdiInfo[WndNum].p mti->iLineNumberTextCount);152 MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace= 153 GetControlTabSpace(WndNum,&MdiInfo[WndNum].pMdiTextEdit->iLineNumberTextCount); 154 154 155 155 if(bRedraw){ … … 159 159 160 160 if(!TextEdit_ScrollCaret(WndNum,0)){ 161 UpdateWindow(MdiInfo[WndNum].p mti->hEdit); //ちらつき防止162 InvalidateRect(MdiInfo[WndNum].p mti->hEdit,NULL,0);161 UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->hEdit); //ちらつき防止 162 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->hEdit,NULL,0); 163 163 } 164 164 … … 167 167 168 168 //上下キャレット移動時の左右位置保持機能を解除 169 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;169 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 170 170 171 171 //編集メニューをリセット 172 172 ResetState_EditMenu(); 173 173 174 //変更フラグをセット 175 MdiInfo[WndNum].pmti->bModify=1; 174 if( ! MdiInfo[WndNum].pMdiTextEdit->IsModified() ){ 175 //変更フラグをセット 176 MdiInfo[WndNum].pMdiTextEdit->Modify(); 177 } 176 178 177 179 … … 245 247 #endif 246 248 char *pBuf; 247 pBuf=MdiInfo[WndNum].p mti->buffer;249 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 248 250 249 251 //行全体を選択(min) … … 270 272 buffer=(char *)HeapAlloc(hHeap,0,length*3+1024); 271 273 temporary=(char *)HeapAlloc(hHeap,0,length*3+1024); 272 memcpy(buffer,MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,length);274 memcpy(buffer,MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin,length); 273 275 buffer[length]=0; 274 276 -
ProjectEditor/Ruler.cpp
r3 r24 57 57 58 58 int iControlTabSpace; 59 iControlTabSpace=MdiInfo[m_WndNum].p mti->iWidth_ControlTabSpace;59 iControlTabSpace=MdiInfo[m_WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 60 60 61 61 HBRUSH hBrush,hOldBrush; -
ProjectEditor/Search.cpp
r3 r24 35 35 hEdit=GetWindow(GetWindow(hClient,GW_CHILD),GW_CHILD); 36 36 37 i=lstrlen(MdiInfo[WndNum].p mti->buffer)+1;37 i=lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer)+1; 38 38 39 39 buffer=(char *)HeapAlloc(hHeap,0,i); 40 lstrcpy(buffer,MdiInfo[WndNum].p mti->buffer);40 lstrcpy(buffer,MdiInfo[WndNum].pMdiTextEdit->buffer); 41 41 42 42 LineStr=(char *)HeapAlloc(hHeap,0,i+64); … … 106 106 107 107 char *pBuf; 108 pBuf=MdiInfo[WndNum].p mti->buffer;108 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 109 109 110 110 //行の末端位置を取得 … … 146 146 if(WndNum==-1) return 0; 147 147 148 pBuf=MdiInfo[WndNum].p mti->buffer;148 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 149 149 150 150 TextEdit_GetSel(WndNum,&CharRange); … … 241 241 pTemp=(char *)HeapAlloc(hHeap,0,CharRange.cpMax-CharRange.cpMin+1); 242 242 memcpy(pTemp, 243 MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,243 MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin, 244 244 CharRange.cpMax-CharRange.cpMin); 245 245 pTemp[CharRange.cpMax-CharRange.cpMin]=0; … … 329 329 pTemp=(char *)HeapAlloc(hHeap,0,CharRange.cpMax-CharRange.cpMin+1); 330 330 memcpy(pTemp, 331 MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,331 MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin, 332 332 CharRange.cpMax-CharRange.cpMin); 333 333 pTemp[CharRange.cpMax-CharRange.cpMin]=0; … … 394 394 pTemp=(char *)HeapAlloc(hHeap,0,CharRange.cpMax-CharRange.cpMin+1); 395 395 memcpy(pTemp, 396 MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,396 MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin, 397 397 CharRange.cpMax-CharRange.cpMin); 398 398 pTemp[CharRange.cpMax-CharRange.cpMin]=0; … … 468 468 pTemp=(char *)HeapAlloc(hHeap,0,CharRange.cpMax-CharRange.cpMin+1); 469 469 memcpy(pTemp, 470 MdiInfo[WndNum].p mti->buffer+CharRange.cpMin,470 MdiInfo[WndNum].pMdiTextEdit->buffer+CharRange.cpMin, 471 471 CharRange.cpMax-CharRange.cpMin); 472 472 pTemp[CharRange.cpMax-CharRange.cpMin]=0; -
ProjectEditor/StringCount.cpp
r3 r24 23 23 else{ 24 24 //すべての範囲 25 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[WndNum].p mti->buffer)+1);26 lstrcpy(pBuf,MdiInfo[WndNum].p mti->buffer);25 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer)+1); 26 lstrcpy(pBuf,MdiInfo[WndNum].pMdiTextEdit->buffer); 27 27 } 28 28 -
ProjectEditor/SubOperation.cpp
r22 r24 817 817 if(IS_DOCUMENT_TEXT(MdiInfo[i].DocType)){ 818 818 SetTextEditWordColor(i); 819 InvalidateRect(MdiInfo[i].p mti->hEdit,NULL,0);819 InvalidateRect(MdiInfo[i].pMdiTextEdit->hEdit,NULL,0); 820 820 } 821 821 } … … 1403 1403 } 1404 1404 else{ 1405 if( MdiInfo[WndNum].pmti->bModify){1405 if( MdiInfo[WndNum].pMdiTextEdit->IsModified() ){ 1406 1406 if(!SaveDocument(hChild,NULL)) return 0; 1407 1407 } -
ProjectEditor/TabCtrl.cpp
r3 r24 73 73 74 74 75 int CMainTab:: search(char *lpszText){75 int CMainTab::SearchItemIndex( const char *lpszText ){ 76 76 int i2,i3; 77 77 char temporary[MAX_PATH]; … … 86 86 for(i2=0;i2<i3;i2++){ 87 87 TabCtrl_GetItem(hTab,i2,&tcItem); 88 89 //アスタリスクを取り除いて評価する 90 if( tcItem.pszText[ lstrlen( tcItem.pszText ) -1 ] == '*' ){ 91 tcItem.pszText[ lstrlen( tcItem.pszText ) -1 ] = 0; 92 } 93 88 94 if(lstrcmpi(lpszText,tcItem.pszText)==0) break; 89 95 } … … 91 97 92 98 return i2; 99 } 100 void CMainTab::SetItemText( int index, const char *ItemText ){ 101 TC_ITEM tcItem; 102 tcItem.mask=TCIF_TEXT; 103 tcItem.pszText=(LPSTR)ItemText; 104 tcItem.cchTextMax=MAX_PATH; 105 106 TabCtrl_SetItem(hTab,index,&tcItem); 107 } 108 void CMainTab::GetItemText( int index, char *ItemText ){ 109 TC_ITEM tcItem; 110 tcItem.mask = TCIF_TEXT; 111 tcItem.pszText = ItemText; 112 tcItem.cchTextMax = MAX_PATH; 113 TabCtrl_GetItem( hTab, index, &tcItem ); 114 } 115 bool CMainTab::IsModified( int index ){ 116 //アスタリスク表示かどうかを判断する 117 118 //アイテム文字列を取得 119 char ItemText[MAX_PATH]; 120 GetItemText( index, ItemText ); 121 122 if( ItemText[ lstrlen( ItemText ) -1 ] == '*' ){ 123 //アスタリスクがあったとき 124 return true; 125 } 126 127 //その他 128 return false; 93 129 } 94 130 … … 126 162 } 127 163 128 void CMainTab:: insert(char *lpszText,BOOL bResize,COLORREF color){164 void CMainTab::InsertItem( const char *lpszText, bool isResize, COLORREF color ){ 129 165 int sw=0; 130 166 if(TabCtrl_GetItemCount(hTab)==0) sw=1; … … 134 170 TC_ITEM tcItem; 135 171 tcItem.mask=TCIF_TEXT|TCIF_PARAM; 136 tcItem.pszText= lpszText;172 tcItem.pszText=(LPSTR)lpszText; 137 173 tcItem.lParam=color; 138 174 TabCtrl_InsertItem(hTab,0,&tcItem); 139 175 TabCtrl_SetCurSel(hTab,0); 140 176 141 if( bResize){177 if(isResize){ 142 178 if(sw) ResizeOwnerWnd(); 143 179 } 144 180 } 145 181 146 void CMainTab:: delete_item(char *lpszText,BOOL bResize){182 void CMainTab::DeleteItem( const char *lpszText, bool isResize ){ 147 183 int i2; 148 i2= search(lpszText);184 i2=SearchItemIndex(lpszText); 149 185 if(i2==-1) return; 150 186 151 187 TabCtrl_DeleteItem(hTab,i2); 152 188 153 if( bResize){189 if(isResize){ 154 190 if(TabCtrl_GetItemCount(hTab)==0) ResizeOwnerWnd(); 155 191 } 156 192 } 157 193 158 void CMainTab:: reset_item(char *lpszOldText,char *lpszNewText){194 void CMainTab::RenameItem( const char *lpszOldText, const char *lpszNewText ){ 159 195 int i2; 160 i2= search(lpszOldText);196 i2=SearchItemIndex(lpszOldText); 161 197 if(i2==-1) return; 162 198 163 TC_ITEM tcItem; 164 tcItem.mask=TCIF_TEXT; 165 tcItem.pszText=lpszNewText; 166 tcItem.cchTextMax=MAX_PATH; 167 168 TabCtrl_SetItem(hTab,i2,&tcItem); 169 } 170 171 COLORREF CMainTab::GetItemColor(char *lpszText){ 172 int i2,i3; 199 SetItemText( i2, lpszNewText ); 200 } 201 202 void CMainTab::NofityModifyDocument( const char *ItemText ){ 203 //ドキュメントが変更されたとき、アスタリスクを付けて表示する 204 205 //インデックスを取得 206 int index = SearchItemIndex( ItemText ); 207 if( index == -1 ) return; 208 209 //既にアスタリスク表示されていた場合は抜ける 210 if( IsModified( index ) ) return; 211 212 //アスタリスクを付加 173 213 char temporary[MAX_PATH]; 174 175 i3=TabCtrl_GetItemCount(hTab); 176 177 TC_ITEM tcItem; 178 tcItem.mask=TCIF_TEXT|TCIF_PARAM; 179 tcItem.pszText=temporary; 180 tcItem.cchTextMax=MAX_PATH; 181 182 for(i2=0;i2<i3;i2++){ 183 TabCtrl_GetItem(hTab,i2,&tcItem); 184 if(lstrcmpi(lpszText,tcItem.pszText)==0) return tcItem.lParam; 185 } 186 return -1; 214 lstrcpy( temporary, ItemText ); 215 lstrcat( temporary, "*" ); 216 217 //タブアイテムを更新 218 SetItemText( index, temporary ); 219 } 220 void CMainTab::NofityUnModifyDocument( const char *ItemText ){ 221 //ドキュメントが保存されたとき、アスタリスクを非表示にする 222 223 //インデックスを取得 224 int index = SearchItemIndex( ItemText ); 225 if( index == -1 ) return; 226 227 //既にアスタリスクが非表示の場合は抜ける 228 if( ! IsModified( index ) ) return; 229 230 //タブアイテムを更新 231 SetItemText( index, ItemText ); 232 } 233 234 COLORREF CMainTab::GetItemColor( char *ItemText ){ 235 //インデックスを取得 236 int index = SearchItemIndex( ItemText ); 237 if( index == -1 ) return -1; 238 239 TC_ITEM tcItem; 240 tcItem.mask = TCIF_PARAM; 241 TabCtrl_GetItem( hTab, index, &tcItem ); 242 return tcItem.lParam; 187 243 } 188 244 … … 207 263 void CMainTab::MdiActiveEvent(char *lpszText){ 208 264 int i2; 209 i2= search(lpszText);265 i2=SearchItemIndex(lpszText); 210 266 if(i2==-1) return; 211 267 -
ProjectEditor/TabCtrl.h
r3 r24 4 4 HFONT hBoldFont; 5 5 6 int search(char *lpszText); 6 //アイテム文字列を元にインデックスを取得する 7 int SearchItemIndex( const char *lpszText ); 8 9 //アイテム文字列を変更する 10 void SetItemText( int index, const char *ItemText ); 11 12 //アイテム文字列を取得する 13 void GetItemText( int index, char *ItemText ); 14 15 //アスタリスク表示かどうかを調べる(true/変更あり, false/変更なし) 16 bool IsModified( int index ); 7 17 8 18 public: … … 12 22 ~CMainTab(); 13 23 14 void insert(char *lpszText,BOOL bResize,COLORREF color=-1); 15 void delete_item(char *lpszText,BOOL bResize); 16 void reset_item(char *lpszOldText,char *lpszNewText); 24 //アイテムを挿入 25 void InsertItem( const char *lpszText, bool isResize, COLORREF color = -1 ); 17 26 18 COLORREF GetItemColor(char *lpszText); 27 //アイテムを削除 28 void DeleteItem( const char *lpszText, bool isResize ); 29 30 //アイテムの名前を変更 31 void RenameItem( const char *lpszOldText, const char *lpszNewText ); 32 33 //変更あり通知 34 void NofityModifyDocument( const char *ItemText ); 35 36 //変更なし通知 37 void NofityUnModifyDocument( const char *ItemText ); 38 39 COLORREF GetItemColor( char *ItemText ); 19 40 20 41 void SelChangeEvent(); -
ProjectEditor/TextEditor.cpp
r22 r24 10 10 11 11 char *pBuf; 12 pBuf=MdiInfo[WndNum].p mti->buffer;12 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 13 13 14 14 int i,iNum=1,x=0; … … 85 85 char *pBuf; 86 86 87 pBuf=MdiInfo[WndNum].p mti->buffer;87 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 88 88 89 89 if(MdiInfo[WndNum].DocType==WNDTYPE_TEXT){ … … 91 91 for(i=0;;i++){ 92 92 if(pBuf[i]=='\0') break; 93 MdiInfo[WndNum].p mti->pColorRef[i]=tci.rgbDefault;93 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbDefault; 94 94 } 95 95 return; … … 120 120 if(bResult){ 121 121 for(i3=i-i2;i3<i;i3++){ 122 MdiInfo[WndNum].p mti->pColorRef[i3]=tci.rgbStatement;122 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i3]=tci.rgbStatement; 123 123 } 124 124 } 125 125 else{ 126 126 for(i3=i-i2;i3<i;i3++){ 127 MdiInfo[WndNum].p mti->pColorRef[i3]=tci.rgbDefault;127 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i3]=tci.rgbDefault; 128 128 } 129 129 } … … 134 134 if(IsStr||pBuf[i]=='\"'&&IsStr==0){ 135 135 //文字列カラー(""で囲まれる範囲) 136 MdiInfo[WndNum].p mti->pColorRef[i]=tci.rgbString;136 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbString; 137 137 } 138 138 else{ 139 139 //通常カラー 140 MdiInfo[WndNum].p mti->pColorRef[i]=tci.rgbDefault;140 MdiInfo[WndNum].pMdiTextEdit->pColorRef[i]=tci.rgbDefault; 141 141 } 142 142 } … … 156 156 //エディタ画面左端のコントロールタブ 157 157 int iControlTabSpace; 158 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;158 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 159 159 160 160 HWND hEdit; … … 181 181 182 182 //ルーラーを再描画 183 InvalidateRect(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd,NULL,0);184 UpdateWindow(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd);183 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd,NULL,0); 184 UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd); 185 185 } 186 186 … … 217 217 char *pBuf; 218 218 219 pBuf=MdiInfo[WndNum].p mti->buffer;219 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 220 220 221 221 //ダブルクリック位置を取得(バッファインデックス) … … 330 330 331 331 i=GetBufferIndexFromCaretPos( 332 MdiInfo[WndNum].p mti->buffer,333 MdiInfo[WndNum].p mti->StartCaretPos.x,334 MdiInfo[WndNum].p mti->StartCaretPos.y);332 MdiInfo[WndNum].pMdiTextEdit->buffer, 333 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 334 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 335 335 GetCaretPosFromBufferIndex( 336 MdiInfo[WndNum].p mti->buffer,336 MdiInfo[WndNum].pMdiTextEdit->buffer, 337 337 i-lstrlen(MdiInfo[WndNum].IndentStr), 338 &MdiInfo[WndNum].p mti->StartCaretPos);338 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 339 339 340 340 TextEdit_Replace(WndNum,"",1); -
ProjectEditor/TextEditor_EventProc.cpp
r3 r24 226 226 227 227 int iControlTabSpace; 228 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;228 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 229 229 230 230 i=max(-si.nPos,min(i,si.nMax-((rect.right-iControlTabSpace)/font_width)-si.nPos)); … … 238 238 239 239 //ルーラーを再描画 240 InvalidateRect(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd,NULL,0);241 UpdateWindow(MdiInfo[WndNum].p mti->pobj_Ruler->hRulerWnd);240 InvalidateRect(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd,NULL,0); 241 UpdateWindow(MdiInfo[WndNum].pMdiTextEdit->pobj_Ruler->hRulerWnd); 242 242 243 243 return 0; … … 259 259 WS_CHILD|WS_VISIBLE, 260 260 0,0,0,0, 261 MdiInfo[wParam].p mti->pobj_WebResult->hwnd,0,hInst,0);261 MdiInfo[wParam].pMdiTextEdit->pobj_WebResult->hwnd,0,hInst,0); 262 262 263 263 SetWindowLong(hOneTabWnd,GWL_USERDATA,(long)lParam); -
ProjectEditor/TextEditor_ImeEvent.cpp
r3 r24 9 9 10 10 int iControlTabSpace; 11 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;11 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 12 12 13 13 HIMC hIMC; … … 18 18 COMPOSITIONFORM CompForm; 19 19 CompForm.dwStyle=CFS_POINT; 20 pos=MdiInfo[WndNum].p mti->StartCaretPos;20 pos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 21 21 GetScrollBaseCaretPos(WndNum,(int *)&pos.x,(int *)&pos.y); 22 22 CompForm.ptCurrentPos.x=pos.x*font_width+iControlTabSpace; … … 36 36 37 37 int iControlTabSpace; 38 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;38 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 39 39 40 40 //////////////////// … … 60 60 COMPOSITIONFORM CompForm; 61 61 CompForm.dwStyle=CFS_POINT; 62 pos=MdiInfo[WndNum].p mti->StartCaretPos;62 pos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 63 63 GetScrollBaseCaretPos(WndNum,(int *)&pos.x,(int *)&pos.y); 64 64 CompForm.ptCurrentPos.x=pos.x*font_width+iControlTabSpace; -
ProjectEditor/TextEditor_KeyEvent.cpp
r22 r24 12 12 WndNum=GetWndNum(GetParent(hwnd)); 13 13 14 if(MdiInfo[WndNum].p mti->iUnderStart!=-1){14 if(MdiInfo[WndNum].pMdiTextEdit->iUnderStart!=-1){ 15 15 //ハイパーリンク下線の表示を解除 16 MdiInfo[WndNum].p mti->iUnderStart=-1;17 MdiInfo[WndNum].p mti->iUnderEnd=-1;16 MdiInfo[WndNum].pMdiTextEdit->iUnderStart=-1; 17 MdiInfo[WndNum].pMdiTextEdit->iUnderEnd=-1; 18 18 19 19 //再描画 … … 147 147 char *pBuf; 148 148 149 pBuf=MdiInfo[WndNum].p mti->buffer;149 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 150 150 for(i=iPos;i>0;i--){ 151 151 if(pBuf[i-1]=='\r'&&pBuf[i]=='\n') return i+1; … … 235 235 } 236 236 237 pBuf=MdiInfo[WndNum].p mti->buffer;237 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 238 238 239 239 int StartX; … … 241 241 //リプレイス前のカーソルバッファ位置を取得 242 242 i=GetBufferIndexFromCaretPos(pBuf, 243 MdiInfo[WndNum].p mti->StartCaretPos.x,244 MdiInfo[WndNum].p mti->StartCaretPos.y);245 StartX=MdiInfo[WndNum].p mti->StartCaretPos.x;243 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 244 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 245 StartX=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x; 246 246 247 247 //リプレイス 248 248 TextEdit_ReplaceUpdateUndoData(WndNum,temporary,0,1); 249 pBuf=MdiInfo[WndNum].p mti->buffer;249 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 250 250 251 251 //リプレイス後のカーソル行のインデントをi3に取得 … … 290 290 */ 291 291 i=GetBufferIndexFromCaretPos(pBuf, 292 MdiInfo[WndNum].p mti->StartCaretPos.x,293 MdiInfo[WndNum].p mti->StartCaretPos.y);292 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 293 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 294 294 if(pBuf[i]=='\r'&& 295 295 pBuf[i+1]=='\n'){ … … 322 322 } 323 323 else if(nVirtualKey==VK_TAB){ 324 pBuf=MdiInfo[WndNum].p mti->buffer;324 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 325 325 326 326 TextEdit_GetSel(WndNum,&CharRange); … … 409 409 //リプレイス 410 410 TextEdit_ReplaceUpdateUndoData(WndNum,pTemp,0,0); 411 pBuf=MdiInfo[WndNum].p mti->buffer;411 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 412 412 413 413 HeapDefaultFree(pTemp); … … 496 496 case VK_LEFT: 497 497 //上下キャレット移動時の左右位置保持機能を解除 498 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;499 500 if((MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&501 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y)||498 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 499 500 if((MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 501 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y)|| 502 502 GetKeyState(VK_SHIFT)&0x8000){ 503 503 //選択中でないとき、またはシフトキーが押されているとき … … 506 506 else{ 507 507 //選択中のとき 508 if(MdiInfo[WndNum].p mti->StartCaretPos.y<MdiInfo[WndNum].pmti->EndCaretPos.y)509 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;510 else if(MdiInfo[WndNum].p mti->StartCaretPos.y>MdiInfo[WndNum].pmti->EndCaretPos.y)511 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;508 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 509 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 510 else if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y>MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 511 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 512 512 else{ 513 if(MdiInfo[WndNum].p mti->StartCaretPos.x<MdiInfo[WndNum].pmti->EndCaretPos.x)514 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;513 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x) 514 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 515 515 else 516 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;516 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 517 517 } 518 518 } … … 520 520 case VK_RIGHT: 521 521 //上下キャレット移動時の左右位置保持機能を解除 522 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;523 524 if((MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&525 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y)||522 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 523 524 if((MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 525 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y)|| 526 526 GetKeyState(VK_SHIFT)&0x8000){ 527 527 //選択中でないとき、またはシフトキーが押されているとき 528 528 GetNaturalCaretPos_Right(WndNum, 529 &MdiInfo[WndNum].p mti->StartCaretPos);529 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 530 530 } 531 531 else{ 532 532 //選択中のとき 533 if(MdiInfo[WndNum].p mti->StartCaretPos.y<MdiInfo[WndNum].pmti->EndCaretPos.y)534 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;535 else if(MdiInfo[WndNum].p mti->StartCaretPos.y>MdiInfo[WndNum].pmti->EndCaretPos.y)536 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;533 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 534 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 535 else if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y>MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 536 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 537 537 else{ 538 if(MdiInfo[WndNum].p mti->StartCaretPos.x<MdiInfo[WndNum].pmti->EndCaretPos.x)539 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;538 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x) 539 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 540 540 else 541 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;541 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 542 542 } 543 543 } … … 545 545 case VK_UP: 546 546 if((GetKeyState(VK_CONTROL)&0x8000)&& 547 MdiInfo[WndNum].p mti->StartCaretPos.x!=0){547 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x!=0){ 548 548 //行の先頭へキャレットを移動 549 MdiInfo[WndNum].p mti->StartCaretPos.x=0;549 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0; 550 550 551 551 //上下キャレット移動時の左右位置保持機能を解除 552 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;552 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 553 553 } 554 554 else{ 555 if((MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&556 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y)||555 if((MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 556 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y)|| 557 557 GetKeyState(VK_SHIFT)&0x8000){ 558 558 //選択中でないとき、またはシフトキーが押されているとき 559 559 GetNaturalCaretPos_Up(WndNum, 560 &MdiInfo[WndNum].p mti->StartCaretPos);560 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 561 561 } 562 562 else{ 563 563 //選択中のとき 564 if(MdiInfo[WndNum].p mti->StartCaretPos.y<MdiInfo[WndNum].pmti->EndCaretPos.y)565 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;566 else if(MdiInfo[WndNum].p mti->StartCaretPos.y>MdiInfo[WndNum].pmti->EndCaretPos.y)567 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;564 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 565 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 566 else if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y>MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 567 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 568 568 else{ 569 if(MdiInfo[WndNum].p mti->StartCaretPos.x<MdiInfo[WndNum].pmti->EndCaretPos.x)570 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;569 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x) 570 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 571 571 else 572 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;572 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 573 573 } 574 574 575 575 GetNaturalCaretPos_Up(WndNum, 576 &MdiInfo[WndNum].p mti->StartCaretPos);576 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 577 577 } 578 578 } 579 579 break; 580 580 case VK_DOWN: 581 i2=MdiInfo[WndNum].p mti->StartCaretPos.y;582 if((MdiInfo[WndNum].p mti->StartCaretPos.x==MdiInfo[WndNum].pmti->EndCaretPos.x&&583 MdiInfo[WndNum].p mti->StartCaretPos.y==MdiInfo[WndNum].pmti->EndCaretPos.y)||581 i2=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y; 582 if((MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&& 583 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y)|| 584 584 GetKeyState(VK_SHIFT)&0x8000){ 585 585 //選択中でないとき、またはシフトキーが押されているとき 586 586 GetNaturalCaretPos_Down(WndNum, 587 &MdiInfo[WndNum].p mti->StartCaretPos);587 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 588 588 } 589 589 else{ 590 590 //選択中のとき 591 if(MdiInfo[WndNum].p mti->StartCaretPos.y<MdiInfo[WndNum].pmti->EndCaretPos.y)592 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;593 else if(MdiInfo[WndNum].p mti->StartCaretPos.y>MdiInfo[WndNum].pmti->EndCaretPos.y)594 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;591 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 592 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 593 else if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y>MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y) 594 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 595 595 else{ 596 if(MdiInfo[WndNum].p mti->StartCaretPos.x<MdiInfo[WndNum].pmti->EndCaretPos.x)597 MdiInfo[WndNum].p mti->StartCaretPos=MdiInfo[WndNum].pmti->EndCaretPos;596 if(MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x<MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x) 597 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=MdiInfo[WndNum].pMdiTextEdit->EndCaretPos; 598 598 else 599 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;599 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 600 600 } 601 601 602 602 GetNaturalCaretPos_Down(WndNum, 603 &MdiInfo[WndNum].p mti->StartCaretPos);603 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 604 604 } 605 605 606 606 if(GetKeyState(VK_CONTROL)&0x8000){ 607 if(i2!=MdiInfo[WndNum].p mti->StartCaretPos.y){607 if(i2!=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y){ 608 608 //行の先頭へキャレットを移動 609 MdiInfo[WndNum].p mti->StartCaretPos.x=0;609 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0; 610 610 } 611 611 else{ … … 613 613 CaretPos_LooseToNatural(WndNum, 614 614 INT_MAX, 615 MdiInfo[WndNum].p mti->StartCaretPos.y,616 &MdiInfo[WndNum].p mti->StartCaretPos);615 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y, 616 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 617 617 } 618 618 619 619 //上下キャレット移動時の左右位置保持機能を解除 620 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;620 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 621 621 } 622 622 break; 623 623 case VK_PRIOR: 624 624 GetNaturalCaretPos_PageUp(WndNum, 625 &MdiInfo[WndNum].p mti->StartCaretPos);625 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 626 626 break; 627 627 case VK_NEXT: 628 628 GetNaturalCaretPos_PageDown(WndNum, 629 &MdiInfo[WndNum].p mti->StartCaretPos);629 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 630 630 break; 631 631 } … … 633 633 if(!(GetKeyState(VK_SHIFT)&0x8000)){ 634 634 //シフトキーが押されていない、通常時 635 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;635 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 636 636 } 637 637 … … 660 660 661 661 //上下キャレット移動時の左右位置保持機能を解除 662 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;662 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 663 663 664 664 if(GetKeyState(VK_CONTROL)&0x8000){ 665 665 //ファイルの先頭または末端へキャレットを移動 666 666 if(nVirtualKey==VK_HOME){ 667 MdiInfo[WndNum].p mti->StartCaretPos.x=0;668 MdiInfo[WndNum].p mti->StartCaretPos.y=0;667 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0; 668 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y=0; 669 669 } 670 670 else if(nVirtualKey==VK_END){ … … 673 673 INT_MAX, 674 674 INT_MAX, 675 &MdiInfo[WndNum].p mti->StartCaretPos);675 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 676 676 } 677 677 } 678 678 else{ 679 679 //行の先頭または末端へキャレットを移動 680 if(nVirtualKey==VK_HOME) MdiInfo[WndNum].p mti->StartCaretPos.x=0;680 if(nVirtualKey==VK_HOME) MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0; 681 681 else if(nVirtualKey==VK_END){ 682 682 //存在するキャレット位置に変換 683 683 CaretPos_LooseToNatural(WndNum, 684 684 INT_MAX, 685 MdiInfo[WndNum].p mti->StartCaretPos.y,686 &MdiInfo[WndNum].p mti->StartCaretPos);685 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y, 686 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 687 687 } 688 688 } … … 690 690 if(!(GetKeyState(VK_SHIFT)&0x8000)){ 691 691 //シフトキーが押されていない、通常時 692 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;692 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 693 693 } 694 694 … … 709 709 TextEdit_GetSel(WndNum,&CharRange); 710 710 711 pBuf=MdiInfo[WndNum].p mti->buffer;711 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 712 712 713 713 //キャレットがファイルの終端にあるとき … … 731 731 732 732 GetCaretPosFromBufferIndex( 733 MdiInfo[WndNum].p mti->buffer,733 MdiInfo[WndNum].pMdiTextEdit->buffer, 734 734 CharRange.cpMax, 735 &MdiInfo[WndNum].p mti->EndCaretPos);735 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 736 736 } 737 737 … … 753 753 754 754 i=GetBufferIndexFromCaretPos( 755 MdiInfo[WndNum].p mti->buffer,756 MdiInfo[WndNum].p mti->StartCaretPos.x,757 MdiInfo[WndNum].p mti->StartCaretPos.y);755 MdiInfo[WndNum].pMdiTextEdit->buffer, 756 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 757 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 758 758 GetCaretPosFromBufferIndex( 759 MdiInfo[WndNum].p mti->buffer,759 MdiInfo[WndNum].pMdiTextEdit->buffer, 760 760 i-1, 761 &MdiInfo[WndNum].p mti->StartCaretPos);761 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 762 762 TextEdit_Replace(WndNum,"",1); 763 763 } … … 789 789 790 790 char *pBuf; 791 pBuf=MdiInfo[WndNum].p mti->buffer;791 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 792 792 793 793 … … 823 823 824 824 i=GetBufferIndexFromCaretPos(pBuf, 825 MdiInfo[WndNum].p mti->StartCaretPos.x,826 MdiInfo[WndNum].p mti->StartCaretPos.y);825 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 826 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 827 827 828 828 i2=i-2; … … 961 961 962 962 char *pBuf; 963 pBuf=MdiInfo[WndNum].p mti->buffer;963 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 964 964 965 965 … … 972 972 973 973 i=GetBufferIndexFromCaretPos(pBuf, 974 MdiInfo[WndNum].p mti->StartCaretPos.x,975 MdiInfo[WndNum].p mti->StartCaretPos.y);974 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x, 975 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y); 976 976 977 977 if(GetNowTagInfo(pBuf,i-1)){ -
ProjectEditor/TextEditor_MouseEvent.cpp
r3 r24 10 10 if((GetKeyState(VK_CONTROL)&0x8000)&&pobj_nv->bCtrlKeyHyperLink){ 11 11 //Ctrlキーが押されているとき 12 if(MdiInfo[WndNum].p mti->iUnderStart!=-1){12 if(MdiInfo[WndNum].pMdiTextEdit->iUnderStart!=-1){ 13 13 //単語が選択可能なとき 14 14 15 15 //半角文字列を選択時の全角とのズレを修正 16 16 int start,end; 17 start=MdiInfo[WndNum].p mti->iUnderStart;18 end=MdiInfo[WndNum].p mti->iUnderEnd;19 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,start,&pos);20 start=GetBufferIndexFromCaretPos(MdiInfo[WndNum].p mti->buffer,pos.x,pos.y);21 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,end,&pos);22 end=GetBufferIndexFromCaretPos(MdiInfo[WndNum].p mti->buffer,pos.x,pos.y);17 start=MdiInfo[WndNum].pMdiTextEdit->iUnderStart; 18 end=MdiInfo[WndNum].pMdiTextEdit->iUnderEnd; 19 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,start,&pos); 20 start=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer,pos.x,pos.y); 21 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer,end,&pos); 22 end=GetBufferIndexFromCaretPos(MdiInfo[WndNum].pMdiTextEdit->buffer,pos.x,pos.y); 23 23 24 24 int length; … … 30 30 memcpy( 31 31 pTemp, 32 MdiInfo[WndNum].p mti->buffer+start,32 MdiInfo[WndNum].pMdiTextEdit->buffer+start, 33 33 length); 34 34 pTemp[length]=0; … … 51 51 52 52 int iControlTabSpace; 53 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;53 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 54 54 55 55 if(MdiInfo[WndNum].IndentStr){ … … 58 58 } 59 59 60 MdiInfo[WndNum].p mti->bAutoScroll=0;60 MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=0; 61 61 62 62 //上下キャレット移動時の左右位置保持機能を解除 63 MdiInfo[WndNum].p mti->Temp_UpDown_CaretXPos=-1;63 MdiInfo[WndNum].pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 64 64 65 65 if(0<=(pMousePos->x) && (pMousePos->x)<iControlTabSpace){ … … 72 72 0, 73 73 pMousePos->y, 74 &MdiInfo[WndNum].p mti->StartCaretPos);75 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;74 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 75 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 76 76 77 77 //////////// … … 80 80 81 81 char *pBuf; 82 pBuf=MdiInfo[WndNum].p mti->buffer;82 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 83 83 CHARRANGE CharRange; 84 84 TextEdit_GetSel(WndNum,&CharRange); … … 99 99 pMousePos->x-iControlTabSpace, 100 100 pMousePos->y, 101 &MdiInfo[WndNum].p mti->StartCaretPos);101 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 102 102 103 103 if(!(GetKeyState(VK_SHIFT)&0x8000)){ 104 104 //シフトキーが押されていない、通常時 105 MdiInfo[WndNum].p mti->EndCaretPos=MdiInfo[WndNum].pmti->StartCaretPos;105 MdiInfo[WndNum].pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos; 106 106 } 107 107 … … 121 121 122 122 int iControlTabSpace; 123 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;123 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 124 124 125 125 if(0<=(pMousePos->x) && (pMousePos->x)<iControlTabSpace){ … … 138 138 139 139 //オートスクロールスレッドを停止 140 MdiInfo[WndNum].p mti->bAutoScroll=0;140 MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=0; 141 141 142 142 //編集メニューをリセット … … 159 159 //エディタ画面左端のコントロールタブ 160 160 int iControlTabSpace; 161 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;162 163 164 while(MdiInfo[WndNum].p mti->bAutoScroll){161 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 162 163 164 while(MdiInfo[WndNum].pMdiTextEdit->bAutoScroll){ 165 165 GetCursorPos(&pos); 166 166 ScreenToClient(hwnd,&pos); … … 175 175 pos.x, 176 176 pos.y, 177 &MdiInfo[WndNum].p mti->StartCaretPos);177 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 178 178 179 179 if(!TextEdit_ScrollCaret(WndNum,1)) … … 194 194 195 195 int iControlTabSpace; 196 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;196 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 197 197 198 198 if(GetCapture()==hwnd){ … … 214 214 //////////////////////////// 215 215 216 if(MdiInfo[WndNum].p mti->bAutoScroll){216 if(MdiInfo[WndNum].pMdiTextEdit->bAutoScroll){ 217 217 //すでにオートスクロールスレッドが作動中のときは抜け出す 218 218 return; … … 220 220 221 221 //オートスクロールスレッドを起動 222 MdiInfo[WndNum].p mti->bAutoScroll=1;222 MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=1; 223 223 224 224 _beginthread((void (__cdecl *)(void *))AutoScrollThread,0,(void *)hwnd); … … 226 226 return; 227 227 } 228 else if(MdiInfo[WndNum].p mti->bAutoScroll){228 else if(MdiInfo[WndNum].pMdiTextEdit->bAutoScroll){ 229 229 //オートスクロールを解除 230 MdiInfo[WndNum].p mti->bAutoScroll=0;230 MdiInfo[WndNum].pMdiTextEdit->bAutoScroll=0; 231 231 } 232 232 … … 242 242 &pos); 243 243 244 if(pos.x!=MdiInfo[WndNum].p mti->StartCaretPos.x||pos.y!=MdiInfo[WndNum].pmti->StartCaretPos.y){245 MdiInfo[WndNum].p mti->StartCaretPos=pos;244 if(pos.x!=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x||pos.y!=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y){ 245 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos=pos; 246 246 247 247 InvalidateRect(hwnd,NULL,0); … … 270 270 271 271 TextEdit_GetWordCaret( 272 MdiInfo[WndNum].p mti->hEdit,272 MdiInfo[WndNum].pMdiTextEdit->hEdit, 273 273 WndNum, 274 274 &pos, 275 &MdiInfo[WndNum].p mti->iUnderStart,&MdiInfo[WndNum].pmti->iUnderEnd,275 &MdiInfo[WndNum].pMdiTextEdit->iUnderStart,&MdiInfo[WndNum].pMdiTextEdit->iUnderEnd, 276 276 WORDCARET_AFTER); 277 277 … … 282 282 } 283 283 else{ 284 if(MdiInfo[WndNum].p mti->iUnderStart!=-1){285 MdiInfo[WndNum].p mti->iUnderStart=-1;286 MdiInfo[WndNum].p mti->iUnderEnd=-1;284 if(MdiInfo[WndNum].pMdiTextEdit->iUnderStart!=-1){ 285 MdiInfo[WndNum].pMdiTextEdit->iUnderStart=-1; 286 MdiInfo[WndNum].pMdiTextEdit->iUnderEnd=-1; 287 287 288 288 InvalidateRect(hwnd,NULL,0); … … 300 300 301 301 int start,end; 302 TextEdit_GetWordCaret(hwnd,WndNum,&MdiInfo[WndNum].p mti->StartCaretPos,&start,&end,WORDCARET_AFTER);302 TextEdit_GetWordCaret(hwnd,WndNum,&MdiInfo[WndNum].pMdiTextEdit->StartCaretPos,&start,&end,WORDCARET_AFTER); 303 303 304 304 //セレクト … … 314 314 315 315 int iControlTabSpace; 316 iControlTabSpace=MdiInfo[WndNum].p mti->iWidth_ControlTabSpace;316 iControlTabSpace=MdiInfo[WndNum].pMdiTextEdit->iWidth_ControlTabSpace; 317 317 318 318 if(0<=(pMousePos->x) && (pMousePos->x)<iControlTabSpace){ -
ProjectEditor/TextEditor_UndoRedo.cpp
r3 r24 9 9 if(MdiInfo[WndNum].IndentStr) CancelBeforeAutoIndent(WndNum); 10 10 11 pUndoState=MdiInfo[WndNum]. edit_undo;11 pUndoState=MdiInfo[WndNum].pMdiTextEdit->pTextEditUndoState; 12 12 i=pUndoState->NowPos-1; 13 13 if(i==-1) i=MAX_UNDONUM-1; … … 19 19 20 20 //選択範囲をセット 21 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,21 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 22 22 pUndoState->Range[pUndoState->NowPos].cpMin, 23 &MdiInfo[WndNum].p mti->StartCaretPos);24 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,23 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 24 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 25 25 pUndoState->Range[pUndoState->NowPos].cpMax, 26 &MdiInfo[WndNum].p mti->EndCaretPos);26 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 27 27 28 28 switch(pUndoState->Command[pUndoState->NowPos]){ … … 41 41 //元に戻す、やり直しメニューをリセット 42 42 ResetState_UndoMenu(); 43 44 //変更を通知 45 MdiInfo[WndNum].pMdiTextEdit->NofityUndoRedoToModify(); 43 46 } 44 47 void TextEdit_RedoCommand(int WndNum){ … … 46 49 TEXTEDIT_UNDOSTATE *pUndoState; 47 50 48 pUndoState=MdiInfo[WndNum]. edit_undo;51 pUndoState=MdiInfo[WndNum].pMdiTextEdit->pTextEditUndoState; 49 52 if(!pUndoState->Command[pUndoState->NowPos]){ 50 53 MessageBeep(0); … … 56 59 case TEXTEDIT_UNDO_PASTE: 57 60 //選択範囲をセット 58 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,61 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 59 62 pUndoState->Range[pUndoState->NowPos].cpMin, 60 &MdiInfo[WndNum].p mti->StartCaretPos);61 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,63 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 64 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 62 65 pUndoState->Range[pUndoState->NowPos].cpMin, 63 &MdiInfo[WndNum].p mti->EndCaretPos);66 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 64 67 65 68 TextEdit_Replace(WndNum,pUndoState->KeyStr[pUndoState->NowPos],1); … … 67 70 case TEXTEDIT_UNDO_SELKEY: 68 71 //選択範囲をセット 69 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,72 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 70 73 pUndoState->DelRange[pUndoState->NowPos].cpMin, 71 &MdiInfo[WndNum].p mti->StartCaretPos);72 GetCaretPosFromBufferIndex(MdiInfo[WndNum].p mti->buffer,74 &MdiInfo[WndNum].pMdiTextEdit->StartCaretPos); 75 GetCaretPosFromBufferIndex(MdiInfo[WndNum].pMdiTextEdit->buffer, 73 76 pUndoState->DelRange[pUndoState->NowPos].cpMax, 74 &MdiInfo[WndNum].p mti->EndCaretPos);77 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 75 78 76 79 TextEdit_Replace(WndNum,pUndoState->KeyStr[pUndoState->NowPos],1); … … 86 89 //元に戻す、やり直しメニューをリセット 87 90 ResetState_UndoMenu(); 91 92 //変更を通知 93 MdiInfo[WndNum].pMdiTextEdit->NofityUndoRedoToModify(); 88 94 } 89 95 … … 102 108 TEXTEDIT_UNDOSTATE *pUndoState; 103 109 104 pUndoState=MdiInfo[WndNum]. edit_undo;110 pUndoState=MdiInfo[WndNum].pMdiTextEdit->pTextEditUndoState; 105 111 106 112 //Redoされた場合の不要なデータを削除する … … 108 114 if(i==MAX_UNDONUM) i=0; 109 115 if(pUndoState->Command[i]==0) break; 110 TextEdit_DeleteUndoData( WndNum,i);116 TextEdit_DeleteUndoData(pUndoState,i); 111 117 } 112 118 … … 141 147 if(pUndoState->Command[pUndoState->NowPos]){ 142 148 //一番古い情報を切り捨てる 143 TextEdit_DeleteUndoData( WndNum,pUndoState->NowPos);149 TextEdit_DeleteUndoData(pUndoState,pUndoState->NowPos); 144 150 } 145 151 … … 148 154 } 149 155 150 void TextEdit_DeleteUndoData(int WndNum,int pos){ 151 extern MDIINFO MdiInfo[MAX_WNDNUM]; 152 TEXTEDIT_UNDOSTATE *pUndoState; 153 154 pUndoState=MdiInfo[WndNum].edit_undo; 156 void TextEdit_DeleteUndoData(TEXTEDIT_UNDOSTATE *pUndoState,int pos){ 155 157 if(pUndoState->KeyStr[pos]) HeapDefaultFree(pUndoState->KeyStr[pos]); 156 158 if(pUndoState->DelStr[pos]) HeapDefaultFree(pUndoState->DelStr[pos]); -
ProjectEditor/WebSearch.cpp
r3 r24 321 321 iWindowWidth=size.cx+20; 322 322 323 if(MdiInfo[WndNum].p mti==0) return;324 hTabWnd=(HWND)SendMessage(MdiInfo[WndNum].p mti->hEdit,WM_SEARCH_TAB_CREATE,(WPARAM)WndNum,(LPARAM)this);323 if(MdiInfo[WndNum].pMdiTextEdit==0) return; 324 hTabWnd=(HWND)SendMessage(MdiInfo[WndNum].pMdiTextEdit->hEdit,WM_SEARCH_TAB_CREATE,(WPARAM)WndNum,(LPARAM)this); 325 325 } 326 326 COneTab::~COneTab(){ … … 333 333 } 334 334 335 if(MdiInfo[m_WndNum].p mti)336 SendMessage(MdiInfo[m_WndNum].p mti->hEdit,WM_SEARCH_TAB_CLOSE,0,(LPARAM)hTabWnd);335 if(MdiInfo[m_WndNum].pMdiTextEdit) 336 SendMessage(MdiInfo[m_WndNum].pMdiTextEdit->hEdit,WM_SEARCH_TAB_CLOSE,0,(LPARAM)hTabWnd); 337 337 } 338 338 … … 483 483 COneTab *pobj_temp_OneTab; 484 484 pobj_temp_OneTab=new COneTab(WndNum,lpszSearchText); 485 if(MdiInfo[WndNum].p mti==0){485 if(MdiInfo[WndNum].pMdiTextEdit==0){ 486 486 delete pobj_temp_OneTab; 487 487 return; … … 577 577 goto exit; 578 578 } 579 if(MdiInfo[WndNum].p mti==0){579 if(MdiInfo[WndNum].pMdiTextEdit==0){ 580 580 goto exit; 581 581 } 582 582 583 583 //重複チェック 584 if(MdiInfo[WndNum].p mti->pobj_WebResult->DuplicateCheck(str)){584 if(MdiInfo[WndNum].pMdiTextEdit->pobj_WebResult->DuplicateCheck(str)){ 585 585 goto exit; 586 586 } … … 589 589 590 590 extern MDIINFO MdiInfo[MAX_WNDNUM]; 591 MdiInfo[WndNum].p mti->pobj_WebResult->add(WndNum,str);591 MdiInfo[WndNum].pMdiTextEdit->pobj_WebResult->add(WndNum,str); 592 592 593 593 exit: -
ProjectEditor/nkf_class.cpp
r3 r24 174 174 SendMessage(hList,LB_ADDSTRING,0,(long)"JIS"); 175 175 SendMessage(hList,LB_ADDSTRING,0,(long)"UTF-8"); 176 SendMessage(hList,LB_SETCURSEL,MdiInfo[WndNum].p mti->iCharCode,0);176 SendMessage(hList,LB_SETCURSEL,MdiInfo[WndNum].pMdiTextEdit->iCharCode,0); 177 177 178 178 hList=GetDlgItem(hwnd,IDC_LIST_LFCODE); … … 180 180 SendMessage(hList,LB_ADDSTRING,0,(long)"LF(Unix)"); 181 181 SendMessage(hList,LB_ADDSTRING,0,(long)"CR(Macintosh)"); 182 SendMessage(hList,LB_SETCURSEL,MdiInfo[WndNum].p mti->iLfCode,0);182 SendMessage(hList,LB_SETCURSEL,MdiInfo[WndNum].pMdiTextEdit->iLfCode,0); 183 183 break; 184 184 case WM_COMMAND: … … 186 186 case IDOK: 187 187 //文字コードを取得 188 MdiInfo[WndNum].p mti->iCharCode=188 MdiInfo[WndNum].pMdiTextEdit->iCharCode= 189 189 (int)SendDlgItemMessage(hwnd,IDC_LIST_CHARCODE,LB_GETCURSEL,0,0); 190 190 191 191 //改行コードを取得 192 MdiInfo[WndNum].p mti->iLfCode=192 MdiInfo[WndNum].pMdiTextEdit->iLfCode= 193 193 (int)SendDlgItemMessage(hwnd,IDC_LIST_LFCODE,LB_GETCURSEL,0,0); 194 194 -
ProjectEditor/rebar.cpp
r3 r24 290 290 291 291 #ifdef THETEXT 292 //ファイル選択コンボボックス293 psr[num].RebarID=ID_DOCCOMBO;294 psr[num].RebarLength=150;295 psr[num].IsBandBreak=0;296 num++;297 292 298 293 //スタンダードツールバー … … 308 303 num++; 309 304 #else 310 //ファイル選択コンボボックス311 psr[num].RebarID=ID_DOCCOMBO;312 psr[num].RebarLength=150;313 psr[num].IsBandBreak=0;314 num++;315 305 316 306 //スタンダードツールバー
Note:
See TracChangeset
for help on using the changeset viewer.