<commit_before>#ifndef _LISTLAYOUT_H_
#define _LISTLAYOUT_H_

#include <UIElement.h>

#include <Command.h>
#include <CommandEvent.h>

class ListLayout : public Element {
 public:
  ListLayout() { }

  bool isA(const std::string & className) override {
    if (className == "ListLayout") return true;
    return Element::isA(className);
  }

  void addColumn(const char * name) {
    Command c(Command::ADD_COLUMN, getInternalId());
    c.setValue(columnNumber);
    c.setTextValue(title);
    sendCommand(c);
  }

  void addData(int row, int column, const char * value) {
    Command c(Command::SET_TEXT_DATA, getInternalId());
    c.setRow(row);
    c.setColumn(column);
    c.setTextValue(text);
    sendCommand(c);
  }

  void addHeaderBar(int row, const char * text) {
    Command c(Command::ADD_COLUMN, getInternalId(), text);
    c.setValue(row);
    sendCommand(c);
  }

  void flush() {
    sendCommand(Command(Command::FLUSH_VIEW, getInternalId()));
  }

  void clear() {
    sendCommand(Command(Command::CLEAR, getInternalId()));
  }

 protected: 
  void create() override {
    sendCommand(Command(Command::CREATE_GRIDVIEW, getParentInternalId(), getInternalId()));
  }

  void initialize(FWPlatform * _platform) override {
    Element::initialize(_platform);
    Command c(Command::CREATE_LISTVIEW, getParentInternalId(), getInternalId());
    c.setLayoutWeight(getLayoutWeight());<commit_msg>Correct syntax<commit_after>#ifndef _LISTLAYOUT_H_
#define _LISTLAYOUT_H_

#include <UIElement.h>

#include <Command.h>
#include <CommandEvent.h>

class ListLayout : public Element {
 public:
  ListLayout() { }

  bool isA(const std::string & className) override {
    if (className == "ListLayout") return true;
    return Element::isA(className);
  }

  void addColumn(const char * name) {
    Command c(Command::ADD_COLUMN, getInternalId());
    c.setTextValue(name);
    sendCommand(c);
  }

  void addData(int row, int column, const char * value) {
    Command c(Command::SET_TEXT_DATA, getInternalId());
    c.setRow(row);
    c.setColumn(column);
    c.setTextValue(value);
    sendCommand(c);
  }

  void addHeaderBar(int row, const char * text) {
    Command c(Command::ADD_COLUMN, getInternalId(), text);
    c.setValue(row);
    sendCommand(c);
  }

  void flush() {
    sendCommand(Command(Command::FLUSH_VIEW, getInternalId()));
  }

  void clear() {
    sendCommand(Command(Command::CLEAR, getInternalId()));
  }

 protected: 
  void create() override {
    sendCommand(Command(Command::CREATE_GRIDVIEW, getParentInternalId(), getInternalId()));
  }

  void initialize(FWPlatform * _platform) override {
    Element::initialize(_platform);
    Command c(Command::CREATE_LISTVIEW, getParentInternalId(), getInternalId());
    c.setLayoutWeight(getLayoutWeight());
{'fraction_non_alphanumeric': 0.13592233009708737, 'fraction_numerical': 0.0, 'mean_word_length': 4.608870967741935, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3668769', 'n_tokens_mistral': 888, 'n_tokens_neox': 875, 'n_words': 179}