Bases: wx.Frame
wx editor window for BarZonesController using CpGrid.
Provides a grid for segment data (label, value, color, fraction,
legend x, legend y), plus controls for bar geometry (position, size,
orientation), legend layout (mode, offset, color), and I/O operations.
-
controller[source]
-
_updating_ui = False[source]
-
_colors: list[tuple[int, int, int, int]] = [][source]
-
_wp[source]
-
_live[source]
-
_grid[source]
-
_pick_position[source]
-
_transform_map[source]
-
_colorpicker[source]
-
_alpha[source]
-
_add[source]
-
_del[source]
-
_apply[source]
-
_save_json[source]
-
_load_json[source]
-
_bind_events()[source]
Bind UI event handlers to controls.
-
_init_wolf_param_schema() → None[source]
-
_purge_color_params() → None[source]
-
static _color_key(idx: int) → str[source]
-
static _alpha_key(idx: int) → str[source]
-
_sync_color_param_schema(count: int) → None[source]
-
_set_wp_colors(colors: list[tuple[int, int, int, int]]) → None[source]
-
_read_wp_colors(count: int) → list[tuple[int, int, int, int]][source]
-
_colors_from_controller(count: int) → list[tuple[int, int, int, int]][source]
-
_sync_wp_colors_to_grid() → None[source]
-
_read_wp() → dict[source]
-
_color_text(rgba: tuple[int, int, int, int]) → str[source]
Format RGBA tuple to comma-separated string.
-
_set_row_color(row: int, rgba: tuple[int, int, int, int]) → None[source]
Set segment fill color for grid row and update color picker.
-
_sync_picker_from_row(row: int) → None[source]
Sync color picker UI to the RGBA value of the current grid row.
-
_collect_grid_data()[source]
Extract labels, values, colors, and legend positions from grid.
- Returns:
Tuple of (labels, values, colors, legend_positions).
-
_refresh_manual_columns_state() → None[source]
Enable/disable Legend X/Y columns based on placement mode.
-
_apply_controller()[source]
Commit all UI state to controller and rebuild geometry.
-
refresh_from_controller()[source]
Reload all UI state from controller.
-
_maybe_live()[source]
Apply controller changes if live-update mode is enabled.
-
on_prop_changed(event)[source]
Handle changes in the Wolf_Param property panel.
-
on_grid_changed(event)[source]
Handle changes to grid cells.
-
on_grid_select(event)[source]
Handle grid row selection; sync color picker.
-
on_grid_editor_hidden(event)[source]
Keep focus on grid after Enter validation to avoid focus jump.
-
on_picker_changed(event)[source]
Handle color picker changes; apply to selected row.
-
on_pick_position(event)[source]
Interactive picker for bar position; user clicks map to set origin.
-
on_transform_map(event)[source]
Start interactive move/resize mode with map handles.
-
on_add_row(event)[source]
Add a new empty segment row to the grid.
-
on_del_row(event)[source]
Delete the selected grid row.
-
on_apply(event)[source]
Commit all changes to controller and rebuild.
-
on_save_json(event)[source]
Prompt for file and save controller state to JSON.
-
on_load_json(event)[source]
Prompt for file and load controller state from JSON.