Changeset 285 for trunk/Lucide/SOURCE/gui
- Timestamp:
- Jan 6, 2010, 5:47:40 PM (11 years ago)
- Location:
- trunk/Lucide/SOURCE/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Lucide/SOURCE/gui/docViewer.cpp
r268 r285 671 671 } 672 672 673 if ( SHORT2FROMMP( mp2 ) != SB_PAGEDRAG ) { 673 if ( SHORT2FROMMP( mp2 ) != SB_PAGEDRAG ) { 674 674 sVscrollInc = __max( -sVscrollPos * VScrollStep, __min( sVscrollInc, 675 675 ( sVscrollMax - sVscrollPos ) * VScrollStep ) ); … … 714 714 case SB_SLIDERPOSITION: 715 715 sHscrollInc = SHORT1FROMMP( mp2 ) - sHscrollPos; 716 break; 717 case SB_PAGEDRAG: 718 sHscrollInc = (SHORT)SHORT1FROMMP( mp2 ); 716 719 break; 717 720 } … … 1717 1720 docDraggingEnd.x = xpos; 1718 1721 docDraggingEnd.y = ypos; 1722 1723 SHORT hMove = docDraggingEnd.x - docDraggingStart.x; 1724 if ( abs( hMove ) > 5 ) 1725 { 1726 horizScroll( hwnd, MPFROM2SHORT( hMove, SB_PAGEDRAG ) ); 1727 docDraggingStart.x = xpos; 1728 } 1719 1729 1720 1730 SHORT vMove = docDraggingEnd.y - docDraggingStart.y; 1721 if ( abs( vMove ) > 5 ) 1722 { 1731 if ( abs( vMove ) > 5 ) 1732 { 1723 1733 vertScroll( hwnd, MPFROM2SHORT( vMove, SB_PAGEDRAG ) ); 1724 docDraggingStart.x = xpos;1725 1734 docDraggingStart.y = ypos; 1726 1735 } … … 1844 1853 } 1845 1854 1855 // handles WM_BUTTON2CLICK 1856 BOOL DocumentViewer::wmRightClick( HWND hwnd, SHORT xpos, SHORT ypos ) 1857 { 1858 if ( zoomMode ) 1859 { 1860 zoomInOut( false ); 1861 return TRUE; 1862 } 1863 return FALSE; 1864 } 1865 1846 1866 BOOL DocumentViewer::wmChar( HWND hwnd, MPARAM mp1, MPARAM mp2 ) 1847 1867 { … … 2178 2198 _this->wmButton2Down( hwnd, SHORT1FROMMP( mp1 ), SHORT2FROMMP( mp1 ) ); 2179 2199 break; 2180 2200 2181 2201 case WM_BUTTON2UP: 2182 2202 _this->wmButton2Up(); 2183 2203 break; 2184 2204 2185 2205 case WM_MOUSEMOVE: 2186 2206 if ( _this->wmMouseMove( hwnd, SHORT1FROMMP( mp1 ), SHORT2FROMMP( mp1 ) ) ) { … … 2191 2211 case WM_BUTTON1CLICK: 2192 2212 if ( _this->wmClick( hwnd, SHORT1FROMMP( mp1 ), SHORT2FROMMP( mp1 ) ) ) { 2213 return (MRESULT)TRUE; 2214 } 2215 break; 2216 2217 case WM_BUTTON2CLICK: 2218 if ( _this->wmRightClick( hwnd, SHORT1FROMMP( mp1 ), SHORT2FROMMP( mp1 ) ) ) { 2193 2219 return (MRESULT)TRUE; 2194 2220 } -
trunk/Lucide/SOURCE/gui/docViewer.h
r268 r285 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 * … … 91 91 void drawPage(); 92 92 void adjustSize(); 93 93 void countPagesizes(); 94 94 95 95 MRESULT vertScroll( HWND hwnd, MPARAM mp2 ); 96 96 MRESULT horizScroll( HWND hwnd, MPARAM mp2 ); 97 97 MRESULT wmDragOver( PDRAGINFO dragInfo ); 98 99 98 void wmDrop( PDRAGINFO dragInfo ); 99 void wmSize( HWND hwnd, MPARAM mp2 ); 100 100 void wmPaint( HWND hwnd ); 101 101 void wmPaintCont( HWND hwnd ); … … 108 108 BOOL wmMouseMove( HWND hwnd, SHORT xpos, SHORT ypos ); 109 109 BOOL wmClick( HWND hwnd, SHORT xpos, SHORT ypos ); 110 BOOL wmRightClick( HWND hwnd, SHORT xpos, SHORT ypos ); 110 111 BOOL wmChar( HWND hwnd, MPARAM mp1, MPARAM mp2 ); 111 112 void wmTimer( USHORT idTimer ); 112 113 void winPosToDocPos( PPOINTL startpoint, PPOINTL endpoint, LuRectangle *r ); 113 114 void winPosToDocPos( PageDrawArea *pda, LuRectangle *r ); … … 172 173 POINTL docDraggingStart; 173 174 POINTL docDraggingEnd; 174 175 175 176 // fullscreen 176 177 bool fullscreen; … … 212 213 bool continueSearch; 213 214 bool abortSearch; 214 215 215 216 // pointers 216 217 HPOINTER handPtr;
Note: See TracChangeset
for help on using the changeset viewer.