Exemple #1
0
bool Widget::TriggerMouseOver(const Point &pos, bool handled, Widget *stop)
{
	// only send external events on state change
	if (!m_mouseOver) {
		m_mouseOver = true;
		HandleMouseOver();
		if (!handled) handled = onMouseOver.emit();
	}
	if (stop == this) return handled;
	if (GetContainer()) handled = GetContainer()->TriggerMouseOver(pos+GetPosition(), handled, stop);
	return handled;
}
Exemple #2
0
bool Widget::TriggerMouseOver(const Point &pos, bool emit, Widget *stop)
{
	// only send external events on state change
	if (!m_mouseOver) {
		m_mouseOver = true;
		HandleMouseOver();
		if (emit) emit = !onMouseOver.emit();
	}
	if (stop == this) return !emit;
	if (GetContainer()) GetContainer()->TriggerMouseOver(pos+GetPosition(), emit, stop);
	return !emit;
}