Skip to content

Commit f994674

Browse files
committed
Revert "v0.9.0 [Module decomposition + CanvasBindings + Clipboard]"
This reverts commit 906cea3.
1 parent 906cea3 commit f994674

18 files changed

Lines changed: 226 additions & 1256 deletions

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,4 @@ cython_debug/
151151
temp/
152152
tmp/
153153
.ruff_cache/
154-
.claude
155-
CLAUDE.md
154+
.claude

CHANGELOG.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [0.9.0] - 2026-03-16
11-
12-
### Added
13-
- **`CanvasBindings` frozen dataclass** (`_bindings.py`, public API): Centralises
14-
every tkinter event sequence used by `InteractiveCanvas` and `DraggableRectangle`
15-
as named fields with sensible defaults. Pass a custom instance to
16-
`InteractiveCanvas(bindings=...)` to remap any shortcut (zoom, undo/redo, Delete,
17-
panning, clipboard) without subclassing. `DEFAULT_BINDINGS` is the module-level
18-
singleton used when no custom instance is provided.
19-
- **Clipboard system** (`InteractiveCanvas`): Copy, cut, paste, and duplicate
20-
operations on selected rectangles, backed by an internal `_clipboard` snapshot
21-
list. All four operations are hookable via the existing callback system and
22-
bound to standard keyboard shortcuts from `CanvasBindings`:
23-
- `copy()``Ctrl+C`: snapshots selected rects into the clipboard.
24-
- `cut()``Ctrl+X`: copies then deletes selected rects.
25-
- `paste()``Ctrl+V`: recreates clipboard rects with a configurable offset,
26-
selects the new copies, and saves history.
27-
- `duplicate()``Ctrl+D`: copy + paste in one step.
28-
- **`_history.py`**`saves_history` decorator extracted into its own module;
29-
previously lived inline in `draggable_rectangle.py`.
30-
- **`_keyboard.py`**`KeyboardStateManager` extracted into its own module.
31-
- **`_units.py`**`mm_to_px` / `px_to_mm` pure-function utilities extracted
32-
into their own module; usable without a running canvas.
33-
- **`STYLE.md`** — Python style guide for contributors and AI coding agents.
34-
- **`OPTIMIZATION.md`** — Performance principles for the parent-child GUI pattern.
35-
36-
### Changed
37-
- **Module decomposition**: `draggable_rectangle.py` and `interactive_canvas.py`
38-
refactored to import from the four new private modules. Public API is unchanged;
39-
all symbols are still exported from `__init__.py`.
40-
- **`bindings` parameter on `InteractiveCanvas.__init__`**: New optional keyword
41-
argument; defaults to `CanvasBindings()`. `_create_bindings()` now reads all
42-
event strings from `self._bindings` instead of hardcoded literals.
43-
4410
## [0.8.0] - 2026-03-16
4511

4612
### Changed — Performance Optimizations
@@ -456,10 +422,7 @@ Maintenance and compatibility release improving code quality, testing infrastruc
456422
- Proper package structure with relative imports
457423
- Phase 1 critical bug fixes completed
458424

459-
[Unreleased]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.9.0...HEAD
460-
[0.9.0]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.8.0...v0.9.0
461-
[0.8.0]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.7.0...v0.8.0
462-
[0.7.0]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.6.0...v0.7.0
425+
[Unreleased]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.6.0...HEAD
463426
[0.6.0]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.5.0...v0.6.0
464427
[0.5.0]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.4.3...v0.5.0
465428
[0.4.3]: https://github.com/DeltaGa/ctk_interactive_canvas/compare/v0.4.2...v0.4.3

OPTIMIZATION.md

Lines changed: 0 additions & 245 deletions
This file was deleted.

0 commit comments

Comments
 (0)