|
Blender V5.0
|
#include <cmath>#include "MEM_guardedalloc.h"#include "DNA_userdef_types.h"#include "DNA_windowmanager_types.h"#include "BLI_math_base.h"#include "BLI_math_vector.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_screen.hh"#include "UI_interface.hh"#include "UI_view2d.hh"#include "view2d_intern.hh"Go to the source code of this file.
Classes | |
| struct | v2dViewPanData |
| struct | v2dViewZoomData |
| struct | SmoothView2DStore |
| struct | v2dScrollerMove |
Scroll Bar Move Operator | |
| enum | { SCROLLHANDLE_MIN = -1 , SCROLLHANDLE_BAR , SCROLLHANDLE_MAX , SCROLLHANDLE_MIN_OUTSIDE , SCROLLHANDLE_MAX_OUTSIDE } |
| static short | scrollbar_zone_get (int mouse, int sh_min, int sh_max) |
| static bool | scroller_activate_poll (bContext *C) |
| static void | scroller_activate_init (bContext *C, wmOperator *op, const wmEvent *event, const char in_scroller) |
| static void | scroller_activate_exit (bContext *C, wmOperator *op) |
| static void | scroller_activate_cancel (bContext *C, wmOperator *op) |
| static void | scroller_activate_apply (bContext *C, wmOperator *op) |
| static wmOperatorStatus | scroller_activate_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static wmOperatorStatus | scroller_activate_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | VIEW2D_OT_scroller_activate (wmOperatorType *ot) |
| anonymous enum |
| Enumerator | |
|---|---|
| SCROLLHANDLE_MIN | |
| SCROLLHANDLE_BAR | |
| SCROLLHANDLE_MAX | |
| SCROLLHANDLE_MIN_OUTSIDE | |
| SCROLLHANDLE_MAX_OUTSIDE | |
Definition at line 1823 of file view2d_ops.cc.
| void ED_keymap_view2d | ( | wmKeyConfig * | keyconf | ) |
Definition at line 2359 of file view2d_ops.cc.
References RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().
Referenced by ED_spacetypes_keymap().
| void ED_operatortypes_view2d | ( | ) |
Definition at line 2332 of file view2d_ops.cc.
References VIEW2D_OT_edge_pan(), VIEW2D_OT_pan(), VIEW2D_OT_reset(), VIEW2D_OT_scroll_down(), VIEW2D_OT_scroll_left(), VIEW2D_OT_scroll_right(), VIEW2D_OT_scroll_up(), VIEW2D_OT_scroller_activate(), VIEW2D_OT_smoothview(), VIEW2D_OT_zoom(), VIEW2D_OT_zoom_border(), VIEW2D_OT_zoom_in(), VIEW2D_OT_zoom_out(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
|
static |
Definition at line 2257 of file view2d_ops.cc.
References View2D::align, BLI_rcti_size_x(), BLI_rcti_size_y(), C, ARegion::category_scroll, CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, ED_area_tag_redraw(), ED_region_snap_size_apply(), ED_region_snap_size_test(), ED_region_tag_redraw(), float, View2D::mask, NA_EDITED, NC_SCREEN, OPERATOR_FINISHED, uiStyle::panelzoom, UI_style_get(), UI_view2d_curRect_changed(), UI_view2d_sync(), UI_view2d_zoom_cache_reset(), ARegion::v2d, V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_NEG_Y, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, V2D_LOCK_COPY, WM_event_add_notifier(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by UV_OT_reset(), and VIEW2D_OT_reset().
|
static |
Get the part of the scrollbar that the mouse is in.
| mouse | Relevant mouse coordinate in region space. |
| sh_min,sh_max | Extents of the "scroller handle" part of the scrollbar in region space. |
Definition at line 1837 of file view2d_ops.cc.
References SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN, SCROLLHANDLE_MIN_OUTSIDE, and V2D_SCROLL_HANDLE_SIZE_HOTSPOT.
Referenced by scroller_activate_init().
|
static |
Definition at line 1995 of file view2d_ops.cc.
References C, CTX_wm_area(), CTX_wm_screen(), View2D::cur, wmOperator::customdata, v2dScrollerMove::delta, ED_region_tag_redraw_no_rebuild(), v2dScrollerMove::fac, v2dScrollerMove::fac_round, View2D::keepofs, View2D::keepzoom, v2dScrollerMove::region, roundf, v2dScrollerMove::scroller, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN, SCROLLHANDLE_MIN_OUTSIDE, UI_view2d_curRect_changed(), UI_view2d_sync(), v2dScrollerMove::v2d, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, rctf::xmax, rctf::xmin, rctf::ymax, rctf::ymin, and v2dScrollerMove::zone.
Referenced by scroller_activate_invoke(), and scroller_activate_modal().
|
static |
Definition at line 1989 of file view2d_ops.cc.
References C, and scroller_activate_exit().
Referenced by VIEW2D_OT_scroller_activate().
|
static |
Definition at line 1974 of file view2d_ops.cc.
References C, CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw_no_rebuild(), View2D::flag, MEM_freeN(), View2D::scroll_ui, v2dScrollerMove::v2d, V2D_IS_NAVIGATING, V2D_SCROLL_H_ACTIVE, and V2D_SCROLL_V_ACTIVE.
Referenced by scroller_activate_cancel(), scroller_activate_invoke(), and scroller_activate_modal().
|
static |
Definition at line 1887 of file view2d_ops.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rctf_union(), BLI_rcti_size_x(), BLI_rcti_size_y(), BLI_rcti_union(), C, CTX_wm_region(), View2D::cur, wmOperator::customdata, ED_region_tag_redraw_no_rebuild(), ELEM, v2dScrollerMove::fac, v2dScrollerMove::fac_round, View2D::flag, float, View2D::hor, View2DScrollers::hor_max, View2DScrollers::hor_min, View2D::keepzoom, v2dScrollerMove::lastx, v2dScrollerMove::lasty, MEM_callocN(), wmEvent::mval, v2dScrollerMove::region, v2dScrollerMove::scrollbar_orig, scrollbar_zone_get(), v2dScrollerMove::scrollbarwidth, v2dScrollerMove::scroller, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MIN, View2D::tot, ARegion::v2d, v2dScrollerMove::v2d, V2D_IS_NAVIGATING, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, View2D::vert, View2DScrollers::vert_max, View2DScrollers::vert_min, view2d_scrollers_calc(), ARegion::winrct, rcti::xmin, rcti::ymin, and v2dScrollerMove::zone.
Referenced by scroller_activate_invoke().
|
static |
Definition at line 2146 of file view2d_ops.cc.
References C, CTX_wm_region(), wmOperator::customdata, v2dScrollerMove::delta, ELEM, float, View2D::keepofs, MIDDLEMOUSE, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, View2D::scroll, View2D::scroll_ui, v2dScrollerMove::scrollbar_orig, v2dScrollerMove::scroller, scroller_activate_apply(), scroller_activate_exit(), scroller_activate_init(), SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MIN, wmEvent::type, UI_view2d_mouse_in_scrollers(), ARegion::v2d, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_SCROLL_H_ACTIVE, V2D_SCROLL_HORIZONTAL_FULLR, V2D_SCROLL_HORIZONTAL_HANDLES, V2D_SCROLL_V_ACTIVE, V2D_SCROLL_VERTICAL_FULLR, V2D_SCROLL_VERTICAL_HANDLES, WM_event_add_modal_handler(), wmEvent::xy, and v2dScrollerMove::zone.
Referenced by VIEW2D_OT_scroller_activate().
|
static |
Handle user input for scrollers - calculations of mouse-movement need to be done here, not in the apply callback!
Definition at line 2057 of file view2d_ops.cc.
References C, wmOperator::customdata, v2dScrollerMove::delta, ELEM, v2dScrollerMove::fac, View2D::flag, float, IS_EQF, KM_RELEASE, v2dScrollerMove::lastx, v2dScrollerMove::lasty, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, v2dScrollerMove::scrollbarwidth, v2dScrollerMove::scroller, scroller_activate_apply(), scroller_activate_exit(), SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN, SCROLLHANDLE_MIN_OUTSIDE, wmEvent::type, v2dScrollerMove::v2d, V2D_SNAP_TO_PAGESIZE_Y, wmEvent::val, view2d_scroll_delta_y_snap_page_size(), wmEvent::xy, and v2dScrollerMove::zone.
Referenced by VIEW2D_OT_scroller_activate().
|
static |
Definition at line 1871 of file view2d_ops.cc.
References C, CTX_wm_region(), CTX_wm_window(), wmWindow::eventstate, UI_view2d_mouse_in_scrollers(), ARegion::v2d, view2d_poll(), and wmEvent::xy.
Referenced by VIEW2D_OT_scroller_activate().
function to get a factor out of a rectangle
NOTE: this doesn't always work as well as it might because the target size may not be reached because of clamping the desired rect, we could attempt to clamp the rect before working out the zoom factor but its not really worthwhile for the few cases this happens.
Definition at line 1611 of file view2d_ops.cc.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), fabsf, i, max_ff(), and min_ff().
Referenced by UI_view2d_smooth_view().
| void UI_view2d_smooth_view | ( | const bContext * | C, |
| ARegion * | region, | ||
| const rctf * | cur, | ||
| int | smooth_viewtx ) |
Will start timer if appropriate. the arguments are the desired situation.
Definition at line 1638 of file view2d_ops.cc.
References BLI_rctf_compare(), C, CTX_wm_area(), CTX_wm_manager(), CTX_wm_screen(), CTX_wm_window(), View2D::cur, ED_region_tag_redraw_no_rebuild(), SmoothView2DStore::new_cur, SmoothView2DStore::orig_cur, View2D::smooth_timer, smooth_view_rect_to_fac(), View2D::sms, SmoothView2DStore::time_allowed, TIMER1, UI_view2d_curRect_changed(), UI_view2d_sync(), ARegion::v2d, V2D_LOCK_COPY, WM_event_timer_add(), and WM_event_timer_remove().
Referenced by ANIM_center_frame(), graphkeys_channel_view_pick_invoke(), graphkeys_view_selected_channels_exec(), graphkeys_viewall(), blender::ed::vse::sequencer_view_all_exec(), blender::ed::vse::sequencer_view_selected_exec(), blender::ed::space_node::space_node_view_flag(), view_borderzoom_exec(), view_curve_in_graph_editor_exec(), and blender::ed::vse::view_frame_preview_scope().
|
static |
Definition at line 434 of file view2d_ops.cc.
References OPTYPE_INTERNAL, ot, UI_view2d_edge_pan_operator_properties(), view2d_edge_pan_poll(), view_edge_pan_cancel(), view_edge_pan_invoke(), and view_edge_pan_modal().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 358 of file view2d_ops.cc.
References OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, ot, RNA_def_int(), view_pan_cancel(), view_pan_exec(), view_pan_invoke(), view_pan_modal(), and view_pan_poll().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 2314 of file view2d_ops.cc.
References ot, reset_exec(), and view2d_poll().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 576 of file view2d_ops.cc.
References ot, RNA_def_boolean(), RNA_def_int(), view_pan_poll(), and view_scrolldown_exec().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 522 of file view2d_ops.cc.
References ot, RNA_def_int(), view_pan_poll(), and view_scrollleft_exec().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 482 of file view2d_ops.cc.
References ot, RNA_def_int(), view_pan_poll(), and view_scrollright_exec().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 631 of file view2d_ops.cc.
References ot, RNA_def_boolean(), RNA_def_int(), view_pan_poll(), and view_scrollup_exec().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 2233 of file view2d_ops.cc.
References OPTYPE_BLOCKING, ot, scroller_activate_cancel(), scroller_activate_invoke(), scroller_activate_modal(), and scroller_activate_poll().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 1759 of file view2d_ops.cc.
References OPTYPE_INTERNAL, ot, view2d_poll(), view2d_smoothview_invoke(), and WM_operator_properties_gesture_box().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 1399 of file view2d_ops.cc.
References FLT_MAX, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, ot, PROP_HIDDEN, RNA_def_float(), RNA_def_property_flag(), view_zoom_poll(), view_zoomdrag_cancel(), view_zoomdrag_exec(), view_zoomdrag_invoke(), view_zoomdrag_modal(), and WM_operator_properties_use_cursor_init().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 1505 of file view2d_ops.cc.
References ot, view_borderzoom_exec(), view_zoom_poll(), WM_gesture_box_cancel(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_gesture_box_zoom().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 934 of file view2d_ops.cc.
References FLT_MAX, ot, PROP_HIDDEN, RNA_def_float(), RNA_def_property_flag(), view_zoom_poll(), view_zoomin_exec(), and view_zoomin_invoke().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 998 of file view2d_ops.cc.
References FLT_MAX, ot, PROP_HIDDEN, RNA_def_float(), RNA_def_property_flag(), view_zoom_poll(), view_zoomout_exec(), and view_zoomout_invoke().
Referenced by ED_operatortypes_view2d().
|
static |
Definition at line 40 of file view2d_ops.cc.
References C, CTX_wm_region(), View2D::flag, ARegion::v2d, and V2D_IS_INIT.
Referenced by scroller_activate_poll(), VIEW2D_OT_reset(), and VIEW2D_OT_smoothview().
Calculate a scrolling delta that is the closest to a multiple of the page size (as returned by view2d_page_size_y). So when scrolling for more than half a page size, a delta to the next page is returned. No scrolling change should be applied when this returns 0.
Definition at line 52 of file view2d_ops.cc.
References abs, and view2d_page_size_y().
Referenced by scroller_activate_modal(), and view_pan_modal().
|
static |
Definition at line 1706 of file view2d_ops.cc.
References BLI_rctf_interp(), C, CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_window(), View2D::cur, wmEvent::customdata, ED_region_tag_redraw_no_rebuild(), float, SmoothView2DStore::new_cur, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, SmoothView2DStore::orig_cur, View2D::smooth_timer, View2D::sms, step, SmoothView2DStore::time_allowed, wmTimer::time_duration, UI_view2d_curRect_changed(), UI_view2d_sync(), UI_view2d_zoom_cache_reset(), ARegion::v2d, V2D_LOCK_COPY, WM_event_add_mousemove(), and WM_event_timer_remove().
Referenced by VIEW2D_OT_smoothview().
|
static |
Definition at line 1442 of file view2d_ops.cc.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), C, CTX_wm_region(), View2D::cur, View2D::keepzoom, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), size(), UI_view2d_region_to_view_rctf(), UI_view2d_smooth_view(), ARegion::v2d, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, WM_operator_properties_border_to_rctf(), WM_operator_smooth_viewtx_get(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by VIEW2D_OT_zoom_border().
|
static |
Definition at line 426 of file view2d_ops.cc.
References wmOperator::customdata, View2D::flag, MEM_SAFE_FREE, v2dViewPanData::v2d, and V2D_IS_NAVIGATING.
Referenced by VIEW2D_OT_edge_pan().
|
static |
Definition at line 390 of file view2d_ops.cc.
References C, wmOperator::customdata, MEM_callocN(), OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, UI_view2d_edge_pan_operator_init(), and WM_event_add_modal_handler().
Referenced by VIEW2D_OT_edge_pan().
|
static |
Definition at line 403 of file view2d_ops.cc.
References C, CTX_wm_window(), wmOperator::customdata, EVT_ESCKEY, View2D::flag, KM_RELEASE, MEM_SAFE_FREE, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmEvent::type, UI_view2d_edge_pan_apply_event(), View2DEdgePanData::v2d, V2D_IS_NAVIGATING, wmEvent::val, WM_window_find_under_cursor(), and wmEvent::xy.
Referenced by VIEW2D_OT_edge_pan().
|
static |
Definition at line 200 of file view2d_ops.cc.
References C, wmOperator::customdata, wmOperator::ptr, RNA_int_get(), and view_pan_apply_ex().
Referenced by view_pan_exec(), view_pan_invoke(), view_pan_modal(), view_scrolldown_exec(), view_scrollleft_exec(), view_scrollright_exec(), and view_scrollup_exec().
|
static |
Definition at line 165 of file view2d_ops.cc.
References v2dViewPanData::area, C, ARegion::category_scroll, CTX_wm_window(), View2D::cur, v2dViewPanData::do_category_scroll, ED_region_tag_redraw_no_rebuild(), v2dViewPanData::facx, v2dViewPanData::facy, View2D::keepofs, v2dViewPanData::region, v2dViewPanData::screen, UI_view2d_curRect_changed(), UI_view2d_sync(), v2dViewPanData::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 view_pan_apply().
|
static |
Definition at line 353 of file view2d_ops.cc.
References view_pan_exit().
Referenced by CLIP_OT_view_pan(), and VIEW2D_OT_pan().
|
static |
Definition at line 223 of file view2d_ops.cc.
References C, OPERATOR_FINISHED, view_pan_apply(), view_pan_exit(), and view_pan_init().
Referenced by CLIP_OT_view_pan(), and VIEW2D_OT_pan().
|
static |
Definition at line 208 of file view2d_ops.cc.
References wmOperator::customdata, View2D::flag, MEM_freeN(), v2dViewPanData::v2d, and V2D_IS_NAVIGATING.
Referenced by view_pan_cancel(), view_pan_exec(), view_pan_invoke(), view_pan_modal(), view_scrolldown_exec(), view_scrollleft_exec(), view_scrollright_exec(), and view_scrollup_exec().
|
static |
Definition at line 138 of file view2d_ops.cc.
References v2dViewPanData::area, BLI_assert, 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, wmOperator::customdata, v2dViewPanData::do_category_scroll, v2dViewPanData::facx, v2dViewPanData::facy, View2D::flag, float, MEM_callocN(), v2dViewPanData::region, v2dViewPanData::screen, ARegion::v2d, v2dViewPanData::v2d, V2D_IS_NAVIGATING, view_pan_poll(), and ARegion::winrct.
Referenced by view_pan_exec(), view_pan_invoke(), view_scrolldown_exec(), view_scrollleft_exec(), view_scrollright_exec(), and view_scrollup_exec().
|
static |
Definition at line 232 of file view2d_ops.cc.
References C, CTX_wm_window(), wmOperator::customdata, v2dViewPanData::do_category_scroll, ED_region_panel_category_gutter_isect_xy(), v2dViewPanData::invoke_event, View2D::keepofs, v2dViewPanData::lastx, v2dViewPanData::lasty, MOUSEPAN, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, v2dViewPanData::own_cursor, wmEvent::prev_xy, wmOperator::ptr, v2dViewPanData::region, RNA_int_set(), v2dViewPanData::startx, v2dViewPanData::starty, wmEvent::type, v2dViewPanData::v2d, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, view_pan_apply(), view_pan_exit(), view_pan_init(), WM_CURSOR_EW_SCROLL, WM_cursor_modal_is_set_ok(), WM_cursor_modal_set(), WM_CURSOR_NS_SCROLL, WM_CURSOR_NSEW_SCROLL, WM_event_add_modal_handler(), and wmEvent::xy.
Referenced by CLIP_OT_view_pan(), and VIEW2D_OT_pan().
|
static |
Definition at line 282 of file view2d_ops.cc.
References C, CTX_wm_window(), wmOperator::customdata, ELEM, EVT_ESCKEY, View2D::flag, v2dViewPanData::invoke_event, blender::wm::InvokeDefault, KM_PRESS, KM_RELEASE, v2dViewPanData::lastx, v2dViewPanData::lasty, LEFTMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, v2dViewPanData::own_cursor, wmOperator::ptr, RNA_int_set(), v2dViewPanData::startx, v2dViewPanData::starty, wmEvent::type, v2dViewPanData::v2d, V2D_SNAP_TO_PAGESIZE_Y, wmEvent::val, view2d_scroll_delta_y_snap_page_size(), view_pan_apply(), view_pan_exit(), WM_cursor_modal_restore(), and WM_operator_name_call().
Referenced by CLIP_OT_view_pan(), and VIEW2D_OT_pan().
|
static |
Definition at line 117 of file view2d_ops.cc.
References C, CTX_wm_region(), View2D::keepofs, ARegion::v2d, V2D_LOCKOFS_X, and V2D_LOCKOFS_Y.
Referenced by VIEW2D_OT_pan(), VIEW2D_OT_scroll_down(), VIEW2D_OT_scroll_left(), VIEW2D_OT_scroll_right(), VIEW2D_OT_scroll_up(), and view_pan_init().
|
static |
Definition at line 539 of file view2d_ops.cc.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, v2dViewPanData::do_category_scroll, ED_region_panel_category_gutter_isect_xy(), wmWindow::eventstate, View2D::flag, View2D::keepofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, v2dViewPanData::region, RNA_int_set(), RNA_property_boolean_get(), RNA_property_is_set(), RNA_struct_find_property(), UI_SCALE_FAC, ARegion::v2d, v2dViewPanData::v2d, V2D_LOCKOFS_Y, V2D_SNAP_TO_PAGESIZE_Y, view2d_page_size_y(), view_pan_apply(), view_pan_exit(), view_pan_init(), and wmEvent::xy.
Referenced by VIEW2D_OT_scroll_down().
|
static |
Definition at line 499 of file view2d_ops.cc.
References C, wmOperator::customdata, View2D::keepofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), UI_SCALE_FAC, v2dViewPanData::v2d, V2D_LOCKOFS_X, view_pan_apply(), view_pan_exit(), and view_pan_init().
Referenced by VIEW2D_OT_scroll_left().
|
static |
Definition at line 459 of file view2d_ops.cc.
References C, wmOperator::customdata, View2D::keepofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), UI_SCALE_FAC, v2dViewPanData::v2d, V2D_LOCKOFS_X, view_pan_apply(), view_pan_exit(), and view_pan_init().
Referenced by VIEW2D_OT_scroll_right().
|
static |
Definition at line 594 of file view2d_ops.cc.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, v2dViewPanData::do_category_scroll, ED_region_panel_category_gutter_isect_xy(), wmWindow::eventstate, View2D::flag, View2D::keepofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, v2dViewPanData::region, RNA_int_set(), RNA_property_boolean_get(), RNA_property_is_set(), RNA_struct_find_property(), UI_SCALE_FAC, ARegion::v2d, v2dViewPanData::v2d, V2D_LOCKOFS_Y, V2D_SNAP_TO_PAGESIZE_Y, view2d_page_size_y(), view_pan_apply(), view_pan_exit(), view_pan_init(), and wmEvent::xy.
Referenced by VIEW2D_OT_scroll_up().
|
static |
Clamp by convention rather than locking flags, for ndof and +/- keys
Definition at line 691 of file view2d_ops.cc.
References C, CTX_wm_area(), CTX_wm_region(), ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_SEQ, and ScrArea::spacetype.
Referenced by view_zoomin_exec(), and view_zoomout_exec().
|
static |
Definition at line 709 of file view2d_ops.cc.
References C, CTX_wm_region(), CTX_wm_region_view3d(), View2D::keepzoom, ARegion::v2d, V2D_LOCKZOOM_X, and V2D_LOCKZOOM_Y.
Referenced by VIEW2D_OT_zoom(), VIEW2D_OT_zoom_border(), VIEW2D_OT_zoom_in(), VIEW2D_OT_zoom_out(), and view_zoomdrag_init().
|
static |
MMB Drag - allows non-uniform scaling by dragging mouse
In order to make sure this works, each operator must define the following RNA-Operator Props:
Definition at line 1036 of file view2d_ops.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_time_now_seconds(), C, CTX_wm_area(), CTX_wm_screen(), View2D::cur, wmOperator::customdata, ED_area_tag_redraw(), ED_region_snap_size_apply(), ED_region_snap_size_test(), ED_region_tag_redraw_no_rebuild(), float, View2D::keepofs, View2D::keepzoom, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, NA_EDITED, NC_SCREEN, wmOperator::ptr, v2dViewZoomData::region, RNA_boolean_get(), RNA_float_get(), v2dViewZoomData::timer, v2dViewZoomData::timer_lastdraw, U, UI_SCALE_FAC, UI_view2d_curRect_changed(), UI_view2d_sync(), USER_ZOOM_CONTINUE, v2dViewZoomData::v2d, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, WM_event_add_notifier(), rctf::xmax, rctf::xmin, rctf::ymax, rctf::ymin, and v2dViewZoomData::zoom_to_mouse_pos.
Referenced by view_zoomdrag_exec(), view_zoomdrag_invoke(), and view_zoomdrag_modal().
|
static |
Definition at line 1133 of file view2d_ops.cc.
References C, and view_zoomdrag_exit().
Referenced by VIEW2D_OT_zoom().
|
static |
Definition at line 1139 of file view2d_ops.cc.
References C, OPERATOR_FINISHED, view_zoomdrag_apply(), view_zoomdrag_exit(), and view_zoomdrag_init().
Referenced by VIEW2D_OT_zoom().
|
static |
Definition at line 1116 of file view2d_ops.cc.
References C, CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, View2D::flag, MEM_freeN(), v2dViewZoomData::timer, UI_view2d_zoom_cache_reset(), v2dViewZoomData::v2d, V2D_IS_NAVIGATING, and WM_event_timer_remove().
Referenced by view_zoomdrag_cancel(), view_zoomdrag_exec(), view_zoomdrag_invoke(), and view_zoomdrag_modal().
|
static |
Definition at line 735 of file view2d_ops.cc.
References BLI_assert, C, CTX_wm_region(), wmOperator::customdata, View2D::flag, MEM_callocN(), v2dViewZoomData::region, ARegion::v2d, v2dViewZoomData::v2d, V2D_IS_NAVIGATING, view_zoom_poll(), and v2dViewZoomData::zoom_to_mouse_pos.
Referenced by view_zoomdrag_exec(), view_zoomdrag_invoke(), view_zoomin_exec(), view_zoomin_invoke(), view_zoomout_exec(), and view_zoomout_invoke().
|
static |
Definition at line 1148 of file view2d_ops.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_time_now_seconds(), C, clamp_f(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), View2D::cur, wmOperator::customdata, ELEM, fabsf, v2dViewZoomData::invoke_event, View2D::keepofs, View2D::keepzoom, v2dViewZoomData::lastx, v2dViewZoomData::lasty, View2D::maxzoom, MOUSEPAN, MOUSEZOOM, wmEvent::mval, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, v2dViewZoomData::own_cursor, wmOperator::ptr, RNA_float_set(), TIMER, v2dViewZoomData::timer, v2dViewZoomData::timer_lastdraw, wmEvent::type, U, UI_view2d_region_to_view(), USER_ZOOM_CONTINUE, USER_ZOOM_HORIZ, USER_ZOOM_INVERT, USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, v2dViewZoomData::v2d, V2D_KEEPASPECT, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, view_zoomdrag_apply(), view_zoomdrag_exit(), view_zoomdrag_init(), WM_CURSOR_EW_SCROLL, WM_cursor_modal_is_set_ok(), WM_cursor_modal_set(), WM_CURSOR_NS_SCROLL, WM_CURSOR_NSEW_SCROLL, WM_event_absolute_delta_x(), WM_event_absolute_delta_y(), WM_event_add_modal_handler(), WM_event_timer_add(), and v2dViewZoomData::zoom_to_mouse_pos.
Referenced by VIEW2D_OT_zoom().
|
static |
Definition at line 1263 of file view2d_ops.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), C, clamp_f(), CTX_wm_window(), View2D::cur, wmEvent::customdata, wmOperator::customdata, v2dViewZoomData::dx, v2dViewZoomData::dy, ELEM, EVT_ESCKEY, fabsf, v2dViewZoomData::invoke_event, View2D::keepzoom, KM_RELEASE, v2dViewZoomData::lastx, v2dViewZoomData::lasty, len_v2(), View2D::mask, View2D::maxzoom, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, v2dViewZoomData::own_cursor, wmOperator::ptr, v2dViewZoomData::region, RNA_float_set(), TIMER, v2dViewZoomData::timer, wmEvent::type, U, USER_ZOOM_CONTINUE, USER_ZOOM_HORIZ, USER_ZOOM_INVERT, USER_ZOOM_SCALE, v2dViewZoomData::v2d, V2D_KEEPASPECT, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, wmEvent::val, view_zoomdrag_apply(), view_zoomdrag_exit(), ARegion::winrct, WM_cursor_modal_restore(), rcti::xmin, wmEvent::xy, and rcti::ymin.
Referenced by VIEW2D_OT_zoom().
|
static |
Definition at line 895 of file view2d_ops.cc.
References C, wmOperator::customdata, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_set(), view_zoom_axis_lock_defaults(), view_zoomdrag_init(), view_zoomstep_apply(), and view_zoomstep_exit().
Referenced by VIEW2D_OT_zoom_in(), and view_zoomin_invoke().
|
static |
Definition at line 916 of file view2d_ops.cc.
References C, CTX_wm_region(), wmOperator::customdata, wmEvent::mval, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, U, UI_view2d_region_to_view(), USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, view_zoomdrag_init(), view_zoomin_exec(), and v2dViewZoomData::zoom_to_mouse_pos.
Referenced by VIEW2D_OT_zoom_in().
|
static |
Definition at line 958 of file view2d_ops.cc.
References C, wmOperator::customdata, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_set(), view_zoom_axis_lock_defaults(), view_zoomdrag_init(), view_zoomstep_apply(), and view_zoomstep_exit().
Referenced by VIEW2D_OT_zoom_out(), and view_zoomout_invoke().
|
static |
Definition at line 980 of file view2d_ops.cc.
References C, CTX_wm_region(), wmOperator::customdata, wmEvent::mval, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, U, UI_view2d_region_to_view(), USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, view_zoomdrag_init(), view_zoomout_exec(), and v2dViewZoomData::zoom_to_mouse_pos.
Referenced by VIEW2D_OT_zoom_out().
|
static |
Definition at line 866 of file view2d_ops.cc.
References C, wmOperator::customdata, wmOperator::ptr, RNA_float_get(), and view_zoomstep_apply_ex().
Referenced by view_zoomin_exec(), and view_zoomout_exec().
|
static |
Definition at line 754 of file view2d_ops.cc.
References View2D::align, 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, ED_area_tag_redraw(), ED_region_snap_size_apply(), ED_region_snap_size_test(), ED_region_tag_redraw_no_rebuild(), View2D::flag, float, IN_RANGE_INCL, View2D::keepofs, View2D::keepzoom, View2D::mask, View2D::maxzoom, View2D::minzoom, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, NA_EDITED, NC_SCREEN, v2dViewZoomData::region, UI_view2d_curRect_changed(), UI_view2d_sync(), ARegion::v2d, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, V2D_KEEPOFS_X, V2D_KEEPOFS_Y, V2D_LIMITZOOM, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_ZOOM_IGNORE_KEEPOFS, WM_event_add_notifier(), rctf::xmax, rctf::xmin, rctf::ymax, rctf::ymin, and v2dViewZoomData::zoom_to_mouse_pos.
Referenced by view_zoomstep_apply().
|
static |
Definition at line 880 of file view2d_ops.cc.
References C, CTX_wm_area(), wmOperator::customdata, ELEM, View2D::flag, MEM_SAFE_FREE, SPACE_ACTION, SPACE_GRAPH, ScrArea::spacetype, UI_view2d_zoom_cache_reset(), v2dViewZoomData::v2d, and V2D_IS_NAVIGATING.
Referenced by view_zoomin_exec(), and view_zoomout_exec().