| 39 | } |
| 40 | |
| 41 | void JsonUiManager::addComponent(fl::weak_ptr<JsonUiInternal> component) FL_NOEXCEPT { |
| 42 | //FL_WARN("*** JsonUiManager::addComponent ENTRY ***"); |
| 43 | fl::unique_lock<fl::mutex> lock(mMutex); |
| 44 | mComponents.insert(component); |
| 45 | mItemsAdded = true; |
| 46 | |
| 47 | // Mark the component as changed so it gets sent to the frontend initially |
| 48 | if (auto ptr = component.lock()) { |
| 49 | ptr->markChanged(); |
| 50 | //FL_WARN("*** COMPONENT REGISTERED: ID " << ptr->id() << " name=" << ptr->name() << " (Total: " << mComponents.size() << ")"); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | void JsonUiManager::removeComponent(fl::weak_ptr<JsonUiInternal> component) FL_NOEXCEPT { |
| 55 | fl::unique_lock<fl::mutex> lock(mMutex); |
no test coverage detected