bool UILineEdit::onMousePress(const Point& mousePos, Fw::MouseButton button) { if(button == Fw::MouseLeftButton) { int pos = getTextPos(mousePos); if(pos >= 0) setCursorPos(pos); } return true; }
bool UITextEdit::onMouseMove(const Point& mousePos, const Point& mouseMoved) { if(m_selectable && isPressed()) { int pos = getTextPos(mousePos); if(pos >= 0) { setSelection(m_selectionReference, pos); setCursorPos(pos); } return true; } return UIWidget::onMouseMove(mousePos, mouseMoved); }
bool UITextEdit::onMousePress(const Point& mousePos, Fw::MouseButton button) { if(UIWidget::onMousePress(mousePos, button)) return true; if(button == Fw::MouseLeftButton) { int pos = getTextPos(mousePos); if(pos >= 0) { setCursorPos(pos); if(m_selectable) { m_selectionReference = pos; setSelection(pos, pos); } } return true; } return false; }