# hellikandra/wintak-plugintemplate architecture

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

- Interactive diagram: https://gitdiagram.com/hellikandra/wintak-plugintemplate
- Repository: https://github.com/hellikandra/wintak-plugintemplate

## Overview

This is a WinTAK plugin template demonstrating a ribbon button that opens a dockable pane with a counter view. The main runtime path is WinTAK hosting MEF exports, a button requesting pane activation, and the view invoking a command on its pane. The README also describes map interaction as a possible use of buttons, not implemented here. Source excerpts establish the button and pane behavior; view bindings and MEF hosting are documented in the README.

Main entry points: [`TemplateButton.cs`](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateButton.cs) (Ribbon Button), [`TemplateDockPane.cs`](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateDockPane.cs) (Counter Pane), [`TemplateView.xaml`](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateView.xaml) (Pane View), [`TemplateView.xaml.cs`](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateView.xaml.cs) (View Code)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_registration["Plugin Registration"]
  node_template_module["Plugin Module<br/>[TemplateModule.cs]"]
  node_ribbon_button["Ribbon Button<br/>[TemplateButton.cs]"]
end

subgraph group_dock_ui["Dockable UI"]
  node_dock_pane["Counter Pane"]
  node_view["Pane View<br/>[TemplateView.xaml]"]
  node_view_code["View Code"]
end

subgraph group_host_services["Host Services"]
  node_wintak["WinTAK Host"]
  node_docking_manager["Docking Manager"]
end

node_wintak_user(("WinTAK User"))

node_wintak_user -->|"clicks"| node_ribbon_button
node_wintak -->|"loads MEF module"| node_template_module
node_wintak -->|"loads MEF export"| node_ribbon_button
node_ribbon_button -->|"requests pane"| node_docking_manager
node_ribbon_button -->|"activates pane"| node_dock_pane
node_dock_pane -->|"provides content"| node_view
node_view -->|"invokes bound command"| node_dock_pane
node_dock_pane -->|"updates counter"| node_view
node_view_code -->|"initializes"| node_view

click node_template_module "https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateModule.cs"
click node_ribbon_button "https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateButton.cs"
click node_dock_pane "https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateDockPane.cs"
click node_view "https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateView.xaml"
click node_view_code "https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateView.xaml.cs"

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_template_module,node_ribbon_button,node_wintak_user toneBlue
class node_dock_pane,node_view,node_view_code toneAmber
class node_wintak,node_docking_manager toneMint
```

## Components

### Plugin Registration

- [Plugin Module](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateModule.cs): `TemplateModule.cs`
- [Ribbon Button](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateButton.cs): `TemplateButton.cs`

### Dockable UI

- [Counter Pane](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateDockPane.cs): `TemplateDockPane.cs`
- [Pane View](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateView.xaml): `TemplateView.xaml`
- [View Code](https://github.com/hellikandra/wintak-plugintemplate/blob/main/TemplateView.xaml.cs): `TemplateView.xaml.cs`

### Host Services

- **WinTAK Host**
- **Docking Manager**

### Other components

- **WinTAK User**

## Connections

- WinTAK User → Ribbon Button: clicks (evidence: `README.md`)
- WinTAK Host → Plugin Module: loads MEF module (evidence: `README.md`)
- WinTAK Host → Ribbon Button: loads MEF export (evidence: `README.md`)
- Ribbon Button → Docking Manager: requests pane (evidence: `TemplateButton.cs`)
- Ribbon Button → Counter Pane: activates pane (evidence: `TemplateButton.cs`)
- Counter Pane → Pane View: provides content (evidence: `TemplateDockPane.cs`)
- Pane View → Counter Pane: invokes bound command (evidence: `README.md`)
- Counter Pane → Pane View: updates counter (evidence: `README.md`)
- View Code → Pane View: initializes (evidence: `TemplateView.xaml.cs`)
