build_tools.syllable_walk_tui.core.handlers

Event handler routing for Syllable Walker TUI.

Contains handler dispatch logic extracted from the main App class. The actual @on() decorated methods remain on the App, but delegate here.

This module provides pure functions that take the app instance and event data, then route to appropriate state updates. This separation allows: - Testing of handler logic without full App setup - Clearer separation of concerns - Easier maintenance and modification

Functions

switch_to_custom_mode(app, patch_name, patch)

Switch patch to custom mode when user manually adjusts profile parameters.

handle_int_spinner_changed(app, widget_id, value)

Route IntSpinner.Changed events to appropriate state updates.

handle_float_slider_changed(app, widget_id, value)

Route FloatSlider.Changed events to appropriate state updates.

handle_seed_changed(app, widget_id, value)

Route SeedInput.Changed events to appropriate state updates.

handle_selector_mode_selected(app, widget_id, mode)

Handle selector mode radio option selection.

set_selector_count_mode(app, patch_name, selector, mode)

Set selector count mode and update radio button UI.

handle_selector_count_mode_selected(app, widget_id, mode)

Handle selector count mode radio selection.

set_combiner_mode(app, patch_name, combiner, mode)

Set combiner syllable mode and update radio button UI.

handle_combiner_mode_selected(app, widget_id, mode)

Handle combiner mode radio option selection.

handle_selector_order_selected(app, widget_id, order)

Handle selector order radio option selection.

handle_selector_name_class_changed(app, widget_id, value)

Handle selector name class selection change.

handle_profile_selected(app, widget_id, profile_name)

Handle profile option selection (radio button click).

Module Contents

build_tools.syllable_walk_tui.core.handlers.switch_to_custom_mode(app, patch_name, patch)[source]

Switch patch to custom mode when user manually adjusts profile parameters.

This is called when the user manually changes max_flips, temperature, or frequency_weight - the three parameters that define walk profiles. When manually adjusted, the patch switches from a named profile to “custom” mode.

Parameters:

Note

Only switches to custom if currently using a named profile. If already in custom mode, does nothing.

build_tools.syllable_walk_tui.core.handlers.handle_int_spinner_changed(app, widget_id, value)[source]

Route IntSpinner.Changed events to appropriate state updates.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_float_slider_changed(app, widget_id, value)[source]

Route FloatSlider.Changed events to appropriate state updates.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_seed_changed(app, widget_id, value)[source]

Route SeedInput.Changed events to appropriate state updates.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_selector_mode_selected(app, widget_id, mode)[source]

Handle selector mode radio option selection.

Parameters:
build_tools.syllable_walk_tui.core.handlers.set_selector_count_mode(app, patch_name, selector, mode)[source]

Set selector count mode and update radio button UI.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_selector_count_mode_selected(app, widget_id, mode)[source]

Handle selector count mode radio selection.

Parameters:
build_tools.syllable_walk_tui.core.handlers.set_combiner_mode(app, patch_name, combiner, mode)[source]

Set combiner syllable mode and update radio button UI.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_combiner_mode_selected(app, widget_id, mode)[source]

Handle combiner mode radio option selection.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_selector_order_selected(app, widget_id, order)[source]

Handle selector order radio option selection.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_selector_name_class_changed(app, widget_id, value)[source]

Handle selector name class selection change.

Parameters:
build_tools.syllable_walk_tui.core.handlers.handle_profile_selected(app, widget_id, profile_name)[source]

Handle profile option selection (radio button click).

Parameters: