NAP
Public Member Functions | List of all members
SequenceEventTrackSegmentViewBase Class Referenceabstract

#include <sequenceeventtracksegmentviewbase.h>

Public Member Functions

 SequenceEventTrackSegmentViewBase ()=default
 
virtual ~SequenceEventTrackSegmentViewBase ()=default
 
virtual void handleEditPopupContent (sequenceguiactions::Action &action)=0
 
virtual void drawEvent (const SequenceTrackSegment &segment, ImDrawList *drawList, const ImVec2 &topLeft, float x)=0
 
virtual void insertSegment (SequenceControllerEvent &controller, const std::string &trackID, double time)=0
 
virtual std::unique_ptr< sequenceguiactions::ActioncreateEditAction (const SequenceTrackSegmentEventBase *segment, const std::string &trackID, const std::string &segmentID)=0
 
 SequenceEventTrackSegmentViewBase ()=default
 
virtual ~SequenceEventTrackSegmentViewBase ()=default
 
virtual void handleEditPopupContent (sequenceguiactions::Action &action)=0
 
virtual void drawEvent (const SequenceTrackSegment &segment, ImDrawList *drawList, const ImVec2 &topLeft, float x, ImU32 color)=0
 
virtual void insertSegment (SequenceControllerEvent &controller, const std::string &trackID, double time)=0
 
virtual std::unique_ptr< sequenceguiactions::ActioncreateEditAction (const SequenceTrackSegmentEventBase *segment, const std::string &trackID, const std::string &segmentID)=0
 

Description

Base class for an event segment view This base class is used by the track view to draw and handle segment views of different event types When you want to add your own event type, you can extend the derived class SequenceEventTrackSegmentView<T> where T is the value type of your own event

Inheritance diagram for SequenceEventTrackSegmentViewBase:
[legend]

Constructor & Destructor Documentation

◆ SequenceEventTrackSegmentViewBase() [1/2]

Constructor

◆ ~SequenceEventTrackSegmentViewBase() [1/2]

virtual ~SequenceEventTrackSegmentViewBase ( )
virtualdefault

Deconstructor

◆ SequenceEventTrackSegmentViewBase() [2/2]

Constructor

◆ ~SequenceEventTrackSegmentViewBase() [2/2]

virtual ~SequenceEventTrackSegmentViewBase ( )
virtualdefault

Deconstructor

Member Function Documentation

◆ createEditAction() [1/2]

virtual std::unique_ptr<sequenceguiactions::Action> createEditAction ( const SequenceTrackSegmentEventBase segment,
const std::string &  trackID,
const std::string &  segmentID 
)
pure virtual

Extend this method to specify the way an edit action for this event segment needs to be created Generally, this method doesn't need specialization

Parameters
segmentconst pointer to segment
trackIDthe track id
segmentIDthe segment id
Returns
unique pointer to created action, cannot be nullptr

Implemented in SequenceEventTrackSegmentView< T >.

◆ createEditAction() [2/2]

virtual std::unique_ptr<sequenceguiactions::Action> createEditAction ( const SequenceTrackSegmentEventBase segment,
const std::string &  trackID,
const std::string &  segmentID 
)
pure virtual

Extend this method to specify the way an edit action for this event segment needs to be created Generally, this method doesn't need specialization

Parameters
segmentconst pointer to segment
trackIDthe track id
segmentIDthe segment id
Returns
unique pointer to created action, cannot be nullptr

Implemented in SequenceEventTrackSegmentView< T >.

◆ drawEvent() [1/2]

virtual void drawEvent ( const SequenceTrackSegment segment,
ImDrawList *  drawList,
const ImVec2 &  topLeft,
float  x 
)
pure virtual

Extend this method to specify a way to draw this event type For examples, see template specializations in SequenceEventTrackView.cpp

Parameters
segmentreference to segment
drawListpointer to ImGui drawlist
topLefttop left position
xx position of segment on track

◆ drawEvent() [2/2]

virtual void drawEvent ( const SequenceTrackSegment segment,
ImDrawList *  drawList,
const ImVec2 &  topLeft,
float  x,
ImU32  color 
)
pure virtual

Extend this method to specify a way to draw this event type For examples, see template specializations in SequenceEventTrackView.cpp

Parameters
segmentreference to segment
drawListpointer to ImGui drawlist
topLefttop left position
xx position of segment on track
colordraw color

Implemented in SequenceEventTrackSegmentView< T >.

◆ handleEditPopupContent() [1/2]

virtual void handleEditPopupContent ( sequenceguiactions::Action action)
pure virtual

Extend this method to implement the way editing this event type must be handle in the GUI For examples, see template specializations in SequenceEventTrackView.cpp

Parameters
actionthe incoming action from the gui, contains information about the track time and segment. Segment can be assumed to be of type SequenceTrackSegmentEvent<T>

Implemented in SequenceEventTrackSegmentView< T >.

◆ handleEditPopupContent() [2/2]

virtual void handleEditPopupContent ( sequenceguiactions::Action action)
pure virtual

Extend this method to implement the way editing this event type must be handle in the GUI For examples, see template specializations in SequenceEventTrackView.cpp

Parameters
actionthe incoming action from the gui, contains information about the track time and segment. Segment can be assumed to be of type SequenceTrackSegmentEvent<T>

Implemented in SequenceEventTrackSegmentView< T >.

◆ insertSegment() [1/2]

virtual void insertSegment ( SequenceControllerEvent controller,
const std::string &  trackID,
double  time 
)
pure virtual

Extend this method to specify the way the controller needs to be called to add your custom event type Generally, this method doesn't need specialization

Parameters
controllerreference to controller
trackIDid of event track
timetime at which to insert custom event

Implemented in SequenceEventTrackSegmentView< T >.

◆ insertSegment() [2/2]

virtual void insertSegment ( SequenceControllerEvent controller,
const std::string &  trackID,
double  time 
)
pure virtual

Extend this method to specify the way the controller needs to be called to add your custom event type Generally, this method doesn't need specialization

Parameters
controllerreference to controller
trackIDid of event track
timetime at which to insert custom event

Implemented in SequenceEventTrackSegmentView< T >.