|
Blender V5.0
|
#include "BKE_context.hh"#include "BLI_math_base.h"#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.
|
static |
Definition at line 179 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 108 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().
Used to calculate a "fade in" factor for edge panning to make the interaction feel smooth and more purposeful.
Definition at line 133 of file view2d_edge_pan.cc.
Referenced by view2d_edge_pan_speed().
| void UI_view2d_edge_pan_apply | ( | bContext * | C, |
| View2DEdgePanData * | vpd, | ||
| const int | xy[2] ) |
Definition at line 214 of file view2d_edge_pan.cc.
References BLI_rcti_isect_pt_v(), BLI_rcti_pad(), BLI_time_now_seconds(), C, View2D::cur, edge_pan_apply_delta(), View2DEdgePanData::edge_pan_last_time, edge_pan_manage_delay_timers(), View2DEdgePanData::enabled, float, View2DEdgePanData::inside_pad, View2DEdgePanData::limit, View2DEdgePanData::outside_pad, View2DEdgePanData::region, U, View2DEdgePanData::v2d, view2d_edge_pan_speed(), ARegion::winrct, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, xy, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by 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 272 of file view2d_edge_pan.cc.
References C, 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().
| void UI_view2d_edge_pan_cancel | ( | bContext * | C, |
| View2DEdgePanData * | vpd ) |
Definition at line 282 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 blender::ed::transform::flushTransNodes(), blender::ed::space_node::node_link_cancel(), blender::ed::spreadsheet::reorder_columns_modal(), and blender::ed::transform::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 51 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, FLT_MAX, View2DEdgePanData::inside_pad, View2DEdgePanData::limit, View2DEdgePanData::max_speed, View2DEdgePanData::outside_pad, View2DEdgePanData::region, View2DEdgePanData::screen, View2DEdgePanData::speed_ramp, UI_view2d_edge_pan_reset(), ARegion::v2d, View2DEdgePanData::v2d, view2d_edge_pan_poll(), ARegion::winrct, and View2DEdgePanData::zoom_influence.
Referenced by blender::ed::transform::createTransNodeData(), blender::ed::transform::createTransSeqData(), blender::ed::spreadsheet::reorder_columns_invoke(), and 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 381 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 303 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 | ( | wmOperatorType * | ot, |
| float | inside_pad, | ||
| float | outside_pad, | ||
| float | speed_ramp, | ||
| float | max_speed, | ||
| float | delay, | ||
| float | zoom_influence ) |
Definition at line 315 of file view2d_edge_pan.cc.
References ot, and RNA_def_float().
Referenced by blender::ed::space_node::NODE_OT_link(), and UI_view2d_edge_pan_operator_properties().
| void UI_view2d_edge_pan_reset | ( | View2DEdgePanData * | vpd | ) |
Definition at line 96 of file view2d_edge_pan.cc.
References BLI_time_now_seconds(), View2D::cur, View2DEdgePanData::edge_pan_last_time, View2DEdgePanData::edge_pan_start_time_x, View2DEdgePanData::edge_pan_start_time_y, View2DEdgePanData::initial_rect, View2DEdgePanData::region, and ARegion::v2d.
Referenced by UI_view2d_edge_pan_init().
| 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 90 of file view2d_edge_pan.cc.
References BLI_rctf_init(), and View2DEdgePanData::limit.
Referenced by blender::ed::transform::createTransSeqData().
| bool view2d_edge_pan_poll | ( | bContext * | C | ) |
Definition at line 31 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().
|
static |
Definition at line 139 of file view2d_edge_pan.cc.
References BLI_assert_msg, BLI_rctf_size_x(), BLI_rcti_size_x(), CLAMP, View2D::cur, View2DEdgePanData::delay, 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, U, UI_SCALE_FAC, ARegion::v2d, ARegion::winrct, rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and View2DEdgePanData::zoom_influence.
Referenced by UI_view2d_edge_pan_apply().