-
-void wxHtmlWindow::OnKeyDown(wxKeyEvent& event)
-{
- int dummy;
- int sty, szy, cliy;
-
- ViewStart(&dummy, &sty);
- GetClientSize(&dummy, &cliy); cliy /= wxHTML_SCROLL_STEP;
- GetVirtualSize(&dummy, &szy); szy /= wxHTML_SCROLL_STEP;
-
- switch (event.KeyCode()) {
- case WXK_PAGEUP :
- case WXK_PRIOR :
- Scroll(-1, sty - cliy);
- break;
- case WXK_PAGEDOWN :
- case WXK_NEXT :
- Scroll(-1, sty + cliy);
- break;
- case WXK_HOME :
- Scroll(-1, 0);
- break;
- case WXK_END :
- Scroll(-1, szy - cliy);
- break;
- case WXK_UP :
- Scroll(-1, sty - 1);
- break;
- case WXK_DOWN :
- Scroll(-1, sty + 1);
- break;
- }
-}
-
-
-