// This file contains templates for widgets // This file must be included somewhere in HalibutEngine.h just after ResourceManager is declared namespace SE { template void TRadioButton::SmartValueFiller(const std::string& dictionaryName, const std::string& smartValueName, TYPENAME value, TRadioButton* radioButtonToFill) { radioButtonToFill->SetChecked(ResourceManager->SmartValueManager.GetImmediateValue(dictionaryName, smartValueName) == value); radioButtonToFill->OnSetChecked.connect ( [dictionaryName, smartValueName, value](bool checked) { if (checked) { if (ResourceManager->SmartValueManager.GetImmediateValue(dictionaryName, smartValueName) != value) { ResourceManager->SmartValueManager.SetImmediateValue(dictionaryName, smartValueName, value); } } } ); radioButtonToFill->SetCheckedSlotConnection = ResourceManager->SmartValueManager.GetSignal(dictionaryName, smartValueName).connect ( [radioButtonToFill, value](const TYPENAME& newValue) { radioButtonToFill->SetChecked(value == newValue); } ); } } //namespace SE