Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
RulerTrack Class Reference

#include "stage/timeline/ruler-track.hpp"

Description

Helper to organise and draw the time or content overview ruler at the top of the timeline track display.

The purpose is to support custom drawing onto the TimelineCanvas to show rendered content, timecode or frame count ticks plus any markers, ranges and locators...

Todo:
this is more or less preliminary/placeholder code as of 4/2019 ////////////////////////TICKET #1194 : proper handling of ruler tracks

Definition at line 66 of file ruler-track.hpp.

Public Member Functions

 ~RulerTrack ()
 
 RulerTrack (ID id, ctrl::BusTerm &nexus, TrackPresenter &parent)
 
uint calcHeight ()
 recursively calculate the height in pixels to display this ruler track.
 
uint getGapHeight ()
 possibly cause the display of an additional padding gap below this ruler track
 
virtual void buildMutator (lib::diff::TreeMutator::Handle) override
 set up a binding to respond to mutation messages via UiBus
 
- Public Member Functions inherited from Controller
 Tangible (ID identity, ctrl::BusTerm &nexus)
 
- Public Member Functions inherited from Tangible
virtual ~Tangible ()
 this is an interface
 
 operator string () const
 diagnostic representation.
 
 operator LuidH () const
 
ID getID () const
 
void reset ()
 invoke the generic reset hook
 
void clearMsg ()
 invoke the hook to clear notification messages
 
void clearErr ()
 invoke the hook to clear error markers
 
template<typename... ARGS>
void invoke (Symbol cmdID, ARGS &&...)
 
void invoke (Symbol cmdID, Rec &&arguments)
 Perform a command or action, once the execution context has been established.
 
void slotExpand ()
 Expand this element and remember the expanded state.
 
void slotCollapse ()
 Collapse or minimise this element and remember the collapsed state.
 
void slotReveal ()
 Cause the element to be brought into sight.
 
void markFlash ()
 highlight the element visually to catch the user's attention
 
void markMsg (string message)
 push a notification (or warning) message to the element.
 
void markErr (string error)
 push an error state tag to the element
 
void mark (GenNode const &)
 generic handler for all incoming "state mark" messages
 
void installExpander (Expander::ProbeFun, Expander::ChangeFun)
 Configure the (optional) functionality to expand or collapse the UI-Element.
 
void installRevealer (Revealer::RevealeItFun)
 Configure the (optional) functionality to bring the UI-Element into sight.
 
template<typename... ARGS>
void invoke (Symbol cmdID, ARGS &&... args)
 convenience shortcut to issue a command with several arguments
 
- Public Member Functions inherited from DiffMutable
virtual ~DiffMutable ()
 this is an interface
 

Private Types

using Scales = std::vector< RulerScale >
 

Private Attributes

TrackPresentertrack_
 
Scales scales_
 

Additional Inherited Members

- Public Types inherited from Tangible
using ID = ctrl::BusTerm::ID
 
using LuidH = lib::hash::LuidH
 
- Protected Types inherited from Tangible
using Rec = lib::diff::Rec
 
using GenNode = lib::diff::GenNode
 
- Protected Member Functions inherited from Controller
virtual void doMark (GenNode const &mark) override
 default handler for all generic mark messages.
 
- Protected Member Functions inherited from Tangible
 Tangible (ID identity, ctrl::BusTerm &nexus)
 
virtual bool doExpand (bool yes)
 generic default implementation of the expand/collapse functionality.
 
virtual void doReveal ()
 generic default implementation of the "reveal" functionality.
 
- Protected Attributes inherited from Tangible
ctrl::BusTerm uiBus_
 
Expander expand_
 
Revealer reveal_
 

Constructor & Destructor Documentation

◆ ~RulerTrack()

~RulerTrack ( )

Definition at line 73 of file ruler-track.cpp.

◆ RulerTrack()

RulerTrack ( ID  id,
ctrl::BusTerm nexus,
TrackPresenter parent 
)
Parameters
ididentity used to refer to a corresponding session::Fork
nexusa way to connect this Controller to the UI-Bus.
anchorDisplaya one-way closure to attach into the display fabric

Definition at line 66 of file ruler-track.cpp.

Member Typedef Documentation

◆ Scales

using Scales = std::vector<RulerScale>
private

Definition at line 69 of file ruler-track.hpp.

Member Function Documentation

◆ calcHeight()

uint calcHeight ( )

recursively calculate the height in pixels to display this ruler track.

Todo:
this is more or less braindead placeholder code as of 4/2019

Definition at line 94 of file ruler-track.cpp.

References RulerTrack::scales_.

◆ getGapHeight()

uint getGapHeight ( )

possibly cause the display of an additional padding gap below this ruler track

Returns
0 when no gap shall be displayed, otherwise the gap height in pixels.
Todo:
this is more or less braindead placeholder code as of 4/2019

Definition at line 113 of file ruler-track.cpp.

References RulerTrack::scales_.

◆ buildMutator()

void buildMutator ( lib::diff::TreeMutator::Handle  buffer)
overridevirtual

set up a binding to respond to mutation messages via UiBus

Implements Tangible.

Definition at line 76 of file ruler-track.cpp.

Member Data Documentation

◆ track_

TrackPresenter& track_
private

Definition at line 71 of file ruler-track.hpp.

◆ scales_

Scales scales_
private

Definition at line 72 of file ruler-track.hpp.

Referenced by RulerTrack::calcHeight(), and RulerTrack::getGapHeight().

+ Inheritance diagram for RulerTrack:
+ Collaboration diagram for RulerTrack:

The documentation for this class was generated from the following files: