ae.gui.utils

GUI app constants and helper functions

Module Attributes

APP_STATE_SECTION_NAME

config section name to store app state

APP_STATE_VERSION_VAR_NAME

config variable name to store the current application state version

MIN_FONT_SIZE

minimum (see min_font_size) and

MAX_FONT_SIZE

COLOR_BLACK

black ink

COLOR_DARK_GREY

dark grey ink

COLOR_GREY

grey ink

COLOR_LIGHT_GREY

light grey ink

COLOR_WHITE

white ink

RELIEF_ANGLE_BEG

beginning angle for ellipse drawings via relief_colors()

RELIEF_ANGLE_END

ending angle for ellipse drawings via relief_colors()

THEME_DARK_BACKGROUND_COLOR

dark theme background color in rgba(0.0 .

THEME_DARK_FONT_COLOR

dark theme font color in rgba(0.0 .

THEME_LIGHT_BACKGROUND_COLOR

light theme background color in rgba(0.0 .

THEME_LIGHT_FONT_COLOR

light theme font color in rgba(0.0 .

THEME_SECTION_PREFIX

config-files section name prefix for to store app theme vars

THEME_VARIABLE_PREFIX

mangle app state var names to not be interpreted as user-specific

FLOW_KEY_SEP

separator character between flow action/object and flow key

FLOW_ACTION_RE

regular expression detecting invalid characters in flow action string

FLOW_OBJECT_RE

regular expression detecting invalid characters in flow object string

APP_STATE_HELP_ID_PREFIX

message id prefix for app state change help texts

FLOW_HELP_ID_PREFIX

message id prefix for flow change help texts

TOUR_PAGE_HELP_ID_PREFIX

message id prefix of tour page text/dict

TOUR_START_DELAY_DEF

default value of tour start delay in seconds

TOUR_EXIT_DELAY_DEF

default value of tour exit delay in seconds

PORTIONS_IMAGES

app image files register

PORTIONS_SOUNDS

app audio/sound files register

REGISTERED_TOURS

map(name: class) of all registered tour classes

AnchorSpecType

(see return value of anchor_spec())

AppStatesType

app state config variable type

ColorRGB

color red, green and blue parts

ColorRGBA

ink is rgb color and alpha

ColorOrInk

color or ink type

EventKwargsType

change flow event kwargs type

ExplainedMatcherType

single explained widget matcher type

HelpVarsType

help context variables for help text rendering

PopupsToCloseType

popups to close on button-press/flow-change

ReliefColors

tuple of top/bottom relief colors or empty tuple

module_globals

used.

Functions

anchor_layout_x(anchor_spe, layout_width, ...)

calculate the anchor's x position of the layout box.

anchor_layout_y(anchor_spe, layout_height, ...)

calculate the layout box y position of an anchor.

anchor_points(font_size, anchor_spe)

recalculate points of the anchor triangle drawing.

anchor_spec(wid_x, wid_y, wid_width, ...)

calculate anchor center pos (x, y) and anchor direction to the targeted widget.

brighten_color(color_or_ink[, factor])

brightens the specified color/ink without changing an optionally passed alpha/occupancy value.

color_from_hsv(hsv)

convert HSV-color (H: 0-360, S: 0-1, V: 0-1) into its corresponding RGB color.

color_to_hsv(color_or_ink)

convert color/ink to its HSV values.

complementary_color(color_or_ink[, delta_h])

determine the complementary color or ink without changing an optionally passed alpha/occupancy value.

darken_color(color_or_ink[, factor])

darkens the specified color/ink without changing an optionally passed alpha/occupancy value.

ellipse_polar_radius(ell_a, ell_b, radian)

calculate the radius from polar for the given ellipse and radian.

ensure_tap_kwargs_refs(init_kwargs, tap_widget)

ensure that the passed widget.__init__ kwargs dict contains a reference to itself within kwargs['tap_kwargs'].

flow_action(flow_id)

determine the action string of a flow_id.

flow_action_split(flow_id)

split flow id string into the action part and the rest.

flow_change_confirmation_event_name(flow_id)

determine the name of the event method for the change confirmation of the passed flow_id.

flow_class_name(flow_id, name_suffix)

determine the class name for the given flow id and class name suffix.

flow_key(flow_id)

return the key of a flow id.

flow_key_split(flow_id)

split flow id into an action, object and flow key.

flow_object(flow_id)

determine the object string of the passed flow_id.

flow_path_id(flow_path[, path_index])

determine the flow id of the newest/last entry in the flow_path.

flow_path_strip(flow_path)

return a copy of the specified flow_path with all non-enter actions stripped from the end.

flow_popup_class_name(flow_id)

determine the name of the Popup class for the given flow id.

help_id_tour_class(help_id)

determine the tour class if passed help id has attached tour pages.

help_sub_id(help_id)

determine sub id (flow id, tour id or app state name) of the current/specified/passed help id.

id_of_flow(action[, obj, key])

create flow id string.

id_of_flow_help(flow_id)

compose help id for specified flow id.

id_of_state_help(app_state_name)

compose help id for app state name/key.

id_of_tour_help(page_id)

compose help id for specified tour page id.

merge_popups_to_close(tap_kwargs, add_kwargs)

merge the popups_to_close item values of the two specified tap_kwargs dicts.

mix_colors(*colors)

mix multiple colors or inks into a single one.

popup_event_kwargs(message, title[, ...])

type-check and bundle args of the MainAppClass.show_*() methods into a single event kwargs dict for a FlowPopup.

register_package_images()

call from the module scope of the package to register/add the image/img resources path.

register_package_sounds()

call from the module scope of the package to register/add sound file resources.

relief_colors([color_or_ink, top_factor, ...])

calculate the top-left and bottom-right colors used for square/ellipse relief effects.

replace_flow_action(flow_id, new_action)

replace action in the given flow id.

tour_help_translation(page_id)

determine help translation for the passed page id (flow id or app state name).

tour_id_class(tour_id)

determine the tour class of the passed tour id.

translation_short_help_id(help_id)

check if a help text exists for the passed help id.

update_tap_kwargs(widget_or_kwargs[, ...])

update or simulate a widget's tap_kwargs property and return the updated dictionary (for kv rule of tap_kwargs).

widget_page_id(wid)

determine tour page id of passed widget.

APP_STATE_SECTION_NAME = 'aeAppState'

config section name to store app state

APP_STATE_VERSION_VAR_NAME = 'app_state_version'

config variable name to store the current application state version

MIN_FONT_SIZE = 15.0

minimum (see min_font_size) and

MAX_FONT_SIZE = 99.0
COLOR_BLACK = [0.009, 0.006, 0.003, 1.0]

black ink

COLOR_DARK_GREY = [0.309, 0.306, 0.303, 1.0]

dark grey ink

COLOR_GREY = [0.509, 0.506, 0.503, 1.0]

grey ink

COLOR_LIGHT_GREY = [0.699, 0.696, 0.693, 1.0]

light grey ink

COLOR_WHITE = [0.999, 0.996, 0.993, 1.0]

white ink

RELIEF_ANGLE_BEG = 69

beginning angle for ellipse drawings via relief_colors()

RELIEF_ANGLE_END = 249

ending angle for ellipse drawings via relief_colors()

THEME_DARK_BACKGROUND_COLOR = [0.009, 0.006, 0.003, 1.0]

dark theme background color in rgba(0.0 … 1.0)

THEME_DARK_FONT_COLOR = [0.999, 0.996, 0.993, 1.0]

dark theme font color in rgba(0.0 … 1.0)

THEME_LIGHT_BACKGROUND_COLOR = [0.999, 0.996, 0.993, 1.0]

light theme background color in rgba(0.0 … 1.0)

THEME_LIGHT_FONT_COLOR = [0.009, 0.006, 0.003, 1.0]

light theme font color in rgba(0.0 … 1.0)

THEME_SECTION_PREFIX = 'aeTheme_'

config-files section name prefix for to store app theme vars

THEME_VARIABLE_PREFIX = 'MUSASV_'

mangle app state var names to not be interpreted as user-specific

FLOW_KEY_SEP = ':'

separator character between flow action/object and flow key

FLOW_ACTION_RE = re.compile('[a-z0-9]+')

regular expression detecting invalid characters in flow action string

FLOW_OBJECT_RE = re.compile('[A-Za-z0-9_]+')

regular expression detecting invalid characters in flow object string

APP_STATE_HELP_ID_PREFIX = 'help_app_state#'

message id prefix for app state change help texts

FLOW_HELP_ID_PREFIX = 'help_flow#'

message id prefix for flow change help texts

TOUR_PAGE_HELP_ID_PREFIX = 'tour_page#'

message id prefix of tour page text/dict

TOUR_START_DELAY_DEF = 0.15

default value of tour start delay in seconds

TOUR_EXIT_DELAY_DEF = 0.45

default value of tour exit delay in seconds

PORTIONS_IMAGES = {'add_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/add_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/add_item.png')], 'app_tour': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/app_tour.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/app_tour.png')], 'bubble_arrow': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/bubble_arrow.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/bubble_arrow.png')], 'close_popup': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/close_popup.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/close_popup.png')], 'copy_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/copy_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/copy_node.png')], 'cut_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/cut_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/cut_node.png')], 'delete_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/delete_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/delete_item.png')], 'drag_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/drag_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/drag_item.png')], 'edit_font_size': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/edit_font_size.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/light_1/edit_font_size.png')], 'edit_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/edit_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/edit_item.png')], 'enter_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/enter_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/enter_item.png')], 'export_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/export_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/export_node.png')], 'filter_off': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/filter_off.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/filter_off.png')], 'filter_on': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/filter_on.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/filter_on.png')], 'flag_de': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/flag_de.png')], 'flag_en': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/flag_en.png')], 'flag_es': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/flag_es.png')], 'font_size': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/font_size.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/light_1/font_size.png')], 'help_circled': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/help_circled.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/help_circled.png')], 'help_icon': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/help_icon.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/help_icon.png')], 'icon_view': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/icon_view.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/icon_view.png')], 'import_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/import_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/import_node.png')], 'leave_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/leave_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/leave_item.png')], 'list_view': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/list_view.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/list_view.png')], 'open_node_info': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/open_node_info.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/open_node_info.png')], 'open_user_preferences': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/open_user_preferences.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/light_1/open_user_preferences.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/open_user_preferences.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/light_1/open_user_preferences.png')], 'paste_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/paste_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/paste_node.png')], 'save_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/save_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/save_item.png')], 'send_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/send_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/send_item.png')], 'sideloading_activate': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_sideloading/img/sideloading_activate.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_sideloading/img/light_1/sideloading_activate.png')], 'tap_pointer': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/tap_pointer.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/tap_pointer.png')], 'vibration': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/vibration.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/light_1/vibration.png')]}

app image files register

PORTIONS_SOUNDS = {'added': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/added.wav')], 'debug_draw': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/debug_draw.wav')], 'debug_save': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/debug_save.wav')], 'deleted': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/deleted.wav')], 'edited': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/edited.wav')], 'enter_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/enter_item.wav')], 'error': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/error.wav')], 'filter_off': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/filter_off.wav')], 'filter_on': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/filter_on.wav')], 'leave_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/leave_item.wav')], 'touched': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/touched.wav')]}

app audio/sound files register

REGISTERED_TOURS: dict[str, Type] = {'AnimatedOnboardingTour': <class 'ae.kivy.tours.AnimatedOnboardingTour'>, 'OnboardingTour': <class 'ae.gui.tours.OnboardingTour'>, 'SideloadingMenuTour': <class 'ae.kivy_sideloading.SideloadingMenuTour'>, 'TourDropdownFromButton': <class 'ae.gui.tours.TourDropdownFromButton'>, 'UserPreferencesTour': <class 'ae.gui.tours.UserPreferencesTour'>}

map(name: class) of all registered tour classes

AnchorSpecType

(see return value of anchor_spec())

alias of tuple[float, float, str]

AppStatesType

app state config variable type

alias of dict[str, Any]

ColorRGB

color red, green and blue parts

alias of tuple[float, float, float] | list[float]

ColorRGBA

ink is rgb color and alpha

alias of tuple[float, float, float, float] | list[float]

ColorOrInk

color or ink type

alias of tuple[float, float, float] | list[float] | tuple[float, float, float, float]

EventKwargsType

change flow event kwargs type

alias of dict[str, Any]

ExplainedMatcherType

single explained widget matcher type

alias of Callable[[Any], bool] | str

HelpVarsType

help context variables for help text rendering

alias of dict[str, Any]

PopupsToCloseType

popups to close on button-press/flow-change

alias of int | tuple

ReliefColors

tuple of top/bottom relief colors or empty tuple

alias of tuple[tuple[float, float, float] | list[float], tuple[float, float, float] | list[float]] | tuple

anchor_layout_x(anchor_spe, layout_width, win_width)[source]

calculate the anchor’s x position of the layout box.

Parameters:
Return type:

float

Returns:

absolute x coordinate within the app window of anchor layout.

anchor_layout_y(anchor_spe, layout_height, win_height)[source]

calculate the layout box y position of an anchor.

Parameters:
Return type:

float

Returns:

the absolute y coordinate in the app window of anchor layout.

anchor_points(font_size, anchor_spe)[source]

recalculate points of the anchor triangle drawing.

Parameters:
  • font_size (float) – font_size to calculate the size (radius == hypotenuse / 2) of the anchor triangle.

  • anchor_spe (tuple[float, float, str]) – anchor specification tuple: x/y coordinates and direction - see anchor_spec() return.

Return type:

tuple[float, ...]

Returns:

6-item-tuple with the three x and y coordinates of the anchor triangle edges.

anchor_spec(wid_x, wid_y, wid_width, wid_height, win_width, win_height)[source]

calculate anchor center pos (x, y) and anchor direction to the targeted widget.

Parameters:
  • wid_x (float) – the absolute x coordinate in the main app window of the targeted widget.

  • wid_y (float) – the absolute y coordinate in the main app window of the targeted widget.

  • wid_width (float) – width of targeted widget.

  • wid_height (float) – height of targeted widget.

  • win_width (float) – app window width.

  • win_height (float) – app window height.

Return type:

tuple[float, float, str]

Returns:

tooltip anchor specification tuple (AnchorSpecType) with the three items:

  • anchor_x (the absolute anchor center x-coordinate in the app main window),

  • anchor_y (the absolute anchor center y-coordinate in the app main window) and

  • anchor_dir (anchor direction: ‘r’=right, ‘i’=increase-y, ‘l’=left, ‘d’=decrease-y)

Note

the direction in the y-axis got named increase for higher y values and decrease for lower y values to support different coordinate systems of the GUI frameworks.

e.g., Kivy has the y-axis zero value at the bottom of the app window, whereas in enaml/Qt it is at the top.

brighten_color(color_or_ink, factor=0.3)[source]

brightens the specified color/ink without changing an optionally passed alpha/occupancy value.

Parameters:
  • color_or_ink (Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]) – the color or ink to be brightened.

  • factor (float) – the factor to brighten the color or ink by. its value must range between -1 and 1, 0 results in no brightening at all (original color), positive values are using the more complex HSV algorithm, and negative values the efficient RGB brightening algorithm. so +1 returns the brightest value of the specified color, whereas -1 results as white.

Return type:

Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]

Returns:

the brightened color or ink, as the same type as the input.

color_from_hsv(hsv)[source]

convert HSV-color (H: 0-360, S: 0-1, V: 0-1) into its corresponding RGB color.

Parameters:

hsv (tuple[float, float, float]) – HSV color tuple to convert into its corresponding RGB value.

Return type:

Union[tuple[float, float, float], list[float]]

Returns:

the corresponding RGB color, with normalized color channel values between 0 and 1.

color_to_hsv(color_or_ink)[source]

convert color/ink to its HSV values.

Parameters:

color_or_ink (Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]) – the color or ink to convert into its hsv value.

Return type:

tuple[float, float, float]

Returns:

the HSV values (H: 0-360, S: 0-1, V: 0-1) of the specified color or ink.

complementary_color(color_or_ink, delta_h=180.0)[source]

determine the complementary color or ink without changing an optionally passed alpha/occupancy value.

Parameters:
  • color_or_ink (Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]) – the color or ink to convert into its complementary value.

  • delta_h (float) –

    specify a value between -360 and +360 to get a complementary color. specify -180 or 180 to get the opposite value using the HSV algorithm, or a zero value to get the opposite color with the more efficient RGB algorithm. any other value will use the HSV algorithm, which adds this value as a delta angle in the HSV color circle. some harmonic delta angles are:

    • 30: analogous colors

    • 90, 180 and 270: tetradic colors 2, 3 and 4

    • 120 and 240: triadic color 2 and 3

    • 180: opposite color

Return type:

Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]

Returns:

the complementary color or ink, as the same type as the input. note that the HSV algorithm does not change any monochrom/greyscale colors; pass a zero value to the delta_h parameter to get an “opposite”-like color from a gray-scale color (see the unit tests on how the RGB algorithm does behave in relation to the HSV algorithm).

darken_color(color_or_ink, factor=0.3)[source]

darkens the specified color/ink without changing an optionally passed alpha/occupancy value.

Parameters:
  • color_or_ink (Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]) – the color or ink to be darkened.

  • factor (float) – the factor to darken the color or ink by. its value must range between -1 and 1, where 0 results in no darkening (original color), positive values are using the more complex HSV algorithm, and negative values the efficient RGB darkening algorithm. so +1 returns the darkest value of the specified color, whereas -1 results in a black color.

Return type:

Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]

Returns:

the darkened color or ink, as the same type as the input.

ellipse_polar_radius(ell_a, ell_b, radian)[source]

calculate the radius from polar for the given ellipse and radian.

Parameters:
  • ell_a (float) – ellipse x-radius.

  • ell_b (float) – ellipse y-radius.

  • radian (float) – angle radian.

Return type:

float

Returns:

ellipse radius at the angle specified by radian.

ensure_tap_kwargs_refs(init_kwargs, tap_widget)[source]

ensure that the passed widget.__init__ kwargs dict contains a reference to itself within kwargs[‘tap_kwargs’].

Parameters:
  • init_kwargs (dict[str, Any]) – kwargs of the widgets __init__ method.

  • tap_widget (Any) – reference to the tap widget.

this alternative version is only 10 % faster but much less clean than the current implementation:

if 'tap_kwargs' not in init_kwargs:
    init_kwargs['tap_kwargs'] = {}
tap_kwargs = init_kwargs['tap_kwargs']

if 'tap_widget' not in tap_kwargs:
    tap_kwargs['tap_widget'] = tap_widget

if 'popup_kwargs' not in tap_kwargs:
    tap_kwargs['popup_kwargs'] = {}
popup_kwargs = tap_kwargs['popup_kwargs']
if 'opener' not in popup_kwargs:
    popup_kwargs['opener'] = tap_kwargs['tap_widget']
flow_action(flow_id)[source]

determine the action string of a flow_id.

Parameters:

flow_id (str) – flow id.

Return type:

str

Returns:

flow action string.

flow_action_split(flow_id)[source]

split flow id string into the action part and the rest.

Parameters:

flow_id (str) – flow id.

Return type:

tuple[str, str]

Returns:

tuple of (flow action string, flow obj and key string)

flow_change_confirmation_event_name(flow_id)[source]

determine the name of the event method for the change confirmation of the passed flow_id.

Parameters:

flow_id (str) – flow id.

Return type:

str

Returns:

tuple with 2 items containing the flow action and the object name (and id).

flow_class_name(flow_id, name_suffix)[source]

determine the class name for the given flow id and class name suffix.

Parameters:
  • flow_id (str) – flow id.

  • name_suffix (str) – class name suffix.

Return type:

str

Returns:

name of the class. please note that the flow action open will not be added to the returned class name.

flow_key(flow_id)[source]

return the key of a flow id.

Parameters:

flow_id (str) – flow id string.

Return type:

str

Returns:

flow key string.

flow_key_split(flow_id)[source]

split flow id into an action, object and flow key.

Parameters:

flow_id (str) – flow id to split.

Return type:

tuple[str, str]

Returns:

tuple of (flow action and object string, flow key string).

flow_object(flow_id)[source]

determine the object string of the passed flow_id.

Parameters:

flow_id (str) – flow id.

Return type:

str

Returns:

flow object string.

flow_path_id(flow_path, path_index=-1)[source]

determine the flow id of the newest/last entry in the flow_path.

Parameters:
  • flow_path (list[str]) – flow path to determine the flow id from its newest/latest entry.

  • path_index (int) – index in the flow_path.

Return type:

str

Returns:

flow id string or empty string if the flow path is empty or index does not exist.

flow_path_strip(flow_path)[source]

return a copy of the specified flow_path with all non-enter actions stripped from the end.

Parameters:

flow_path (list[str]) – flow path list to strip.

Return type:

list[str]

Returns:

stripped flow path copy.

flow_popup_class_name(flow_id)[source]

determine the name of the Popup class for the given flow id.

Parameters:

flow_id (str) – flow id.

Return type:

str

Returns:

name of the Popup class. please note that the action open will not be added to the returned class name.

help_id_tour_class(help_id)[source]

determine the tour class if passed help id has attached tour pages.

Parameters:

help_id (str) – help id to determine the tour class from.

Return type:

Optional[Any]

Returns:

tour class of an existing tour for the passed help id or None if no associated tour exists.

help_sub_id(help_id)[source]

determine sub id (flow id, tour id or app state name) of the current/specified/passed help id.

opposite of id_of_flow_help() / id_of_state_help() / id_of_tour_help().

Parameters:

help_id (str) – help id to extract the sub id from.

Return type:

str

Returns:

flow id, tour id, app state name or empty string if help id does not contain a sub id.

id_of_flow(action, obj='', key='')[source]

create flow id string.

Parameters:
  • action (str) – flow action string.

  • obj (str) – flow object (defined by app project).

  • key (str) – flow index/item_id/field_id/… (defined by app project).

Return type:

str

Returns:

complete flow_id string.

id_of_flow_help(flow_id)[source]

compose help id for specified flow id.

Parameters:

flow_id (str) – flow id to make help id for.

Return type:

str

Returns:

help id for the specified flow id.

id_of_state_help(app_state_name)[source]

compose help id for app state name/key.

Parameters:

app_state_name (str) – name of the app state variable.

Return type:

str

Returns:

help id for the specified app state.

id_of_tour_help(page_id)[source]

compose help id for specified tour page id.

Parameters:

page_id (str) – tour page id to make help id for.

Return type:

str

Returns:

help id for the specified tour page.

merge_popups_to_close(tap_kwargs, add_kwargs)[source]

merge the popups_to_close item values of the two specified tap_kwargs dicts.

Parameters:
  • tap_kwargs (dict[str, Any]) – the initial tap kwargs dict, with an optional popups_to_close key.

  • add_kwargs (dict[str, Any]) – additional tap kwargs dict, whose optional popups to close will get merged to the end.

Return type:

Union[int, tuple]

Returns:

either tuple with the merged popup widgets (ensuring to have no duplicates), or an integer with the number of popups to close, or an empty tuple if both parameters do not have a popups_to_close key.

Raises:

AssertionError – if the types of the popups_to_close values are not matching.

mix_colors(*colors)[source]

mix multiple colors or inks into a single one.

Parameters:

colors (Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]) – colors or inks to mix.

Return type:

Union[tuple[float, float, float], list[float], tuple[float, float, float, float]]

Returns:

mixed color or ink.

popup_event_kwargs(message, title, confirm_flow_id=None, confirm_kwargs=None, confirm_text=None, **popup_kwargs)[source]

type-check and bundle args of the MainAppClass.show_*() methods into a single event kwargs dict for a FlowPopup.

Parameters:
  • message (str) – message string to display in the popup.

  • title (str) – title of the popup.

  • confirm_flow_id (Optional[str]) – tap_flow_id of the popup’s ‘confirm’ button.

  • confirm_kwargs (Optional[dict[str, Any]]) – tap_kwargs event args of the popup’s ‘confirm’ button.

  • confirm_text (Optional[str]) – popup confirmation button text. if empty, then the i18n translation of “confirm” is used.

  • popup_kwargs – any other extra popup kwargs (not type checked).

Return type:

dict[str, Any]

Returns:

dict with at least a ‘popup_kwargs’ key to be passed as event_kwargs argument to the change_flow() method.

register_package_images()[source]

call from the module scope of the package to register/add the image/img resources path.

no parameters needed because we use here stack_var() helper function to determine the module file path via the __file__ module variable of the caller module in the call stack. in this call we have to overwrite the default value (SKIPPED_MODULES) of the skip_modules parameter to not skip ae portions that are providing package resources and are listed in the SKIPPED_MODULES, like e.g., ae.gui.app and ae.gui.utils (passing empty string ‘’ to overwrite the default skip list).

register_package_sounds()[source]

call from the module scope of the package to register/add sound file resources.

no parameters needed because we use here stack_var() helper function to determine the module file path via the __file__ module variable of the caller module in the call stack. in this call, we have to overwrite the default value (SKIPPED_MODULES) of the skip_modules parameter to not skip ae portions that are providing package resources and are listed in the SKIPPED_MODULES.

relief_colors(color_or_ink=None, top_factor=0.6, bottom_factor=0.3, sunken=False)[source]

calculate the top-left and bottom-right colors used for square/ellipse relief effects.

Parameters:
  • color_or_ink (Union[tuple[float, float, float], list[float], tuple[float, float, float, float], None]) – optional color used to calculate the relief colors from. if not specified, then the COLOR_GREY constant will be used to draw the relief effect.

  • top_factor (float) – factor to brighten/darken the top-left part of a square/ellipse with a relief effect, via the HSV calculation method. pass a negative factor to use the more efficient RGB method.

  • bottom_factor (float) – factor to brighten/darken the bottom part of a square/ellipse with a relief effect, via tbe HSV calculation method. pass a negative factor to use the more efficient RGB method.

  • sunken (bool) – if True, then the top-left part of the relief colors will be darkened instead of brightened. a raised relief effect will be produced if False (default).

Return type:

Union[tuple[Union[tuple[float, float, float], list[float]], Union[tuple[float, float, float], list[float]]], tuple]

Returns:

tuple with the brightened/darkened top and bottom colors, calculated from the argument specified in color_or_ink, or an empty tuple if the alpha value of color_or_ink is zero.

replace_flow_action(flow_id, new_action)[source]

replace action in the given flow id.

Parameters:
  • flow_id (str) – flow id.

  • new_action (str) – action to be set/replaced within passed flow id.

Returns:

flow id with the new action and object/key from passed flow id.

tour_help_translation(page_id)[source]

determine help translation for the passed page id (flow id or app state name).

Parameters:

page_id (str) – tour page id.

Return type:

Union[str, dict[str, str], None]

Returns:

help translation text/dict (if exists) or None if translation is not found.

tour_id_class(tour_id)[source]

determine the tour class of the passed tour id.

Parameters:

tour_id (str) – tour/flow id to determine tour class for.

Return type:

Optional[Any]

Returns:

tour class of an existing tour for the passed tour id or None if no tour exists.

translation_short_help_id(help_id)[source]

check if a help text exists for the passed help id.

Parameters:

help_id (str) – help id to check if a translation/help with texts exists.

Return type:

tuple[Union[str, dict[str, str], None], str]

Returns:

tuple of translation text/dict (if exists) and maybe shortened help id(removed detail) or tuple of (None, help_id) if translation is not found.

update_tap_kwargs(widget_or_kwargs, popup_kwargs=None, **tap_kwargs)[source]

update or simulate a widget’s tap_kwargs property and return the updated dictionary (for kv rule of tap_kwargs).

Parameters:
  • widget_or_kwargs (Union[dict[str, Any], Any]) – either the tap widget (with optional tap_kwargs property, to be extended), or a tap_kwargs dict to be updated (returning an extended shallow copy of it).

  • popup_kwargs (Optional[dict[str, Any]]) – dict with items to update popup_kwargs key of.

  • tap_kwargs – additional tap_kwargs items to update.

Return type:

dict[str, Any]

Returns:

tap_kwargs dict extended with the specified argument values. if the widget parameter is a widget, then the ‘opener’ and ‘tap_widget’ keys will be set to this widget if they are not already set. if the tap_kwargs parameter as well as widget.tap_kwargs are having the key ‘popups_to_close’, then both values will be returned merged.

widget_page_id(wid)[source]

determine tour page id of passed widget.

Parameters:

wid (Optional[Any]) – widget to determine tour page id from (can be None).

Return type:

str

Returns:

tour page id or empty string if the widget has no page id or is None.

module_globals = {'APP_STATE_HELP_ID_PREFIX': 'help_app_state#', 'APP_STATE_SECTION_NAME': 'aeAppState', 'APP_STATE_VERSION_VAR_NAME': 'app_state_version', 'AnchorSpecType': tuple[float, float, str], 'Any': typing.Any, 'AppStatesType': dict[str, typing.Any], 'COLOR_BLACK': [0.009, 0.006, 0.003, 1.0], 'COLOR_DARK_GREY': [0.309, 0.306, 0.303, 1.0], 'COLOR_GREY': [0.509, 0.506, 0.503, 1.0], 'COLOR_LIGHT_GREY': [0.699, 0.696, 0.693, 1.0], 'COLOR_WHITE': [0.999, 0.996, 0.993, 1.0], 'Callable': typing.Callable, 'ColorOrInk': typing.Union[tuple[float, float, float], list[float], tuple[float, float, float, float]], 'ColorRGB': typing.Union[tuple[float, float, float], list[float]], 'ColorRGBA': typing.Union[tuple[float, float, float, float], list[float]], 'EventKwargsType': dict[str, typing.Any], 'ExplainedMatcherType': typing.Union[typing.Callable[[typing.Any], bool], str], 'FLOW_ACTION_RE': re.compile('[a-z0-9]+'), 'FLOW_HELP_ID_PREFIX': 'help_flow#', 'FLOW_KEY_SEP': ':', 'FLOW_OBJECT_RE': re.compile('[A-Za-z0-9_]+'), 'FilesRegister': <class 'ae.paths.FilesRegister'>, 'HelpVarsType': dict[str, typing.Any], 'MAX_FONT_SIZE': 99.0, 'MIN_FONT_SIZE': 15.0, 'NAME_PARTS_SEP': '_', 'Optional': typing.Optional, 'PORTIONS_IMAGES': {'add_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/add_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/add_item.png')], 'app_tour': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/app_tour.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/app_tour.png')], 'bubble_arrow': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/bubble_arrow.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/bubble_arrow.png')], 'close_popup': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/close_popup.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/close_popup.png')], 'copy_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/copy_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/copy_node.png')], 'cut_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/cut_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/cut_node.png')], 'delete_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/delete_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/delete_item.png')], 'drag_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/drag_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/drag_item.png')], 'edit_font_size': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/edit_font_size.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/light_1/edit_font_size.png')], 'edit_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/edit_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/edit_item.png')], 'enter_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/enter_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/enter_item.png')], 'export_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/export_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/export_node.png')], 'filter_off': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/filter_off.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/filter_off.png')], 'filter_on': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/filter_on.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/filter_on.png')], 'flag_de': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/flag_de.png')], 'flag_en': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/flag_en.png')], 'flag_es': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/flag_es.png')], 'font_size': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/font_size.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/light_1/font_size.png')], 'help_circled': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/help_circled.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/help_circled.png')], 'help_icon': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/help_icon.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/help_icon.png')], 'icon_view': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/icon_view.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/icon_view.png')], 'import_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/import_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/import_node.png')], 'leave_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/leave_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/leave_item.png')], 'list_view': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/list_view.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/list_view.png')], 'open_node_info': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/open_node_info.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/open_node_info.png')], 'open_user_preferences': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/open_user_preferences.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/enaml_app/img/light_1/open_user_preferences.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/open_user_preferences.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/light_1/open_user_preferences.png')], 'paste_node': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/paste_node.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/paste_node.png')], 'save_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/save_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/save_item.png')], 'send_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/send_item.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/send_item.png')], 'sideloading_activate': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_sideloading/img/sideloading_activate.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_sideloading/img/light_1/sideloading_activate.png')], 'tap_pointer': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/tap_pointer.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/img/light_1/tap_pointer.png')], 'vibration': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/vibration.png'), RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/kivy_user_prefs/img/light_1/vibration.png')]}, 'PORTIONS_SOUNDS': {'added': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/added.wav')], 'debug_draw': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/debug_draw.wav')], 'debug_save': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/debug_save.wav')], 'deleted': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/deleted.wav')], 'edited': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/edited.wav')], 'enter_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/enter_item.wav')], 'error': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/error.wav')], 'filter_off': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/filter_off.wav')], 'filter_on': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/filter_on.wav')], 'leave_item': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/leave_item.wav')], 'touched': [RegisteredFile('/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/snd/touched.wav')]}, 'PopupsToCloseType': typing.Union[int, tuple], 'REGISTERED_TOURS': {'AnimatedOnboardingTour': <class 'ae.kivy.tours.AnimatedOnboardingTour'>, 'OnboardingTour': <class 'ae.gui.tours.OnboardingTour'>, 'SideloadingMenuTour': <class 'ae.kivy_sideloading.SideloadingMenuTour'>, 'TourDropdownFromButton': <class 'ae.gui.tours.TourDropdownFromButton'>, 'UserPreferencesTour': <class 'ae.gui.tours.UserPreferencesTour'>}, 'RELIEF_ANGLE_BEG': 69, 'RELIEF_ANGLE_END': 249, 'ReliefColors': typing.Union[tuple[typing.Union[tuple[float, float, float], list[float]], typing.Union[tuple[float, float, float], list[float]]], tuple], 'THEME_DARK_BACKGROUND_COLOR': [0.009, 0.006, 0.003, 1.0], 'THEME_DARK_FONT_COLOR': [0.999, 0.996, 0.993, 1.0], 'THEME_LIGHT_BACKGROUND_COLOR': [0.999, 0.996, 0.993, 1.0], 'THEME_LIGHT_FONT_COLOR': [0.009, 0.006, 0.003, 1.0], 'THEME_SECTION_PREFIX': 'aeTheme_', 'THEME_VARIABLE_PREFIX': 'MUSASV_', 'TOUR_EXIT_DELAY_DEF': 0.45, 'TOUR_PAGE_HELP_ID_PREFIX': 'tour_page#', 'TOUR_START_DELAY_DEF': 0.15, 'Type': typing.Type, 'Union': typing.Union, '__annotations__': {'REGISTERED_TOURS': dict[str, typing.Type]}, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BaseExceptionGroup': <class 'BaseExceptionGroup'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EncodingWarning': <class 'EncodingWarning'>, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'ExceptionGroup': <class 'ExceptionGroup'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__annotations__': {}, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, types, exceptions, and other objects.\n\nThis module provides direct access to all 'built-in'\nidentifiers of Python; for example, builtins.len is\nthe full name for the built-in function len().\n\nThis module is not normally accessed explicitly by most\napplications, but can be useful in modules that provide\nobjects with the same name as a built-in value, but in\nwhich the built-in of that name is also needed.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'aiter': <built-in function aiter>, 'all': <built-in function all>, 'anext': <built-in function anext>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen, Zope Corporation, the Python Software     Foundation, and a cast of thousands for supporting Python     development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/__pycache__/utils.cpython-312.pyc', '__doc__': '\nGUI app constants and helper functions\n--------------------------------------\n', '__file__': '/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/utils.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'ae.gui.utils', '__package__': 'ae.gui', '__spec__': ModuleSpec(name='ae.gui.utils', loader=<_frozen_importlib_external.SourceFileLoader object>, origin='/home/docs/checkouts/readthedocs.org/user_builds/ae/envs/latest/lib/python3.12/site-packages/ae/gui/utils.py'), '_d_': ('linux', <function path_name>, <function placeholder_path>), 'anchor_layout_x': <function anchor_layout_x>, 'anchor_layout_y': <function anchor_layout_y>, 'anchor_points': <function anchor_points>, 'anchor_spec': <function anchor_spec>, 'brighten_color': <function brighten_color>, 'color_from_hsv': <function color_from_hsv>, 'color_to_hsv': <function color_to_hsv>, 'complementary_color': <function complementary_color>, 'cos': <built-in function cos>, 'darken_color': <function darken_color>, 'ellipse_polar_radius': <function ellipse_polar_radius>, 'ensure_tap_kwargs_refs': <function ensure_tap_kwargs_refs>, 'flow_action': <function flow_action>, 'flow_action_split': <function flow_action_split>, 'flow_change_confirmation_event_name': <function flow_change_confirmation_event_name>, 'flow_class_name': <function flow_class_name>, 'flow_key': <function flow_key>, 'flow_key_split': <function flow_key_split>, 'flow_object': <function flow_object>, 'flow_path_id': <function flow_path_id>, 'flow_path_strip': <function flow_path_strip>, 'flow_popup_class_name': <function flow_popup_class_name>, 'get_text': <function get_text>, 'help_id_tour_class': <function help_id_tour_class>, 'help_sub_id': <function help_sub_id>, 'id_of_flow': <function id_of_flow>, 'id_of_flow_help': <function id_of_flow_help>, 'id_of_state_help': <function id_of_state_help>, 'id_of_tour_help': <function id_of_tour_help>, 'merge_popups_to_close': <function merge_popups_to_close>, 'mix_colors': <function mix_colors>, 'module_globals': dict(...), 'norm_path': <function norm_path>, 'os_path_dirname': <function dirname>, 'os_path_join': <function join>, 'os_platform': 'linux', 'path_name': <function path_name>, 'placeholder_path': <function placeholder_path>, 'popup_event_kwargs': <function popup_event_kwargs>, 're': <module 're' from '/home/docs/.asdf/installs/python/3.12.12/lib/python3.12/re/__init__.py'>, 'register_package_images': <function register_package_images>, 'register_package_sounds': <function register_package_sounds>, 'relief_colors': <function relief_colors>, 'replace_flow_action': <function replace_flow_action>, 'sin': <built-in function sin>, 'snake_to_camel': <function snake_to_camel>, 'sqrt': <built-in function sqrt>, 'stack_var': <function stack_var>, 'tour_help_translation': <function tour_help_translation>, 'tour_id_class': <function tour_id_class>, 'translation': <function translation>, 'translation_short_help_id': <function translation_short_help_id>, 'update_tap_kwargs': <function update_tap_kwargs>, 'widget_page_id': <function widget_page_id>}

used. e.g., for execution/evaluation of dynamic code, expressions and f-strings of the app tour and help systems