Changeset 69 for trunk/Lucide/SOURCE


Ignore:
Timestamp:
Jul 2, 2006, 12:37:22 PM (15 years ago)
Author:
Eugene Romanenko
Message:

added document navigation shortcuts (up/down,pgup/pgdown,ctrl-pgup/pgdown,home/end), closes #7

Location:
trunk/Lucide/SOURCE/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/gui/docViewer.cpp

    r67 r69  
    15671567
    15681568            case VK_PAGEUP:
    1569                 WinSendMsg( hwnd, WM_VSCROLL, MPVOID, MPFROM2SHORT( 0, SB_PAGEUP ) );
     1569                if ( fsflags & KC_CTRL ) {
     1570                    vertScroll( hwnd, MPFROM2SHORT( 0, SB_SLIDERPOSITION ), NULLHANDLE );
     1571                } else {
     1572                    WinSendMsg( hwnd, WM_VSCROLL, MPVOID, MPFROM2SHORT( 0, SB_PAGEUP ) );
     1573                }
    15701574                return TRUE;
    15711575
    15721576            case VK_PAGEDOWN:
    1573                 WinSendMsg( hwnd, WM_VSCROLL, MPVOID, MPFROM2SHORT( 0, SB_PAGEDOWN ) );
     1577                if ( fsflags & KC_CTRL ) {
     1578                    vertScroll( hwnd, MPFROM2SHORT( sVscrollMax, SB_SLIDERPOSITION ), NULLHANDLE );
     1579                } else {
     1580                    WinSendMsg( hwnd, WM_VSCROLL, MPVOID, MPFROM2SHORT( 0, SB_PAGEDOWN ) );
     1581                }
    15741582                return TRUE;
    15751583
     
    15811589                WinSendMsg( hwnd, WM_HSCROLL, MPVOID, MPFROM2SHORT( 0, SB_LINERIGHT ) );
    15821590                return TRUE;
     1591
     1592            case VK_HOME:
     1593                horizScroll( hwnd, MPFROM2SHORT( 0, SB_SLIDERPOSITION ), NULLHANDLE );
     1594                return TRUE;
     1595
     1596            case VK_END:
     1597                horizScroll( hwnd, MPFROM2SHORT( sHscrollMax, SB_SLIDERPOSITION ), NULLHANDLE );
     1598                return TRUE;
     1599
    15831600        }
    15841601    }
  • trunk/Lucide/SOURCE/gui/lucide.cpp

    r66 r69  
    422422void Lucide::openDocument()
    423423{
    424         char dirbuf[ CCHMAXPATH ];
     424    char dirbuf[ CCHMAXPATH ];
    425425    PFILEDLG fd = new FILEDLG;
    426426    memset( fd, 0, sizeof( FILEDLG ) );
     
    767767    }
    768768
     769    WinSetFocus( HWND_DESKTOP, WinWindowFromID( docViewer->getHWND(), FID_CLIENT ) );
     770
    769771    if ( argc > 1 ) {
    770772        Lucide::loadDocument( argv[1] );
Note: See TracChangeset for help on using the changeset viewer.