Compared files  

Left
C:\SDK\wxWidgets-2.6.2\contrib\src\stc\scintilla\src\ScintillaBase.cxx
Last modified2005-03-21 12:17:54.000 +0100
Size15.4 Kb (646 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
C:\SDK\wxWidgets-2.6.3\contrib\src\stc\scintilla\src\ScintillaBase.cxx
Last modified2006-03-16 13:07:08.000 +0100
Size17.2 Kb (713 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged25610
Inserted1055
Deleted22
Ignored00
Changed1282



   Comparison Details  

37 skipped lines
38 38 ScintillaBase::ScintillaBase() {
39 39     displayPopupMenu = true;
40 40     listType = 0;
  41     maxListWidth = 0;
41 42 #ifdef SCI_LEXER
42 43     lexLanguage = SCLEX_CONTAINER;
  44     performingStyle = false;
43 45     lexCurrent = 0;
44 46     for (int wl = 0;wl < numWordLists;wl++)
45 47         keyWordLists[wl] = new WordList;
168 skipped lines
214 216         return;
215 217         }
216 218     }
  219     ac.Start(wMain, idAutoComplete, currentPos, LocationFromPosition(currentPos),
217     ac.Start(wMain, idAutoComplete, currentPos, lenEntered, vs.lineHeight, IsUnicodeMode()); 220         lenEntered, vs.lineHeight, IsUnicodeMode());
218 221  
219 222     PRectangle rcClient = GetClientRectangle();
220 223     Point pt = LocationFromPosition(currentPos - lenEntered);
21 skipped lines
242 245     rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom);
243 246     ac.lb->SetPositionRelative(rcac, wMain);
244 247     ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font);
245     ac.lb->SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth); 248     unsigned int aveCharWidth = vs.styles[STYLE_DEFAULT].aveCharWidth;
  249     ac.lb->SetAverageCharWidth(aveCharWidth);
246 250     ac.lb->SetDoubleClickAction(AutoCompleteDoubleClick, this);
247 251  
248 252     ac.SetList(list);
2 skipped lines
251 255     PRectangle rcList = ac.lb->GetDesiredRect();
252 256     int heightAlloced = rcList.bottom - rcList.top;
253 257     widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left);
  258     if (maxListWidth != 0)
  259         widthLB = Platform::Minimum(widthLB, aveCharWidth*maxListWidth);
254 260     // Make an allowance for large strings in list
255 261     rcList.left = pt.x - ac.lb->CaretFromEdge();
256 262     rcList.right = rcList.left + widthLB;
5 skipped lines
262 268     }
263 269     rcList.bottom = rcList.top + heightAlloced;
264 270     ac.lb->SetPositionRelative(rcList, wMain);
265     ac.Show(); 271     ac.Show(true);
266 272     if (lenEntered != 0) {
267 273         AutoCompleteMoveToCurrentWord();
268 274     }
43 skipped lines
312 318     selected[0] = '\0';
313 319     if (item != -1) {
314 320         ac.lb->GetValue(item, selected, sizeof(selected));
  321     } else {
  322         ac.Cancel();
  323         return;
315 324     }
  325  
316     ac.Cancel(); 326     ac.Show(false);
  327  
  328     listSelected = selected;
  329     SCNotification scn = {0};
  330     scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION;
  331     scn.message = 0;
  332     scn.wParam = listType;
  333     scn.listType = listType;
  334     Position firstPos = ac.posStart - ac.startLen;
  335     scn.lParam = firstPos;
  336     scn.text = listSelected.c_str();
  337     NotifyParent(scn);
  338  
317     if (item == -1) 339     if (!ac.Active())
318 340         return;
  341     ac.Cancel();
319 342  
320     if (listType > 0) { 343     if (listType > 0)
321         userListSelected = selected;  
322         SCNotification scn;  
323         scn.nmhdr.code = SCN_USERLISTSELECTION;  
324         scn.message = 0;  
325         scn.wParam = listType;  
326         scn.listType = listType;  
327         scn.lParam = 0;  
328         scn.text = userListSelected.c_str();  
329         NotifyParent(scn);  
330 344         return;
331     }  
332 345  
333     Position firstPos = ac.posStart - ac.startLen;  
334 346     Position endPos = currentPos;
335 347     if (ac.dropRestOfWord)
336 348         endPos = pdoc->ExtendWordSelect(endPos, 1, true);
41 skipped lines
378 390 }
379 391  
380 392 void ScintillaBase::CallTipClick() {
381     SCNotification scn; 393     SCNotification scn = {0};
382 394     scn.nmhdr.code = SCN_CALLTIPCLICK;
383 395     scn.position = ct.clickPlace;
384 396     NotifyParent(scn);
45 skipped lines
430 442 }
431 443  
432 444 void ScintillaBase::Colourise(int start, int end) {
433     int lengthDoc = pdoc->Length(); 445     if (!performingStyle) {
434     if (end == -1) 446         // Protect against reentrance, which may occur, for example, when
435         end = lengthDoc; 447         // fold points are discovered while performing styling and the folding
  448         // code looks for child lines which may trigger styling.
436     int len = end - start; 449         performingStyle = true;
437 450  
438     PLATFORM_ASSERT(len >= 0); 451         int lengthDoc = pdoc->Length();
  452         if (end == -1)
439     PLATFORM_ASSERT(start + len <= lengthDoc); 453         end = lengthDoc;
  454         int len = end - start;
440 455  
441     //WindowAccessor styler(wMain.GetID(), props); 456         PLATFORM_ASSERT(len >= 0);
442     DocumentAccessor styler(pdoc, props, wMain.GetID()); 457         PLATFORM_ASSERT(start + len <= lengthDoc);
443 458  
444     int styleStart = 0; 459         //WindowAccessor styler(wMain.GetID(), props);
445     if (start > 0)  
446         styleStart = styler.StyleAt(start - 1); 460         DocumentAccessor styler(pdoc, props, wMain.GetID());
447     styler.SetCodePage(pdoc->dbcsCodePage);  
448 461  
  462         int styleStart = 0;
  463         if (start > 0)
  464         styleStart = styler.StyleAt(start - 1);
  465         styler.SetCodePage(pdoc->dbcsCodePage);
  466  
449     if (lexCurrent && (len > 0)) {  // Should always succeed as null lexer should always be available 467         if (lexCurrent && (len > 0)) {  // Should always succeed as null lexer should always be available
450         lexCurrent->Lex(start, len, styleStart, keyWordLists, styler);  
451         styler.Flush();  
452         if (styler.GetPropertyInt("fold")) {  
453         lexCurrent->Fold(start, len, styleStart, keyWordLists, styler); 468         lexCurrent->Lex(start, len, styleStart, keyWordLists, styler);
454 469         styler.Flush();
  470         if (styler.GetPropertyInt("fold")) {
  471         lexCurrent->Fold(start, len, styleStart, keyWordLists, styler);
  472         styler.Flush();
  473         }
455 474         }
  475  
  476         performingStyle = false;
456 477     }
457 478 }
458 479 #endif
94 skipped lines
553 574     case SCI_AUTOCGETDROPRESTOFWORD:
554 575         return ac.dropRestOfWord;
555 576  
  577     case SCI_AUTOCSETMAXHEIGHT:
  578         ac.lb->SetVisibleRows(wParam);
  579         break;
  580  
  581     case SCI_AUTOCGETMAXHEIGHT:
4 skipped lines
  586         break;
  587  
  588     case SCI_AUTOCGETMAXWIDTH:
  589         return maxListWidth;
  590  
556 591     case SCI_REGISTERIMAGE:
557 592         ac.lb->RegisterImage(wParam, reinterpret_cast<const char *>(lParam));
558 593         break;
57 skipped lines
616 651         return lexLanguage;
617 652  
618 653     case SCI_COLOURISE:
  654         if (lexLanguage == SCLEX_CONTAINER) {
  655         pdoc->ModifiedAt(wParam);
  656         NotifyStyleToNeeded((lParam == -1) ? pdoc->Length() : lParam);
  657         } else {
619         Colourise(wParam, lParam); 658         Colourise(wParam, lParam);
  659         }
620 660         Redraw();
621 661         break;
622 662  
2 skipped lines
625 665                   reinterpret_cast<const char *>(lParam));
626 666         break;
627 667  
  668     case SCI_GETPROPERTY: {
  669         SString val = props.Get(reinterpret_cast<const char *>(wParam));
  670         const int n = val.length();
  671         if (lParam != 0) {
  672         char *ptr = reinterpret_cast<char *>(lParam);
15 skipped lines
  688         }
  689  
  690     case SCI_GETPROPERTYINT:
  691         return props.GetInt(reinterpret_cast<const char *>(wParam), lParam);
  692  
628 693     case SCI_SETKEYWORDS:
629 694         if (wParam < numWordLists) {
630 695         keyWordLists[wParam]->Clear();
5 skipped lines
636 701         SetLexerLanguage(reinterpret_cast<const char *>(lParam));
637 702         break;
638 703  
  704     case SCI_GETSTYLEBITSNEEDED:
  705         return lexCurrent ? lexCurrent->GetStyleBitsNeeded() : 5;
639 706 #endif
640 707  
641 708     default:
5 skipped lines

   Text comparison Options  

Syntax colouring language used: C / C++
Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

Unchanged lineExample of unchanged line
Modified lineExample of modified line
Added lineExample of added line
Removed lineExample of removed line
Ignored lineExample of ignored line

This report has been generated by Ellié Computing Merge on 2006-09-07 15:48:34.001 +0200.
© 2005-2006 Ellié Computing http://www.elliecomputing.com. All rights reserved.