A modeling framework is proposed for circuits that are subject both to externally induced switches (time events) and to state events. The framework applies to switched networks with linear and piecewise-linear elements, including diodes. We show that the linear complementarity formulation, which already has proved effective for piecewise-linear networks, can be extended in a natural way to also cover switching circuits. To achieve this, we use a generalization of the linear complementarity problem known as the cone-complementarity problem. We show that the proposed framework is sound in the sense that existence and uniqueness of solutions is guaranteed under a passivity assumption. We prove that only first-order impulses occur and characterize all situations that give rise to a state jump; moreover, we provide rules that determine the jump. Finally, we show that within our framework, energy cannot increase as a result of a jump, and we derive a stability result from this.