Optically controlled molecular switching of an indolobenzoxazine-type photochromic compound.