gustaf.helpers.options.ShowOption#

class gustaf.helpers.options.ShowOption(helpee)[source]#

Bases: HelperBase

Behaves similar to dict, but will only accept a set of options that’s applicable to the helpee class. Intended use is to create a subclass that would define valid options for helpee. Options should be described by Option object. Helps all the way up to initializing backend showables up to their backend specific common routines. ShowOption and ShowManager in a sense.

Methods

ShowOption.clear()

Clears all the options.

ShowOption.copy_valid_options(copy_to[, keys])

Copies valid option to other show_option.

ShowOption.get(key[, default])

Gets value from key and default.

ShowOption.items()

Registered option items.

ShowOption.keys()

Registered option keys.

ShowOption.pop(*args, **kwargs)

Calls pop() on current options

ShowOption.update(**kwargs)

Calls __setitem__ iteratively for validity check.

ShowOption.valid_keys()

Returns valid keys.

ShowOption.values()

Registered option values.