Blender V2.61 - r43446
|
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "UI_view2d.h"
#include "UI_interface.h"
#include "PIL_time.h"
Go to the source code of this file.
Definition in file view2d_ops.c.
typedef struct v2dScrollerMove v2dScrollerMove |
typedef struct v2dViewPanData v2dViewPanData |
typedef struct v2dViewZoomData v2dViewZoomData |
anonymous enum |
SCROLLHANDLE_MIN | |
SCROLLHANDLE_BAR | |
SCROLLHANDLE_MAX | |
SCROLLHANDLE_MIN_OUTSIDE | |
SCROLLHANDLE_MAX_OUTSIDE |
Definition at line 1228 of file view2d_ops.c.
static short mouse_in_scroller_handle | ( | int | mouse, |
int | sc_min, | ||
int | sc_max, | ||
int | sh_min, | ||
int | sh_max | ||
) | [static] |
Definition at line 1243 of file view2d_ops.c.
References SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN, SCROLLHANDLE_MIN_OUTSIDE, and V2D_SCROLLER_HANDLE_SIZE.
Referenced by scroller_activate_init().
static int reset_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1607 of file view2d_ops.c.
References View2D::align, CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, ED_region_tag_redraw(), View2D::mask, OPERATOR_FINISHED, uiStyle::panelzoom, UI_GetStyle(), UI_view2d_curRect_validate(), UI_view2d_sync(), 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, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by VIEW2D_OT_reset().
static void scroller_activate_apply | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1376 of file view2d_ops.c.
References v2dScrollerMove::ar, CTX_wm_area(), CTX_wm_screen(), View2D::cur, wmOperator::customdata, v2dScrollerMove::delta, ED_region_tag_redraw(), v2dScrollerMove::fac, View2D::keepofs, View2D::keepzoom, v2dScrollerMove::scroller, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN, SCROLLHANDLE_MIN_OUTSIDE, UI_view2d_curRect_validate(), 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 int scroller_activate_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1368 of file view2d_ops.c.
References OPERATOR_CANCELLED, and scroller_activate_exit().
Referenced by VIEW2D_OT_scroller_activate().
static void scroller_activate_exit | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1354 of file view2d_ops.c.
References CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), MEM_freeN(), NULL, View2D::scroll_ui, v2dScrollerMove::v2d, V2D_SCROLL_H_ACTIVE, and V2D_SCROLL_V_ACTIVE.
Referenced by scroller_activate_cancel(), scroller_activate_invoke(), and scroller_activate_modal().
static void scroller_activate_init | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event, | ||
short | in_scroller | ||
) | [static] |
Definition at line 1290 of file view2d_ops.c.
References v2dScrollerMove::ar, CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), ELEM, v2dScrollerMove::fac, View2D::hor, View2DScrollers::hor_max, View2DScrollers::hor_min, View2D::keepzoom, v2dScrollerMove::lastx, v2dScrollerMove::lasty, MEM_callocN(), mouse_in_scroller_handle(), wmEvent::mval, v2dScrollerMove::scrollbar_orig, v2dScrollerMove::scrollbarwidth, v2dScrollerMove::scroller, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MIN, View2D::tot, UI_view2d_scrollers_calc(), UI_view2d_scrollers_free(), v2dScrollerMove::v2d, ARegion::v2d, V2D_ARG_DUMMY, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, View2D::vert, View2DScrollers::vert_max, View2DScrollers::vert_min, ARegion::winrct, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, rcti::ymin, and v2dScrollerMove::zone.
Referenced by scroller_activate_invoke().
static int scroller_activate_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1500 of file view2d_ops.c.
References CTX_wm_region(), wmOperator::customdata, v2dScrollerMove::delta, ELEM, if(), 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_HIDE, V2D_SCROLL_SCALE_HORIZONTAL, V2D_SCROLL_SCALE_VERTICAL, V2D_SCROLL_V_ACTIVE, V2D_SCROLL_VERTICAL_FULLR, V2D_SCROLL_VERTICAL_HIDE, WM_event_add_modal_handler(), wmEvent::x, wmEvent::y, and v2dScrollerMove::zone.
Referenced by VIEW2D_OT_scroller_activate().
static int scroller_activate_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 1430 of file view2d_ops.c.
References wmOperator::customdata, v2dScrollerMove::delta, ELEM, 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, wmEvent::val, wmEvent::x, wmEvent::y, and v2dScrollerMove::zone.
Referenced by VIEW2D_OT_scroller_activate().
void UI_view2d_keymap | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1689 of file view2d_ops.c.
References BKEY, HOMEKEY, KM_CTRL, KM_PRESS, KM_SHIFT, LEFTMOUSE, MIDDLEMOUSE, MOUSEPAN, MOUSEZOOM, PADMINUS, PADPLUSKEY, PAGEDOWNKEY, PAGEUPKEY, wmKeyMapItem::ptr, RNA_boolean_set(), TRUE, WHEELDOWNMOUSE, WHEELINMOUSE, WHEELOUTMOUSE, WHEELUPMOUSE, WM_keymap_add_item(), and WM_keymap_find().
Referenced by ED_spacetypes_keymap().
void UI_view2d_operatortypes | ( | void | ) |
Definition at line 1669 of file view2d_ops.c.
References 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_zoom(), VIEW2D_OT_zoom_border(), VIEW2D_OT_zoom_in(), VIEW2D_OT_zoom_out(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
static void VIEW2D_OT_pan | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 290 of file view2d_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_POINTER, RNA_def_int(), wmOperatorType::srna, view_pan_cancel(), view_pan_exec(), view_pan_invoke(), and view_pan_modal().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_reset | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 1654 of file view2d_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, reset_exec(), and view2d_poll().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_scroll_down | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 432 of file view2d_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, RNA_def_boolean(), RNA_def_int(), wmOperatorType::srna, and view_scrolldown_exec().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_scroll_left | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 384 of file view2d_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, RNA_def_int(), wmOperatorType::srna, and view_scrollleft_exec().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_scroll_right | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 340 of file view2d_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, RNA_def_int(), wmOperatorType::srna, and view_scrollright_exec().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_scroll_up | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 482 of file view2d_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, RNA_def_boolean(), RNA_def_int(), wmOperatorType::srna, and view_scrollup_exec().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_scroller_activate | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 1586 of file view2d_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, wmOperatorType::poll, scroller_activate_cancel(), scroller_activate_invoke(), scroller_activate_modal(), and view2d_poll().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_zoom | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 1062 of file view2d_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, view_zoom_poll(), view_zoomdrag_cancel(), view_zoomdrag_exec(), view_zoomdrag_invoke(), and view_zoomdrag_modal().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_zoom_border | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 1163 of file view2d_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, view_borderzoom_exec(), view_zoom_poll(), WM_border_select_cancel(), WM_border_select_invoke(), and WM_border_select_modal().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_zoom_in | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 710 of file view2d_ops.c.
References wmOperatorType::description, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, view_zoom_poll(), and view_zoomin_invoke().
Referenced by UI_view2d_operatortypes().
static void VIEW2D_OT_zoom_out | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 767 of file view2d_ops.c.
References wmOperatorType::description, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_float(), wmOperatorType::srna, view_zoom_poll(), and view_zoomout_invoke().
Referenced by UI_view2d_operatortypes().
static int view2d_poll | ( | bContext * | C | ) | [static] |
Definition at line 56 of file view2d_ops.c.
References CTX_wm_region(), View2D::flag, NULL, ARegion::v2d, and V2D_IS_INITIALISED.
Referenced by VIEW2D_OT_reset(), and VIEW2D_OT_scroller_activate().
static int view_borderzoom_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1097 of file view2d_ops.c.
References CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, ED_region_tag_redraw(), GESTURE_MODAL_IN, View2D::keepzoom, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), size(), UI_view2d_curRect_validate(), UI_view2d_region_to_view(), UI_view2d_sync(), ARegion::v2d, V2D_LOCK_COPY, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by VIEW2D_OT_zoom_border().
static void view_pan_apply | ( | wmOperator * | op | ) | [static] |
Definition at line 130 of file view2d_ops.c.
References v2dViewPanData::ar, View2D::cur, wmOperator::customdata, ED_region_tag_redraw(), v2dViewPanData::facx, v2dViewPanData::facy, ListBase::first, View2D::keepofs, wmOperator::ptr, RNA_int_get(), v2dViewPanData::sa, v2dViewPanData::sc, SO_TREESTORE_REDRAW, SPACE_OUTLINER, ScrArea::spacedata, ScrArea::spacetype, SpaceOops::storeflag, UI_view2d_curRect_validate(), UI_view2d_sync(), v2dViewPanData::v2d, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
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 int view_pan_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 284 of file view2d_ops.c.
References OPERATOR_CANCELLED, and view_pan_exit().
Referenced by VIEW2D_OT_pan().
static int view_pan_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 178 of file view2d_ops.c.
References OPERATOR_CANCELLED, OPERATOR_FINISHED, view_pan_apply(), view_pan_exit(), and view_pan_init().
Referenced by VIEW2D_OT_pan().
static void view_pan_exit | ( | wmOperator * | op | ) | [static] |
Definition at line 167 of file view2d_ops.c.
References wmOperator::customdata, MEM_freeN(), and NULL.
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 int view_pan_init | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 94 of file view2d_ops.c.
References v2dViewPanData::ar, CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, wmOperator::customdata, v2dViewPanData::facx, v2dViewPanData::facy, View2D::keepofs, MEM_callocN(), NULL, v2dViewPanData::sa, v2dViewPanData::sc, v2dViewPanData::v2d, ARegion::v2d, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, ARegion::winrct, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by view_pan_exec(), view_pan_invoke(), view_scrolldown_exec(), view_scrollleft_exec(), view_scrollright_exec(), and view_scrollup_exec().
static int view_pan_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 189 of file view2d_ops.c.
References BC_EW_SCROLLCURSOR, BC_NS_SCROLLCURSOR, BC_NSEW_SCROLLCURSOR, CTX_wm_window(), wmOperator::customdata, v2dViewPanData::invoke_event, View2D::keepofs, v2dViewPanData::lastx, v2dViewPanData::lasty, MOUSEPAN, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmEvent::prevx, wmEvent::prevy, wmOperator::ptr, 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_modal(), WM_event_add_modal_handler(), wmEvent::x, and wmEvent::y.
Referenced by VIEW2D_OT_pan().
static int view_pan_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 233 of file view2d_ops.c.
References CTX_wm_window(), wmOperator::customdata, ESCKEY, v2dViewPanData::invoke_event, KM_RELEASE, v2dViewPanData::lastx, v2dViewPanData::lasty, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_int_set(), v2dViewPanData::startx, v2dViewPanData::starty, wmEvent::type, wmEvent::val, view_pan_apply(), view_pan_exit(), WM_cursor_restore(), wmEvent::x, and wmEvent::y.
Referenced by VIEW2D_OT_pan().
static int view_scrolldown_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 401 of file view2d_ops.c.
References CTX_wm_region(), wmOperator::customdata, View2D::keepofs, View2D::mask, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), RNA_int_set(), ARegion::v2d, v2dViewPanData::v2d, V2D_LOCKOFS_Y, view_pan_apply(), view_pan_exit(), view_pan_init(), rcti::ymax, and rcti::ymin.
Referenced by VIEW2D_OT_scroll_down().
static int view_scrollleft_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 358 of file view2d_ops.c.
References wmOperator::customdata, View2D::keepofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), v2dViewPanData::v2d, V2D_LOCKOFS_X, view_pan_apply(), view_pan_exit(), and view_pan_init().
Referenced by VIEW2D_OT_scroll_left().
static int view_scrollright_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 314 of file view2d_ops.c.
References wmOperator::customdata, View2D::keepofs, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), v2dViewPanData::v2d, V2D_LOCKOFS_X, view_pan_apply(), view_pan_exit(), and view_pan_init().
Referenced by VIEW2D_OT_scroll_right().
static int view_scrollup_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 451 of file view2d_ops.c.
References CTX_wm_region(), wmOperator::customdata, View2D::keepofs, View2D::mask, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_boolean_get(), RNA_int_set(), ARegion::v2d, v2dViewPanData::v2d, V2D_LOCKOFS_Y, view_pan_apply(), view_pan_exit(), view_pan_init(), rcti::ymax, and rcti::ymin.
Referenced by VIEW2D_OT_scroll_up().
static int view_zoom_poll | ( | bContext * | C | ) | [static] |
Definition at line 558 of file view2d_ops.c.
References CTX_wm_region(), View2D::keepzoom, NULL, 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(), view_zoomin_exec(), and view_zoomout_exec().
static void view_zoomdrag_apply | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 794 of file view2d_ops.c.
References v2dViewZoomData::ar, CTX_wm_area(), CTX_wm_screen(), View2D::cur, wmOperator::customdata, ED_region_tag_redraw(), View2D::keepofs, View2D::keepzoom, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, PIL_check_seconds_timer(), wmOperator::ptr, RNA_float_get(), v2dViewZoomData::timer_lastdraw, U, UI_view2d_curRect_validate(), UI_view2d_sync(), UserDef::uiflag, USER_ZOOM_CONT, USER_ZOOM_TO_MOUSEPOS, v2dViewZoomData::v2d, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, UserDef::viewzoom, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by view_zoomdrag_exec(), view_zoomdrag_invoke(), and view_zoomdrag_modal().
static int view_zoomdrag_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 877 of file view2d_ops.c.
References OPERATOR_CANCELLED, and view_zoomdrag_exit().
Referenced by VIEW2D_OT_zoom().
static int view_zoomdrag_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 885 of file view2d_ops.c.
References OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, view_zoomdrag_apply(), view_zoomdrag_exit(), and view_zoomdrag_init().
Referenced by VIEW2D_OT_zoom().
static void view_zoomdrag_exit | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 864 of file view2d_ops.c.
References CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, MEM_freeN(), NULL, v2dViewZoomData::timer, and WM_event_remove_timer().
Referenced by view_zoomdrag_cancel(), view_zoomdrag_exec(), view_zoomdrag_invoke(), and view_zoomdrag_modal().
static int view_zoomdrag_init | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 531 of file view2d_ops.c.
References v2dViewZoomData::ar, CTX_wm_region(), wmOperator::customdata, View2D::keepzoom, MEM_callocN(), NULL, v2dViewZoomData::v2d, ARegion::v2d, V2D_LOCKZOOM_X, and V2D_LOCKZOOM_Y.
Referenced by view_zoomdrag_exec(), view_zoomdrag_invoke(), view_zoomin_invoke(), and view_zoomout_invoke().
static int view_zoomdrag_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 896 of file view2d_ops.c.
References BC_EW_SCROLLCURSOR, BC_NS_SCROLLCURSOR, BC_NSEW_SCROLLCURSOR, CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), View2D::cur, wmOperator::customdata, v2dViewZoomData::invoke_event, View2D::keepofs, v2dViewZoomData::lastx, v2dViewZoomData::lasty, MOUSEZOOM, wmEvent::mval, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, PIL_check_seconds_timer(), wmOperator::ptr, RNA_float_set(), TIMER, v2dViewZoomData::timer, v2dViewZoomData::timer_lastdraw, wmEvent::type, U, UI_view2d_region_to_view(), UserDef::uiflag, USER_ZOOM_CONT, USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, v2dViewZoomData::v2d, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, view_zoomdrag_apply(), view_zoomdrag_exit(), view_zoomdrag_init(), UserDef::viewzoom, WM_cursor_modal(), WM_event_add_modal_handler(), WM_event_add_timer(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by VIEW2D_OT_zoom().
static int view_zoomdrag_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 968 of file view2d_ops.c.
References CTX_wm_window(), View2D::cur, wmEvent::customdata, wmOperator::customdata, v2dViewZoomData::dx, v2dViewZoomData::dy, ESCKEY, fabsf, v2dViewZoomData::invoke_event, View2D::keepzoom, KM_RELEASE, v2dViewZoomData::lastx, v2dViewZoomData::lasty, View2D::mask, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, PIL_check_seconds_timer(), wmOperator::ptr, RNA_float_set(), v2dViewZoomData::timer, TIMER, v2dViewZoomData::timer_lastdraw, wmEvent::type, U, USER_ZOOM_CONT, USER_ZOOM_SCALE, v2dViewZoomData::v2d, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, wmEvent::val, view_zoomdrag_apply(), view_zoomdrag_exit(), UserDef::viewzoom, WM_cursor_restore(), wmEvent::x, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, wmEvent::y, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by VIEW2D_OT_zoom().
static int view_zoomin_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 671 of file view2d_ops.c.
References OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_float_set(), view_zoom_poll(), view_zoomstep_apply(), and view_zoomstep_exit().
Referenced by view_zoomin_invoke().
static int view_zoomin_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 689 of file view2d_ops.c.
References CTX_wm_region(), wmOperator::customdata, wmEvent::mval, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, OPERATOR_PASS_THROUGH, U, UI_view2d_region_to_view(), UserDef::uiflag, USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, view_zoomdrag_init(), and view_zoomin_exec().
Referenced by VIEW2D_OT_zoom_in().
static int view_zoomout_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 728 of file view2d_ops.c.
References OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_float_set(), view_zoom_poll(), view_zoomstep_apply(), and view_zoomstep_exit().
Referenced by view_zoomout_invoke().
static int view_zoomout_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 746 of file view2d_ops.c.
References CTX_wm_region(), wmOperator::customdata, wmEvent::mval, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, OPERATOR_PASS_THROUGH, U, UI_view2d_region_to_view(), UserDef::uiflag, USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, view_zoomdrag_init(), and view_zoomout_exec().
Referenced by VIEW2D_OT_zoom_out().
static void view_zoomstep_apply | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 577 of file view2d_ops.c.
References View2D::align, v2dViewZoomData::ar, CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, wmOperator::customdata, ED_region_tag_redraw(), View2D::keepofs, View2D::keepzoom, v2dViewZoomData::mx_2d, v2dViewZoomData::my_2d, wmOperator::ptr, RNA_float_get(), U, UI_view2d_curRect_validate(), UI_view2d_sync(), UserDef::uiflag, USER_ZOOM_TO_MOUSEPOS, ARegion::v2d, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, V2D_KEEPOFS_X, V2D_KEEPOFS_Y, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by view_zoomin_exec(), and view_zoomout_exec().
static void view_zoomstep_exit | ( | wmOperator * | op | ) | [static] |
Definition at line 662 of file view2d_ops.c.
References wmOperator::customdata, MEM_freeN(), and NULL.
Referenced by view_zoomin_exec(), and view_zoomout_exec().