StyleContext.save

void save()

Saves the context state.

This allows temporary modifications done through [gtk.style_context.StyleContext.addClass], [gtk.style_context.StyleContext.removeClass], [gtk.style_context.StyleContext.setState] to be quickly reverted in one go through [gtk.style_context.StyleContext.restore].

The matching call to [gtk.style_context.StyleContext.restore] must be done before GTK returns to the main loop.

Deprecated

This API will be removed in GTK 5