#include <sequenceguiservice.h>
Classes | |
struct | Colors |
Static Public Member Functions | |
static bool | registerObjectCreator (std::unique_ptr< rtti::IObjectCreator >(*objectCreator)(SequenceGUIService *)) |
Protected Member Functions | |
void | registerObjectCreators (rtti::Factory &factory) override |
bool | init (nap::utility::ErrorState &errorState) override |
virtual void | getDependentServices (std::vector< rtti::TypeInfo > &dependencies) |
![]() | |
virtual void | created () |
virtual void | preUpdate (double deltaTime) |
virtual void | update (double deltaTime) |
virtual void | postUpdate (double deltaTime) |
virtual void | preShutdown () |
virtual void | shutdown () |
virtual void | preResourcesLoaded () |
virtual void | postResourcesLoaded () |
template<typename SERVICE_CONFIG > | |
SERVICE_CONFIG * | getConfiguration () |
template<typename SERVICE_CONFIG > | |
const SERVICE_CONFIG * | getConfiguration () const |
std::string | getIniFilePath () const |
std::string | getIniFilePath (const std::string &appendix) const |
The SequenceGUIService is responsible for registering track, segment & popup views and supplying the GUI the necessary factory methods to dynamically create the views and handlers for all registered types. When adding a new track type, a new segment type or a new event type with new gui views outside the SequenceGUI module you need to register them by calling registerTrackTypeForView, registerTrackViewFactory and/or registerEventView on the SequenceGUIService after the service is initialized but before any SequenceEditorGUI is created. A good place to do this from is from your own Service that will always initialize itself before any SequenceEditorGUI Resource.
SequenceGUIService | ( | ServiceConfiguration * | configuration | ) |
|
override |
std::vector<rtti::TypeInfo> getAllRegisteredEventActions | ( | ) | const |
returns a vector containing type info of all registered event actions (f.e. EditingEventSegment<T>)
std::vector<rtti::TypeInfo> getAllTrackTypes | ( | ) | const |
returns a vector containing type info of all registered track types
const Colors& getColors | ( | ) | const |
Returns the sequencer GUI color palette
|
protectedvirtual |
Override this function to register service dependencies A service that depends on another service is initialized after all it's associated dependencies This will ensure correct order of initialization, update calls and shutdown of all services SequenceGUIService depends on SequenceService
dependencies | rtti information of the services this service depends on |
Reimplemented from Service.
nap::IMGuiService& getGui | ( | ) |
const nap::IMGuiService& getGui | ( | ) | const |
const std::vector<rtti::TypeInfo>& getRegisteredSegmentEventTypes | ( | ) | const |
returns all registered event segment types (SequenceTrackSegmentEvent<T>)
rtti::TypeInfo getViewTypeForTrackType | ( | rtti::TypeInfo | trackType | ) | const |
returns track view type for corresponding track type, asserts when track type not found
trackType | type info of track type |
|
overrideprotectedvirtual |
initializes service
errorState | contains any errors |
Reimplemented from Service.
void invokeEditEventHandler | ( | rtti::TypeInfo | actionType, |
SequenceEventTrackView & | view | ||
) | const |
call this method to invoke the edit event handler for a specific event action
actionType | type info of the action (f.e. EditingEventSegment<T>) |
view | reference to the view invoking the edit event handler |
std::unique_ptr<SequenceEventTrackSegmentViewBase> invokeEventTrackSegmentViewFactory | ( | rtti::TypeInfo | eventType | ) |
invoke this method to create a event segment view for a certain event type, assert when event type is not found
eventType | type info of the event type |
void invokePasteEvent | ( | rtti::TypeInfo | eventType, |
SequenceEventTrackView & | view, | ||
const std::string & | trackID, | ||
const SequenceTrackSegmentEventBase & | eventBase, | ||
double | time | ||
) | const |
invoke this method to paste an event of a certain type
eventType | typeInfo of the event to paste |
view | reference to the view invoking the paste event |
trackID | track id of the track on which to paste the event |
eventBase | reference to base of event |
time | time at which to paste the event |
std::unique_ptr<SequenceTrackView> invokeTrackViewFactory | ( | rtti::TypeInfo | viewType, |
SequenceEditorGUIView & | view, | ||
SequenceEditorGUIState & | state | ||
) |
invoke this method to create a track view for a certain view type, asserts when view type is not found
viewType | the viewType to create |
view | reference to editor view creating the view |
state | reference to gui state |
bool registerEventView | ( | ) |
call this method to register a custom view for a custom event type T is the value type of the event (SequenceEvent<T>)
T | value to of the event |
|
static |
registers object creator method that can be passed on to the rtti factory
objectCreator | unique pointer to method |
|
overrideprotectedvirtual |
registers all objects that need a specific way of construction
factory | the factory to register the object creators with |
Reimplemented from Service.
bool registerTrackTypeForView | ( | rtti::TypeInfo | trackType, |
rtti::TypeInfo | viewType | ||
) |
registers the track view type that belongs to a track type
trackType | the track type |
viewType | the view type |
bool registerTrackViewFactory | ( | rtti::TypeInfo | trackType, |
SequenceTrackViewFactoryFunc | factory | ||
) |
registers a factory function for the creation of a certain track type,
trackType | the track type for which to register the factory function |
factory | the factory function |