static void RefreshEditContent() { DataFieldEnum &df = *(DataFieldEnum *)edit_content->GetDataField(); df.Set(data.contents[current_preview]); edit_content->RefreshDisplay(); RefreshEditContentDescription(); }
static void OnContentAccess(DataField *Sender) { const DataFieldEnum &dfe = (const DataFieldEnum &)*Sender; data.contents[current_preview] = (InfoBoxFactory::Type)dfe.GetValue(); previews[current_preview].Invalidate(); RefreshEditContentDescription(); }
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(); } }