@Override
  public void onFingerMove(int x, int y) {
    final SelectionCursor.Which cursor = getSelectionCursorInMovement();
    if (cursor != null) {
      moveSelectionCursorTo(cursor, x, y);
      return;
    }

    synchronized (this) {
      if (myIsBrightnessAdjustmentInProgress) {
        if (x >= getContextWidth() / 5) {
          myIsBrightnessAdjustmentInProgress = false;
          startManualScrolling(x, y);
        } else {
          final int delta = (myStartBrightness + 30) * (myStartY - y) / getContextHeight();
          myReader.getViewWidget().setScreenBrightness(myStartBrightness + delta);
          return;
        }
      }

      if (isFlickScrollingEnabled()) {
        myReader.getViewWidget().scrollManuallyTo(x, y);
      }
    }
  }
  @Override
  public void onFingerPress(int x, int y) {
    myReader.runAction(ActionCode.HIDE_TOAST);

    final float maxDist = ZLibrary.Instance().getDisplayDPI() / 4;
    final SelectionCursor.Which cursor = findSelectionCursor(x, y, maxDist * maxDist);
    if (cursor != null) {
      myReader.runAction(ActionCode.SELECTION_HIDE_PANEL);
      moveSelectionCursorTo(cursor, x, y);
      return;
    }

    if (myReader.MiscOptions.AllowScreenBrightnessAdjustment.getValue()
        && x < getContextWidth() / 10) {
      myIsBrightnessAdjustmentInProgress = true;
      myStartY = y;
      myStartBrightness = myReader.getViewWidget().getScreenBrightness();
      return;
    }

    startManualScrolling(x, y);
  }