Owns viewport/input state for the render pane: zoom/pan, pending click dispatch, and frame timing history.
More...
#include "donner/editor/ViewportInteractionController.h"
|
|
ViewportState & | viewport () |
|
const ViewportState & | viewport () const |
|
FrameHistory & | frameHistory () |
|
const FrameHistory & | frameHistory () const |
|
void | noteFrameDelta (float deltaMs) |
|
void | updatePaneLayout (const Vector2d &paneOrigin, const Vector2d &paneSize, const std::optional< Box2d > &documentViewBox, bool preservePaneCenterDocumentPoint=false) |
|
void | updateDevicePixelRatio (double devicePixelRatio) |
| bool | resetToActualSize () |
| | Reset the viewport to 100%.
|
| bool | applyZoom (double factor, const Vector2d &focalScreen) |
| | Apply a multiplicative zoom around a screen-space focal point.
|
| bool | updatePanState (bool paneHovered, bool spaceHeld, bool middleDown, bool leftDown, const ImVec2 &mousePosition) |
| | Update mouse-drag pan state.
|
|
bool | panning () const |
| ScrollConsumptionResult | consumeScrollEvents (std::vector< RenderPaneScrollEvent > &events, const Box2d &paneRect, bool modalCapturingInput, double wheelZoomStep, double panPixelsPerScrollUnit) |
| | Consume queued trackpad/wheel events.
|
|
void | bufferPendingClick (const Vector2d &documentPoint, MouseModifiers modifiers) |
|
const std::optional< PendingClick > & | pendingClick () const |
|
void | clearPendingClick () |
Owns viewport/input state for the render pane: zoom/pan, pending click dispatch, and frame timing history.
◆ applyZoom()
| bool donner::editor::ViewportInteractionController::applyZoom |
( |
double | factor, |
|
|
const Vector2d & | focalScreen ) |
|
nodiscard |
Apply a multiplicative zoom around a screen-space focal point.
- Parameters
-
| factor | Zoom multiplier. |
| focalScreen | Screen-space point that remains anchored. |
- Returns
- True if the viewport mapping changed.
◆ consumeScrollEvents()
Consume queued trackpad/wheel events.
- Returns
- Viewport mutation summary for the consumed events.
◆ resetToActualSize()
| bool donner::editor::ViewportInteractionController::resetToActualSize |
( |
| ) |
|
|
nodiscard |
Reset the viewport to 100%.
- Returns
- True if the viewport mapping changed.
◆ updatePanState()
| bool donner::editor::ViewportInteractionController::updatePanState |
( |
bool | paneHovered, |
|
|
bool | spaceHeld, |
|
|
bool | middleDown, |
|
|
bool | leftDown, |
|
|
const ImVec2 & | mousePosition ) |
|
nodiscard |
Update mouse-drag pan state.
- Returns
- True if the viewport mapping changed.
The documentation for this class was generated from the following file: