NAP
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SequenceEditorGUIView Class Reference

#include <sequenceeditorgui.h>

Public Member Functions

 SequenceEditorGUIView (SequenceGUIService &service, SequenceEditor &editor, std::string id, RenderWindow *renderWindow, bool drawFullWindow)
 
virtual void show (bool newWindow=true)
 
void hideMarkerLabels (bool hide)
 
SequenceGUIServicegetService ()
 

Protected Member Functions

void drawTracks (const SequencePlayer &sequencePlayer, const Sequence &sequence)
 
void drawInspectors (const SequencePlayer &sequencePlayer, const Sequence &sequence)
 
void drawMarkers (const SequencePlayer &sequencePlayer, const Sequence &sequence)
 
void drawMarkerLines (const Sequence &sequence, SequencePlayer &player) const
 
void drawPlayerController (SequencePlayer &player)
 
void drawTimelinePlayerPosition (const Sequence &sequence, SequencePlayer &player) const
 
void drawEndOfSequence (const Sequence &sequence, SequencePlayer &player)
 
void handleInsertTrackPopup ()
 
void handleLoadPopup ()
 
void handleSaveAsPopup ()
 
void handleSequenceDurationPopup ()
 
void handleEditMarkerPopup ()
 
void handleInsertMarkerPopup ()
 
void handleHorizontalZoom ()
 
void handleHelpPopup ()
 
void handleSaveClipboardPopup ()
 
void registerActionHandler (const rttr::type &actionType, const std::function< void()> &action)
 
void registerActionHandlers ()
 

Protected Attributes

SequenceEditormEditor
 
SequenceEditorGUIState mState
 
std::string mID
 
bool mDrawFullWindow = false
 
bool mHideMarkerLabels = false
 
RenderWindowmRenderWindow = nullptr
 
std::unordered_map< rttr::type, std::function< void()> > mActionHandlers
 
std::unordered_map< rttr::type, std::unique_ptr< SequenceTrackView > > mViews
 
SequenceGUIServicemService
 

Description

Responsible for drawing the GUI for the sequence editor Needs reference to editor

Collaboration diagram for SequenceEditorGUIView:
[legend]

Constructor & Destructor Documentation

◆ SequenceEditorGUIView()

SequenceEditorGUIView ( SequenceGUIService service,
SequenceEditor editor,
std::string  id,
RenderWindow renderWindow,
bool  drawFullWindow 
)

Constructor

Parameters
servicesequence gui service handle
editorreference to editor
idid of the GUI resource, used to push ID by IMGUI
renderWindowthe render window
drawFullWindowif the editor occupies the entire window space

Member Function Documentation

◆ drawEndOfSequence()

void drawEndOfSequence ( const Sequence sequence,
SequencePlayer player 
)
protected

draws end of sequence

Parameters
sequencereference to sequence
playerreference to player

◆ drawInspectors()

void drawInspectors ( const SequencePlayer sequencePlayer,
const Sequence sequence 
)
protected

Draws inspectors of the sequence tracks

Parameters
sequencePlayerreference to sequenceplayer
sequencereference to sequence

◆ drawMarkerLines()

void drawMarkerLines ( const Sequence sequence,
SequencePlayer player 
) const
protected

Draw lines of markers

Parameters
sequencereference to sequence
playerreference to sequenceplayer

◆ drawMarkers()

void drawMarkers ( const SequencePlayer sequencePlayer,
const Sequence sequence 
)
protected

Draws markers

Parameters
sequencePlayerreference to sequenceplayer
sequencereference to sequence

◆ drawPlayerController()

void drawPlayerController ( SequencePlayer player)
protected

draws player controller bar

Parameters
playerreference to player

◆ drawTimelinePlayerPosition()

void drawTimelinePlayerPosition ( const Sequence sequence,
SequencePlayer player 
) const
protected

draws line of player position

Parameters
sequencereference to sequence
playerreference to player

◆ drawTracks()

void drawTracks ( const SequencePlayer sequencePlayer,
const Sequence sequence 
)
protected

Draws the tracks of the sequence

Parameters
sequencePlayerreference to sequenceplayer
sequencereference to sequence

◆ getService()

SequenceGUIService& getService ( )

◆ handleEditMarkerPopup()

void handleEditMarkerPopup ( )
protected

handle editing of markers

◆ handleHelpPopup()

void handleHelpPopup ( )
protected

when show help popup is pressed, show modal help popup

◆ handleHorizontalZoom()

void handleHorizontalZoom ( )
protected

when zooming, zoom around the center of the timeline, keeping the focus in the middle

◆ handleInsertMarkerPopup()

void handleInsertMarkerPopup ( )
protected

handle insertion of new markers

◆ handleInsertTrackPopup()

void handleInsertTrackPopup ( )
protected

Handles insertion of track popup

◆ handleLoadPopup()

void handleLoadPopup ( )
protected

handles load popup

◆ handleSaveAsPopup()

void handleSaveAsPopup ( )
protected

handles save as popup

◆ handleSaveClipboardPopup()

void handleSaveClipboardPopup ( )
protected

when save clipboard is pressed, show save clipboard popup

◆ handleSequenceDurationPopup()

void handleSequenceDurationPopup ( )
protected

handle editing of sequence duration

◆ hideMarkerLabels()

void hideMarkerLabels ( bool  hide)

Hides marker labels when not hovered

Parameters
hidewhen true, hides marker labels when not hovered

◆ registerActionHandler()

void registerActionHandler ( const rttr::type &  actionType,
const std::function< void()> &  action 
)
protected

registers handlers for actions

Parameters
actionTypethe action type to register a handler function for
actionthe handler function

◆ registerActionHandlers()

void registerActionHandlers ( )
protected

◆ show()

virtual void show ( bool  newWindow = true)
virtual

Shows the editor interface

Parameters
newWindowwhen true interface will be drawn in a new ImGUI window

Member Data Documentation

◆ mActionHandlers

std::unordered_map<rttr::type, std::function<void()> > mActionHandlers
protected

◆ mDrawFullWindow

bool mDrawFullWindow = false
protected

◆ mEditor

SequenceEditor& mEditor
protected

◆ mHideMarkerLabels

bool mHideMarkerLabels = false
protected

◆ mID

std::string mID
protected

◆ mRenderWindow

RenderWindow* mRenderWindow = nullptr
protected

◆ mService

SequenceGUIService& mService
protected

◆ mState

SequenceEditorGUIState mState
protected

◆ mViews

std::unordered_map<rttr::type, std::unique_ptr<SequenceTrackView> > mViews
protected