Theory of gyrotrons with a nonfixed structure of the high-frequency field