![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "stage/model/zoom-window.hpp"
A component to ensure uniform handling of zoom scale and visible interval on the timeline.
Changes through the mutator functions are validated and harmonised to meet the internal invariants; a change listener is possibly notified to pick up the new settings.
A ZoomWindow...
Definition at line 213 of file zoom-window.hpp.
Public Member Functions | |
| ZoomWindow (uint pxWidth, TimeSpan timeline=TimeSpan{Time::ZERO, DEFAULT_CANVAS}) | |
| ZoomWindow (TimeSpan timeline=TimeSpan{Time::ZERO, DEFAULT_CANVAS}) | |
| TimeSpan | overallSpan () const |
| TimeSpan | visible () const |
| Rat | px_per_sec () const |
| uint | pxWidth () const |
| void | calibrateExtension (uint pxWidth) |
| Define the extension of the window in pixels. | |
| void | setMetric (Rat px_per_sec) |
| explicitly set the zoom factor, defined as pixel per second | |
| void | nudgeMetric (int steps) |
| scale up or down on a 2-logarithmic scale. | |
| void | setRanges (TimeSpan overall, TimeSpan visible) |
| Set both the overall canvas, as well as the visible part within that canvas. | |
| void | setOverallRange (TimeSpan range) |
| redefine the overall canvas range. | |
| void | setOverallStart (TimeValue start) |
| void | setOverallDuration (Duration duration) |
| void | setVisibleStart (TimeValue start) |
| void | setVisibleRange (TimeSpan newWindow) |
| explicitly set the visible window, possibly expanding the canvas to fit. | |
| void | expandVisibleRange (TimeSpan target) |
| the »reverse zoom operation«: zoom out such as to bring the current window at the designated time span. | |
| void | setVisibleDuration (Duration duration) |
| explicitly set the duration of the visible window range, working around the relative anchor point; possibly expand canvas. | |
| void | offsetVisiblePos (Offset offset) |
| scroll by arbitrary offset, possibly expanding canvas. | |
| void | nudgeVisiblePos (int64_t steps) |
| scroll by increments of half window size, possibly expanding. | |
| void | setVisiblePos (Time posToShow) |
| scroll the window to bring the denoted position in sight, retaining the current zoom factor, possibly expanding canvas. | |
| void | setVisiblePos (Rat percentage) |
| scroll to reveal position designated relative to overall canvas | |
| void | setVisiblePos (double percentage) |
| void | navHistory () |
| template<class FUN > | |
| void | attachChangeNotification (FUN &&trigger) |
| Attach a λ or functor to be triggered on each actual change. | |
| void | detachChangeNotification () |
Private Member Functions | |
| void | fireChangeNotification () |
| Rat | optimiseMetric (uint pxWidth, FSecs dur, Rat rawMetric) |
| Reform the effective metric in all dangerous corner cases. | |
| void | conformWindowToMetric (Rat changedMetric) |
| this is the centrepiece of the whole zoom metric logic... | |
| Rat | conformMetricToWindow (uint pxWidth) |
| void | conformWindowToMetricLimits (uint pxWidth) |
| The zoom metric factor must not become "poisonous". | |
| void | conformWindowToCanvas () |
| void | conformToBounds (Rat changedMetric) |
| void | ensureInvariants (uint px=0) |
| Procedure to (re)establish the invariants. | |
| void | mutateCanvas (TimeSpan canvas) |
| void | mutateWindow (TimeSpan window) |
| void | mutateRanges (TimeSpan canvas, TimeSpan window) |
| void | mutateScale (Rat changedMetric) |
| void | mutateDuration (FSecs duration, uint px=0) |
| void | adaptWindowToPixels (uint pxWidth) |
| void | anchorWindowAtPosition (FSecs canvasOffset) |
| void | placeWindowRelativeToAnchor (FSecs duration) |
| void | establishWindowDuration (Duration duration) |
| FSecs | anchorPoint () const |
| The anchor point or centre for zooming operations applied to the visible window. | |
| Rat | relativeAnchor () const |
| define at which proportion to the visible window's duration the anchor should be placed | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Static Private Member Functions | |
| static Rat | detox (Rat poison) |
| Check and possibly sanitise a rational number to avoid internal numeric overflow. | |
| static FSecs | scaleSafe (FSecs duration, Rat factor) |
| Scale a possibly large time duration by a rational factor, while attempting to avoid integer wrap-around. | |
| static FSecs | addSafe (FSecs t1, FSecs t2) |
| Calculate sum (or difference) of possibly large time durations, avoiding integer wrap-around. | |
| static TimeSpan | ensureNonEmpty (TimeSpan const &span) |
| static void | ENSURE_matchesExpectedPixWidth (Rat zoomFactor, FSecs duration, uint pxWidth) |
| Assertion helper: resulting pxWidth matches expectations. | |
| static int64_t | calcPixelsForDurationAtScale (Rat zoomFactor, FSecs duration) |
calculate rational_cast<uint> (zoomFactor * duration) | |
| static FSecs | maxSaneWinExtension (uint pxWidth) |
| window size beyond that limit would lead to numerically dangerous zoom factors (pixel/duration) | |
| static Rat | establishMetric (uint pxWidth, Time startWin, Time afterWin) |
| static Rat | parabolicAnchorRule (Rat posFactor) |
| A counter movement rule to place an anchor point, based on a percentage factor. | |
Private Attributes | |
| TimeVar | startAll_ |
| TimeVar | afterAll_ |
| TimeVar | startWin_ |
| TimeVar | afterWin_ |
| Rat | px_per_sec_ |
| std::function< void()> | changeSignal_ {} |
|
inline |
Definition at line 223 of file zoom-window.hpp.
References Time::ZERO.
|
inline |
Definition at line 236 of file zoom-window.hpp.
References Time::ZERO.
|
inline |
Definition at line 241 of file zoom-window.hpp.
References ZoomWindow::afterAll_, and ZoomWindow::startAll_.
Referenced by ZoomMetric< I >::coveredTime(), TimelineLayout::syncZoomWindow(), ZoomMetric< I >::translateTimeToPixels(), ZoomWindow_test::verify_calibration(), ZoomWindow_test::verify_setup(), and ZoomWindow_test::verify_simpleUsage().
Here is the caller graph for this function:
|
inline |
Definition at line 247 of file zoom-window.hpp.
References ZoomWindow::afterWin_, and ZoomWindow::startWin_.
Referenced by TimelineLayout::establishLayout(), ZoomWindow::setRanges(), ZoomWindow_test::verify_calibration(), ZoomWindow_test::verify_setup(), and ZoomWindow_test::verify_simpleUsage().
Here is the caller graph for this function:
|
inline |
Definition at line 253 of file zoom-window.hpp.
References ZoomWindow::px_per_sec_.
Referenced by ZoomMetric< I >::applyScreenDelta(), ZoomWindow::pxWidth(), ZoomWindow::setMetric(), ZoomMetric< I >::translateScreenDelta(), ZoomWindow_test::verify_calibration(), ZoomWindow_test::verify_setup(), and ZoomWindow_test::verify_simpleUsage().
Here is the caller graph for this function:
|
inline |
Definition at line 259 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::calcPixelsForDurationAtScale(), ZoomWindow::px_per_sec(), and ZoomWindow::startWin_.
Referenced by ZoomWindow::adaptWindowToPixels(), ZoomWindow::anchorWindowAtPosition(), ZoomWindow::calibrateExtension(), ZoomWindow::conformMetricToWindow(), ZoomWindow::conformWindowToMetric(), ZoomWindow::conformWindowToMetricLimits(), ZoomWindow::ENSURE_matchesExpectedPixWidth(), ZoomWindow::ensureInvariants(), ZoomWindow::establishMetric(), ZoomWindow::maxSaneWinExtension(), ZoomWindow::mutateDuration(), ZoomWindow::mutateRanges(), ZoomWindow::mutateScale(), ZoomWindow::mutateWindow(), ZoomWindow::optimiseMetric(), TimelineLayout::sizeZoomWindow(), ZoomWindow_test::verify_calibration(), and ZoomWindow_test::verify_setup().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Define the extension of the window in pixels.
The existing logical scale factor is retained, meaning that the logical duration of the actually visible window is adjusted alongside to match the new given pixel size, if necessary, also the canvas is expanded to fit.
Definition at line 278 of file zoom-window.hpp.
References ZoomWindow::adaptWindowToPixels(), ZoomWindow::fireChangeNotification(), and ZoomWindow::pxWidth().
Referenced by TimelineLayout::sizeZoomWindow(), and ZoomWindow_test::verify_calibration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
explicitly set the zoom factor, defined as pixel per second
Definition at line 291 of file zoom-window.hpp.
References ZoomWindow::fireChangeNotification(), ZoomWindow::mutateScale(), and ZoomWindow::px_per_sec().
Referenced by ZoomWindow::nudgeMetric().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
scale up or down on a 2-logarithmic scale.
Each step either doubles or halves the zoom level, and the visible window is adjusted accordingly, using the current anchorPoint as centre for scaling.
Definition at line 306 of file zoom-window.hpp.
References ZoomWindow::px_per_sec_, and ZoomWindow::setMetric().
Referenced by ZoomWindow_test::verify_simpleUsage().
Here is the call graph for this function:
Here is the caller graph for this function:Set both the overall canvas, as well as the visible part within that canvas.
Given values will possibly be adjusted to retain overall consistency, according to the following rules:
Definition at line 326 of file zoom-window.hpp.
References ZoomWindow::fireChangeNotification(), ZoomWindow::mutateRanges(), and ZoomWindow::visible().
Referenced by ZoomWindow_test::verify_calibration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
redefine the overall canvas range.
Definition at line 340 of file zoom-window.hpp.
References ZoomWindow::fireChangeNotification(), and ZoomWindow::mutateCanvas().
Referenced by ZoomWindow_test::verify_calibration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 347 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::fireChangeNotification(), ZoomWindow::mutateCanvas(), and ZoomWindow::startAll_.
Here is the call graph for this function:
|
inline |
Definition at line 354 of file zoom-window.hpp.
References ZoomWindow::fireChangeNotification(), ZoomWindow::mutateCanvas(), and ZoomWindow::startAll_.
Referenced by ZoomWindow_test::verify_calibration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 361 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::fireChangeNotification(), ZoomWindow::mutateWindow(), and ZoomWindow::startWin_.
Referenced by TimelineLayout::syncZoomWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
explicitly set the visible window, possibly expanding the canvas to fit.
Typically used to zoom into a user selected range.
Definition at line 373 of file zoom-window.hpp.
References ZoomWindow::fireChangeNotification(), and ZoomWindow::mutateWindow().
Referenced by ZoomWindow::nudgeVisiblePos().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
the »reverse zoom operation«: zoom out such as to bring the current window at the designated time span.
Typically the user selects a sub-range, and the current view is then collapsed accordingly to fit into that range. As a side effect, the canvas may be expanded significantly.
Definition at line 387 of file zoom-window.hpp.
References ZoomWindow::afterWin_, TimeSpan::end(), ZoomWindow::fireChangeNotification(), ZoomWindow::mutateWindow(), TimeSpan::start(), and ZoomWindow::startWin_.
Here is the call graph for this function:
|
inline |
explicitly set the duration of the visible window range, working around the relative anchor point; possibly expand canvas.
Definition at line 411 of file zoom-window.hpp.
References ZoomWindow::fireChangeNotification(), and ZoomWindow::mutateDuration().
Referenced by ZoomWindow_test::safeguard_reversed_intervals().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
scroll by arbitrary offset, possibly expanding canvas.
Definition at line 419 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::fireChangeNotification(), ZoomWindow::mutateWindow(), and ZoomWindow::startWin_.
Here is the call graph for this function:
|
inline |
scroll by increments of half window size, possibly expanding.
Definition at line 427 of file zoom-window.hpp.
References ZoomWindow::afterWin_, util::limited(), ZoomWindow::setVisibleRange(), and ZoomWindow::startWin_.
Referenced by ZoomWindow_test::verify_simpleUsage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
scroll the window to bring the denoted position in sight, retaining the current zoom factor, possibly expanding canvas.
Definition at line 442 of file zoom-window.hpp.
References ZoomWindow::anchorWindowAtPosition(), ZoomWindow::fireChangeNotification(), and ZoomWindow::startAll_.
Referenced by ZoomWindow::setVisiblePos().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
scroll to reveal position designated relative to overall canvas
Definition at line 451 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::anchorWindowAtPosition(), ZoomWindow::fireChangeNotification(), ZoomWindow::scaleSafe(), and ZoomWindow::startAll_.
Here is the call graph for this function:
|
inline |
Definition at line 459 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::setVisiblePos(), and ZoomWindow::startAll_.
Here is the call graph for this function:
|
inline |
Definition at line 467 of file zoom-window.hpp.
|
inline |
Attach a λ or functor to be triggered on each actual change.
Definition at line 476 of file zoom-window.hpp.
References ZoomWindow::changeSignal_.
Referenced by TimelineLayout::TimelineLayout().
Here is the caller graph for this function:
|
inline |
Definition at line 482 of file zoom-window.hpp.
References ZoomWindow::changeSignal_.
|
inlineprivate |
Definition at line 490 of file zoom-window.hpp.
References ZoomWindow::changeSignal_.
Referenced by ZoomWindow::calibrateExtension(), ZoomWindow::expandVisibleRange(), ZoomWindow::offsetVisiblePos(), ZoomWindow::setMetric(), ZoomWindow::setOverallDuration(), ZoomWindow::setOverallRange(), ZoomWindow::setOverallStart(), ZoomWindow::setRanges(), ZoomWindow::setVisibleDuration(), ZoomWindow::setVisiblePos(), ZoomWindow::setVisiblePos(), ZoomWindow::setVisibleRange(), and ZoomWindow::setVisibleStart().
Here is the caller graph for this function:
|
inlinestaticprivate |
Check and possibly sanitise a rational number to avoid internal numeric overflow.
Fractional arithmetics can be insidious, due to the frequent re-normalisation; seemingly "harmless" numbers with a large denominator can cause numeric wrap-around. As safeguard, by introducing a tiny error, problematic numbers can be re-quantised to smaller denominators; moreover, large numbers must be limit checked.
FSecs or RSec class //////////////////TICKET #1262 Definition at line 520 of file zoom-window.hpp.
Referenced by ZoomWindow::addSafe(), ZoomWindow::conformWindowToMetric(), ZoomWindow::mutateScale(), ZoomWindow::parabolicAnchorRule(), and ZoomWindow::scaleSafe().
Here is the caller graph for this function:
|
inlinestaticprivate |
Scale a possibly large time duration by a rational factor, while attempting to avoid integer wrap-around.
In the typical use-case, the multiplication can be just computed precisely and safe, but at least we check the limits. In the danger and boundary zone, a slight error is introduced to allow cancelling out a common factor, so that the result can be just constructed without any further dangerous computation. Obviously this is only a heuristic, yet adequate within the framework of ZoomWindow, where the end result is pixel aligned anyway.
FSecs or RSec class //////////////////TICKET #1262 Descriptor for a Strategy to reduce the numbers to keep them in domain. After cross-wise cancelling out one part in each factor, the result can be constructed without any further multiplication. To achieve that, a slight error is introduced into one of the four participating numbers
< factor one is safe and will not be changed
< the counterpart of f1 is used as quantiser and cancelled out
< the diagonal counterpart of u is scaled to u and cancelled
< the counterpart of #q is re-quantised to u; it acts as limit
< Strategy will be applied to the inverse 1/x
Definition at line 538 of file zoom-window.hpp.
References util::can_represent_Product(), ZoomWindow::detox(), util::iDiv(), util::ilog2(), and TimeValue::SCALE.
Referenced by ZoomWindow::anchorPoint(), ZoomWindow::anchorWindowAtPosition(), ZoomWindow::placeWindowRelativeToAnchor(), and ZoomWindow::setVisiblePos().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
Calculate sum (or difference) of possibly large time durations, avoiding integer wrap-around.
Again, this is a heuristics, based on re-quantisation to a smaller common denominator.
FSecs or RSec class //////////////////TICKET #1262 Definition at line 636 of file zoom-window.hpp.
References util::can_represent_Sum(), ZoomWindow::detox(), util::ilog2(), and TimeValue::SCALE.
Referenced by ZoomWindow::anchorWindowAtPosition().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 689 of file zoom-window.hpp.
References TimeSpan::duration(), util::isnil(), and TimeSpan::start().
Referenced by ZoomWindow::mutateCanvas(), ZoomWindow::mutateRanges(), and ZoomWindow::mutateWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
Assertion helper: resulting pxWidth matches expectations.
Definition at line 699 of file zoom-window.hpp.
References ZoomWindow::pxWidth().
Referenced by ZoomWindow::conformWindowToMetric().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
calculate rational_cast<uint> (zoomFactor * duration)
Definition at line 712 of file zoom-window.hpp.
References util::iDiv().
Referenced by ZoomWindow::conformMetricToWindow(), ZoomWindow::conformWindowToMetric(), ZoomWindow::establishMetric(), ZoomWindow::optimiseMetric(), and ZoomWindow::pxWidth().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
window size beyond that limit would lead to numerically dangerous zoom factors (pixel/duration)
Definition at line 729 of file zoom-window.hpp.
References ZoomWindow::pxWidth().
Referenced by ZoomWindow::adaptWindowToPixels(), ZoomWindow::conformWindowToMetricLimits(), ZoomWindow::mutateDuration(), and ZoomWindow::mutateScale().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Reform the effective metric in all dangerous corner cases.
Ensure the metric value is not »poisonous« and can be multiplied even with Time::SCALE without numeric wrap-around.
Definition at line 743 of file zoom-window.hpp.
References ZoomWindow::calcPixelsForDurationAtScale(), util::ilog2(), ZoomWindow::pxWidth(), and util::reQuant().
Referenced by ZoomWindow::conformMetricToWindow().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 788 of file zoom-window.hpp.
References ZoomWindow::calcPixelsForDurationAtScale(), and ZoomWindow::pxWidth().
Here is the call graph for this function:
|
inlineprivate |
this is the centrepiece of the whole zoom metric logic...
Definition at line 804 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::calcPixelsForDurationAtScale(), ZoomWindow::conformMetricToWindow(), ZoomWindow::detox(), ZoomWindow::ENSURE_matchesExpectedPixWidth(), ZoomWindow::establishWindowDuration(), ZoomWindow::placeWindowRelativeToAnchor(), ZoomWindow::px_per_sec_, ZoomWindow::pxWidth(), and ZoomWindow::startWin_.
Referenced by ZoomWindow::conformToBounds(), and ZoomWindow::mutateScale().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 827 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::calcPixelsForDurationAtScale(), ZoomWindow::optimiseMetric(), ZoomWindow::pxWidth(), and ZoomWindow::startWin_.
Referenced by ZoomWindow::conformWindowToMetric(), ZoomWindow::ensureInvariants(), and ZoomWindow::mutateDuration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
The zoom metric factor must not become "poisonous".
This leads to a minimum possible zoom factor for a given pixWidth, thereby effectively limiting the maximum window extension. This constraint is enforced by reducing the current window size.
Definition at line 847 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::establishWindowDuration(), ZoomWindow::maxSaneWinExtension(), ZoomWindow::placeWindowRelativeToAnchor(), ZoomWindow::pxWidth(), and ZoomWindow::startWin_.
Referenced by ZoomWindow::mutateRanges(), and ZoomWindow::mutateWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 860 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::afterWin_, Time::MAX, Time::MIN, ZoomWindow::startAll_, and ZoomWindow::startWin_.
Referenced by ZoomWindow::ensureInvariants().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 894 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::afterWin_, ZoomWindow::conformWindowToMetric(), Time::MAX, Time::MIN, ZoomWindow::px_per_sec_, ZoomWindow::startAll_, ZoomWindow::startWin_, and stage::model::ZOOM_MAX_RESOLUTION.
Referenced by ZoomWindow::ensureInvariants().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Procedure to (re)establish the invariants.
Adjustments should be done first to windows, then to the metric, using conformWindowToMetric(). Then this function shall be called and will first shift and possibly cap the window, then reestablish the metric and possibly increase the canvas to keep ensure the ZOOM_MAX_RESOLUTION is not exceeded. These steps ensure overall pixel size remains stable.
Definition at line 922 of file zoom-window.hpp.
References ZoomWindow::conformMetricToWindow(), ZoomWindow::conformToBounds(), ZoomWindow::conformWindowToCanvas(), ZoomWindow::px_per_sec_, and ZoomWindow::pxWidth().
Referenced by ZoomWindow::adaptWindowToPixels(), ZoomWindow::anchorWindowAtPosition(), ZoomWindow::mutateCanvas(), ZoomWindow::mutateDuration(), ZoomWindow::mutateRanges(), ZoomWindow::mutateScale(), and ZoomWindow::mutateWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
set a different overall canvas range, possibly set window and metrics to fit
Definition at line 937 of file zoom-window.hpp.
References ZoomWindow::afterAll_, TimeSpan::end(), ZoomWindow::ensureInvariants(), ZoomWindow::ensureNonEmpty(), TimeSpan::start(), and ZoomWindow::startAll_.
Referenced by ZoomWindow::setOverallDuration(), ZoomWindow::setOverallRange(), and ZoomWindow::setOverallStart().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
change Window TimeSpan, possibly also outside of the current canvas, which is then expanded; validate and adjust all params accordingly
Definition at line 948 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::afterWin_, ZoomWindow::conformWindowToMetricLimits(), TimeSpan::end(), ZoomWindow::ensureInvariants(), ZoomWindow::ensureNonEmpty(), ZoomWindow::pxWidth(), TimeSpan::start(), ZoomWindow::startAll_, and ZoomWindow::startWin_.
Referenced by ZoomWindow::expandVisibleRange(), ZoomWindow::offsetVisiblePos(), ZoomWindow::setVisibleRange(), and ZoomWindow::setVisibleStart().
Here is the call graph for this function:
Here is the caller graph for this function:change canvas and window position in one call, then validate and adjust to maintain invariants
Definition at line 962 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::afterWin_, ZoomWindow::conformWindowToMetricLimits(), TimeSpan::end(), ZoomWindow::ensureInvariants(), ZoomWindow::ensureNonEmpty(), ZoomWindow::pxWidth(), TimeSpan::start(), ZoomWindow::startAll_, and ZoomWindow::startWin_.
Referenced by ZoomWindow::setRanges().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
adjust Window to match given scale, validate and adjust all params
Definition at line 977 of file zoom-window.hpp.
References ZoomWindow::conformWindowToMetric(), ZoomWindow::detox(), ZoomWindow::ensureInvariants(), ZoomWindow::maxSaneWinExtension(), ZoomWindow::px_per_sec_, ZoomWindow::pxWidth(), and stage::model::ZOOM_MAX_RESOLUTION.
Referenced by ZoomWindow::setMetric().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
change visible duration centred around anchor point, validate and adjust all params
Definition at line 990 of file zoom-window.hpp.
References ZoomWindow::conformMetricToWindow(), ZoomWindow::ensureInvariants(), ZoomWindow::establishWindowDuration(), ZoomWindow::maxSaneWinExtension(), ZoomWindow::placeWindowRelativeToAnchor(), ZoomWindow::px_per_sec_, and ZoomWindow::pxWidth().
Referenced by ZoomWindow::setVisibleDuration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
resize window to span the given pixel with, validate and adjust all other params
Definition at line 1007 of file zoom-window.hpp.
References ZoomWindow::ensureInvariants(), ZoomWindow::establishWindowDuration(), util::limited(), ZoomWindow::maxSaneWinExtension(), ZoomWindow::px_per_sec_, and ZoomWindow::pxWidth().
Referenced by ZoomWindow::calibrateExtension().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
relocate window anchored at a position relative to canvas, also placing the anchor position relative within the window in accordance with the position relative to canvas. Window will enclose the given position, possibly extending canvas to fit, afterwards reestablishing all invariants.
Definition at line 1023 of file zoom-window.hpp.
References ZoomWindow::addSafe(), ZoomWindow::afterAll_, ZoomWindow::afterWin_, ZoomWindow::ensureInvariants(), ZoomWindow::establishWindowDuration(), ZoomWindow::parabolicAnchorRule(), ZoomWindow::pxWidth(), ZoomWindow::scaleSafe(), ZoomWindow::startAll_, and ZoomWindow::startWin_.
Referenced by ZoomWindow::setVisiblePos(), and ZoomWindow::setVisiblePos().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
similar operation as anchorWindowAtPosition(), but based on the current window position and without relocation, rather intended for changing the scale
Definition at line 1044 of file zoom-window.hpp.
References ZoomWindow::anchorPoint(), ZoomWindow::relativeAnchor(), ZoomWindow::scaleSafe(), and ZoomWindow::startWin_.
Referenced by ZoomWindow::conformWindowToMetric(), ZoomWindow::conformWindowToMetricLimits(), and ZoomWindow::mutateDuration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1051 of file zoom-window.hpp.
References ZoomWindow::afterWin_, Time::MAX, and ZoomWindow::startWin_.
Referenced by ZoomWindow::adaptWindowToPixels(), ZoomWindow::anchorWindowAtPosition(), ZoomWindow::conformWindowToMetric(), ZoomWindow::conformWindowToMetricLimits(), and ZoomWindow::mutateDuration().
Here is the caller graph for this function:
|
inlineprivate |
The anchor point or centre for zooming operations applied to the visible window.
Definition at line 1075 of file zoom-window.hpp.
References ZoomWindow::afterWin_, ZoomWindow::relativeAnchor(), ZoomWindow::scaleSafe(), and ZoomWindow::startWin_.
Referenced by ZoomWindow::placeWindowRelativeToAnchor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
define at which proportion to the visible window's duration the anchor should be placed
Definition at line 1088 of file zoom-window.hpp.
References ZoomWindow::afterAll_, ZoomWindow::afterWin_, ZoomWindow::parabolicAnchorRule(), ZoomWindow::startAll_, and ZoomWindow::startWin_.
Referenced by ZoomWindow::anchorPoint(), and ZoomWindow::placeWindowRelativeToAnchor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
A counter movement rule to place an anchor point, based on a percentage factor.
Used to define the anchor point within the window, depending on the window's position relative to the overall canvas. Implemented using a cubic parabola, which moves quick away from the boundaries, while hovering most of the time in the middle area.
Definition at line 1110 of file zoom-window.hpp.
References ZoomWindow::detox(), util::limited(), and util::reQuant().
Referenced by ZoomWindow::anchorWindowAtPosition(), and ZoomWindow::relativeAnchor().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 216 of file zoom-window.hpp.
Referenced by ZoomWindow::anchorWindowAtPosition(), ZoomWindow::conformToBounds(), ZoomWindow::conformWindowToCanvas(), ZoomWindow::mutateCanvas(), ZoomWindow::mutateRanges(), ZoomWindow::mutateWindow(), ZoomWindow::overallSpan(), ZoomWindow::relativeAnchor(), ZoomWindow::setOverallDuration(), ZoomWindow::setOverallStart(), ZoomWindow::setVisiblePos(), ZoomWindow::setVisiblePos(), and ZoomWindow::setVisiblePos().
|
private |
Definition at line 216 of file zoom-window.hpp.
Referenced by ZoomWindow::anchorWindowAtPosition(), ZoomWindow::conformToBounds(), ZoomWindow::conformWindowToCanvas(), ZoomWindow::mutateCanvas(), ZoomWindow::mutateRanges(), ZoomWindow::mutateWindow(), ZoomWindow::overallSpan(), ZoomWindow::relativeAnchor(), ZoomWindow::setOverallStart(), ZoomWindow::setVisiblePos(), and ZoomWindow::setVisiblePos().
|
private |
Definition at line 217 of file zoom-window.hpp.
Referenced by ZoomWindow::anchorPoint(), ZoomWindow::anchorWindowAtPosition(), ZoomWindow::conformMetricToWindow(), ZoomWindow::conformToBounds(), ZoomWindow::conformWindowToCanvas(), ZoomWindow::conformWindowToMetric(), ZoomWindow::conformWindowToMetricLimits(), ZoomWindow::establishWindowDuration(), ZoomWindow::expandVisibleRange(), ZoomWindow::mutateRanges(), ZoomWindow::mutateWindow(), ZoomWindow::nudgeVisiblePos(), ZoomWindow::offsetVisiblePos(), ZoomWindow::placeWindowRelativeToAnchor(), ZoomWindow::pxWidth(), ZoomWindow::relativeAnchor(), ZoomWindow::setVisibleStart(), and ZoomWindow::visible().
|
private |
Definition at line 217 of file zoom-window.hpp.
Referenced by ZoomWindow::anchorPoint(), ZoomWindow::anchorWindowAtPosition(), ZoomWindow::conformMetricToWindow(), ZoomWindow::conformToBounds(), ZoomWindow::conformWindowToCanvas(), ZoomWindow::conformWindowToMetric(), ZoomWindow::conformWindowToMetricLimits(), ZoomWindow::establishWindowDuration(), ZoomWindow::expandVisibleRange(), ZoomWindow::mutateRanges(), ZoomWindow::mutateWindow(), ZoomWindow::nudgeVisiblePos(), ZoomWindow::offsetVisiblePos(), ZoomWindow::pxWidth(), ZoomWindow::relativeAnchor(), ZoomWindow::setVisibleStart(), and ZoomWindow::visible().
|
private |
Definition at line 218 of file zoom-window.hpp.
Referenced by ZoomWindow::adaptWindowToPixels(), ZoomWindow::conformToBounds(), ZoomWindow::conformWindowToMetric(), ZoomWindow::ensureInvariants(), ZoomWindow::mutateDuration(), ZoomWindow::mutateScale(), ZoomWindow::nudgeMetric(), and ZoomWindow::px_per_sec().
|
private |
Definition at line 220 of file zoom-window.hpp.
Referenced by ZoomWindow::attachChangeNotification(), ZoomWindow::detachChangeNotification(), and ZoomWindow::fireChangeNotification().
Inheritance diagram for ZoomWindow:
Collaboration diagram for ZoomWindow: