Blender V5.3
blender::ui::v2dScrollerMove Struct Reference

Public Attributes

View2D * v2d
ARegion * region
char scroller
short zone
float fac
float fac_round
float delta
float scrollbarwidth
int scrollbar_orig
int lastx
int lasty

Detailed Description

Scrollers should behave in the following ways, when clicked on with LMB (and dragged):

  1. "Handles" on end of "bubble" - when the axis that the scroller represents is zoomable, enlarge cur rect on the relevant side.
  2. "Bubble"/"bar" - just drag, and bar should move with mouse (view pans opposite).

In order to make sure this works, each operator must define the following RNA-Operator Props:

  • deltax, deltay - define how much to move view by (relative to zoom-correction factor)

Definition at line 1804 of file view2d_ops.cc.

Member Data Documentation

◆ delta

float blender::ui::v2dScrollerMove::delta

amount moved by mouse on axis of interest

Definition at line 1822 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_apply(), blender::ui::scroller_activate_invoke(), and blender::ui::scroller_activate_modal().

◆ fac

float blender::ui::v2dScrollerMove::fac

view adjustment factor, based on size of region

Definition at line 1818 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_apply(), blender::ui::scroller_activate_init(), and blender::ui::scroller_activate_modal().

◆ fac_round

float blender::ui::v2dScrollerMove::fac_round

for pixel rounding (avoid visible UI jitter)

Definition at line 1820 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_apply(), and blender::ui::scroller_activate_init().

◆ lastx

int blender::ui::v2dScrollerMove::lastx

previous mouse coordinates (in screen coordinates) for determining movement

Definition at line 1830 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_init(), and blender::ui::scroller_activate_modal().

◆ lasty

int blender::ui::v2dScrollerMove::lasty

◆ region

ARegion* blender::ui::v2dScrollerMove::region

region that the scroller is in

Definition at line 1808 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_apply(), and blender::ui::scroller_activate_init().

◆ scrollbar_orig

int blender::ui::v2dScrollerMove::scrollbar_orig

initial location of scrollbar x/y, mouse relative

Definition at line 1827 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_init(), and blender::ui::scroller_activate_invoke().

◆ scrollbarwidth

float blender::ui::v2dScrollerMove::scrollbarwidth

width of the scrollbar itself, used for page up/down clicks

Definition at line 1825 of file view2d_ops.cc.

Referenced by blender::ui::scroller_activate_init(), and blender::ui::scroller_activate_modal().

◆ scroller

char blender::ui::v2dScrollerMove::scroller

◆ v2d

View2D* blender::ui::v2dScrollerMove::v2d

◆ zone

short blender::ui::v2dScrollerMove::zone

The documentation for this struct was generated from the following file: