How elkeipy/agsnaptool works
AgSnapTool is a Windows tray screenshot utility. A user gesture selects a control, region, or window; the app captures and saves a PNG, then exposes it in a searchable, annotated gallery for copying, OCR/Markdown, magnification, and editing. The graph separates capture, gallery/tool windows, and persisted library state. Several command implementations and UI-to-command bindings were not fully excerpted, so those documented relationships cite the README rather than implying the unsampled call details were inspected.
Main entry points: main.rs Gallery commands · win.rs Capture hooks · app.js Gallery UI · logic.rs Settings and rules
Components 19
Capture
- Capture hooks
src/win.rs - Capture geometry
src/rect.rs - Shot PNG files
src/win.rs
Gallery and tools
- Gallery UI
ui/app.js - Gallery commands
src/main.rs - Magnifier UI
ui/app.js - Editor UI
ui/app.js - Image commands
src/main.rs - Windows OCR
src/ocr.rs - Markdown tools
src/main.rs
Library and settings
- Settings and rules
src/logic.rs - Settings file
src/logic.rs - Notes and tags
src/logic.rs - Notes file
src/logic.rs
Platform support
- Tray runtime
src/main.rs - Localization
src/strings.rs - Native dialogs
src/dialogs.rs - Windows integration
src/win.rs
Other components
- User
Connections 26
- User → Capture hooks: gestures
README.md - Capture hooks → Capture geometry: uses bounds
src/win.rs - Capture hooks → Shot PNG files: saves PNG
README.md - Capture hooks → Tray runtime: sends notices
src/win.rs - Tray runtime → Capture hooks: starts capture
src/main.rs - User → Tray runtime: opens gallery
README.md - Gallery UI → Gallery commands: requests gallery
README.md - Gallery commands → Shot PNG files: lists shots
README.md - Gallery UI → Notes and tags: searches notes
README.md - Gallery commands → Settings and rules: loads settings
README.md - Settings and rules → Settings file: reads and writes
README.md - Gallery commands → Notes and tags: updates notes
README.md - Notes and tags → Notes file: reads and writes
src/logic.rs - User → Magnifier UI: opens magnifier
README.md - Gallery commands → Magnifier UI: opens window
src/main.rs - User → Editor UI: edits image
README.md - Gallery commands → Editor UI: opens window
src/main.rs - Gallery UI → Image commands: requests image actions
README.md - Image commands → Shot PNG files: reads and saves
README.md - Image commands → Windows OCR: recognizes text
src/main.rs - User → Markdown tools: copies or saves
README.md - Markdown tools → Windows OCR: gets OCR text
src/main.rs - Markdown tools → Shot PNG files: reads images
README.md - Native dialogs → Settings and rules: normalizes days
src/dialogs.rs - Native dialogs → Localization: gets dialog text
src/dialogs.rs - Capture hooks → Windows integration: uses native capture
src/win.rs