# dominictobias/securepad architecture

> Architecture diagram of the GitHub repository dominictobias/securepad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dominictobias/securepad
- Repository: https://github.com/dominictobias/securepad

## Overview

SecurePad is a Notepad++ plugin for encrypting and decrypting documents or selections with Blowfish. The documented user workflow is to invoke a plugin command, choose an encryption action, and apply it to editor content; the README establishes the product behavior, but the sampled implementation does not show the command handlers’ internal calls. The repository also includes a reusable docking-dialog layer. Edges between those implementation stages are omitted where the excerpts do not establish them.

Main entry points: [`PluginInterface.h`](https://github.com/dominictobias/securepad/blob/master/PluginInterface.h) (Plugin API), [`DockingFeature/DockingDlgInterface.h`](https://github.com/dominictobias/securepad/blob/master/DockingFeature/DockingDlgInterface.h) (Docking interface), [`PluginDefinition.cpp`](https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp) (Plugin commands), [`DockingFeature/StaticDialog.h`](https://github.com/dominictobias/securepad/blob/master/DockingFeature/StaticDialog.h) (Dialog interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin integration"]
  node_plugin_commands["Plugin commands"]
  node_crypt_doc["Document actions"]
  node_crypt_selection["Selection actions"]
  node_plugin_api["Plugin API<br/>[PluginInterface.h]"]
  node_plugin_defs["Plugin definitions<br/>[PluginDefinition.h]"]
  node_resource_ids["Plugin resources<br/>[resource1.h]"]
end

subgraph group_crypto["Encryption"]
  node_blowfish_impl["Blowfish cipher<br/>[blowfish.cpp]"]
  node_blowfish_api["Cipher interface<br/>[blowfish.h]"]
end

subgraph group_editor["Editor interface"]
  node_editor_api["Scintilla interface<br/>[Scintilla.h]"]
  node_npp_messages["Notepad++ messages"]
  node_sci_position["Position types<br/>[Sci_Position.h]"]
end

subgraph group_docking["Docking dialogs"]
  node_dock_interface["Docking interface"]
  node_dock_types["Docking types<br/>[Docking.h]"]
  node_static_dialog["Static dialog<br/>[StaticDialog.cpp]"]
  node_dialog_api["Dialog interface<br/>[StaticDialog.h]"]
  node_window_base["Window base<br/>[Window.h]"]
  node_dock_resources["Dock resources<br/>[dockingResource.h]"]
end

node_user(("Notepad++ user"))
node_npp["Notepad++"]

node_user -->|"uses"| node_npp
node_npp -.->|"loads plugin"| node_plugin_api
node_plugin_api -.->|"dispatches commands"| node_plugin_commands
node_plugin_commands -.->|"offers document actions"| node_crypt_doc
node_plugin_commands -.->|"offers selection actions"| node_crypt_selection
node_crypt_doc -.->|"encrypts documents"| node_blowfish_impl
node_crypt_selection -.->|"encrypts selections"| node_blowfish_impl
node_plugin_defs -->|"includes cipher API"| node_blowfish_api
node_plugin_api -->|"includes editor API"| node_editor_api
node_plugin_api -->|"includes message API"| node_npp_messages
node_editor_api -->|"includes position types"| node_sci_position
node_dock_interface -->|"uses docking types"| node_dock_types
node_dock_interface -->|"inherits dialog"| node_dialog_api
node_dock_interface -->|"includes resources"| node_dock_resources
node_dialog_api -->|"inherits window"| node_window_base
node_static_dialog -->|"implements"| node_dialog_api

click node_plugin_commands "https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp"
click node_crypt_doc "https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp"
click node_crypt_selection "https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp"
click node_plugin_api "https://github.com/dominictobias/securepad/blob/master/PluginInterface.h"
click node_plugin_defs "https://github.com/dominictobias/securepad/blob/master/PluginDefinition.h"
click node_blowfish_impl "https://github.com/dominictobias/securepad/blob/master/blowfish.cpp"
click node_blowfish_api "https://github.com/dominictobias/securepad/blob/master/blowfish.h"
click node_editor_api "https://github.com/dominictobias/securepad/blob/master/Scintilla.h"
click node_npp_messages "https://github.com/dominictobias/securepad/blob/master/Notepad_plus_msgs.h"
click node_sci_position "https://github.com/dominictobias/securepad/blob/master/Sci_Position.h"
click node_resource_ids "https://github.com/dominictobias/securepad/blob/master/resource1.h"
click node_dock_interface "https://github.com/dominictobias/securepad/blob/master/DockingFeature/DockingDlgInterface.h"
click node_dock_types "https://github.com/dominictobias/securepad/blob/master/DockingFeature/Docking.h"
click node_static_dialog "https://github.com/dominictobias/securepad/blob/master/DockingFeature/StaticDialog.cpp"
click node_dialog_api "https://github.com/dominictobias/securepad/blob/master/DockingFeature/StaticDialog.h"
click node_window_base "https://github.com/dominictobias/securepad/blob/master/DockingFeature/Window.h"
click node_dock_resources "https://github.com/dominictobias/securepad/blob/master/DockingFeature/dockingResource.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin_commands,node_crypt_doc,node_crypt_selection,node_plugin_api,node_plugin_defs,node_resource_ids,node_user toneBlue
class node_blowfish_impl,node_blowfish_api toneAmber
class node_editor_api,node_npp_messages,node_sci_position toneMint
class node_dock_interface,node_dock_types,node_static_dialog,node_dialog_api,node_window_base,node_dock_resources toneRose
class node_npp toneIndigo
```

## Components

### Plugin integration

- [Plugin commands](https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp): `PluginDefinition.cpp`
- [Document actions](https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp): `PluginDefinition.cpp`
- [Selection actions](https://github.com/dominictobias/securepad/blob/master/PluginDefinition.cpp): `PluginDefinition.cpp`
- [Plugin API](https://github.com/dominictobias/securepad/blob/master/PluginInterface.h): `PluginInterface.h`
- [Plugin definitions](https://github.com/dominictobias/securepad/blob/master/PluginDefinition.h): `PluginDefinition.h`
- [Plugin resources](https://github.com/dominictobias/securepad/blob/master/resource1.h): `resource1.h`

### Encryption

- [Blowfish cipher](https://github.com/dominictobias/securepad/blob/master/blowfish.cpp): `blowfish.cpp`
- [Cipher interface](https://github.com/dominictobias/securepad/blob/master/blowfish.h): `blowfish.h`

### Editor interface

- [Scintilla interface](https://github.com/dominictobias/securepad/blob/master/Scintilla.h): `Scintilla.h`
- [Notepad++ messages](https://github.com/dominictobias/securepad/blob/master/Notepad_plus_msgs.h): `Notepad_plus_msgs.h`
- [Position types](https://github.com/dominictobias/securepad/blob/master/Sci_Position.h): `Sci_Position.h`

### Docking dialogs

- [Docking interface](https://github.com/dominictobias/securepad/blob/master/DockingFeature/DockingDlgInterface.h): `DockingFeature/DockingDlgInterface.h`
- [Docking types](https://github.com/dominictobias/securepad/blob/master/DockingFeature/Docking.h): `DockingFeature/Docking.h`
- [Static dialog](https://github.com/dominictobias/securepad/blob/master/DockingFeature/StaticDialog.cpp): `DockingFeature/StaticDialog.cpp`
- [Dialog interface](https://github.com/dominictobias/securepad/blob/master/DockingFeature/StaticDialog.h): `DockingFeature/StaticDialog.h`
- [Window base](https://github.com/dominictobias/securepad/blob/master/DockingFeature/Window.h): `DockingFeature/Window.h`
- [Dock resources](https://github.com/dominictobias/securepad/blob/master/DockingFeature/dockingResource.h): `DockingFeature/dockingResource.h`

### Other components

- **Notepad++ user**
- **Notepad++**

## Connections

- Notepad++ user → Notepad++: uses (evidence: `README.md`)
- Notepad++ → Plugin API: loads plugin
- Plugin API → Plugin commands: dispatches commands
- Plugin commands → Document actions: offers document actions (evidence: `PluginDefinition.cpp`)
- Plugin commands → Selection actions: offers selection actions (evidence: `PluginDefinition.cpp`)
- Document actions → Blowfish cipher: encrypts documents
- Selection actions → Blowfish cipher: encrypts selections
- Plugin definitions → Cipher interface: includes cipher API (evidence: `PluginDefinition.h`)
- Plugin API → Scintilla interface: includes editor API (evidence: `PluginInterface.h`)
- Plugin API → Notepad++ messages: includes message API (evidence: `PluginInterface.h`)
- Scintilla interface → Position types: includes position types (evidence: `Scintilla.h`)
- Docking interface → Docking types: uses docking types (evidence: `DockingFeature/DockingDlgInterface.h`)
- Docking interface → Dialog interface: inherits dialog (evidence: `DockingFeature/DockingDlgInterface.h`)
- Docking interface → Dock resources: includes resources (evidence: `DockingFeature/DockingDlgInterface.h`)
- Dialog interface → Window base: inherits window (evidence: `DockingFeature/StaticDialog.h`)
- Static dialog → Dialog interface: implements (evidence: `DockingFeature/StaticDialog.cpp`)
