Blender V4.3
view2d_edge_pan.cc File Reference
#include "BKE_context.hh"
#include "BLI_rect.h"
#include "BLI_time.h"
#include "ED_screen.hh"
#include "MEM_guardedalloc.h"
#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()

static 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 109 of file view2d_edge_pan.cc.

References View2DEdgePanData::edge_pan_start_time_x, and View2DEdgePanData::edge_pan_start_time_y.

Referenced by UI_view2d_edge_pan_apply().

◆ edge_pan_speed()

◆ smootherstep()

static 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 134 of file view2d_edge_pan.cc.

References clamp_f().

Referenced by edge_pan_speed().

◆ 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 )

Apply transform to view using mouse events.

Definition at line 273 of file view2d_edge_pan.cc.

References MOUSEMOVE, wmEvent::type, UI_view2d_edge_pan_apply(), and wmEvent::xy.

Referenced by blender::ed::space_node::node_link_modal(), and view_edge_pan_modal().

◆ 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 )

Initialize panning data with operator settings.

Definition at line 382 of file view2d_edge_pan.cc.

References wmOperator::ptr, RNA_float_get(), and UI_view2d_edge_pan_init().

Referenced by blender::ed::space_node::node_link_invoke(), and view_edge_pan_invoke().

◆ UI_view2d_edge_pan_operator_properties()

void UI_view2d_edge_pan_operator_properties ( wmOperatorType * ot)

Definition at line 304 of file view2d_edge_pan.cc.

References ot, and UI_view2d_edge_pan_operator_properties_ex().

Referenced by VIEW2D_OT_edge_pan().

◆ 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 )

Set area which can be panned

Definition at line 91 of file view2d_edge_pan.cc.

References BLI_rctf_init(), and View2DEdgePanData::limit.

Referenced by createTransSeqData().

◆ view2d_edge_pan_poll()

bool view2d_edge_pan_poll ( bContext * C)