bool BookTextView::_onStylusRelease(int x, int y) { FBReader &fbreader = FBReader::Instance(); if (!isReleasedWithoutMotion()) { return false; } const ZLTextElementRectangle *rectangle = textArea().elementByCoordinates(x, y); if (rectangle != 0) { std::string id; ZLHyperlinkType type; if (getHyperlinkInfo(*rectangle, id, type)) { fbreader.tryShowFootnoteView(id, type); return true; } if (fbreader.isDictionarySupported() && fbreader.EnableSingleClickDictionaryOption.value()) { const std::string txt = word(*rectangle); if (!txt.empty()) { fbreader.openInDictionary(txt); return true; } } } return false; }
bool BookTextView::_onStylusMove(int x, int y) { const ZLTextElementRectangle *rectangle = textArea().elementByCoordinates(x, y); std::string id; ZLHyperlinkType type; FBReader::Instance().setHyperlinkCursor((rectangle != 0) && getHyperlinkInfo(*rectangle, id, type)); return true; }
bool BookTextView::_onStylusMove(int x, int y) { const ZLTextElementArea *area = elementByCoordinates(x, y); std::string id; std::string type; fbreader().setHyperlinkCursor((area != 0) && getHyperlinkInfo(*area, id, type)); return true; }
bool BookTextView::onStylusMove(int x, int y) { const ZLTextElementArea *area = elementByCoordinates(x, y); std::string id; std::string type; if ((area != 0) && getHyperlinkInfo(*area, id, type)) { fbreader().setHyperlinkCursor(true); return (type == "internal" ? true : false); } fbreader().setHyperlinkCursor(false); return false; }
std::string BookTextView::getInternalHyperlinkId(int x, int y) { const ZLTextElementArea *area = elementByCoordinates(x, y); std::string id; std::string type; if ((area != 0) && getHyperlinkInfo(*area, id, type)) { if (type == "internal") { return id; } } return std::string(); }
bool BookTextView::onStylusClick(int x, int y, int count) { FBReader &fbreader = FBReader::Instance(); const ZLTextElementRectangle *rectangle = textArea().elementByCoordinates(x, y); if (rectangle != 0) { std::string id; std::string type; if (getHyperlinkInfo(*rectangle, id, type)) { fbreader.tryShowFootnoteView(id, type); return true; } if (fbreader.isDictionarySupported() && fbreader.EnableSingleClickDictionaryOption.value()) { const std::string txt = word(*rectangle); if (!txt.empty()) { fbreader.openInDictionary(txt); return true; } } } return FBView::onStylusClick(x, y, count); }
bool BookTextView::openInternalLink(int x, int y) { const ZLTextElementArea *area = elementByCoordinates(x, y); if (area != 0) { std::string id; std::string type; if (getHyperlinkInfo(*area, id, type)) { fbreader().tryShowFootnoteView(id, type); return true; } if (fbreader().isDictionarySupported() && fbreader().EnableSingleClickDictionaryOption.value()) { const std::string txt = word(*area); if (!txt.empty()) { fbreader().openInDictionary(txt); return true; } } } return false; }