# AIOS CopyBox

Simple standalone chat copying tool for World of Warcraft — Retail, Cataclysm Classic, Mists of Pandaria Classic, and Classic Era.

## Features

- **Expandable copy window** — drag to move, Open/Close to resize
- **Full chat scrollback** — loads existing messages when opened, not just new ones
- **Live message streaming** — new chat appends in real-time while the window is open
- **Channel cycling** — left-click next channel, right-click previous channel
- **Theme selector** — cycles through all installed AIOS themes (color + texture themes)
- **Settings panel** — Font Size, Max Lines, Lock Scroll, Timestamps, Live Updates
- **Select All / Clear** — left-click highlights everything, right-click clears the box
- **Position memory** — saves frame position across sessions
- **Combat safe** — defers open if in combat, auto-opens when combat ends
- **No dependencies** — AIOS NOT required, zero external libraries
- **Clean UI** — no taint, no secure execution issues, no errors on any client

## How to Use

| Action | What it does |
|--------|-------------|
| `/copybox` or `/cb` | Open the window |
| Drag the header | Move the frame |
| Left-click **Channel** | Switch to next chat channel |
| Right-click **Channel** | Switch to previous chat channel |
| Left-click **Select All** | Highlight all text (Ctrl+C to copy) |
| Right-click **Select All** | Clear the text box |
| Click **Settings** | Open the settings panel |
| Left-click **Theme** | Next theme |
| Right-click **Theme** | Previous theme |
| Click **Open/Close** | Expand or collapse the window |
| Click **Exit** | Close the window |
| Mouse wheel | Scroll through chat history |

## Settings Panel

Open via the **Settings** button in the footer:

- **Font Size** — 8pt to 20pt slider
- **Max Lines** — 50 to 1000 lines (auto-trims oldest)
- **Lock Scroll** — stops auto-scrolling so you can read without interruption
- **Show Timestamps** — prefixes live messages with `[HH:MM:SS]`
- **Enable Live Updates** — toggle real-time message streaming on/off
- **Reset** — restores all settings to defaults instantly

## Installation

1. Download the ZIP
2. Extract into `Interface/AddOns/`
3. Make sure the folder is named **AIOS_CopyBox**
4. Restart the game or `/reload`

## File Structure

```
AIOS_CopyBox/
├── AIOS_CopyBox.toc
├── Init.lua              -- Addon load, slash commands, event registration
├── Config.lua            -- Client detection, version checks, defaults
├── Meta.lua              -- Theme definitions & default values
├── MainFrame.lua         -- UI frame, header, scroll frame, footer, settings panel
├── ChatManager.lua       -- Channel detection, message pulling, live updates
├── ThemeManager.lua      -- Theme cycling, texture/color application
├── Logger.lua            -- Internal debug logging (optional)
└── Utils/
    ├── StringUtils.lua   -- Text processing helpers
    └── TableUtils.lua    -- Table manipulation helpers
```

## Compatibility

| Client | Support |
|--------|---------|
| Retail / The War Within | Full — all themes, BackdropTemplate borders |
| Cataclysm Classic | Full — color themes + manual texture borders |
| Mists of Pandaria Classic | Full — color themes + manual texture borders |
| Classic Era | Full — color themes + manual texture borders |

Zero dependency on AIOS, Ace3, or any external library.

## Slash Commands

```
/copybox
/cb
```

## License

Free to use, modify, or include in compilations. Attribution appreciated but not required.

---

*Built with the AIOS framework. Compatible with Ace3 environments but does not require them.*
