phoenix::ListView

A list widget that tries to fulfill many roles. Can represent a standard list control, a columnar list control with or without a header, and can also represent a list of checkable items.

Uses a much simpler append/modify/reset API, rather than MVC.

struct ListView : Widget {
  function<void ()> onActivate;
  function<void ()> onChange;
  function<void (unsigned row)> onToggle;

  void append(const string&... text);
  void autoSizeColumns();
  bool checked(unsigned row);
  void modify(unsigned row, const string&... text);
  void reset();
  bool selected();
  unsigned selection();
  void setCheckable(bool checkable = true);
  void setChecked(unsigned row, bool checked = true);
  void setHeaderText(const string&... text);
  void setHeaderVisible(bool visible = true);
  void setSelected(bool selected = true);
  void setSelection(unsigned row);
};