"""
Widget Specs
"""
from dataclasses import dataclass
from typing import Any, Optional
from picomidi.sysex.parameter.address import AddressParameter
@dataclass
@dataclass
[docs]
class FilterSpec:
"""Class representing the specification for a filter mode."""
[docs]
name: str # Filter mode name (e.g., "Low Pass", "High Pass", etc.)
[docs]
param: Optional[AddressParameter] # Associated parameter (if applicable)
[docs]
icon: str # Icon used for the filter mode
[docs]
description: Optional[str] = None # Optional description or tooltip text
@dataclass(frozen=True)
[docs]
class SliderSpec:
"""Class representing the specification for a slider."""
@dataclass(frozen=True)
[docs]
class SwitchSpec:
"""Class representing the specification for a switch."""
@dataclass(frozen=True)
[docs]
class ComboBoxSpec:
"""Class representing the specification for a combo box."""
@dataclass(frozen=True)
[docs]
class PWMSpec:
"""Spec for PWM widget: pulse width and modulation depth parameters."""
[docs]
pulse_width_param: AddressParameter
[docs]
mod_depth_param: AddressParameter
@dataclass(frozen=True)
[docs]
class PitchEnvelopeSpec:
"""Spec for Pitch Envelope widget: attack, decay, and depth parameters."""
[docs]
attack_param: AddressParameter
[docs]
decay_param: AddressParameter
[docs]
depth_param: AddressParameter