void RenderMenuSystem(Menu changed_mn, RectListRgn& rct_lst) { Project::MenuPack& mp = changed_mn->GetData<MenuPack>(); GetRenderList(mp.thRgn).swap(rct_lst); // * EraseLinkedMenus(mp); // * InvokeOnChange(changed_mn); }
void RetainedEntities::InvokeOnChange(RegisteredObjectType& type, RetainedEntity& obj, ChangeType changeType) const { for (auto i=type._onChange.begin(); i!=type._onChange.end(); ++i) { (*i)(*this, Identifier(obj._doc, obj._id, obj._type), changeType); } if (( changeType == ChangeType::SetProperty || changeType == ChangeType::ChildSetProperty || changeType == ChangeType::AddChild || changeType == ChangeType::RemoveChild || changeType == ChangeType::ChangeHierachy || changeType == ChangeType::Delete) && obj._parent != 0) { ChangeType newChangeType = ChangeType::ChildSetProperty; if ( changeType == ChangeType::AddChild || changeType == ChangeType::RemoveChild || changeType == ChangeType::ChangeHierachy || changeType == ChangeType::Delete) newChangeType = ChangeType::ChangeHierachy; for (auto i=_objects.begin(); i!=_objects.end(); ++i) if (i->_id == obj._parent && i->_doc == obj._doc) { auto type = GetObjectType(i->_type); if (type) InvokeOnChange(*type, *i, newChangeType); } } }