Blender V4.3
v2dScrollerMove Struct Reference

Public Attributes

View2Dv2d
 
ARegionregion
 
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 1780 of file view2d_ops.cc.

Member Data Documentation

◆ delta

float v2dScrollerMove::delta

amount moved by mouse on axis of interest

Definition at line 1798 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), scroller_activate_invoke(), and scroller_activate_modal().

◆ fac

float v2dScrollerMove::fac

view adjustment factor, based on size of region

Definition at line 1794 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), scroller_activate_init(), and scroller_activate_modal().

◆ fac_round

float v2dScrollerMove::fac_round

for pixel rounding (avoid visible UI jitter)

Definition at line 1796 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), and scroller_activate_init().

◆ lastx

int v2dScrollerMove::lastx

previous mouse coordinates (in screen coordinates) for determining movement

Definition at line 1806 of file view2d_ops.cc.

Referenced by scroller_activate_init(), and scroller_activate_modal().

◆ lasty

int v2dScrollerMove::lasty

Definition at line 1806 of file view2d_ops.cc.

Referenced by scroller_activate_init(), and scroller_activate_modal().

◆ region

ARegion* v2dScrollerMove::region

region that the scroller is in

Definition at line 1784 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), and scroller_activate_init().

◆ scrollbar_orig

int v2dScrollerMove::scrollbar_orig

initial location of scrollbar x/y, mouse relative

Definition at line 1803 of file view2d_ops.cc.

Referenced by scroller_activate_init(), and scroller_activate_invoke().

◆ scrollbarwidth

float v2dScrollerMove::scrollbarwidth

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

Definition at line 1801 of file view2d_ops.cc.

Referenced by scroller_activate_init(), and scroller_activate_modal().

◆ scroller

char v2dScrollerMove::scroller

scroller that mouse is in ('h' or 'v')

Definition at line 1787 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), scroller_activate_init(), scroller_activate_invoke(), and scroller_activate_modal().

◆ v2d

View2D* v2dScrollerMove::v2d

View2D data that this operation affects

Definition at line 1782 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), scroller_activate_exit(), scroller_activate_init(), and scroller_activate_modal().

◆ zone

short v2dScrollerMove::zone

-1 is min zoomer, 0 is bar, 1 is max zoomer

Definition at line 1791 of file view2d_ops.cc.

Referenced by scroller_activate_apply(), scroller_activate_init(), scroller_activate_invoke(), and scroller_activate_modal().


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