Blender V4.5
view2d_edge_pan.cc File Reference
#include "BKE_context.hh"
#include "BLI_rect.h"
#include "BLI_time.h"
#include "ED_screen.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "UI_view2d.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "view2d_intern.hh"

Go to the source code of this file.

Functions

Edge Pan Operator Utilities
bool view2d_edge_pan_poll (bContext *C)
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)
void UI_view2d_edge_pan_set_limits (View2DEdgePanData *vpd, float xmin, float xmax, float ymin, float ymax)
void UI_view2d_edge_pan_reset (View2DEdgePanData *vpd)
static void edge_pan_manage_delay_timers (View2DEdgePanData *vpd, int pan_dir_x, int pan_dir_y, const double current_time)
static float smootherstep (const float domain_max, float x)
static float edge_pan_speed (View2DEdgePanData *vpd, int event_loc, bool x_dir, const double current_time)
static void edge_pan_apply_delta (bContext *C, View2DEdgePanData *vpd, float dx, float dy)
void UI_view2d_edge_pan_apply (bContext *C, View2DEdgePanData *vpd, const int xy[2])
void UI_view2d_edge_pan_apply_event (bContext *C, View2DEdgePanData *vpd, const wmEvent *event)
void UI_view2d_edge_pan_cancel (bContext *C, View2DEdgePanData *vpd)
void UI_view2d_edge_pan_operator_properties (wmOperatorType *ot)
void UI_view2d_edge_pan_operator_properties_ex (wmOperatorType *ot, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
void UI_view2d_edge_pan_operator_init (bContext *C, View2DEdgePanData *vpd, wmOperator *op)

Function Documentation

◆ edge_pan_apply_delta()

◆ edge_pan_manage_delay_timers()

void edge_pan_manage_delay_timers ( View2DEdgePanData * vpd,
int pan_dir_x,
int pan_dir_y,
const double current_time )
static

Reset the edge pan timers if the mouse isn't in the scroll zone and start the timers when the mouse enters a scroll zone.

Definition at line 107 of file view2d_edge_pan.cc.

References edge_pan_manage_delay_timers(), View2DEdgePanData::edge_pan_start_time_x, and View2DEdgePanData::edge_pan_start_time_y.

Referenced by edge_pan_manage_delay_timers(), and UI_view2d_edge_pan_apply().

◆ edge_pan_speed()

◆ smootherstep()

float smootherstep ( const float domain_max,
float x )
static

Used to calculate a "fade in" factor for edge panning to make the interaction feel smooth and more purposeful.

Note
Assumes a domain_min of 0.0f.

Definition at line 132 of file view2d_edge_pan.cc.

References clamp_f(), smootherstep(), and x.

◆ UI_view2d_edge_pan_apply()

◆ UI_view2d_edge_pan_apply_event()

void UI_view2d_edge_pan_apply_event ( bContext * C,
View2DEdgePanData * vpd,
const wmEvent * event )

◆ UI_view2d_edge_pan_cancel()

◆ UI_view2d_edge_pan_init()

◆ UI_view2d_edge_pan_operator_init()

void UI_view2d_edge_pan_operator_init ( bContext * C,
View2DEdgePanData * vpd,
wmOperator * op )

◆ UI_view2d_edge_pan_operator_properties()

◆ UI_view2d_edge_pan_operator_properties_ex()

void UI_view2d_edge_pan_operator_properties_ex ( wmOperatorType * ot,
float inside_pad,
float outside_pad,
float speed_ramp,
float max_speed,
float delay,
float zoom_influence )

◆ UI_view2d_edge_pan_reset()

◆ UI_view2d_edge_pan_set_limits()

void UI_view2d_edge_pan_set_limits ( View2DEdgePanData * vpd,
float xmin,
float xmax,
float ymin,
float ymax )

◆ view2d_edge_pan_poll()