Changeset 241
- Timestamp:
- Sep 2, 2007, 2:25:00 PM (14 years ago)
- Location:
- trunk/Lucide/SOURCE/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Lucide/SOURCE/gui/docViewer.cpp
r234 r241 63 63 #define PAGEBACK_COLOR 0xFFFFFFL 64 64 #define VERT_SPACE 2 65 #define NO_MOUSE_TIMER 1 65 66 66 67 // DocumentViewer constructor … … 106 107 drawPS = false; 107 108 // fullscreen 108 fullscreen = false; 109 fullscreen = false; 110 secondsNoMouse = 0; 111 mouseHidden = false; 112 xLastPos = 0; 113 yLastPos = 0; 109 114 // asynch draw 110 115 abortAsynch = false; … … 145 150 146 151 drawThreadId = _beginthread( drawthread, NULL, 262144, this ); 152 WinStartTimer( hab, hWndDoc, NO_MOUSE_TIMER, 1000 ); 147 153 } 148 154 … … 286 292 287 293 DosReleaseMutexSem( todrawAccess ); 288 294 289 295 WinInvalidateRect( hWndDocFrame, NULL, TRUE ); 290 296 } … … 434 440 WinSendMsg( hWndDocFrame, WM_UPDATEFRAME, 435 441 MPFROMLONG( FCF_VERTSCROLL | FCF_HORZSCROLL | FCF_SIZEBORDER ), MPVOID ); 442 443 if ( mouseHidden ) { 444 WinShowPointer( HWND_DESKTOP, TRUE ); 445 mouseHidden = false; 446 } 436 447 } 437 448 … … 1587 1598 BOOL DocumentViewer::wmMouseMove( HWND hwnd, SHORT xpos, SHORT ypos ) 1588 1599 { 1600 if ( ( xpos != xLastPos ) || ( ypos != yLastPos ) ) // only if mouse really moved 1601 { 1602 secondsNoMouse = 0; 1603 if ( fullscreen && mouseHidden ) 1604 { 1605 WinShowPointer( HWND_DESKTOP, TRUE ); 1606 mouseHidden = false; 1607 } 1608 } 1609 xLastPos = xpos; 1610 yLastPos = ypos; 1611 1589 1612 if ( zoomMode ) 1590 1613 { … … 1890 1913 } 1891 1914 1915 // Esc && fullscreen 1916 if ( fullscreen && ( fsflags & KC_VIRTUALKEY ) && ( usvk == VK_ESC ) ) { 1917 Lucide::toggleFullscreen(); 1918 return TRUE; 1919 } 1920 1892 1921 // + 1893 1922 if ( ( fsflags & KC_CHAR ) && !( fsflags & KC_KEYUP ) && ( usch == '+' ) ) { … … 2019 2048 } 2020 2049 2050 // handles WM_TIMER 2051 void DocumentViewer::wmTimer( USHORT idTimer ) 2052 { 2053 if ( idTimer == NO_MOUSE_TIMER ) 2054 { 2055 secondsNoMouse++; 2056 2057 if ( fullscreen && !mouseHidden && ( secondsNoMouse > 3 ) ) 2058 { 2059 WinShowPointer( HWND_DESKTOP, FALSE ); 2060 mouseHidden = true; 2061 } 2062 } 2063 } 2064 2021 2065 2022 2066 // static, window procedure … … 2105 2149 } 2106 2150 break; 2151 2152 case WM_TIMER: 2153 _this->wmTimer( SHORT1FROMMP( mp1 ) ); 2154 break; 2107 2155 } 2108 2156 -
trunk/Lucide/SOURCE/gui/docViewer.h
r212 r241 107 107 BOOL wmClick( HWND hwnd, SHORT xpos, SHORT ypos ); 108 108 BOOL wmChar( HWND hwnd, MPARAM mp1, MPARAM mp2 ); 109 void wmTimer( USHORT idTimer ); 109 110 void winPosToDocPos( PPOINTL startpoint, PPOINTL endpoint, LuRectangle *r ); 110 111 void winPosToDocPos( PageDrawArea *pda, LuRectangle *r ); … … 165 166 // fullscreen 166 167 bool fullscreen; 168 long secondsNoMouse; 169 bool mouseHidden; 170 SHORT xLastPos; 171 SHORT yLastPos; 167 172 PgLayout pglSave; 168 173 double zoomSave;
Note: See TracChangeset
for help on using the changeset viewer.