Blender
V3.3
|
#include "BKE_context.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "ED_screen.h"
#include "MEM_guardedalloc.h"
#include "PIL_time.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "UI_view2d.h"
#include "WM_api.h"
#include "WM_types.h"
Go to the source code of this file.
|
static |
Definition at line 180 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, C, CTX_wm_window(), View2D::cur, ED_region_tag_redraw_no_rebuild(), View2DEdgePanData::facx, View2DEdgePanData::facy, View2D::keepofs, View2DEdgePanData::region, View2DEdgePanData::screen, UI_view2d_curRect_changed(), UI_view2d_sync(), View2DEdgePanData::v2d, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, WM_event_add_mousemove(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by UI_view2d_edge_pan_apply().
|
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().
|
static |
Definition at line 140 of file view2d_edge_pan.cc.
References BLI_assert_msg, BLI_rctf_size_x(), BLI_rcti_size_x(), CLAMP, CLAMPIS, View2D::cur, View2DEdgePanData::delay, blender::math::distance(), View2DEdgePanData::edge_pan_start_time_x, View2DEdgePanData::edge_pan_start_time_y, float(), View2DEdgePanData::inside_pad, max, View2DEdgePanData::max_speed, min, pad, View2DEdgePanData::region, smootherstep(), View2DEdgePanData::speed_ramp, ARegion::v2d, ARegion::winrct, rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and View2DEdgePanData::zoom_influence.
Referenced by UI_view2d_edge_pan_apply().
Used to calculate a "fade in" factor for edge panning to make the interaction feel smooth and more purposeful.
Definition at line 134 of file view2d_edge_pan.cc.
Referenced by edge_pan_speed().
void UI_view2d_edge_pan_apply | ( | bContext * | C, |
View2DEdgePanData * | vpd, | ||
const int | xy[2] | ||
) |
Definition at line 215 of file view2d_edge_pan.cc.
References BLI_rcti_isect_pt_v(), BLI_rcti_pad(), C, View2D::cur, edge_pan_apply_delta(), View2DEdgePanData::edge_pan_last_time, edge_pan_manage_delay_timers(), edge_pan_speed(), View2DEdgePanData::enabled, float(), View2DEdgePanData::inside_pad, View2DEdgePanData::limit, View2DEdgePanData::outside_pad, PIL_check_seconds_timer(), View2DEdgePanData::region, View2DEdgePanData::v2d, ARegion::winrct, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, xy, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by UI_view2d_edge_pan_apply_event().
void UI_view2d_edge_pan_apply_event | ( | bContext * | C, |
View2DEdgePanData * | vpd, | ||
const wmEvent * | event | ||
) |
Definition at line 273 of file view2d_edge_pan.cc.
References C, MOUSEMOVE, wmEvent::type, UI_view2d_edge_pan_apply(), and wmEvent::xy.
void UI_view2d_edge_pan_cancel | ( | bContext * | C, |
View2DEdgePanData * | vpd | ||
) |
Definition at line 283 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, C, CTX_wm_window(), View2D::cur, ED_region_tag_redraw_no_rebuild(), View2DEdgePanData::initial_rect, View2DEdgePanData::region, View2DEdgePanData::screen, UI_view2d_curRect_changed(), UI_view2d_sync(), View2DEdgePanData::v2d, V2D_LOCK_COPY, and WM_event_add_mousemove().
Referenced by flushTransNodes(), blender::ed::space_node::node_link_cancel(), and view2d_edge_pan_loc_compensate().
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 | ||
) |
Definition at line 52 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, BLI_assert, BLI_rctf_init(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), C, CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, View2DEdgePanData::delay, View2DEdgePanData::enabled, View2DEdgePanData::facx, View2DEdgePanData::facy, float(), View2DEdgePanData::inside_pad, View2DEdgePanData::limit, View2DEdgePanData::max_speed, View2DEdgePanData::outside_pad, View2DEdgePanData::region, View2DEdgePanData::screen, View2DEdgePanData::speed_ramp, UI_view2d_edge_pan_poll(), UI_view2d_edge_pan_reset(), View2DEdgePanData::v2d, ARegion::v2d, ARegion::winrct, and View2DEdgePanData::zoom_influence.
Referenced by createTransNodeData(), createTransSeqData(), and UI_view2d_edge_pan_operator_init().
void UI_view2d_edge_pan_operator_init | ( | struct bContext * | C, |
struct View2DEdgePanData * | vpd, | ||
struct wmOperator * | op | ||
) |
Initialize panning data with operator settings.
Definition at line 382 of file view2d_edge_pan.cc.
References C, 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().
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().
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 | ||
) |
Definition at line 316 of file view2d_edge_pan.cc.
References ot, RNA_def_float(), and wmOperatorType::srna.
Referenced by blender::ed::space_node::NODE_OT_link(), and UI_view2d_edge_pan_operator_properties().
Definition at line 32 of file view2d_edge_pan.cc.
References C, CTX_wm_region(), View2D::keepofs, ARegion::v2d, V2D_LOCKOFS_X, and V2D_LOCKOFS_Y.
Referenced by UI_view2d_edge_pan_init(), and VIEW2D_OT_edge_pan().
void UI_view2d_edge_pan_reset | ( | View2DEdgePanData * | vpd | ) |
Definition at line 97 of file view2d_edge_pan.cc.
References View2D::cur, View2DEdgePanData::edge_pan_last_time, View2DEdgePanData::edge_pan_start_time_x, View2DEdgePanData::edge_pan_start_time_y, View2DEdgePanData::initial_rect, PIL_check_seconds_timer(), View2DEdgePanData::region, and ARegion::v2d.
Referenced by UI_view2d_edge_pan_init().
void UI_view2d_edge_pan_set_limits | ( | struct 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().