TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_navigation.h File Reference
#include <gui_core/input/gui_input_state.h>
#include <cmath>

Go to the source code of this file.

Classes

struct  tachyon::WheelNavigation
 What a wheel or pinch event asks of a canvas. More...

Namespaces

namespace  tachyon

Enumerations

enum class  tachyon::WheelMode : uint8_t { tachyon::WheelMode::Zoom , tachyon::WheelMode::Pan }
 What the wheel, and a trackpad's two-finger scroll, does over such a canvas. More...

Functions

constexpr WheelMode tachyon::DefaultWheelMode ()
 The mode a platform's users expect: Pan on macOS, where most pointers are trackpads; Zoom elsewhere.
WheelNavigation tachyon::NavigateByWheel (const InputState &s, WheelMode mode, float zoomStep)
 A wheel (or pinch) event's zoom or scroll by mode; zoomStep is the zoom of one notch.
MouseButtons tachyon::PanDragButton (const InputState &s)
 The button a press drags the view with: the middle one, or the left with Alt for a mouse or trackpad without a middle button.