yasmin_editor.editor_gui.selection_clipboard module
Compatibility exports for selection clipboard helpers.
- class yasmin_editor.editor_gui.selection_clipboard.OutcomePlacementSnapshot(outcome_name: str, instance_id: str, position: Position)
Bases:
objectClipboard payload for one visual outcome alias.
- instance_id: str
- outcome_name: str
- class yasmin_editor.editor_gui.selection_clipboard.OutcomeRuleSnapshot(outcome_name: str, state_name: str, state_outcome: str)
Bases:
objectClipboard payload for one concurrence outcome-map rule.
- outcome_name: str
- state_name: str
- state_outcome: str
- class yasmin_editor.editor_gui.selection_clipboard.SelectionBundle(source_kind: str, states: dict[str, ~yasmin_editor.model.state.State] = <factory>, state_positions: dict[str, ~yasmin_editor.model.layout.Position] = <factory>, outcomes: dict[str, ~yasmin_editor.model.outcome.Outcome] = <factory>, outcome_placements: list[~yasmin_editor.editor_gui.selection_models.OutcomePlacementSnapshot] = <factory>, text_blocks: list[~yasmin_editor.model.text_block.TextBlock] = <factory>, transitions: list[~yasmin_editor.model.transition.Transition] = <factory>, transition_sources: list[str] = <factory>, outcome_rules: list[~yasmin_editor.editor_gui.selection_models.OutcomeRuleSnapshot] = <factory>, start_state: str | None = None)
Bases:
objectPortable clipboard payload for selected editor items.
- clone() SelectionBundle
- property is_empty: bool
- outcome_placements: list[OutcomePlacementSnapshot]
- outcome_rules: list[OutcomeRuleSnapshot]
- source_kind: str
- start_state: str | None
- transition_sources: list[str]
- transitions: list[Transition]
- yasmin_editor.editor_gui.selection_clipboard.collect_selection_bundle(container_model: StateMachine | Concurrence, selected_state_names: set[str], selected_outcome_instance_ids: set[str], selected_text_blocks: list[TextBlock]) SelectionBundle
Build a portable snapshot from the selected model items.
- yasmin_editor.editor_gui.selection_clipboard.get_bundle_bounds(bundle: SelectionBundle) tuple[float, float, float, float]
Return the selection bounding box as min_x, min_y, max_x, max_y.
- yasmin_editor.editor_gui.selection_clipboard.increment_name(base_name: str, existing_names: set[str]) str
Return a name that follows the requested 2, 3, 4… suffix rule.
- yasmin_editor.editor_gui.selection_clipboard.paste_bundle_into_model(target_model: StateMachine | Concurrence, bundle: SelectionBundle, anchor_x: float, anchor_y: float) dict[str, str]
Paste a selection snapshot into a target container model.
- yasmin_editor.editor_gui.selection_clipboard.remove_selection_from_model(container_model: StateMachine | Concurrence, selected_state_names: set[str], selected_outcome_instance_ids: set[str], selected_text_blocks: list[TextBlock]) None
Remove the selected items from the source model.