Time-domain optics of ultrashort waveforms