Changeset 211


Ignore:
Timestamp:
Jul 26, 2007, 8:02:16 AM (14 years ago)
Author:
Eugene Romanenko
Message:

TAB key switch between navigation pane and document (closes #112, #123)

Location:
trunk/Lucide
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/gui/Lucide.rc

    r161 r211  
    106106    "n", CM_GOTOPAGE, CONTROL
    107107    VK_F11, CM_MAXVIEW, VIRTUALKEY
     108    VK_TAB, CM_SWITCHWINDOW, VIRTUALKEY
    108109END
    109110
  • trunk/Lucide/SOURCE/gui/Lucide_res.H

    r183 r211  
    9999#define CM_MINIMIZE     701
    100100#define CM_TOFULLSCREEN 702
     101#define CM_SWITCHWINDOW 703
    101102
    102103#define TBID_PAGENUM    1
  • trunk/Lucide/SOURCE/gui/docViewer.cpp

    r171 r211  
    20802080            }
    20812081            break;
     2082
     2083        case WM_FOCUSCHANGE:
     2084            if ( SHORT1FROMMP( mp2 ) ) {
     2085                Lucide::activeWindow = AwView;
     2086            }
     2087            break;
    20822088    }
    20832089
  • trunk/Lucide/SOURCE/gui/indexWindow.cpp

    r94 r211  
    283283            }
    284284            break;
     285           
     286        case WM_FOCUSCHANGE:
     287            if ( SHORT1FROMMP( mp2 ) ) {
     288                Lucide::activeWindow = AwIndex;
     289            }
     290            break;
    285291    }
    286292
  • trunk/Lucide/SOURCE/gui/indexWindow.h

    r91 r211  
    5353
    5454        HWND getHWND() { return hWndPanel; }
     55        HWND getIndexHWND() { return hWndIndex; }
    5556       
    5657        void setDocument( LuDocument *_doc );
  • trunk/Lucide/SOURCE/gui/lucide.cpp

    r177 r211  
    107107char         Lucide::docFileName[ CCHMAXPATHCOMP ] = "";
    108108char        *Lucide::password                      = NULL;
     109ActiveWindow Lucide::activeWindow                  = AwView;
    109110// static data for asynch loading document
    110111ProgressDlg *Lucide::loadProgressDlg               = NULL;
     
    697698}
    698699
     700void Lucide::focusIndex()
     701{
     702    WinSetFocus( HWND_DESKTOP, indexWin->getIndexHWND() );
     703}
     704
     705void Lucide::cmdSwitchWindow()
     706{
     707    if ( activeWindow == AwIndex ) {
     708        focusDocview();
     709    } else {
     710        focusIndex();
     711    }
     712}
     713
    699714void Lucide::toggleZoom()
    700715{
     
    940955                        WinSendMsg( hVertSplitter, SBM_SETSPLITTERPOS,
    941956                            MPFROMSHORT( Lucide::showIndex ? Lucide::splitterPos : 0 ), MPVOID );
     957                        if ( !Lucide::showIndex ) {
     958                            Lucide::focusDocview();
     959                        }
    942960                    }
    943961                    return (MRESULT)FALSE;
     
    961979                case CM_TOFULLSCREEN:
    962980                    Lucide::cmdSwitchToFullscreen();
     981                    return (MRESULT)FALSE;
     982
     983                case CM_SWITCHWINDOW:
     984                    Lucide::cmdSwitchWindow();
    963985                    return (MRESULT)FALSE;
    964986            }
  • trunk/Lucide/SOURCE/gui/lucide.h

    r177 r211  
    4343
    4444enum PgLayout { SinglePage = 0, Continuous = 1 };
     45enum ActiveWindow { AwIndex, AwView };
    4546
    4647struct LuWindowPos
     
    8283        static SHORT splitterPos;
    8384        static bool showIndex;
     85                static ActiveWindow activeWindow;
    8486       
    8587        static void newWindow();
     
    101103        static void toggleFullscreen();
    102104        static void focusDocview();
     105        static void focusIndex();
    103106        static void cmdMinimize();
    104107        static void cmdSwitchToFullscreen();
     108        static void cmdSwitchWindow();
    105109        static void createThumbnail( LuDocument *_doc );
    106110        static bool isThumbNeeded( const char *fn );
  • trunk/Lucide/changelog

    r210 r211  
    44  - DJVU plugin: fix opening files with non-latin chars in filename.
    55  - PDF plugin: freetype library updated to version 2.3.5.
     6  - TAB key switch between navigation pane and document
    67  - Updated NLS-files: Czech, French, Dutch.
    78
Note: See TracChangeset for help on using the changeset viewer.