Example #1
0
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;
	}
}
Example #2
0
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();
    }
}
Example #3
0
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();
}