コード例 #1
0
static void
RefreshEditContent()
{
  DataFieldEnum &df = *(DataFieldEnum *)edit_content->GetDataField();
  df.Set(data.contents[current_preview]);
  edit_content->RefreshDisplay();
  RefreshEditContentDescription();
}
コード例 #2
0
static void
OnContentAccess(DataField *Sender)
{
  const DataFieldEnum &dfe = (const DataFieldEnum &)*Sender;

  data.contents[current_preview] = (InfoBoxFactory::Type)dfe.GetValue();
  previews[current_preview].Invalidate();
  RefreshEditContentDescription();
}
コード例 #3
0
  void OnModified(DataField &df) override {
    if (IsDataField(INFOBOX, df)) {
      const DataFieldEnum &dfe = (const DataFieldEnum &)df;
      SetCurrentInfoBox(dfe.GetValue());
    } else if (IsDataField(CONTENT, df)) {
      const DataFieldEnum &dfe = (const DataFieldEnum &)df;

      auto new_value = (InfoBoxFactory::Type)dfe.GetValue();
      if (new_value == data.contents[current_preview])
        return;

      changed = true;
      data.contents[current_preview] = new_value;
      previews[current_preview].Invalidate();
      RefreshEditContentDescription();
    }
  }