ET++: Stepping through a left mouse click in a button

This handles an event for this Window. It checks for miscellaneous special cases. If this is not a special case and not a keyboard event, then it is dispatched using VObject::DispatchEvents(). VObject::DispatchEvents() generates a command appropriate for this event, and this command is executed using CommandProcessor::PerformCommand().


void Window::InputNotify(Token *t)
{
	gWindow= this;
	if (portDesc == 0) return;
	GrSetPort(portDesc);

	gToken= *t;

	switch (t->Code) {
	case eEvtRightButton: case eEvtMiddleButton: case eEvtLeftButton:
		if (!(t->Flags & eFlgButDown))
			gLastClickToken= *t;
	}

	[ ... code to handle keyboard cursor control ... ]

	if (manager && (gToken.IsKey() || gToken.IsFunctionKey() || gToken.IsCursorKey())) {
		manager->InputKbd(gToken);
	} else {
		PerformCommand(DispatchEvents(gToken.Pos, gToken, this));
	}
}

Back to the method call sequence