# FTRBaseControl

## Overview

`FTRBaseControl` is the abstract base class for most owner-drawn FTR controls. It provides global theme integration, premium property enforcement, and optimized double-buffered painting.

**Namespace:** `FTRControls.BaseClasses`  
**Inherits:** `Control`, `IThemeableControl`  
**Toolbox:** No (abstract)

## Features

- Subscribes to `ThemeManager.ThemeChanged` and calls `ApplyTheme()`
- Resets properties marked with `[PremiumFeature]` when unlicensed
- Refreshes license state when the parent form is activated (5-second cooldown)

## Constructors

| Constructor | Description |
|-------------|-------------|
| *(protected, implicit)* | Derived controls call `base` initialization. |

## Properties

| Property | Type | Category | Premium | Description |
|----------|------|----------|---------|-------------|
| *(none public)* | — | — | — | Derived controls expose their own properties. Standard `Control` members (`Text`, `Font`, `Enabled`, etc.) are inherited where applicable. |

## Methods

| Method | Return | Description |
|--------|--------|-------------|
| `ApplyTheme()` | void | Virtual. Default implementation calls `Invalidate()`. Override in derived controls to map `FTRThemeColors`. |

## Events

Inherits standard `Control` events (`Click`, `Paint`, `Resize`, etc.). No custom events on the base class.

## Protected overrides (for authors)

| Member | Description |
|--------|-------------|
| `ApplyLicenseRestrictions()` | Called when license state changes. |

## Examples

```csharp
public class MyControl : FTRBaseControl
{
    public override void ApplyTheme()
    {
        base.ApplyTheme();
        ForeColor = FTRThemeColors.TextPrimary;
    }
}
```

## Premium Features

The base class does not define premium properties. It enforces `[PremiumFeature]` metadata on derived types via `EnforcePremiumProperties()`.

## See also

- [FTRBaseUserControl.md](FTRBaseUserControl.md)
- [ThemeManager.md](ThemeManager.md)
- [../../LICENSE-GUIDE.md](../../LICENSE-GUIDE.md)
