A facile way to achieve all-photonic logic functions and photo-printing based on a donor–acceptor Stenhouse adduct