The courts and judges may issue attachments for contempt, and punish them summarily, only in the cases following:
(1) Misbehavior in the presence of the court, or so near thereto as to obstruct or interrupt the administration of justice;
(2) Violence, or threats of violence, to a judge or officer of the court, or to a juror, witness or party going to, attending or returning from the court, for or in respect of any act or proceeding had or to be had in such court;
(3) Vile, contemptuous or insulting language addressed to or published of a judge for or in respect of any act or proceeding had, or to be had, in such court, or like language used in his presence and intended for his hearing for or in respect of such act or proceeding;
(4) Misbehavior of an officer of the court in his official character;
(5) Disobedience or resistance of an officer of the court, juror, witness or other person to any lawful process, judgment, decree or order of the court.
Code 1950, § 18.1-292; 1960, c. 358; 1975, cc. 14, 15.