The driver was almost certainly texting. You should have leaned on your horn as soon as they crossed the dividing line. Even if the driver was just being careless and got annoyed at your reaction, he most likely would have corrected. Even as you were leaning on the horn, you should have been slowing to a stop. I would also have hit the hazard lights to alert any driver in the rear. You are very lucky, but this isn't like being struck by lightning. It WILL happen again and again until every texter has a very close call.