larvaworld.portal.runtime.display_shortcuts

Attributes

DISPLAY_SHORTCUTS_RAW_CSS

Classes

DisplayShortcutsConfig

Base class for named objects that support Parameters and message

DisplayShortcutsController

Base class for named objects that support Parameters and message

DisplayShortcutsDialog

Functions

build_display_shortcuts_dialog(→ DisplayShortcutsDialog)

Module Contents

larvaworld.portal.runtime.display_shortcuts.DISPLAY_SHORTCUTS_RAW_CSS = ''
class larvaworld.portal.runtime.display_shortcuts.DisplayShortcutsConfig(**params)

Bases: param.Parameterized

Base class for named objects that support Parameters and message formatting.

Automatic object naming: Every Parameterized instance has a name parameter. If the user doesn’t designate a name=<str> argument when constructing the object, the object will be given a name consisting of its class name followed by a unique 5-digit number.

Automatic parameter setting: The Parameterized __init__ method will automatically read the list of keyword parameters. If any keyword matches the name of a Parameter (see Parameter class) defined in the object’s class or any of its superclasses, that parameter in the instance will get the value given as a keyword argument. For example:

class Foo(Parameterized):

xx = Parameter(default=1)

foo = Foo(xx=20)

in this case foo.xx gets the value 20.

When initializing a Parameterized instance (‘foo’ in the example above), the values of parameters can be supplied as keyword arguments to the constructor (using parametername=parametervalue); these values will override the class default values for this one instance.

If no ‘name’ parameter is supplied, self.name defaults to the object’s class name with a unique number appended to it.

Message formatting: Each Parameterized instance has several methods for optionally printing output. This functionality is based on the standard Python ‘logging’ module; using the methods provided here, wraps calls to the ‘logging’ module’s root logger and prepends each message with information about the instance from which the call was made. For more information on how to set the global logging level and change the default message prefix, see documentation for the ‘logging’ module.

pause
snapshot
larva_collisions
visible_clock
visible_scale
visible_state
visible_ids
visible_trails
trail_duration_up
trail_duration_down
trail_color
black_background
random_colors
color_behavior
screen_move_up
screen_move_down
screen_move_left
screen_move_right
class larvaworld.portal.runtime.display_shortcuts.DisplayShortcutsController(**params: Any)

Bases: param.Parameterized

Base class for named objects that support Parameters and message formatting.

Automatic object naming: Every Parameterized instance has a name parameter. If the user doesn’t designate a name=<str> argument when constructing the object, the object will be given a name consisting of its class name followed by a unique 5-digit number.

Automatic parameter setting: The Parameterized __init__ method will automatically read the list of keyword parameters. If any keyword matches the name of a Parameter (see Parameter class) defined in the object’s class or any of its superclasses, that parameter in the instance will get the value given as a keyword argument. For example:

class Foo(Parameterized):

xx = Parameter(default=1)

foo = Foo(xx=20)

in this case foo.xx gets the value 20.

When initializing a Parameterized instance (‘foo’ in the example above), the values of parameters can be supplied as keyword arguments to the constructor (using parametername=parametervalue); these values will override the class default values for this one instance.

If no ‘name’ parameter is supplied, self.name defaults to the object’s class name with a unique number appended to it.

Message formatting: Each Parameterized instance has several methods for optionally printing output. This functionality is based on the standard Python ‘logging’ module; using the methods provided here, wraps calls to the ‘logging’ module’s root logger and prepends each message with information about the instance from which the call was made. For more information on how to set the global logging level and change the default message prefix, see documentation for the ‘logging’ module.

config
dirty
status
editing
capturing_field
load_from_workspace() None
validate() list[str]
runtime_pygame_keys() dict[str, str]
view() panel.viewable.Viewable
class larvaworld.portal.runtime.display_shortcuts.DisplayShortcutsDialog
controller: DisplayShortcutsController
open_button: panel.widgets.Button
close_button: panel.widgets.Button
dialog: panel.Column
open(*_: object) None
close(*_: object) None
set_disabled(disabled: bool) None
larvaworld.portal.runtime.display_shortcuts.build_display_shortcuts_dialog(*, note: str) DisplayShortcutsDialog