mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-24 13:58:00 -05:00
* Moved ApplicationLauncher to separate files - declutering * WindowsStore renamed to WindowsFactory - Store needs to be splitted toavoid antipattern * Options window build dynamically onBeforeShow * Dialog windows dynamically built
22 lines
499 B
C++
22 lines
499 B
C++
#include "WindowsFactory.hpp"
|
|
#include <AppWindow.hpp>
|
|
|
|
namespace app
|
|
{
|
|
|
|
void WindowsFactory::attach(const std::string &name, builder builder)
|
|
{
|
|
builders[name] = builder;
|
|
}
|
|
|
|
auto WindowsFactory::isRegistered(const std::string &name) const -> bool
|
|
{
|
|
return builders.find(name) != std::end(builders);
|
|
}
|
|
|
|
auto WindowsFactory::build(Application *app, const std::string &name) -> handle
|
|
{
|
|
return builders[name](app, name);
|
|
}
|
|
} // namespace app
|