|
Blender V4.3
|
Go to the source code of this file.
Classes | |
| struct | View2DEdgePanData |
General Defines | |
| #define | V2D_IS_CLIPPED 12000 |
| enum | eView2D_CommonViewTypes { V2D_COMMONVIEW_CUSTOM = -1 , V2D_COMMONVIEW_STANDARD , V2D_COMMONVIEW_LIST , V2D_COMMONVIEW_STACK , V2D_COMMONVIEW_HEADER , V2D_COMMONVIEW_PANELS_UI } |
Operators | |
| #define | UI_MARKER_MARGIN_Y (42 * UI_SCALE_FAC) |
| #define | UI_TIME_SCRUB_MARGIN_Y (23 * UI_SCALE_FAC) |
| #define | UI_TIME_CACHE_MARGIN_Y (UI_TIME_SCRUB_MARGIN_Y / 6.0f) |
| void | ED_operatortypes_view2d () |
| void | ED_keymap_view2d (wmKeyConfig *keyconf) |
| void | UI_view2d_smooth_view (const bContext *C, ARegion *region, const rctf *cur, int smooth_viewtx) |
Generic 2D view with should allow drawing grids, panning, zooming, scrolling, .. etc.
Definition in file UI_view2d.hh.
| #define IN_2D_HORIZ_SCROLL | ( | v2d, | |
| co ) (BLI_rcti_isect_pt_v(&v2d->hor, co)) |
Definition at line 95 of file UI_view2d.hh.
Referenced by UI_view2d_mouse_in_scrollers_ex().
| #define IN_2D_HORIZ_SCROLL_RECT | ( | v2d, | |
| rct ) (BLI_rcti_isect(&v2d->hor, rct, NULL)) |
Definition at line 98 of file UI_view2d.hh.
Referenced by UI_view2d_rect_in_scrollers_ex().
| #define IN_2D_VERT_SCROLL | ( | v2d, | |
| co ) (BLI_rcti_isect_pt_v(&v2d->vert, co)) |
Definition at line 94 of file UI_view2d.hh.
Referenced by UI_view2d_mouse_in_scrollers_ex().
| #define IN_2D_VERT_SCROLL_RECT | ( | v2d, | |
| rct ) (BLI_rcti_isect(&v2d->vert, rct, NULL)) |
Definition at line 97 of file UI_view2d.hh.
Referenced by UI_view2d_rect_in_scrollers_ex().
| #define UI_MARKER_MARGIN_Y (42 * UI_SCALE_FAC) |
Definition at line 471 of file UI_view2d.hh.
Referenced by add_region_padding(), event_in_markers_region(), get_marker_region_rect(), graphkeys_viewall(), nla_track_region_draw(), SEQ_get_timeline_region_padding(), sequencer_main_clamp_view(), and set_v2d_height().
| #define UI_TIME_CACHE_MARGIN_Y (UI_TIME_SCRUB_MARGIN_Y / 6.0f) |
Definition at line 473 of file UI_view2d.hh.
Referenced by draw_cache_background(), draw_cache_view_iter_fn(), and SEQ_get_timeline_region_padding().
| #define UI_TIME_SCRUB_MARGIN_Y (23 * UI_SCALE_FAC) |
Definition at line 472 of file UI_view2d.hh.
Referenced by add_region_padding(), ANIM_UI_get_first_channel_top(), draw_cache_background(), draw_cache_view_iter_fn(), ED_time_scrub_channel_search_draw(), ED_time_scrub_clamp_scroller_mask(), ED_time_scrub_event_in_region(), ED_time_scrub_region_rect_get(), graph_main_region_draw_overlay(), graph_region_draw(), graphkeys_viewall(), SEQ_get_timeline_region_padding(), and sequencer_main_cursor().
| #define V2D_IS_CLIPPED 12000 |
Generic value to use when coordinate lies out of view when converting.
Definition at line 21 of file UI_view2d.hh.
Referenced by annotation_stroke_eraser_dostroke(), do_lasso_select_marker(), do_lasso_select_mesh_uv_is_edge_inside(), do_lasso_select_mesh_uv_is_point_inside(), gpencil_point_to_xy(), blender::io::grease_pencil::GreasePencilExporter::project_to_screen(), UI_view2d_view_to_region_clip(), UI_view2d_view_to_region_rcti_clip(), and UI_view2d_view_to_region_segment_clip().
| #define V2D_LOCK_COPY 1 |
Definition at line 85 of file UI_view2d.hh.
Referenced by actkeys_viewall(), clip_draw_dopesheet_channels(), draw_channel_names(), draw_nla_track_list(), edge_pan_apply_delta(), nlaedit_viewall(), reset_exec(), scene_range_frame_exec(), scroller_activate_apply(), sequencer_view_all_preview_exec(), UI_view2d_edge_pan_cancel(), UI_view2d_smooth_view(), UI_view2d_sync(), view2d_smoothview_invoke(), view_pan_apply_ex(), view_zoomdrag_apply(), and view_zoomstep_apply_ex().
| #define V2D_LOCK_SET 0 |
Definition at line 83 of file UI_view2d.hh.
| #define V2D_SCROLL_HANDLE_HEIGHT (0.6f * U.widget_unit) |
Scroll bars with 'handles' used for scale (zoom).
Definition at line 67 of file UI_view2d.hh.
Referenced by add_region_padding(), graphkeys_viewall(), SEQ_get_timeline_region_padding(), timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), and UI_view2d_scroller_size_get().
| #define V2D_SCROLL_HANDLE_SIZE_HOTSPOT (0.6f * U.widget_unit) |
Scroll bar with 'handles' hot-spot radius for cursor proximity.
Definition at line 71 of file UI_view2d.hh.
Referenced by mouse_in_scroller_handle(), UI_view2d_scrollers_draw_ex(), and view2d_scrollers_calc().
| #define V2D_SCROLL_HANDLE_WIDTH (0.6f * U.widget_unit) |
Definition at line 68 of file UI_view2d.hh.
Referenced by UI_view2d_scroller_size_get().
| #define V2D_SCROLL_HEIGHT ((0.45f * U.widget_unit) + (2.0f * U.pixelsize)) |
Scroll bar area.
Definition at line 53 of file UI_view2d.hh.
Referenced by ED_fileselect_init_layout(), blender::ed::outliner::outliner_update_viewable_area(), and UI_view2d_scroller_size_get().
| #define V2D_SCROLL_HIDE_HEIGHT (HEADERY * UI_SCALE_FAC) |
Definition at line 64 of file UI_view2d.hh.
Referenced by area_actionzone_get_rect(), and area_actionzone_refresh_xy().
| #define V2D_SCROLL_HIDE_WIDTH (AREAMINX * UI_SCALE_FAC) |
Definition at line 63 of file UI_view2d.hh.
Referenced by area_actionzone_get_rect(), and area_actionzone_refresh_xy().
| #define V2D_SCROLL_MIN_ALPHA (0.4f) |
Definition at line 57 of file UI_view2d.hh.
Referenced by UI_view2d_scrollers_draw_ex().
| #define V2D_SCROLL_MIN_WIDTH ((5.0f * UI_SCALE_FAC) + (2.0f * U.pixelsize)) |
Definition at line 60 of file UI_view2d.hh.
Referenced by UI_view2d_scroller_size_get().
| #define V2D_SCROLL_THUMB_SIZE_MIN (30.0 * UI_SCALE_FAC) |
Don't allow scroll thumb to show below this size (so it's never too small to click on).
Definition at line 74 of file UI_view2d.hh.
Referenced by view2d_scrollers_calc().
| #define V2D_SCROLL_WIDTH ((0.45f * U.widget_unit) + (2.0f * U.pixelsize)) |
Definition at line 54 of file UI_view2d.hh.
Referenced by ANIM_channel_draw(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), console_textview_draw_rect_calc(), ED_spacetype_ipo(), graph_draw_channel_names(), info_textview_draw_rect_calc(), blender::ed::outliner::outliner_draw_restrictbuts(), blender::ed::outliner::outliner_right_columns_width(), blender::ed::spreadsheet::register_spacetype(), ui_template_list_layout_draw(), and UI_view2d_scroller_size_get().
Common View2D view types.
Definition at line 29 of file UI_view2d.hh.
| void ED_keymap_view2d | ( | wmKeyConfig * | keyconf | ) |
Definition at line 2361 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 2334 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().
| bool UI_view2d_area_supports_sync | ( | ScrArea * | area | ) |
Definition at line 856 of file view2d.cc.
References ELEM, SPACE_ACTION, SPACE_CLIP, SPACE_GRAPH, SPACE_NLA, and SPACE_SEQ.
Referenced by UI_view2d_sync().
Simple functions for consistent center offset access. Used by node editor to shift view center for each individual node tree.
Definition at line 1934 of file view2d.cc.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), and View2D::cur.
Referenced by actkeys_viewall(), nlaedit_viewall(), and blender::ed::space_node::node_draw_space().
Definition at line 1944 of file view2d.cc.
References BLI_rctf_recenter(), View2D::cur, and UI_view2d_curRect_validate().
Referenced by actkeys_viewall(), nlaedit_viewall(), blender::ed::space_node::node_area_listener(), and blender::ed::space_node::snode_setup_v2d().
Perform all required updates after v2d->cur as been modified. This includes like validation view validation (UI_view2d_curRect_validate).
Current intent is to use it from user code, such as view navigation and zoom operations.
Definition at line 829 of file view2d.cc.
References CTX_wm_region(), and UI_view2d_curRect_validate().
Referenced by edge_pan_apply_delta(), reset_exec(), scroller_activate_apply(), sequencer_view_all_preview_exec(), sequencer_view_zoom_ratio_exec(), UI_but_ensure_in_view(), UI_view2d_edge_pan_cancel(), UI_view2d_smooth_view(), view2d_smoothview_invoke(), view_pan_apply_ex(), view_zoomdrag_apply(), and view_zoomstep_apply_ex().
| void UI_view2d_curRect_clamp_y | ( | View2D * | v2d | ) |
Clamp view2d area to what's visible, preventing scrolling vertically to infinity.
Definition at line 840 of file view2d.cc.
References BLI_rctf_size_y(), View2D::cur, View2D::tot, rctf::ymax, and rctf::ymin.
Referenced by nla_track_region_draw(), set_v2d_height(), and set_v2d_height().
| void UI_view2d_curRect_reset | ( | View2D * | v2d | ) |
Restore 'cur' rect to standard orientation (i.e. optimal maximum view of tot). This does not take into account if zooming the view on an axis will improve the view (if allowed).
Definition at line 924 of file view2d.cc.
References View2D::align, BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, float, View2D::mask, V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_NEG_Y, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void UI_view2d_curRect_validate | ( | View2D * | v2d | ) |
Definition at line 824 of file view2d.cc.
References ui_view2d_curRect_validate_resize().
Referenced by file_ensure_inside_viewbounds(), blender::ed::asset::shelf::region_layout(), region_scale_toggle_hidden(), sequencer_draw_preview(), UI_view2d_center_set(), UI_view2d_curRect_changed(), UI_view2d_offset(), and UI_view2d_offset_y_snap_to_closest_page().
| void UI_view2d_dot_grid_draw | ( | const View2D * | v2d, |
| int | grid_color_id, | ||
| float | min_step, | ||
| int | grid_subdivisions ) |
Draw a multi-level grid of dots, with a dynamic number of levels based on the fading.
| grid_color_id | The theme color used for the points. Faded dynamically based on zoom. |
| min_step | The base size of the grid. At different zoom levels, the visible grid may have a larger step size. |
| grid_subdivisions | The maximum number of sub-levels drawn at once. |
Definition at line 1283 of file view2d.cc.
References BLI_assert, BLI_rctf_size_x(), BLI_rcti_size_x(), ceilf, clamp_f(), View2D::cur, float, fractf(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_vertformat_attr_add(), grid_axis_start_and_count(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform4fv(), immVertex2f(), immVertexFormat(), int, logf, View2D::mask, pos, pow2f(), powf, UI_GetThemeColor3fv(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::node_draw_space().
| void UI_view2d_draw_lines_x__discrete_frames_or_seconds | ( | const View2D * | v2d, |
| const Scene * | scene, | ||
| bool | display_seconds, | ||
| bool | display_minor_lines ) |
Definition at line 495 of file view2d_draw.cc.
References UI_view2d_draw_lines_x__discrete_time(), and UI_view2d_draw_lines_x__discrete_values().
Referenced by action_main_region_draw(), dopesheet_region_draw(), draw_timeline_grid(), and nla_main_region_draw().
| void UI_view2d_draw_lines_x__discrete_time | ( | const View2D * | v2d, |
| const Scene * | scene, | ||
| bool | display_minor_lines ) |
Definition at line 486 of file view2d_draw.cc.
References view2d_draw_lines(), and view2d_major_step_x__time().
Referenced by UI_view2d_draw_lines_x__discrete_frames_or_seconds(), and UI_view2d_draw_lines_x__frames_or_seconds().
| void UI_view2d_draw_lines_x__discrete_values | ( | const View2D * | v2d, |
| bool | display_minor_lines ) |
Definition at line 467 of file view2d_draw.cc.
References view2d_draw_lines(), and view2d_major_step_x__discrete().
Referenced by UI_view2d_draw_lines_x__discrete_frames_or_seconds().
| void UI_view2d_draw_lines_x__frames_or_seconds | ( | const View2D * | v2d, |
| const Scene * | scene, | ||
| bool | display_seconds ) |
Definition at line 508 of file view2d_draw.cc.
References UI_view2d_draw_lines_x__discrete_time(), and UI_view2d_draw_lines_x__values().
Referenced by graph_main_region_draw().
| void UI_view2d_draw_lines_x__values | ( | const View2D * | v2d | ) |
Definition at line 474 of file view2d_draw.cc.
References view2d_draw_lines(), and view2d_major_step_x__continuous().
Referenced by clip_draw_graph(), and UI_view2d_draw_lines_x__frames_or_seconds().
| void UI_view2d_draw_lines_y__values | ( | const View2D * | v2d | ) |
Definition at line 480 of file view2d_draw.cc.
References view2d_draw_lines(), and view2d_major_step_y__continuous().
Referenced by clip_draw_graph(), and graph_main_region_draw().
| void UI_view2d_draw_scale_x__discrete_frames_or_seconds | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const rcti * | rect, | ||
| const Scene * | scene, | ||
| bool | display_seconds, | ||
| int | colorid ) |
Definition at line 570 of file view2d_draw.cc.
References UI_view2d_draw_scale_x__discrete_time(), and UI_view2d_draw_scale_x__discrete_values().
Referenced by ED_time_scrub_draw().
| void UI_view2d_draw_scale_x__frames_or_seconds | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const rcti * | rect, | ||
| const Scene * | scene, | ||
| bool | display_seconds, | ||
| int | colorid ) |
Definition at line 585 of file view2d_draw.cc.
References UI_view2d_draw_scale_x__discrete_time(), and UI_view2d_draw_scale_x__values().
Referenced by ED_time_scrub_draw().
| void UI_view2d_draw_scale_y__block | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const rcti * | rect, | ||
| int | colorid ) |
Definition at line 561 of file view2d_draw.cc.
References draw_vertical_scale_indicators(), and view_to_string__value().
| void UI_view2d_draw_scale_y__values | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const rcti * | rect, | ||
| int | colorid ) |
Scale indicator text drawing.
Definition at line 551 of file view2d_draw.cc.
References draw_vertical_scale_indicators(), view2d_major_step_y__continuous(), and view_to_string__value().
Referenced by graph_main_region_draw_overlay(), and graph_region_draw().
| void UI_view2d_edge_pan_apply | ( | bContext * | C, |
| View2DEdgePanData * | vpd, | ||
| const int | xy[2] ) |
Apply transform to view (i.e. adjust 'cur' rect).
Referenced by blender::ed::transform::flushTransNodes(), and view2d_edge_pan_loc_compensate().
| void 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().
| void UI_view2d_edge_pan_cancel | ( | bContext * | C, |
| View2DEdgePanData * | vpd ) |
Definition at line 283 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, 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(), 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(), 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(), createTransSeqData(), 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 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().
| 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 | ( | 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().
| void UI_view2d_edge_pan_reset | ( | View2DEdgePanData * | vpd | ) |
Definition at line 97 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 91 of file view2d_edge_pan.cc.
References BLI_rctf_init(), and View2DEdgePanData::limit.
Referenced by createTransSeqData().
View2D data by default resides in region, so get from region stored in context.
Definition at line 1850 of file view2d.cc.
References CTX_wm_area(), and CTX_wm_region().
Referenced by draw_cache_background(), draw_cache_view(), ed_marker_box_select_exec(), ed_marker_move_modal(), ed_marker_select(), ED_markers_draw(), mouse_over_key_get_from_strip(), pixels_to_view_height(), pixels_to_view_width(), retiming_fake_key_frame_clicked(), retiming_mouseover_key_get(), seq_select_seq_from_preview(), sequencer_box_select_exec(), sequencer_box_select_invoke(), sequencer_retiming_box_select_exec(), sequencer_select_exec(), sequencer_select_handle_exec(), sequencer_select_linked_pick_invoke(), sequencer_skip_for_handle_tweak(), sequencer_slip_invoke(), sequencer_slip_modal(), sequencer_split_invoke(), sequencer_view_all_preview_exec(), sequencer_view_selected_exec(), sequencer_view_zoom_ratio_exec(), sequencer_visible_strips_get(), timeline_draw_context_get(), and view_ghost_border_exec().
Same as UI_view2d_fromcontext, but it returns region-window. Utility for pull-downs or buttons.
Definition at line 1864 of file view2d.cc.
References BKE_area_find_region_type(), CTX_wm_area(), CTX_wm_region(), RGN_TYPE_WINDOW, and ARegion::v2d.
| float UI_view2d_grid_resolution_x__frames_or_seconds | ( | const View2D * | v2d, |
| const Scene * | scene, | ||
| bool | display_seconds ) |
Definition at line 449 of file view2d_draw.cc.
References view2d_major_step_x__continuous(), and view2d_major_step_x__time().
Referenced by snap_increment_apply().
Definition at line 459 of file view2d_draw.cc.
References view2d_major_step_y__continuous().
Referenced by snap_increment_apply().
| void UI_view2d_listview_view_to_cell | ( | float | columnwidth, |
| float | rowheight, | ||
| float | startx, | ||
| float | starty, | ||
| float | viewx, | ||
| float | viewy, | ||
| int * | r_column, | ||
| int * | r_row ) |
Get the 'cell' (row, column) that the given 2D-view coordinates (i.e. in 'tot' rect space) lie in.
| columnwidth,rowheight | size of each 'cell' |
| startx,starty | coordinates (in 'tot' rect space) that the list starts from. This should be (0,0) for most views. However, for those where the starting row was offsetted (like for Animation Editor channel lists, to make the first entry more visible), these will be the min-coordinates of the first item. |
| viewx,viewy | 2D-coordinates (in 2D-view / 'tot' rect space) to get the cell for |
| r_column,r_row | The 'coordinates' of the relevant 'cell'. |
Definition at line 1616 of file view2d.cc.
References floorf.
Referenced by actkeys_find_list_element_at_position(), animchannels_channel_get(), animchannels_mouseclick_invoke(), nlaedit_strip_at_region_position(), and nlatracks_mouseclick_invoke().
Definition at line 109 of file view2d.cc.
References View2D::winx, View2D::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_region_panels_draw(), and view2d_masks().
| char UI_view2d_mouse_in_scrollers_ex | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const int | xy[2], | ||
| int * | r_scroll ) |
Check if mouse is within scrollers
| xy | Mouse coordinates in screen (not region) space. |
| r_scroll | Return argument for the mapped view2d scroll flag. |
Referenced by area_actionzone_refresh_xy().
| void UI_view2d_multi_grid_draw | ( | const View2D * | v2d, |
| int | colorid, | ||
| float | step, | ||
| int | level_size, | ||
| int | totlevels ) |
Draw a multi-level grid in given 2d-region.
Definition at line 1176 of file view2d.cc.
References View2D::cur, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_3D_FLAT_COLOR, GPU_vertformat_attr_add(), immAttr3ubv(), immAttrSkip(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), int, pos, TH_GRID, UI_GetThemeColorBlendShade3ubv(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Simple pan function (0.0, 0.0) bottom left (0.5, 0.5) center (1.0, 1.0) top right.
Definition at line 1952 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), View2D::cur, View2D::tot, UI_view2d_curRect_validate(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_handle_panel_header(), and ui_handler_panel_region().
| void UI_view2d_offset_y_snap_to_closest_page | ( | View2D * | v2d | ) |
Scrolls the view so that the upper edge is at a multiple of the page size.
Definition at line 1975 of file view2d.cc.
References BLI_rctf_size_y(), View2D::cur, UI_view2d_curRect_validate(), view2d_page_size_y(), rctf::ymax, and rctf::ymin.
Referenced by blender::ed::asset::shelf::region_init().
| char char char char UI_view2d_rect_in_scrollers | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const rcti * | rect ) |
Referenced by ui_region_contains_rect_px().
| char char char UI_view2d_rect_in_scrollers_ex | ( | const ARegion * | region, |
| const View2D * | v2d, | ||
| const rcti * | rect, | ||
| int * | r_scroll ) |
Refresh and validation (of view rects).
Initialize all relevant View2D data (including view rects if first time) and/or refresh mask sizes after view resize.
Definition at line 212 of file view2d.cc.
References View2D::align, View2D::alpha_hor, View2D::alpha_vert, View2D::cur, View2D::flag, float, View2D::keepofs, View2D::keeptot, View2D::keepzoom, View2D::max, View2D::maxzoom, View2D::min, View2D::minzoom, uiStyle::panelzoom, View2D::scroll, View2D::tot, UI_style_get(), ui_view2d_curRect_validate_resize(), V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_NEG_Y, V2D_ALIGN_NO_POS_Y, V2D_COMMONVIEW_HEADER, V2D_COMMONVIEW_LIST, V2D_COMMONVIEW_PANELS_UI, V2D_COMMONVIEW_STACK, V2D_COMMONVIEW_STANDARD, V2D_IS_INIT, V2D_KEEPASPECT, V2D_KEEPTOT_BOUNDS, V2D_KEEPTOT_STRICT, V2D_KEEPZOOM, V2D_LIMITZOOM, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_SCROLL_HORIZONTAL_HIDE, V2D_SCROLL_VERTICAL_HIDE, view2d_masks(), view2d_totRect_set_resize(), View2D::winx, View2D::winy, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_channel_region_init(), action_main_region_init(), clip_channels_region_init(), clip_preview_region_init(), console_main_region_init(), ED_region_header_init(), ED_region_panels_init(), file_main_region_draw(), file_main_region_init(), graph_channel_region_init(), graph_main_region_init(), hud_region_layout(), info_main_region_init(), nla_main_region_init(), nla_track_region_init(), blender::ed::space_node::node_main_region_init(), blender::ed::outliner::outliner_main_region_init(), blender::ed::asset::shelf::region_init(), script_main_region_init(), sequencer_channel_region_init(), sequencer_main_region_init(), sequencer_preview_region_init(), blender::ed::spreadsheet::spreadsheet_main_region_init(), text_main_region_init(), and topbar_main_region_init().
| void UI_view2d_region_to_view | ( | const View2D * | v2d, |
| float | x, | ||
| float | y, | ||
| float * | r_view_x, | ||
| float * | r_view_y ) |
Convert from screen/region space to 2d-View space
| x,y | coordinates to convert |
| r_view_x,r_view_y | resultant coordinates |
Definition at line 1663 of file view2d.cc.
References UI_view2d_region_to_view_x(), and UI_view2d_region_to_view_y().
Referenced by actkeys_find_list_element_at_position(), blender::ed::space_node::add_reroute_exec(), animchannels_channel_get(), animchannels_mouseclick_invoke(), annotation_stroke_convertcoords(), applyTimeSlide(), applyTimeTranslate(), box_select_action(), box_select_anim_channels(), box_select_nla_strips(), blender::ed::space_node::cut_links_exec(), dopesheet_select_channel_invoke(), ED_mask_mouse_pos(), ED_outliner_give_base_under_cursor(), ED_outliner_give_rna_under_cursor(), ED_space_image_color_sample(), ED_space_image_get_position(), file_attribute_column_type_find_isect(), file_box_select_find_last_selected(), file_highlight_set(), find_nearest_seq(), frame_from_event(), frame_from_event(), grab_clone_modal(), graphkeys_click_insert_invoke(), graphview_cursor_setprops(), image_sample_apply(), image_sample_line_exec(), image_view_zoom_in_invoke(), image_view_zoom_init(), image_view_zoom_invoke(), image_view_zoom_out_invoke(), blender::ed::space_node::is_event_over_node_or_socket(), mouse_frame_side(), MouseCoords::MouseCoords(), blender::ed::space_node::mute_links_exec(), nlaedit_strip_at_region_position(), nlatracks_mouseclick_invoke(), blender::ed::space_node::node_add_collection_invoke(), blender::ed::space_node::node_add_file_invoke(), blender::ed::space_node::node_add_group_asset_invoke(), blender::ed::space_node::node_add_group_invoke(), blender::ed::space_node::node_add_material_invoke(), blender::ed::space_node::node_add_object_invoke(), blender::ed::space_node::node_circleselect_exec(), blender::ed::space_node::node_clipboard_paste_invoke(), blender::ed::space_node::node_cursor(), blender::ed::space_node::node_draw_space(), blender::ed::space_node::node_find_frame_to_attach(), blender::ed::space_node::node_link_invoke(), blender::ed::space_node::node_link_modal(), blender::ed::space_node::node_mouse_select(), blender::ed::space_node::node_resize_invoke(), blender::ed::space_node::node_resize_modal(), blender::ed::outliner::outliner_box_select_invoke(), blender::ed::outliner::outliner_drop_find(), blender::ed::outliner::outliner_drop_insert_find(), blender::ed::outliner::outliner_highlight_update_invoke(), blender::ed::outliner::outliner_id_delete_invoke(), blender::ed::outliner::outliner_id_remap_invoke(), blender::ed::outliner::outliner_item_do_activate_from_cursor(), blender::ed::outliner::outliner_item_drag_drop_invoke(), blender::ed::outliner::outliner_item_openclose_invoke(), blender::ed::outliner::outliner_item_openclose_modal(), blender::ed::outliner::outliner_item_rename_find_hovered(), blender::ed::outliner::outliner_lib_reload_invoke(), blender::ed::outliner::outliner_lib_relocate_invoke(), blender::ed::outliner::outliner_operation_invoke(), paint_2d_stroke(), paint_2d_transform_mouse(), paintcurve_cursor_invoke(), select_invoke(), seq_select_seq_from_preview(), sequencer_box_select_invoke(), sequencer_file_drop_channel_frame_set(), sequencer_main_cursor(), sequencer_sample_apply(), sequencer_set_2d_cursor_invoke(), sequencer_skip_for_handle_tweak(), sequencer_slip_invoke(), sequencer_slip_modal(), sequencer_split_invoke(), snapNode(), stitch_select(), transform_convert_frame_side_dir_get(), update_overlay_strip_position_data(), uv_circle_select_exec(), uv_rip_invoke(), uv_sculpt_stroke_apply(), uv_sculpt_stroke_init(), uv_select_edge_ring_invoke(), uv_select_invoke(), uv_select_linked_internal(), uv_select_loop_invoke(), uv_set_2d_cursor_invoke(), uv_shortest_path_pick_invoke(), view_zoomdrag_invoke(), view_zoomin_invoke(), and view_zoomout_invoke().
Definition at line 1670 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, float, View2D::mask, rctf::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rctf::ymin, and rcti::ymin.
Referenced by box_select_graph_exec(), blender::ed::space_node::do_lasso_select_node(), ed_marker_box_select_exec(), find_file_mouse_rect(), image_view_zoom_border_exec(), initialize_box_select_coords(), blender::ed::space_node::node_box_select_exec(), blender::ed::outliner::outliner_box_select_exec(), blender::ed::space_node::viewer_linking::position_viewer_node(), region_select_action_keys(), render_border_exec(), sequencer_box_select_exec(), sequencer_retiming_box_select_exec(), ui_but_rect_to_view(), uv_box_select_exec(), view_borderzoom_exec(), and view_ghost_border_exec().
Definition at line 1652 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rcti_size_x(), View2D::cur, View2D::mask, rctf::xmin, and rcti::xmin.
Referenced by actkeys_find_key_in_list_element(), actkeys_select_leftright_invoke(), draw_horizontal_scale_indicators(), ed_marker_select(), ED_region_overlap_isect_x(), ED_region_overlap_isect_x_with_margin(), frame_from_event(), graphkeys_select_leftright_invoke(), nlaedit_select_leftright_invoke(), nlaedit_strip_at_region_position(), previewrange_define_exec(), region_position_is_over_marker(), seq_snap_threshold_get_frame_distance(), seq_snap_threshold_get_view_distance(), sequencer_select_side_of_frame(), and UI_view2d_region_to_view().
Definition at line 1657 of file view2d.cc.
References BLI_rctf_size_y(), BLI_rcti_size_y(), View2D::cur, View2D::mask, rctf::ymin, and rcti::ymin.
Referenced by draw_cache_view(), draw_vertical_scale_indicators(), ED_region_overlap_isect_y(), ED_region_overlap_isect_y_with_margin(), blender::ed::outliner::outliner_item_drag_element_find(), sequencer_rename_channel_invoke(), and UI_view2d_region_to_view().
Calculate the scale per-axis of the drawing-area
Is used to inverse correct drawing of icons, etc. that need to follow view but not be affected by scale
| r_x,r_y | scale on each axis |
Definition at line 1907 of file view2d.cc.
References UI_view2d_scale_get_x(), and UI_view2d_scale_get_y().
Referenced by createTransGraphEditData(), draw_fcurve_samples(), draw_tracks_motion_and_error_curves(), ED_markers_draw(), ED_mask_pixelspace_factor(), ED_uvedit_nearest_uv_multi(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_sockets(), and blender::ed::space_node::node_draw_zones_and_frames().
Same as UI_view2d_scale_get() - 1.0f / x, y.
Definition at line 1924 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, and View2D::mask.
Referenced by draw_histogram(), draw_vectorscope_graticule(), and ED_image_draw_cursor().
Definition at line 1916 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rcti_size_x(), View2D::cur, and View2D::mask.
Referenced by channel_ui_data_init(), clickable_handle_size_get(), draw_fcurve_curve(), draw_horizontal_scale_indicators(), ED_region_panel_category_gutter_calc_rect(), ED_region_panels_draw(), ED_sequencer_can_select_handle(), blender::ed::space_node::node_find_indicated_socket(), blender::ed::space_node::nodelink_get_draw_config(), region_position_is_over_marker(), seq_select_seq_from_preview(), ui_update_flexible_spacing(), UI_view2d_scale_get(), uv_nearest_hit_init_dist_px(), and uv_nearest_hit_init_max().
Definition at line 1920 of file view2d.cc.
References BLI_rctf_size_y(), BLI_rcti_size_y(), View2D::cur, and View2D::mask.
Referenced by ANIM_UI_get_first_channel_top(), draw_cache_background(), draw_cache_view_iter_fn(), draw_vertical_scale_indicators(), seq_select_seq_from_preview(), sequencer_main_cursor(), UI_view2d_scale_get(), uv_nearest_hit_init_dist_px(), and uv_nearest_hit_init_max().
Get scroll-bar sizes of the current 2D view. The size will be zero if the view has its scroll-bars disabled.
| mapped | whether to use view2d_scroll_mapped which changes flags |
Definition at line 1882 of file view2d.cc.
References View2D::alpha_hor, View2D::alpha_vert, View2D::scroll, V2D_SCROLL_HANDLE_HEIGHT, V2D_SCROLL_HANDLE_WIDTH, V2D_SCROLL_HEIGHT, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_HORIZONTAL_HANDLES, V2D_SCROLL_MIN_WIDTH, V2D_SCROLL_VERTICAL, V2D_SCROLL_VERTICAL_HANDLES, V2D_SCROLL_WIDTH, and view2d_scroll_mapped().
Referenced by ED_area_type_hud_ensure(), and view2d_masks().
Definition at line 1605 of file view2d.cc.
References UI_view2d_scrollers_draw_ex().
Referenced by action_main_region_draw_overlay(), console_main_region_draw(), dopesheet_region_draw(), blender::ed::spreadsheet::draw_spreadsheet_in_region(), draw_timeline_seq_display(), file_main_region_draw(), graph_channel_region_draw(), graph_main_region_draw_overlay(), graph_region_draw(), info_main_region_draw(), nla_main_region_draw_overlay(), nla_track_region_draw(), blender::ed::space_node::node_draw_space(), blender::ed::outliner::outliner_main_region_draw(), and blender::ed::asset::shelf::region_draw().
Draw scroll-bars in the given 2D-region.
Definition at line 1510 of file view2d.cc.
References View2D::alpha_hor, View2D::alpha_vert, BLI_rcti_size_x(), BLI_rcti_size_y(), View2DScrollers::hor, View2DScrollers::hor_max, View2DScrollers::hor_min, uiWidgetColors::inner, uiWidgetColors::item, View2D::keepzoom, uiWidgetColors::outline, View2D::scroll, View2D::scroll_ui, state, TH_BACK, bTheme::tui, UI_draw_widget_scroll(), UI_GetTheme(), UI_GetThemeColor4ubv(), UI_SCROLL_ARROWS, UI_SCROLL_PRESSED, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_SCROLL_H_ACTIVE, V2D_SCROLL_HANDLE_SIZE_HOTSPOT, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_HORIZONTAL_HANDLES, V2D_SCROLL_MIN_ALPHA, V2D_SCROLL_V_ACTIVE, V2D_SCROLL_VERTICAL, V2D_SCROLL_VERTICAL_HANDLES, View2DScrollers::vert, View2DScrollers::vert_max, View2DScrollers::vert_min, view2d_scroll_mapped(), view2d_scrollers_calc(), ThemeUI::wcol_scroll, ThemeUI::widget_emboss, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_region_panels_draw(), and UI_view2d_scrollers_draw().
| 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 1627 of file view2d_ops.cc.
References BLI_rctf_compare(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_screen(), CTX_wm_window(), View2D::cur, double(), 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(), 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(), sequencer_view_all_exec(), sequencer_view_selected_exec(), blender::ed::space_node::space_node_view_flag(), view_borderzoom_exec(), and view_curve_in_graph_editor_exec().
Called by menus to activate it, or by view2d operators to make sure 'related' views stay in synchrony.
Definition at line 861 of file view2d.cc.
References View2D::cur, ED_region_tag_redraw_no_rebuild(), flag, View2D::flag, LISTBASE_FOREACH, UI_view2d_area_supports_sync(), V2D_LOCK_COPY, V2D_VIEWSYNC_AREA_VERTICAL, V2D_VIEWSYNC_SCREEN_TIME, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by actkeys_viewall(), clip_draw_dopesheet_channels(), draw_channel_names(), draw_nla_track_list(), edge_pan_apply_delta(), nlaedit_viewall(), reset_exec(), scene_range_frame_exec(), scroller_activate_apply(), sequencer_view_all_preview_exec(), UI_view2d_edge_pan_cancel(), UI_view2d_smooth_view(), view2d_smoothview_invoke(), view_pan_apply_ex(), view_zoomdrag_apply(), and view_zoomstep_apply_ex().
| char char char char void UI_view2d_text_cache_add | ( | View2D * | v2d, |
| float | x, | ||
| float | y, | ||
| const char * | str, | ||
| size_t | str_len, | ||
| const unsigned char | col[4] ) |
Cached text drawing in v2d, to allow pixel-aligned draw as post process.
Definition at line 2077 of file view2d.cc.
References BLI_assert, BLI_LINKS_PREPEND, BLI_memarena_alloc(), BLI_memarena_new(), col, View2DString::col, g_v2d_strings, g_v2d_strings_arena, MEM_SIZE_OPTIMAL, View2DString::mval, View2DString::pack, View2DString::rect, str, View2DString::str, and UI_view2d_view_to_region_clip().
Referenced by draw_handle_transform_text(), draw_histogram(), draw_vectorscope_graticule(), draw_waveform_graticule(), nla_draw_strip_frames_text(), and retime_speed_text_draw().
| void UI_view2d_text_cache_add_rectf | ( | View2D * | v2d, |
| const rctf * | rect_view, | ||
| const char * | str, | ||
| size_t | str_len, | ||
| const unsigned char | col[4] ) |
No clip (yet).
Definition at line 2107 of file view2d.cc.
References BLI_assert, BLI_LINKS_PREPEND, BLI_memarena_alloc(), BLI_memarena_new(), col, View2DString::col, g_v2d_strings, g_v2d_strings_arena, MEM_SIZE_OPTIMAL, View2DString::mval, View2DString::pack, View2DString::rect, str, View2DString::str, UI_view2d_view_to_region_rcti_clip(), rcti::xmin, and rcti::ymin.
Referenced by draw_seq_in_view(), draw_seq_text_overlay(), and nla_draw_strip_text().
| void UI_view2d_text_cache_draw | ( | ARegion * | region | ) |
Definition at line 2137 of file view2d.cc.
References BLF_CLIPPING, BLF_clipping(), BLF_color4ubv(), BLF_default(), BLF_disable(), BLF_draw_default(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable(), BLF_height(), BLF_set_default(), BLI_memarena_free(), BLI_rcti_size_x(), BLI_rcti_size_y(), ceil(), View2DString::col, g_v2d_strings, g_v2d_strings_arena, View2DString::mval, View2DString::next, View2DString::pack, View2DString::rect, View2DString::str, View2DString::ub, wmOrtho2_region_pixelspace(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by draw_histogram(), draw_seq_in_view(), draw_seq_strips(), draw_vectorscope_graticule(), draw_waveform_graticule(), and nla_main_region_draw().
Definition at line 1032 of file view2d.cc.
References view2d_totRect_set_resize().
Referenced by console_textview_update_rect(), ED_region_header_layout(), ED_region_panels_layout_ex(), file_calc_previews(), info_textview_update_rect(), blender::ed::outliner::outliner_update_viewable_area(), blender::ed::asset::shelf::region_layout(), sequencer_draw_preview(), and blender::ed::spreadsheet::update_view2d_tot_rect().
| void UI_view2d_view_ortho | ( | const View2D * | v2d | ) |
Set view matrices to use 'cur' rect as viewing frame for View2D drawing.
Definition at line 1091 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rctf_translate(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, eps, View2D::flag, floorf, View2D::mask, V2D_PIXELOFS_X, V2D_PIXELOFS_Y, view2d_map_cur_using_mask(), wmOrtho2(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_channel_region_draw(), action_main_region_draw(), clip_channels_region_draw(), clip_draw_sfra_efra(), console_main_region_draw(), dopesheet_region_draw(), draw_channels(), draw_icon_centered(), blender::ed::outliner::draw_outliner(), draw_seq_strips(), draw_seq_timeline_channels(), draw_timeline_backdrop(), draw_timeline_seq(), draw_timeline_seq_display(), ED_region_header_layout(), ED_region_panels_draw(), ED_region_panels_layout_ex(), file_main_region_draw(), graph_channel_region_draw(), graph_main_region_draw(), graph_region_draw(), hud_region_draw(), image_main_region_draw(), info_main_region_draw(), nla_main_region_draw(), nla_track_region_draw(), blender::ed::space_node::node_draw_space(), blender::ed::asset::shelf::region_draw(), region_draw_blocks_in_view2d(), blender::ed::asset::shelf::region_layout(), script_main_region_draw(), sequencer_draw_preview(), sequencer_retiming_speed_draw(), blender::ed::space_node::snode_setup_v2d(), and view2d_draw_lines_internal().
Set view matrices to only use one axis of 'cur' only
| xaxis | if non-zero, only use cur x-axis, otherwise use cur-yaxis (mostly this will be used for x). |
Definition at line 1132 of file view2d.cc.
References view2d_map_cur_using_mask(), wmOrtho2(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_main_region_draw(), action_main_region_draw_overlay(), draw_timeline_markers(), graph_main_region_draw(), and nla_main_region_draw().
| void UI_view2d_view_restore | ( | const bContext * | C | ) |
Restore view matrices after drawing.
Definition at line 1158 of file view2d.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), CTX_wm_region(), GPU_matrix_identity_set(), and wmOrtho2().
Referenced by action_channel_region_draw(), action_main_region_draw(), clip_channels_region_draw(), clip_main_region_draw(), console_main_region_draw(), dopesheet_region_draw(), draw_channels(), draw_icon_centered(), draw_timeline_seq_display(), ED_region_clear(), ED_region_header_layout(), ED_region_panels_draw(), file_main_region_draw(), graph_channel_region_draw(), graph_main_region_draw(), graph_region_draw(), hud_region_layout(), image_main_region_draw(), info_main_region_draw(), nla_main_region_draw(), nla_track_region_draw(), blender::ed::space_node::node_draw_space(), blender::ed::outliner::outliner_main_region_draw(), region_clear_fully_transparent(), blender::ed::asset::shelf::region_draw(), region_draw_blocks_in_view2d(), script_main_region_draw(), sequencer_draw_gpencil_overlay(), and sequencer_draw_preview().
| void UI_view2d_view_to_region | ( | const View2D * | v2d, |
| float | x, | ||
| float | y, | ||
| int * | r_region_x, | ||
| int * | r_region_y ) |
Convert from 2d-view space to screen/region space
| x,y | Coordinates to convert. |
| r_region_x,r_region_y | Resultant coordinates. |
Definition at line 1718 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), clamp_float_to_int(), View2D::cur, View2D::mask, rctf::xmin, rcti::xmin, rctf::ymin, and rcti::ymin.
Referenced by draw_movieclip_buffer(), draw_movieclip_muted(), draw_render_info(), draw_stabilization_border(), DRW_draw_cursor_2d_ex(), ED_clip_point_stable_pos(), ED_clip_point_stable_pos__reverse(), ED_image_mouse_pos(), ED_image_point_pos(), ED_image_point_pos__reverse(), ED_mask_draw_region(), ED_region_grid_draw(), image_main_region_draw(), and projectIntViewEx().
| bool UI_view2d_view_to_region_clip | ( | const View2D * | v2d, |
| float | x, | ||
| float | y, | ||
| int * | r_region_x, | ||
| int * | r_region_y ) |
Convert from 2d-View space to screen/region space
| x,y | Coordinates to convert. |
| r_region_x,r_region_y | Resultant coordinates. |
Definition at line 1697 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, int, View2D::mask, V2D_IS_CLIPPED, rctf::xmin, rcti::xmin, rctf::ymin, and rcti::ymin.
Referenced by do_lasso_select_mesh_uv_is_point_inside(), blender::ed::space_node::do_lasso_select_node(), gpencil_point_to_xy(), mouse_select_knot(), nearest_fcurve_vert_store(), and UI_view2d_text_cache_add().
| void UI_view2d_view_to_region_fl | ( | const View2D * | v2d, |
| float | x, | ||
| float | y, | ||
| float * | r_region_x, | ||
| float * | r_region_y ) |
Definition at line 1734 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, View2D::mask, rctf::xmin, rcti::xmin, rctf::ymin, and rcti::ymin.
Referenced by brush_painter_2d_tex_mapping(), clip_main_region_draw(), draw_distortion(), draw_tracking_tracks(), drawSnapping(), ED_uvedit_nearest_uv_multi(), and gizmo2d_origin_to_region().
Definition at line 1803 of file view2d.cc.
References BLI_rctf_rcti_copy(), BLI_rctf_transform_calc_m4_pivot_min(), View2D::cur, mask(), View2D::mask, and unit_m4().
Referenced by gizmo2d_xform_draw_prepare(), EdgeSlideData::update_proj_mat(), and VertSlideData::update_proj_mat().
Definition at line 1781 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), clamp_rctf_to_rcti(), View2D::cur, float, View2D::mask, rctf::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rctf::ymin, and rcti::ymin.
Referenced by snapNode(), and ui_searchbox_region_layout_fn().
| bool UI_view2d_view_to_region_rcti_clip | ( | const View2D * | v2d, |
| const rctf * | rect_src, | ||
| rcti * | rect_dst ) |
Definition at line 1811 of file view2d.cc.
References BLI_assert, BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), clamp_rctf_to_rcti(), View2D::cur, float, View2D::mask, V2D_IS_CLIPPED, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by UI_view2d_text_cache_add_rectf().
| bool UI_view2d_view_to_region_segment_clip | ( | const View2D * | v2d, |
| const float | xy_a[2], | ||
| const float | xy_b[2], | ||
| int | r_region_a[2], | ||
| int | r_region_b[2] ) |
Definition at line 1746 of file view2d.cc.
References BLI_rctf_isect_segment(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, int, View2D::mask, V2D_IS_CLIPPED, rctf::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rctf::ymin, and rcti::ymin.
Referenced by do_lasso_select_mesh_uv_is_edge_inside().
Definition at line 1686 of file view2d.cc.
References BLI_rctf_size_x(), BLI_rcti_size_x(), View2D::cur, View2D::mask, rctf::xmin, and rcti::xmin.
Referenced by azone_clipped_rect_calc(), calculateCenterCursor2D(), draw_current_frame(), draw_horizontal_scale_indicators(), frame_width_pixelspace_get(), mouse_over_key_get_from_strip(), pixels_to_view_width(), retime_key_draw(), retiming_fake_key_frame_clicked(), sequencer_retiming_draw_continuity(), strip_end_screenspace_get(), and strip_start_screenspace_get().
Definition at line 1691 of file view2d.cc.
References BLI_rctf_size_y(), BLI_rcti_size_y(), View2D::cur, View2D::mask, rctf::ymin, and rcti::ymin.
Referenced by azone_clipped_rect_calc(), calculateCenterCursor2D(), channel_height_pixelspace_get(), draw_vertical_scale_indicators(), pixels_to_view_height(), strip_box_get(), and ui_searchbox_region_layout_fn().
| void UI_view2d_zoom_cache_reset | ( | ) |
Definition at line 1037 of file view2d.cc.
References BLF_cache_clear(), and G.
Referenced by reset_exec(), view2d_smoothview_invoke(), view_zoomdrag_exit(), view_zoomstep_exit(), and wm_file_read_pre().
| void VIEW2D_GGT_navigate_impl | ( | wmGizmoGroupType * | gzgt, |
| const char * | idname ) |
Caller defines the name for gizmo group.
Definition at line 251 of file view2d_gizmo_navigate.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::setup, WIDGETGROUP_navigate_draw_prepare(), WIDGETGROUP_navigate_poll(), WIDGETGROUP_navigate_setup(), WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL, WM_GIZMOGROUPTYPE_PERSISTENT, and WM_GIZMOGROUPTYPE_SCALE.
Referenced by CLIP_GGT_navigate(), IMAGE_GGT_navigate(), and SEQUENCER_GGT_navigate().