Changeset 87
- Timestamp:
- Jul 25, 2006, 5:22:20 PM (15 years ago)
- Location:
- trunk/Lucide
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Lucide/BIN/Lucide.lng
r76 r87 27 27 MENU_NEXT_PAGE=Next page\t+ 28 28 MENU_LAST_PAGE=Last page 29 MENU_GO_TO_PAGE=Go to page... 29 MENU_GO_TO_PAGE=Go to page...\tCtrl+N 30 30 MENU_VIEW=~View 31 31 MENU_FIT_WINDOW=Fit in window … … 110 110 # 111 111 FIND_FIND=Find 112 FIND_FIND_WHAT=~Find what :112 FIND_FIND_WHAT=~Find what 113 113 FIND_MATCH_CASE=~Match case 114 114 FIND_OK=~OK … … 136 136 # 137 137 SD_SETTINGS=Settings 138 SD_DEFAULT_PAGE_LAYOUT=Default Page Layout :139 SD_DEFAULT_ZOOM=Default Zoom :138 SD_DEFAULT_PAGE_LAYOUT=Default Page Layout 139 SD_DEFAULT_ZOOM=Default Zoom 140 140 SD_OK=~OK 141 141 SD_CANCEL=~Cancel 142 143 # 144 # 'Go to page' dialog 145 # 146 GTP_GOTOPAGE=Go to page 147 GTP_PAGE=Page 148 GTP_OF=of %d 149 GTP_OK=~OK 150 GTP_CANCEL=~Cancel -
trunk/Lucide/BIN/Lucide_de.lng
r82 r87 27 27 MENU_NEXT_PAGE=Nchste Seite\t+ 28 28 MENU_LAST_PAGE=Letzte Seite 29 MENU_GO_TO_PAGE=Gehe zu Seite... 29 MENU_GO_TO_PAGE=Gehe zu Seite...\tStrg+N 30 30 MENU_VIEW=~Anzeige 31 31 MENU_FIT_WINDOW=Ganze Seite … … 110 110 # 111 111 FIND_FIND=Suchen 112 FIND_FIND_WHAT=~Suchbegriff :112 FIND_FIND_WHAT=~Suchbegriff 113 113 FIND_MATCH_CASE=~Groá-/Kleinschreibung beachten 114 114 FIND_OK=~OK … … 136 136 # 137 137 SD_SETTINGS=Einstellungen 138 SD_DEFAULT_PAGE_LAYOUT=Standard Seitenlayout :139 SD_DEFAULT_ZOOM=Standard-Zoom :138 SD_DEFAULT_PAGE_LAYOUT=Standard Seitenlayout 139 SD_DEFAULT_ZOOM=Standard-Zoom 140 140 SD_OK=~OK 141 141 SD_CANCEL=~Abbruch -
trunk/Lucide/BIN/Lucide_fr.lng
r72 r87 27 27 MENU_LAST_PAGE=Dernire page 28 28 MENU_GO_TO_PAGE=Aller 29 la page... 29 la page...\tCtrl+N 30 30 MENU_VIEW=~Affichage 31 31 MENU_FIT_WINDOW=Adapter … … 111 111 # 112 112 FIND_FIND=Recherche 113 FIND_FIND_WHAT=~Quoi chercher :113 FIND_FIND_WHAT=~Quoi chercher 114 114 FIND_MATCH_CASE=~Respecter la casse 115 115 FIND_OK=~OK … … 129 129 # 130 130 AD_ABOUT=Infos produit 131 AD_COPYRIGHTS=Copyrights here.132 131 AD_OK=OK -
trunk/Lucide/BIN/Lucide_ru.lng
r2 r87 3 3 # 4 4 5 MENU_FILE=~ ©«6 5 MENU_OPEN=âªàëâì...\tCtrl+O 7 6 MENU_SAVE_AS=®åà šâì ª ª... -
trunk/Lucide/BIN/Lucide_sv.lng
r72 r87 26 26 MENU_NEXT_PAGE=Nsta sida\t+ 27 27 MENU_LAST_PAGE=Sista sidan 28 MENU_GO_TO_PAGE=G till sidan... 28 MENU_GO_TO_PAGE=G till sidan...\tCtrl+N 29 29 MENU_VIEW=~Visa 30 30 MENU_FIT_WINDOW=Passa fnster … … 107 107 # 108 108 FIND_FIND=Finn 109 FIND_FIND_WHAT=~Finn vad :109 FIND_FIND_WHAT=~Finn vad 110 110 FIND_MATCH_CASE=~Matcha stor/liten bokstav 111 111 FIND_OK=~OK -
trunk/Lucide/SOURCE/gui/Lucide.rc
r72 r87 100 100 "G", CM_FINDAGAIN, CONTROL 101 101 "g", CM_FINDAGAIN, CONTROL 102 "N", CM_GOTOPAGE, CONTROL 103 "n", CM_GOTOPAGE, CONTROL 102 104 VK_F11, CM_MAXVIEW, VIRTUALKEY 103 105 END -
trunk/Lucide/SOURCE/gui/Lucide_res.H
r72 r87 125 125 #define IDC_DEFZOOM 11 126 126 127 #define IDD_GOTOPAGE 1007 128 #define IDC_PAGE 10 129 #define IDC_PAGES 11 130 127 131 #endif // __LUCIDE_RES_H -
trunk/Lucide/SOURCE/gui/dialogs.rc
r76 r87 91 91 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 92 92 END 93 94 93 END 95 94 … … 114 113 END 115 114 115 116 DLGTEMPLATE IDD_GOTOPAGE 117 BEGIN 118 DIALOG "GTP_GOTOPAGE", -1, 6, 116, 162, 49, WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR 119 BEGIN 120 CONTROL "GTP_PAGE", -1, 5, 31, 45, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP 121 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 122 CONTROL "", IDC_PAGE, 54, 31, 48, 10, WC_SPINBUTTON, SPBS_MASTER | SPBS_NUMERICONLY | SPBS_JUSTCENTER | WS_VISIBLE | WS_GROUP | WS_TABSTOP 123 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 124 CONTROL "", IDC_PAGES, 106, 31, 52, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP 125 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 126 DEFPUSHBUTTON "GTP_OK", DID_OK, 28, 7, 51, 14 127 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 128 PUSHBUTTON "GTP_CANCEL", DID_CANCEL, 88, 7, 51, 14 129 PRESPARAMS PP_FONTNAMESIZE "9.WarpSans" 130 END 131 END 132 -
trunk/Lucide/SOURCE/gui/docViewer.h
r86 r87 69 69 void close(); 70 70 void goToPage( long page ); 71 long getCurrentPage() { return currentpage; } 71 long getCurrentPage() { return currentpage; } // Zero based 72 72 void setZoom( double _zoom ); 73 73 double getZoom() { return zoom; } -
trunk/Lucide/SOURCE/gui/findDlg.cpp
r35 r87 22 22 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 23 23 * in which case the provisions of the LGPL are applicable instead of those 24 * above. If you wish to allow use of your version of this file only under the 24 * above. If you wish to allow use of your version of this file only under the 25 25 * terms of the LGPL, and not to allow others to use your version of this file 26 26 * under the terms of the CDDL, indicate your decision by deleting the 27 27 * provisions above and replace them with the notice and other provisions 28 28 * required by the LGPL. If you do not delete the provisions above, a recipient 29 * may use your version of this file under the terms of any one of the CDDL 29 * may use your version of this file under the terms of any one of the CDDL 30 30 * or the LGPL. 31 31 * … … 35 35 #define INCL_WIN 36 36 #include <os2.h> 37 38 #include <stdio.h> 37 39 38 40 #include "findDlg.h" 39 41 #include "Lucide_res.h" 40 42 #include "luutils.h" 43 #include "messages.h" 41 44 42 45 #define MAXSEARCHLENGTH 100 … … 115 118 116 119 120 // 121 // ------------------ GotoDlg --------------------- 122 // 123 124 GotoDlg::GotoDlg( HWND hWndFrame, long _pages, long _curpage ) 125 { 126 hFrame = hWndFrame; 127 page = -1; 128 pages = _pages; 129 curpage = _curpage; 130 } 131 132 GotoDlg::~GotoDlg() 133 { 134 } 135 136 ULONG GotoDlg::showDialog() 137 { 138 return WinDlgBox( HWND_DESKTOP, hFrame, gotoDlgProc, 139 NULLHANDLE, IDD_GOTOPAGE, this ); 140 } 141 142 143 144 MRESULT EXPENTRY GotoDlg::gotoDlgProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) 145 { 146 // This is a static method, so we don't know which instantiation we're 147 // dealing with. But we can get a pseudo-this from the parameter to 148 // WM_INITDLG, which we therafter store with the window and retrieve 149 // as follows: 150 GotoDlg *_this = (GotoDlg *)WinQueryWindowULong( hwnd, QWL_USER ); 151 152 switch (msg) 153 { 154 155 // Dialog has just been created 156 case WM_INITDLG: 157 { 158 // Save the mp2 into our user data so that subsequent calls have 159 // access to the parent C++ object 160 WinSetWindowULong( hwnd, QWL_USER, (ULONG)mp2 ); 161 _this = (GotoDlg *)mp2; 162 localizeDialog( hwnd ); 163 centerWindow( _this->hFrame, hwnd ); 164 165 WinSendDlgItemMsg( hwnd, IDC_PAGE, SPBM_SETLIMITS, 166 MPFROMLONG( _this->pages ), MPFROMLONG( 1 ) ); 167 WinSendDlgItemMsg( hwnd, IDC_PAGE, SPBM_SETCURRENTVALUE, 168 MPFROMLONG( _this->curpage ), MPVOID ); 169 char *pgfrm = newstrdupL( GTP_OF ); 170 char pgnum[ 32 ]; 171 snprintf( pgnum, sizeof( pgnum ), pgfrm, _this->pages ); 172 delete pgfrm; 173 WinSetDlgItemText( hwnd, IDC_PAGES, pgnum ); 174 return (MRESULT)FALSE; 175 } 176 177 case WM_COMMAND: 178 switch (SHORT1FROMMP(mp1)) 179 { 180 case DID_OK: 181 { 182 LONG spbmValue = 0; 183 BOOL rc = (BOOL)WinSendDlgItemMsg( hwnd, IDC_PAGE, SPBM_QUERYVALUE, 184 MPFROMP( &spbmValue ), 185 MPFROM2SHORT( 0, SPBQ_UPDATEIFVALID ) ); 186 187 if ( rc && ( spbmValue > 0 ) ) { 188 _this->page = spbmValue; 189 } 190 WinDismissDlg( hwnd, DID_OK ); 191 } 192 return (MRESULT)FALSE; 193 194 case DID_CANCEL: 195 WinDismissDlg( hwnd, DID_CANCEL ); 196 return (MRESULT)FALSE; 197 }; 198 return (MRESULT)FALSE; 199 } 200 return WinDefDlgProc( hwnd, msg, mp1, mp2 ); 201 } 202 -
trunk/Lucide/SOURCE/gui/findDlg.h
r35 r87 56 56 }; 57 57 58 class GotoDlg 59 { 60 public: 61 GotoDlg( HWND hWndFrame, long _pages, long _curpage ); 62 virtual ~GotoDlg(); 63 64 ULONG showDialog(); 65 long getPage() { return page; } 66 67 private: 68 69 static MRESULT EXPENTRY gotoDlgProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ); 70 71 HWND hFrame; 72 long page; 73 long pages; 74 long curpage; 75 }; 76 58 77 #endif // __FINDDLG_H -
trunk/Lucide/SOURCE/gui/lucide.cpp
r86 r87 113 113 delete pgfrm; 114 114 WinSetDlgItemText( hToolBar, TBID_OFPAGES, pgnum ); 115 WinSendDlgItemMsg( hToolBar, TBID_PAGENUM, SPBM_SETLIMITS, (MPARAM)pages, (MPARAM)1 ); 115 WinSendDlgItemMsg( hToolBar, TBID_PAGENUM, SPBM_SETLIMITS, 116 MPFROMLONG( pages ), MPFROMLONG( 1 ) ); 116 117 } 117 118 118 119 void Lucide::checkNavigationMenus() 119 120 { 121 WinEnableMenuItem( hWndMenu, CM_GOTOPAGE, TRUE ); 120 122 BOOL enfirst = ( docViewer->getCurrentPage() != 0 ); 121 123 BOOL enlast = ( docViewer->getCurrentPage() != ( doc->getPageCount( ev ) - 1 ) ); … … 655 657 return (MRESULT)FALSE; 656 658 659 case CM_GOTOPAGE: 660 { 661 GotoDlg *d = new GotoDlg( hWndFrame, doc->getPageCount( ev ), 662 docViewer->getCurrentPage() + 1 ); 663 if ( d->showDialog() == DID_OK ) { 664 long pg = d->getPage(); 665 if ( pg > 0 ) { 666 Lucide::goToPage( pg - 1 ); 667 } 668 } 669 delete d; 670 return (MRESULT)FALSE; 671 } 672 657 673 case CM_FITWINDOW: 658 674 Lucide::setZoom( -2 ); -
trunk/Lucide/SOURCE/gui/messages.cpp
r64 r87 89 89 const char *FIND_SEARCH_PAGE_OF = "FIND_SEARCH_PAGE_OF"; 90 90 const char *FIND_NOT_FOUND = "FIND_NOT_FOUND"; 91 92 // 'Go to page' dialog 93 const char *GTP_OF = "GTP_OF"; -
trunk/Lucide/SOURCE/gui/messages.h
r64 r87 89 89 extern const char *FIND_NOT_FOUND; 90 90 91 // 'Go to page' dialog 92 extern const char *GTP_OF; 93 91 94 92 95 #endif // __MESSAGES_H -
trunk/Lucide/SOURCE/gui/toolbar.cpp
r64 r87 182 182 WS_VISIBLE|SPBS_MASTER|SPBS_NUMERICONLY|SPBS_JUSTCENTER, 183 183 0,0,0,0, hToolBar, HWND_TOP, TBID_PAGENUM, NULL, NULL ); 184 WinSendMsg( cs.ctrlHandle, SPBM_SETLIMITS, (MPARAM)0, (MPARAM)0);184 WinSendMsg( cs.ctrlHandle, SPBM_SETLIMITS, MPFROMLONG( 0 ), MPFROMLONG( 0 ) ); 185 185 WinSetPresParam( cs.ctrlHandle, PP_FONTNAMESIZE, deffontlen, deffont ); 186 186 cs.cx = 50; -
trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.cpp
r86 r87 42 42 #include <ddjvuapi.h> 43 43 #endif 44 #ifdef __GNUC__ 45 #define __min(a,b) (((a) < (b)) ? (a) : (b)) 46 #endif 44 47 45 48 #define SCALE_FACTOR 0.2
Note: See TracChangeset
for help on using the changeset viewer.