37 if (region ==
nullptr) {
112 const double current_time)
114 if (pan_dir_x == 0) {
120 if (pan_dir_y == 0) {
137 return x *
x *
x * (
x * (
x * 6.0 - 15.0) + 10.0);
143 const double current_time)
152 if (event_loc >
max) {
155 else if (event_loc <
min) {
163 CLAMP(distance_factor, 0.0f, 1.0f);
167 const float delay_factor = vpd->
delay > 0.01f ?
176 return distance_factor * delay_factor * zoom_factor * vpd->
max_speed *
U.widget_unit *
201 if (dx != 0.0f || dy != 0.0f) {
219 rcti inside_rect, outside_rect;
220 inside_rect = region->
winrct;
221 outside_rect = region->
winrct;
258 float dx = 0.0f, dy = 0.0f;
259 if (pan_dir_x != 0) {
261 dx = dtime * speed * (
float)pan_dir_x;
263 if (pan_dir_y != 0) {
265 dy = dtime * speed * (
float)pan_dir_y;
322 float zoom_influence)
331 "Inside distance in UI units from the edge of the region within which to start panning",
341 "Outside distance in UI units from the edge of the region at which to stop panning",
350 "Width of the zone in UI units where speed increases with distance from the edge",
359 "Maximum speed in UI units per second",
368 "Delay in seconds before maximum speed is reached",
377 "Influence of the zoom factor on scroll speed",
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
#define BLI_assert_msg(a, msg)
MINLINE float clamp_f(float value, float min, float max)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void BLI_rcti_pad(struct rcti *rect, int pad_x, int pad_y)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
void ED_region_tag_redraw_no_rebuild(struct ARegion *region)
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Platform independent time functions.
void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag)
void UI_view2d_curRect_changed(const struct bContext *C, struct View2D *v2d)
int pad[32 - sizeof(int)]
T distance(const T &a, const T &b)
float RNA_float_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
double edge_pan_last_time
double edge_pan_start_time_x
double edge_pan_start_time_y
double PIL_check_seconds_timer(void)
static void edge_pan_apply_delta(bContext *C, View2DEdgePanData *vpd, float dx, float dy)
static void edge_pan_manage_delay_timers(View2DEdgePanData *vpd, int pan_dir_x, int pan_dir_y, const double current_time)
void UI_view2d_edge_pan_operator_init(bContext *C, View2DEdgePanData *vpd, wmOperator *op)
void UI_view2d_edge_pan_set_limits(View2DEdgePanData *vpd, float xmin, float xmax, float ymin, float ymax)
void UI_view2d_edge_pan_cancel(bContext *C, View2DEdgePanData *vpd)
void UI_view2d_edge_pan_init(bContext *C, View2DEdgePanData *vpd, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
static float edge_pan_speed(View2DEdgePanData *vpd, int event_loc, bool x_dir, const double current_time)
void UI_view2d_edge_pan_apply(bContext *C, View2DEdgePanData *vpd, const int xy[2])
void UI_view2d_edge_pan_operator_properties(wmOperatorType *ot)
static float smootherstep(const float domain_max, float x)
void UI_view2d_edge_pan_reset(View2DEdgePanData *vpd)
bool UI_view2d_edge_pan_poll(bContext *C)
void UI_view2d_edge_pan_operator_properties_ex(struct wmOperatorType *ot, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
void UI_view2d_edge_pan_apply_event(bContext *C, View2DEdgePanData *vpd, const wmEvent *event)
void WM_event_add_mousemove(wmWindow *win)