3 #include "UIComponent.hpp"
4 #include "scheduling/ScheduledEvent.hpp"
17 virtual void removeInstance()
override;
19 virtual ScheduledEventPtr eventInstance();
21 virtual void propertyReceived(
const PropertyKey & key,
22 const PropertyValue & value)
override;
24 const PropertyValue & value)
override;
26 void setHostComponent(UIComponentPtr comp);
29 ScheduledEventWeakPtr m_instanceEvent;
30 ScheduledEventPtr m_strongRef;
32 typedef std::shared_ptr<ScheduleInstance> ScheduleInstancePtr;
33 typedef std::weak_ptr<ScheduleInstance> ScheduleInstanceWeakPtr;
41 typedef std::function<ScheduledEventPtr(void)> CreateFunction;
44 ScheduledEventPtr createEvent();
47 virtual ComponentInstancePtr instanceImpl()
override;
50 CreateFunction m_createFunc;
52 typedef std::shared_ptr<ScheduleComponent> ScheduleComponentPtr;
55 #define SHOWCASE_SCHEDULE_COMPONENT(name, type) \
57 Showcase::FactoryRegistrant<Showcase::ScheduleComponent> MW_PLUGIN_CONCAT(component, __LINE__) \
58 (name, [] { return std::make_shared<Showcase::ScheduleComponent>(\
59 [] { return std::make_shared<type>(); } ); }); \