Esempio n. 1
0
// The event handling function from ScrollView which we have to overwrite.
// We handle CLICK, SELECTION, MENU and POPUP and throw away all other events.
void SVPaint::Notify(const SVEvent* sv_event) {
  if (sv_event->type == SVET_CLICK) { ClickHandler(sv_event); }  
  else if (sv_event->type == SVET_SELECTION) { SelectionHandler(sv_event); }
  else if (sv_event->type == SVET_MENU) { MenuBarHandler(sv_event); }
  else if (sv_event->type == SVET_POPUP) { PopupHandler(sv_event); }
  else {} //throw other events away
}
Esempio n. 2
0
int VMenu2::ProcessMouse(const MOUSE_EVENT_RECORD *MouseEvent)
{
	// BUGBUG
	// m_X1, m_X2, m_Y1, m_Y2 hides the same members from base class, fix it ASAP
	if (MouseEvent->dwMousePosition.X < Dialog::m_X1 || MouseEvent->dwMousePosition.Y < Dialog::m_Y1 ||
		MouseEvent->dwMousePosition.X > Dialog::m_X2 || MouseEvent->dwMousePosition.Y > Dialog::m_Y2)
	{
		if (MouseEvent->dwButtonState & FROM_LEFT_1ST_BUTTON_PRESSED)
			return ClickHandler(this, Global->Opt->VMenu.LBtnClick);
		else if (MouseEvent->dwButtonState & FROM_LEFT_2ND_BUTTON_PRESSED)
			return ClickHandler(this, Global->Opt->VMenu.MBtnClick);
		else if (MouseEvent->dwButtonState & RIGHTMOST_BUTTON_PRESSED)
			return ClickHandler(this, Global->Opt->VMenu.RBtnClick);
	}

	return Dialog::ProcessMouse(MouseEvent);
}