# ohkashi/nppdarkmode architecture

> Architecture diagram of the GitHub repository ohkashi/nppdarkmode, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ohkashi/nppdarkmode
- Repository: https://github.com/ohkashi/nppdarkmode

## Overview

##### Component Relationships

- Core → MFC Integration (Implementation dependency)
- DPI Management → Core (System support)
- IatHook → Core (Windows API interception)
- MFC Integration → Windows API (Platform dependency)

##### Detailed Component Breakdown

- Core Dark Mode Features
- Window theming
- Control styling
- Custom drawing routines
- DPI Management
- Scaling support
- Resolution adaptation
- MFC Integration
- Dialog templates
- Resource management
- Custom controls

##### Implementation Details

Technical notes:
- Windows API hooks
- MFC class extensions
- Resource handling
- DPI awareness levels

- Blue: Core functionality
- Purple: MFC-specific components
- Green: System interfaces
- Gray: External dependencies

##### The DPI management integration

Keep the abstraction level focused on the architectural components while including enough detail to show the library's integration points and dependencies. This will help developers understand both how to use the library and how it works internally.

Remember to include version information and system requirements in a separate notes section, as this is a Windows-specific library with particular platform dependencies.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Dark Mode Core Components"]
        DarkBase["Dark Mode Base"]
        IatHook["IAT Hook System"]
        DPIMgmt["DPI Management System"]
        MenuBar["Menu Bar Component"]
    end

    subgraph MFCLayer["MFC Integration Layer"]
        MFCImpl["MFC Dark Mode Implementation"]
        MFCDlg["Dialog Implementation"]
        ResMgmt["Resource Management"]
        Framework["Framework Support"]
    end

    subgraph Implementation["Implementation Examples"]
        NppImpl["Notepad++ Implementation"]
    end

    subgraph External["External Dependencies"]
        WinAPI["Windows API"]
        MFCLib["MFC Library"]
    end

    DarkBase --> MFCImpl
    IatHook --> DarkBase
    DPIMgmt --> DarkBase
    MenuBar --> DarkBase

    MFCImpl --> MFCDlg
    MFCImpl --> ResMgmt
    Framework --> MFCImpl

    DarkBase --> NppImpl
    MFCImpl --> WinAPI
    MFCImpl --> MFCLib

    classDef core fill:#2b5797,stroke:#fff,stroke-width:2px,color:#fff
    classDef mfc fill:#68217a,stroke:#fff,stroke-width:2px,color:#fff
    classDef impl fill:#00a300,stroke:#fff,stroke-width:2px,color:#fff
    classDef external fill:#666,stroke:#fff,stroke-width:2px,color:#fff

    class DarkBase,IatHook,DPIMgmt,MenuBar core
    class MFCImpl,MFCDlg,ResMgmt,Framework mfc
    class NppImpl impl
    class WinAPI,MFCLib external

    click DarkBase "https://github.com/ohkashi/NppDarkMode/blob/master/DarkMode.cpp"
    click IatHook "https://github.com/ohkashi/NppDarkMode/blob/master/IatHook.h"
    click DPIMgmt "https://github.com/ohkashi/NppDarkMode/blob/master/dpiManager.h"
    click MenuBar "https://github.com/ohkashi/NppDarkMode/blob/master/UAHMenuBar.h"
    click MFCImpl "https://github.com/ohkashi/NppDarkMode/blob/master/MFC/MfcDarkMode.cpp"
    click MFCDlg "https://github.com/ohkashi/NppDarkMode/blob/master/MFC/MfcDarkModeDlg.cpp"
    click ResMgmt "https://github.com/ohkashi/NppDarkMode/blob/master/MFC/MfcDarkMode.rc"
    click Framework "https://github.com/ohkashi/NppDarkMode/blob/master/MFC/framework.h"
    click NppImpl "https://github.com/ohkashi/NppDarkMode/blob/master/NppDarkMode.cpp"

    subgraph Legend
        L1["Core Components"]:::core
        L2["MFC Components"]:::mfc
        L3["Implementation"]:::impl
        L4["External"]:::external
    end
```
