Changeset 450
- Timestamp:
- May 3, 2010, 10:34:50 PM (11 years ago)
- Location:
- trunk/Lucide
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Lucide/gui/Lucide_res.H
r407 r450 133 133 #define IDC_FINDFIELD 10 134 134 #define IDC_FINDMATCHCASE 11 135 #define IDC_FINDBACK 12 135 136 136 137 #define IDD_PROGRESS 1004 -
trunk/Lucide/gui/dialogs.rc
r407 r450 49 49 CONTROL "", IDC_FINDFIELD, 73, 30, 111, 8, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP 50 50 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 51 CONTROL "FIND_MATCH_CASE", IDC_FINDMATCHCASE, 8, 6, 177, 10, WC_BUTTON, BS_AUTOCHECKBOX | WS_VISIBLE | WS_GROUP | WS_TABSTOP 51 CONTROL "FIND_MATCH_CASE", IDC_FINDMATCHCASE, 8, 12, 177, 10, WC_BUTTON, BS_AUTOCHECKBOX | WS_VISIBLE | WS_GROUP | WS_TABSTOP 52 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 53 CONTROL "FIND_BACK", IDC_FINDBACK, 8, 2, 177, 10, WC_BUTTON, BS_AUTOCHECKBOX | WS_VISIBLE | WS_GROUP | WS_TABSTOP 52 54 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 53 55 DEFPUSHBUTTON "FIND_OK", DID_OK, 201, 27, 51, 14 -
trunk/Lucide/gui/docViewer.cpp
r439 r450 658 658 // perform search in document 659 659 void DocumentViewer::searchDocument( const char *_searchString, bool _caseSensitive, 660 bool _continueSearch )660 bool _continueSearch, bool _findBack ) 661 661 { 662 662 abortSearch = false; … … 669 669 caseSensitive = _caseSensitive; 670 670 continueSearch = _continueSearch; 671 findBack = _findBack; 671 672 672 673 progressDlg->setBreakFunc( searchabort, this ); … … 691 692 692 693 long i = _this->currentpage; 694 if (!_this->findBack) { 693 695 if ( _this->continueSearch && ( _this->currentpage < ( _this->totalpages - 1 ) ) ) { 694 696 i = _this->currentpage + 1; 695 697 } 698 } else { 699 if ( _this->continueSearch && ( _this->currentpage >= 1 ) ) { 700 i = _this->currentpage - 1; 701 } 702 } 696 703 697 704 bool found = false; 698 for ( ; i < _this->totalpages;i++ )705 for ( ; _this->findBack ? i >=0 : i < _this->totalpages; _this->findBack ? i-- : i++ ) 699 706 { 700 707 char *fmt = newstrdupL( FIND_SEARCH_PAGE_OF ); … … 706 713 707 714 _this->foundrects[ i ] = _this->doc->searchText( ev, i, 708 (char *)_this->searchString, _this->caseSensitive );715 (char *)_this->searchString, _this->caseSensitive, _this->findBack ); 709 716 if ( _this->foundrects[ i ] != NULL ) 710 717 { -
trunk/Lucide/gui/docViewer.h
r399 r450 99 99 void copyToClipbrd(); 100 100 void searchDocument( const char *_searchString, bool _caseSensitive, 101 bool _continueSearch );101 bool _continueSearch, bool _findBack ); 102 102 void setPresentation( bool _presentation ); 103 103 void zoomInOut( bool zoomIn ); … … 244 244 bool caseSensitive; 245 245 bool continueSearch; 246 bool findBack; 246 247 bool abortSearch; 247 248 -
trunk/Lucide/gui/findDlg.cpp
r367 r450 50 50 searchString = newstrdup( "" ); 51 51 caseSensitive = false; 52 findBack = false; 52 53 } 53 54 … … 91 92 WinSendDlgItemMsg( hwnd, IDC_FINDFIELD, EM_SETSEL, MPFROM2SHORT( 0, MAXSEARCHLENGTH ), MPVOID ); 92 93 WinCheckButton( hwnd, IDC_FINDMATCHCASE, _this->caseSensitive ); 94 WinCheckButton( hwnd, IDC_FINDBACK, _this->findBack ); 95 93 96 94 97 return (MRESULT)FALSE; … … 105 108 _this->searchString = newstrdup( buf ); 106 109 _this->caseSensitive = WinQueryButtonCheckstate( hwnd, IDC_FINDMATCHCASE ); 110 _this->findBack = WinQueryButtonCheckstate( hwnd, IDC_FINDBACK ); 107 111 WinDismissDlg( hwnd, DID_OK ); 108 112 } … … 176 180 } 177 181 182 case WM_CONTROL: 183 // @todo highlight the text in the spinbutton (should work but looks like its not) 184 WinSendDlgItemMsg( hwnd, IDC_PAGE, EM_SETSEL, 185 MPFROM2SHORT(0, 256), NULL); 186 return (MRESULT)FALSE; 187 178 188 case WM_COMMAND: 179 189 switch (SHORT1FROMMP(mp1)) -
trunk/Lucide/gui/findDlg.h
r367 r450 46 46 char *getSearchString() { return searchString; } 47 47 bool isCaseSensitive() { return caseSensitive; } 48 bool doFindBack() { return findBack; } 48 49 49 50 private: … … 54 55 char *searchString; 55 56 bool caseSensitive; 57 bool findBack; 56 58 }; 57 59 -
trunk/Lucide/gui/lucide.cpp
r448 r450 1419 1419 { 1420 1420 docViewer->searchDocument( findDlg->getSearchString(), 1421 findDlg->isCaseSensitive(), false );1421 findDlg->isCaseSensitive(), false, findDlg->doFindBack() ); 1422 1422 1423 1423 WinEnableMenuItem( hWndMenu, CM_FINDAGAIN, TRUE ); … … 1429 1429 case CM_FINDAGAIN: 1430 1430 docViewer->searchDocument( findDlg->getSearchString(), 1431 findDlg->isCaseSensitive(), true );1431 findDlg->isCaseSensitive(), true, findDlg->doFindBack() ); 1432 1432 return (MRESULT)FALSE; 1433 1433 -
trunk/Lucide/gui/toolbar.cpp
r449 r450 77 77 && !Lucide::dontSwitchPage ) 78 78 { 79 /* @todo highlight the text in the spinbutton (is that possible at all???)79 // @todo highlight the text in the spinbutton (should work but looks like its not) 80 80 BOOL rc = (BOOL)WinSendDlgItemMsg( hwnd, TBID_PAGENUM, EM_SETSEL, 81 MPFROM2SHORT( 1,10), NULL); */81 MPFROM2SHORT(0,256), NULL); 82 82 } 83 83 -
trunk/Lucide/lng/Lucide.lng
r435 r450 148 148 FIND_FIND_WHAT=~Find what 149 149 FIND_MATCH_CASE=~Match case 150 FIND_BACK=Find ~Backwards 150 151 FIND_OK=~OK 151 152 FIND_CANCEL=~Cancel -
trunk/Lucide/lng/Lucide_de.lng
r435 r450 148 148 FIND_FIND_WHAT=~Suchbegriff 149 149 FIND_MATCH_CASE=~Groá-/Kleinschreibung beachten 150 FIND_BACK=~Rckwrts suchen 150 151 FIND_OK=~OK 151 152 FIND_CANCEL=~Abbruch -
trunk/Lucide/plugins/ludoc/ludoc.cpp
r367 r450 445 445 446 446 447 SOM_Scope LuDocument_LuRectSequence* SOMLINK searchText(LuDocument *somSelf, 448 Environment *ev, 449 long pagenum, 450 string text, 451 boolean caseSensitive ) 447 448 /* 449 * SOM_Scope LuDocument_LuRectSequence* SOMLINK searchText(LuDocument *somSelf, 450 * Environment *ev, 451 * long pagenum, 452 * string text, 453 * boolean caseSensitive 454 * boolean findBack) 455 */ 456 457 /* 458 * The prototype for searchText was replaced by the following prototype: 459 */ 460 SOM_Scope LuDocument_LuRectSequence* SOMLINK searchText(LuDocument *somSelf, 461 Environment *ev, 462 long pagenum, 463 string text, 464 boolean caseSensitive, 465 boolean findBack) 452 466 { 453 467 // Abstract method does nothing -
trunk/Lucide/plugins/ludoc/ludoc.idl
r367 r450 524 524 * Note: SOMMalloc() must be used for all memory allocations. 525 525 **/ 526 LuRectSequence *searchText( in long pagenum, in string text, in boolean caseSensitive );526 LuRectSequence *searchText( in long pagenum, in string text, in boolean caseSensitive, in boolean findBack ); 527 527 528 528 -
trunk/Lucide/plugins/lupoppler/lupoppler.cpp
r371 r450 1333 1333 long pagenum, 1334 1334 string text, 1335 boolean caseSensitive) 1335 boolean caseSensitive, 1336 boolean findBack) 1336 1337 { 1337 1338 LuPopplerDocumentData *somThis = LuPopplerDocumentGetData(somSelf);
Note: See TracChangeset
for help on using the changeset viewer.