Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/UI_view2d.h
| Show First 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | typedef struct View2DEdgePanData { | ||||
| /** Screen where view pan was initiated. */ | /** Screen where view pan was initiated. */ | ||||
| struct bScreen *screen; | struct bScreen *screen; | ||||
| /** Area where view pan was initiated. */ | /** Area where view pan was initiated. */ | ||||
| struct ScrArea *area; | struct ScrArea *area; | ||||
| /** Region where view pan was initiated. */ | /** Region where view pan was initiated. */ | ||||
| struct ARegion *region; | struct ARegion *region; | ||||
| /** View2d we're operating in. */ | /** View2d we're operating in. */ | ||||
| struct View2D *v2d; | struct View2D *v2d; | ||||
| /* Limit maximum pannable area */ | |||||
| struct rctf limit; | |||||
| /** Panning should only start once being in the inside rect once (e.g. adding nodes can happen | /** Panning should only start once being in the inside rect once (e.g. adding nodes can happen | ||||
| * outside). */ | * outside). */ | ||||
| bool enabled; | bool enabled; | ||||
| /** Inside distance in UI units from the edge of the region within which to start panning. */ | /** Inside distance in UI units from the edge of the region within which to start panning. */ | ||||
| float inside_pad; | float inside_pad; | ||||
| /** Outside distance in UI units from the edge of the region at which to stop panning. */ | /** Outside distance in UI units from the edge of the region at which to stop panning. */ | ||||
| float outside_pad; | float outside_pad; | ||||
| Show All 29 Lines | void UI_view2d_edge_pan_init(struct bContext *C, | ||||
| struct View2DEdgePanData *vpd, | struct View2DEdgePanData *vpd, | ||||
| float inside_pad, | float inside_pad, | ||||
| float outside_pad, | float outside_pad, | ||||
| float speed_ramp, | float speed_ramp, | ||||
| float max_speed, | float max_speed, | ||||
| float delay, | float delay, | ||||
| float zoom_influence); | float zoom_influence); | ||||
| /** | |||||
| * Set area which can be panned | |||||
| */ | |||||
| void UI_view2d_edge_pan_set_limits( | |||||
| struct View2DEdgePanData *vpd, float xmin, float xmax, float ymin, float ymax); | |||||
| void UI_view2d_edge_pan_reset(struct View2DEdgePanData *vpd); | void UI_view2d_edge_pan_reset(struct View2DEdgePanData *vpd); | ||||
| /** | /** | ||||
| * Apply transform to view (i.e. adjust 'cur' rect). | * Apply transform to view (i.e. adjust 'cur' rect). | ||||
| */ | */ | ||||
| void UI_view2d_edge_pan_apply(struct bContext *C, struct View2DEdgePanData *vpd, const int xy[2]) | void UI_view2d_edge_pan_apply(struct bContext *C, struct View2DEdgePanData *vpd, const int xy[2]) | ||||
| ATTR_NONNULL(1, 2, 3); | ATTR_NONNULL(1, 2, 3); | ||||
| Show All 29 Lines | |||||