Gtk.Widget.prototype.set_state_flags
function set_state_flags(flags:Gtk.StateFlags, clear:Boolean):void { // Gjs wrapper for gtk_widget_set_state_flags() }
This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.).
It is worth mentioning that any other state than Gtk.StateFlags.insensitive, will be propagated down to all non-internal children if widget is a Gtk.Container, while Gtk.StateFlags.insensitive itself will be propagated down to all Gtk.Container children by different means than turning on the state flag down the hierarchy, both Gtk.Widget.prototype.get_state_flags and Gtk.Widget.prototype.is_sensitive will make use of these.
Since 3.0
- flags
State flags to turn on
- clear
Whether to clear state before turning on flags