void Inset::doDispatch(Cursor & cur, FuncRequest &cmd) { switch (cmd.action()) { case LFUN_MOUSE_RELEASE: // if the derived inset did not explicitly handle mouse_release, // we assume we request the settings dialog if (!cur.selection() && cmd.button() == mouse_button::button1 && clickable(cmd.x(), cmd.y()) && hasSettings()) { FuncRequest tmpcmd(LFUN_INSET_SETTINGS); dispatch(cur, tmpcmd); } break; case LFUN_INSET_SETTINGS: if (cmd.argument().empty() || cmd.getArg(0) == insetName(lyxCode())) { showInsetDialog(&cur.bv()); cur.dispatched(); } else cur.undispatched(); break; default: cur.noScreenUpdate(); cur.undispatched(); break; } }
void HoaplugAudioProcessorEditor::mouseDown (const MouseEvent &event) { Point<int> mouse = event.getPosition(); Rectangle<int> clickable(70, 40, 20, 20); if (clickable.contains(mouse)) { URL("http://www.mshparisnord.fr/hoalibrary/").launchInDefaultBrowser(); } }
void HoaplugAudioProcessorEditor::mouseMove (const MouseEvent &event) { Point<int> mouse = event.getPosition(); Rectangle<int> clickable(70, 40, 20, 20); //Rectangle<int> clickable(0, 0, 20, 20); cicm_link_over = false; setMouseCursor(MouseCursor::NormalCursor); if (clickable.contains(mouse)) { cicm_link_over = true; setMouseCursor(MouseCursor::PointingHandCursor); } //repaint(); }