---
name: ColumnSpec
lang: cpp
domain: core
version: "1.0.0"
algebraic: product
definition: |
  struct ColumnSpec {
      std::string              id;
      CellRenderer             renderer = CellRenderer::Text;
      std::vector<BadgeRule>   badges;
      bool                     progress_scale_100 = false;
      std::string              progress_color_hex;
      float                    duration_warn_ms  = 1000.0f;
      float                    duration_error_ms = 5000.0f;
      std::vector<IconMapEntry> icon_map;
  };
description: "Spec declarativa de render para una columna de data_table. Indexada por posicion en TableInput.column_specs. Activa Badge/Progress/Duration/Icon sin escribir ImGui inline. Issue 0081-N."
tags: [tables, tql, types, cpp-tables]
uses_types:
  - CellRenderer_cpp_core
  - BadgeRule_cpp_core
  - IconMapEntry_cpp_core
file_path: "cpp/functions/core/data_table_types.h"
---

## Notas

`id` es un identificador estable para uso futuro en TQL roundtrip (Phase 2).
En Phase 1 no se serializa — el caller construye `column_specs` cada frame.
Los campos de renderer no activo se ignoran: si `renderer=Badge`, solo se leen
`badges`; si `renderer=Duration`, solo `duration_warn_ms` y `duration_error_ms`.
