Extract automaton-specific render/event code to a separate protocol.