Blender V2.61 - r43446
|
#include <float.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "BKE_global.h"
#include "WM_api.h"
#include "BIF_gl.h"
#include "BLF_api.h"
#include "ED_anim_api.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_view2d.h"
#include "interface_intern.h"
Go to the source code of this file.
Classes | |
struct | View2DGrid |
struct | View2DScrollers |
struct | View2DString |
Typedefs | |
typedef struct View2DString | View2DString |
Functions | |
static int | view2d_scroll_mapped (int scroll) |
static void | view2d_masks (View2D *v2d) |
void | UI_view2d_region_reinit (View2D *v2d, short type, int winx, int winy) |
void | UI_view2d_curRect_validate_resize (View2D *v2d, int resize) |
void | UI_view2d_curRect_validate (View2D *v2d) |
void | UI_view2d_sync (bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) |
void | UI_view2d_curRect_reset (View2D *v2d) |
void | UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resize) |
void | UI_view2d_totRect_set (View2D *v2d, int width, int height) |
int | UI_view2d_tab_set (View2D *v2d, int tab) |
static void | view2d_map_cur_using_mask (View2D *v2d, rctf *curmasked) |
void | UI_view2d_view_ortho (View2D *v2d) |
void | UI_view2d_view_orthoSpecial (ARegion *ar, View2D *v2d, short xaxis) |
void | UI_view2d_view_restore (const bContext *C) |
static void | step_to_grid (float *step, int *power, int unit) |
View2DGrid * | UI_view2d_grid_calc (Scene *scene, View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int UNUSED(winx), int winy) |
void | UI_view2d_grid_draw (View2D *v2d, View2DGrid *grid, int flag) |
void | UI_view2d_constant_grid_draw (View2D *v2d) |
void | UI_view2d_grid_size (View2DGrid *grid, float *r_dx, float *r_dy) |
void | UI_view2d_grid_free (View2DGrid *grid) |
View2DScrollers * | UI_view2d_scrollers_calc (const bContext *C, View2D *v2d, short xunits, short xclamp, short yunits, short yclamp) |
static void | scroll_printstr (Scene *scene, float x, float y, float val, int power, short unit, char dir) |
void | UI_view2d_scrollers_draw (const bContext *C, View2D *v2d, View2DScrollers *vs) |
void | UI_view2d_scrollers_free (View2DScrollers *scrollers) |
void | UI_view2d_listview_cell_to_view (View2D *v2d, short columnwidth, short rowheight, float startx, float starty, int column, int row, rctf *rect) |
void | UI_view2d_listview_view_to_cell (View2D *v2d, short columnwidth, short rowheight, float startx, float starty, float viewx, float viewy, int *column, int *row) |
void | UI_view2d_listview_visible_cells (View2D *v2d, short columnwidth, short rowheight, float startx, float starty, int *column_min, int *column_max, int *row_min, int *row_max) |
void | UI_view2d_region_to_view (View2D *v2d, int x, int y, float *viewx, float *viewy) |
void | UI_view2d_view_to_region (View2D *v2d, float x, float y, int *regionx, int *regiony) |
void | UI_view2d_to_region_no_clip (View2D *v2d, float x, float y, int *regionx, int *regiony) |
View2D * | UI_view2d_fromcontext (const bContext *C) |
View2D * | UI_view2d_fromcontext_rwin (const bContext *C) |
void | UI_view2d_getscale (View2D *v2d, float *x, float *y) |
short | UI_view2d_mouse_in_scrollers (const bContext *C, View2D *v2d, int x, int y) |
void | UI_view2d_text_cache_add (View2D *v2d, float x, float y, const char *str, const char col[4]) |
void | UI_view2d_text_cache_rectf (View2D *v2d, rctf *rect, const char *str, const char col[4]) |
void | UI_view2d_text_cache_draw (ARegion *ar) |
Variables | |
static ListBase | strings = {NULL, NULL} |
Definition in file view2d.c.
typedef struct View2DString View2DString |
static void scroll_printstr | ( | Scene * | scene, |
float | x, | ||
float | y, | ||
float | val, | ||
int | power, | ||
short | unit, | ||
char | dir | ||
) | [static] |
Definition at line 1507 of file view2d.c.
References ANIM_timecode_string_from_frame(), BLF_draw_default_ascii(), ELEM, len(), strlen(), V2D_UNIT_DEGREES, V2D_UNIT_SECONDS, and V2D_UNIT_TIME.
Referenced by UI_view2d_scrollers_draw().
static void step_to_grid | ( | float * | step, |
int * | power, | ||
int | unit | ||
) | [static] |
Definition at line 1069 of file view2d.c.
References pow(), and V2D_UNIT_FRAMES.
Referenced by UI_view2d_grid_calc().
void UI_view2d_constant_grid_draw | ( | View2D * | v2d | ) |
Definition at line 1301 of file view2d.c.
References View2D::cur, step(), TH_BACK, UI_ThemeColorShade(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq(), and drawnodespace().
void UI_view2d_curRect_reset | ( | View2D * | v2d | ) |
Definition at line 789 of file view2d.c.
References View2D::align, View2D::cur, View2D::mask, V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_NEG_Y, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
void UI_view2d_curRect_validate | ( | View2D * | v2d | ) |
Definition at line 715 of file view2d.c.
References UI_view2d_curRect_validate_resize().
Referenced by draw_image_seq(), reset_exec(), scroller_activate_apply(), sequencer_view_all_exec(), sequencer_view_all_preview_exec(), sequencer_view_selected_exec(), snode_home(), view_borderzoom_exec(), view_pan_apply(), view_zoomdrag_apply(), and view_zoomstep_apply().
void UI_view2d_curRect_validate_resize | ( | View2D * | v2d, |
int | resize | ||
) |
Definition at line 324 of file view2d.c.
References ABS, View2D::align, CLAMP(), View2D::cur, KDL::diff(), View2D::keepofs, View2D::keeptot, View2D::keepzoom, View2D::mask, View2D::max, View2D::maxzoom, View2D::min, View2D::minzoom, View2D::oldwinx, View2D::oldwiny, View2D::tot, V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_NEG_Y, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, V2D_KEEPASPECT, V2D_KEEPOFS_X, V2D_KEEPOFS_Y, V2D_KEEPTOT_STRICT, V2D_KEEPZOOM, V2D_LIMITZOOM, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, view2d_masks(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by UI_view2d_curRect_validate(), UI_view2d_region_reinit(), and UI_view2d_totRect_set_resize().
Definition at line 1949 of file view2d.c.
References CTX_wm_area(), CTX_wm_region(), NULL, and ARegion::v2d.
Definition at line 1960 of file view2d.c.
References BKE_area_find_region_type(), CTX_wm_area(), CTX_wm_region(), NULL, ARegion::regiontype, RGN_TYPE_WINDOW, and ARegion::v2d.
void UI_view2d_getscale | ( | View2D * | v2d, |
float * | x, | ||
float * | y | ||
) |
Definition at line 1981 of file view2d.c.
References View2D::cur, View2D::mask, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by draw_cfra_number(), draw_fcurve_samples(), draw_fcurve_vertices_handles(), draw_graph_cfra(), draw_keylist(), draw_marker(), draw_tracks_curves(), and nla_action_draw_keyframes().
View2DGrid* UI_view2d_grid_calc | ( | Scene * | scene, |
View2D * | v2d, | ||
short | xunits, | ||
short | xclamp, | ||
short | yunits, | ||
short | yclamp, | ||
int | UNUSEDwinx, | ||
int | winy | ||
) |
Definition at line 1120 of file view2d.c.
References View2D::cur, View2DGrid::dx, View2DGrid::dy, ELEM, FPS, View2D::mask, MEM_callocN(), NULL, View2DGrid::powerx, View2DGrid::powery, View2DGrid::startx, View2DGrid::starty, step_to_grid(), U, V2D_ARG_DUMMY, V2D_GRID_CLAMP, UserDef::v2d_min_gridsize, V2D_UNIT_SECONDS, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rctf::ymax, and rctf::ymin.
void UI_view2d_grid_draw | ( | View2D * | v2d, |
View2DGrid * | grid, | ||
int | flag | ||
) |
Definition at line 1192 of file view2d.c.
References View2D::cur, View2DGrid::dx, View2DGrid::dy, View2D::mask, NULL, View2DGrid::startx, View2DGrid::starty, step(), TH_GRID, U, UI_ThemeColor(), UI_ThemeColorShade(), V2D_HORIZONTAL_AXIS, V2D_HORIZONTAL_FINELINES, V2D_HORIZONTAL_LINES, UserDef::v2d_min_gridsize, V2D_VERTICAL_AXIS, V2D_VERTICAL_LINES, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rcti::ymax, rctf::ymax, rctf::ymin, and rcti::ymin.
Referenced by action_main_area_draw(), clip_draw_graph(), graph_main_area_draw(), nla_main_area_draw(), and time_main_area_draw().
void UI_view2d_grid_free | ( | View2DGrid * | grid | ) |
Definition at line 1339 of file view2d.c.
References MEM_freeN().
Referenced by action_main_area_draw(), clip_draw_graph(), graph_main_area_draw(), nla_main_area_draw(), and time_main_area_draw().
void UI_view2d_grid_size | ( | View2DGrid * | grid, |
float * | r_dx, | ||
float * | r_dy | ||
) |
Definition at line 1332 of file view2d.c.
References View2DGrid::dx, and View2DGrid::dy.
Referenced by draw_fcurve_curve().
void UI_view2d_listview_cell_to_view | ( | View2D * | v2d, |
short | columnwidth, | ||
short | rowheight, | ||
float | startx, | ||
float | starty, | ||
int | column, | ||
int | row, | ||
rctf * | rect | ||
) |
Definition at line 1773 of file view2d.c.
References View2D::align, ELEM, NULL, 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_listview_view_to_cell | ( | View2D * | v2d, |
short | columnwidth, | ||
short | rowheight, | ||
float | startx, | ||
float | starty, | ||
float | viewx, | ||
float | viewy, | ||
int * | column, | ||
int * | row | ||
) |
Definition at line 1814 of file view2d.c.
References fabsf, floorf, and NULL.
Referenced by animchannels_mouseclick_invoke(), animchannels_rename_invoke(), mouse_action_keys(), mouse_nla_strips(), nlachannels_mouseclick_invoke(), outliner_item_activate(), and UI_view2d_listview_visible_cells().
void UI_view2d_listview_visible_cells | ( | View2D * | v2d, |
short | columnwidth, | ||
short | rowheight, | ||
float | startx, | ||
float | starty, | ||
int * | column_min, | ||
int * | column_max, | ||
int * | row_min, | ||
int * | row_max | ||
) |
Definition at line 1847 of file view2d.c.
References View2D::cur, UI_view2d_listview_view_to_cell(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 1995 of file view2d.c.
References co, CTX_wm_region(), IN_2D_HORIZ_SCROLL, IN_2D_VERT_SCROLL, View2D::scroll, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_VERTICAL, view2d_scroll_mapped(), ARegion::winrct, rcti::xmin, and rcti::ymin.
void UI_view2d_region_reinit | ( | View2D * | v2d, |
short | type, | ||
int | winx, | ||
int | winy | ||
) |
Definition at line 166 of file view2d.c.
References View2D::align, View2D::cur, View2D::flag, init(), View2D::keepofs, View2D::keeptot, View2D::keepzoom, View2D::max, View2D::maxzoom, View2D::min, View2D::minzoom, uiStyle::panelzoom, View2D::scroll, View2D::tot, UI_GetStyle(), UI_view2d_curRect_validate_resize(), UI_view2d_totRect_set_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_INITIALISED, V2D_KEEPASPECT, V2D_KEEPTOT_BOUNDS, V2D_KEEPTOT_STRICT, V2D_KEEPZOOM, V2D_LIMITZOOM, V2D_LOCKOFS_Y, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_SCROLL_BOTTOM, V2D_SCROLL_HORIZONTAL_HIDE, V2D_SCROLL_RIGHT, V2D_SCROLL_VERTICAL_HIDE, V2D_SCROLL_WIDTH, view2d_masks(), View2D::winx, View2D::winy, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_channel_area_init(), action_main_area_init(), buttons_header_area_init(), clip_main_area_init(), clip_preview_area_init(), console_main_area_init(), ED_region_header_init(), ED_region_panels_init(), file_main_area_draw(), file_main_area_init(), file_ui_area_init(), graph_channel_area_init(), graph_main_area_init(), info_main_area_init(), logic_main_area_init(), nla_channel_area_init(), nla_main_area_init(), node_main_area_init(), outliner_main_area_init(), script_main_area_init(), sequencer_main_area_init(), sequencer_preview_area_init(), text_main_area_init(), time_main_area_init(), and userpref_main_area_draw().
void UI_view2d_region_to_view | ( | View2D * | v2d, |
int | x, | ||
int | y, | ||
float * | viewx, | ||
float * | viewy | ||
) |
Definition at line 1870 of file view2d.c.
References View2D::cur, div, View2D::mask, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by actkeys_select_leftright_invoke(), animchannels_mouseclick_invoke(), animchannels_rename_invoke(), border_select_exec(), borderselect_action(), borderselect_anim_channels(), borderselect_graphkeys(), borderselect_nla_strips(), CalcSnapGeometry(), circle_select_exec(), createTransActionData(), createTransNlaData(), createTransSeqData(), cut_links_exec(), do_node_add(), ed_marker_border_select_exec(), ed_marker_select(), file_hilight_set(), find_file_mouse_rect(), find_nearest_seq(), frame_from_event(), gp_stroke_convertcoords(), grab_clone_modal(), graphkeys_click_insert_invoke(), graphkeys_select_leftright_invoke(), graphview_cursor_setprops(), image_sample_apply(), image_sample_line_exec(), imapaint_paint_stroke(), mouse_action_keys(), mouse_frame_side(), mouse_nla_strips(), nlachannels_mouseclick_invoke(), nlaedit_select_leftright_invoke(), node_add_file_invoke(), node_border_select_invoke(), node_borderselect_exec(), node_link_invoke(), node_link_modal(), node_mouse_select(), node_resize_invoke(), node_resize_modal(), outliner_item_activate(), outliner_item_openclose(), outliner_item_rename(), outliner_operation(), previewrange_define_exec(), select_invoke(), select_linked_internal(), select_loop_invoke(), sequencer_borderselect_exec(), sequencer_generic_invoke_xy__internal(), sequencer_select_invoke(), set_2d_cursor_invoke(), set_tile_invoke(), TimeSlide(), TimeTranslate(), view_borderzoom_exec(), view_ghost_border_exec(), view_zoomdrag_invoke(), view_zoomin_invoke(), and view_zoomout_invoke().
View2DScrollers* UI_view2d_scrollers_calc | ( | const bContext * | C, |
View2D * | v2d, | ||
short | xunits, | ||
short | xclamp, | ||
short | yunits, | ||
short | yclamp | ||
) |
Definition at line 1368 of file view2d.c.
References CLAMP(), CTX_data_scene(), View2D::cur, View2DScrollers::grid, View2DScrollers::hor, View2D::hor, View2DScrollers::hor_max, View2DScrollers::hor_min, View2DScrollers::horfull, View2D::keeptot, MEM_callocN(), View2D::scroll, View2D::tot, UI_view2d_grid_calc(), V2D_SCROLL_BOTTOM, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_HORIZONTAL_FULLR, V2D_SCROLL_LEFT, V2D_SCROLL_SCALE_HORIZONTAL, V2D_SCROLL_SCALE_VERTICAL, V2D_SCROLL_VERTICAL, V2D_SCROLL_VERTICAL_FULLR, V2D_SCROLLER_HANDLE_SIZE, View2DScrollers::vert, View2D::vert, View2DScrollers::vert_max, View2DScrollers::vert_min, View2DScrollers::vertfull, view2d_scroll_mapped(), View2DScrollers::xclamp, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, View2DScrollers::xunits, View2DScrollers::yclamp, rctf::ymax, rcti::ymax, rctf::ymin, rcti::ymin, and View2DScrollers::yunits.
void UI_view2d_scrollers_draw | ( | const bContext * | C, |
View2D * | v2d, | ||
View2DScrollers * | vs | ||
) |
Definition at line 1548 of file view2d.c.
References BLF_disable_default(), BLF_enable_default(), BLF_ROTATION, BLF_rotation_default(), CTX_data_scene(), View2D::cur, View2DGrid::dx, View2DGrid::dy, FPS, View2DScrollers::grid, View2D::hor, View2DScrollers::hor, View2DScrollers::hor_max, View2DScrollers::hor_min, View2DScrollers::horfull, View2D::keepzoom, View2DGrid::powerx, View2DGrid::powery, View2D::scroll, scroll_printstr(), View2D::scroll_ui, View2DGrid::startx, View2DGrid::starty, state, TH_BACK, TH_TEXT, bTheme::tui, UI_GetTheme(), UI_SCROLL_ARROWS, UI_SCROLL_PRESSED, UI_ThemeColor(), uiWidgetScrollDraw(), V2D_GRID_CLAMP, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_SCROLL_H_ACTIVE, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_SCALE_HORIZONTAL, V2D_SCROLL_SCALE_VERTICAL, V2D_SCROLL_V_ACTIVE, V2D_SCROLL_VERTICAL, V2D_SCROLLER_HANDLE_SIZE, V2D_UNIT_DEGREES, V2D_UNIT_FRAMES, V2D_UNIT_FRAMESCALE, V2D_UNIT_SECONDS, V2D_UNIT_SECONDSSEQ, simple_enum_gen::val, View2D::vert, View2DScrollers::vert, View2DScrollers::vert_max, View2DScrollers::vert_min, View2DScrollers::vertfull, view2d_scroll_mapped(), ThemeUI::wcol_scroll, View2DScrollers::xclamp, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, View2DScrollers::xunits, View2DScrollers::yclamp, rctf::ymax, rcti::ymax, rctf::ymin, rcti::ymin, and View2DScrollers::yunits.
void UI_view2d_scrollers_free | ( | View2DScrollers * | scrollers | ) |
Definition at line 1754 of file view2d.c.
References View2DScrollers::grid, and MEM_freeN().
Referenced by action_channel_area_draw(), action_main_area_draw(), clip_preview_area_draw(), console_main_area_draw(), draw_timeline_seq(), drawnodespace(), ED_region_panels(), file_main_area_draw(), graph_channel_area_draw(), graph_main_area_draw(), info_main_area_draw(), logic_main_area_draw(), nla_channel_area_draw(), nla_main_area_draw(), outliner_main_area_draw(), scroller_activate_init(), and time_main_area_draw().
Definition at line 723 of file view2d.c.
References bScreen::areabase, View2D::cur, ED_region_tag_redraw(), ListBase::first, View2D::flag, ScrArea::next, ARegion::next, ScrArea::regionbase, ARegion::v2d, V2D_LOCK_COPY, V2D_VIEWSYNC_AREA_VERTICAL, V2D_VIEWSYNC_SCREEN_TIME, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by actkeys_viewall(), draw_channel_names(), draw_nla_channel_list(), graphkeys_viewall(), nlaedit_viewall(), reset_exec(), scroller_activate_apply(), sequencer_view_all_exec(), sequencer_view_all_preview_exec(), sequencer_view_selected_exec(), view_borderzoom_exec(), view_pan_apply(), view_zoomdrag_apply(), and view_zoomstep_apply().
int UI_view2d_tab_set | ( | View2D * | v2d, |
int | tab | ||
) |
Definition at line 907 of file view2d.c.
References View2D::cur, MEM_callocN(), MEM_freeN(), View2D::tab_cur, View2D::tab_num, View2D::tab_offset, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ED_region_panels().
void UI_view2d_text_cache_add | ( | View2D * | v2d, |
float | x, | ||
float | y, | ||
const char * | str, | ||
const char | col[4] | ||
) |
Definition at line 2033 of file view2d.c.
References BLI_addtail(), View2DString::col, len(), MEM_callocN(), View2DString::mval, View2DString::pack, strlen(), UI_view2d_view_to_region(), and V2D_IS_CLIPPED.
Referenced by draw_seq_handle(), and nla_draw_strip_frames_text().
void UI_view2d_text_cache_draw | ( | ARegion * | ar | ) |
Definition at line 2072 of file view2d.c.
References BLF_CLIPPING, BLF_clipping_default(), BLF_disable_default(), BLF_draw_default(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable_default(), BLF_height_default(), BLI_freelistN(), View2DString::col, ED_region_pixelspace(), ListBase::first, View2DString::mval, View2DString::next, View2DString::pack, View2DString::rect, str, View2DString::ub, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by draw_timeline_seq(), and nla_main_area_draw().
Definition at line 2054 of file view2d.c.
References BLI_addtail(), View2DString::col, len(), MEM_callocN(), View2DString::mval, View2DString::pack, View2DString::rect, strlen(), UI_view2d_to_region_no_clip(), rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by draw_seq_text(), and nla_draw_strip_text().
void UI_view2d_to_region_no_clip | ( | View2D * | v2d, |
float | x, | ||
float | y, | ||
int * | regionx, | ||
int * | regiony | ||
) |
Definition at line 1922 of file view2d.c.
References View2D::cur, View2D::mask, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by draw_image_buffer(), draw_image_buffer_tiled(), draw_image_grid(), draw_image_paint_helpers(), draw_movieclip_buffer(), ED_clip_point_stable_pos(), projectIntView(), ui_searchbox_create(), ui_tooltip_create(), and UI_view2d_text_cache_rectf().
void UI_view2d_totRect_set | ( | View2D * | v2d, |
int | width, | ||
int | height | ||
) |
Definition at line 902 of file view2d.c.
References UI_view2d_totRect_set_resize().
Referenced by buttons_header_buttons(), console_textview_update_rect(), draw_image_seq(), draw_outliner(), ED_region_header(), ED_region_panels(), file_calc_previews(), graph_draw_channel_names(), and info_textview_update_rect().
void UI_view2d_totRect_set_resize | ( | View2D * | v2d, |
int | width, | ||
int | height, | ||
int | resize | ||
) |
Definition at line 839 of file view2d.c.
References abs(), View2D::align, ELEM3, G, G_DEBUG, View2D::scroll, View2D::tot, UI_view2d_curRect_validate_resize(), V2D_ALIGN_NO_NEG_X, V2D_ALIGN_NO_NEG_Y, V2D_ALIGN_NO_POS_X, V2D_ALIGN_NO_POS_Y, V2D_SCROLL_HEIGHT, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_VERTICAL, V2D_SCROLL_WIDTH, view2d_scroll_mapped(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by UI_view2d_region_reinit(), and UI_view2d_totRect_set().
void UI_view2d_view_ortho | ( | View2D * | v2d | ) |
Definition at line 978 of file view2d.c.
References View2D::cur, View2D::flag, floorf, View2D::mask, V2D_PIXELOFS_X, V2D_PIXELOFS_Y, view2d_map_cur_using_mask(), wmOrtho2(), rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by action_channel_area_draw(), action_main_area_draw(), buttons_header_area_draw(), clip_preview_area_draw(), console_main_area_draw(), draw_image_seq(), draw_outliner(), draw_timeline_seq(), drawnodespace(), ED_region_header(), ED_region_panels(), file_main_area_draw(), file_ui_area_draw(), graph_channel_area_draw(), graph_main_area_draw(), image_main_area_draw(), info_main_area_draw(), logic_main_area_draw(), nla_channel_area_draw(), nla_main_area_draw(), script_main_area_draw(), and time_main_area_draw().
Definition at line 1017 of file view2d.c.
References view2d_map_cur_using_mask(), ARegion::winx, ARegion::winy, wmOrtho2(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by action_main_area_draw(), ANIM_draw_cfra(), draw_graph_cfra(), draw_timeline_seq(), graph_main_area_draw(), nla_main_area_draw(), and time_main_area_draw().
void UI_view2d_view_restore | ( | const bContext * | C | ) |
Definition at line 1044 of file view2d.c.
References CTX_wm_region(), ARegion::winrct, wmOrtho2(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
void UI_view2d_view_to_region | ( | View2D * | v2d, |
float | x, | ||
float | y, | ||
int * | regionx, | ||
int * | regiony | ||
) |
Definition at line 1895 of file view2d.c.
References View2D::cur, View2D::mask, V2D_IS_CLIPPED, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by gp_stroke_eraser_dostroke(), gp_strokepoint_convertcoords(), mouse_select_knot(), nearest_fcurve_vert_store(), and UI_view2d_text_cache_add().
Definition at line 956 of file view2d.c.
References View2D::cur, if(), View2D::mask, View2D::scroll, view2d_scroll_mapped(), View2D::winx, View2D::winy, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by UI_view2d_view_ortho(), and UI_view2d_view_orthoSpecial().
static void view2d_masks | ( | View2D * | v2d | ) | [static] |
Definition at line 84 of file view2d.c.
References View2D::cur, View2D::hor, View2D::mask, View2D::scroll, View2D::tot, V2D_SCROLL_BOTTOM, V2D_SCROLL_BOTTOM_O, V2D_SCROLL_HEIGHT, V2D_SCROLL_HORIZONTAL, V2D_SCROLL_HORIZONTAL_HIDE, V2D_SCROLL_LEFT, V2D_SCROLL_RIGHT, V2D_SCROLL_SCALE_HORIZONTAL, V2D_SCROLL_SCALE_VERTICAL, V2D_SCROLL_TOP, V2D_SCROLL_VERTICAL, V2D_SCROLL_VERTICAL_HIDE, V2D_SCROLL_WIDTH, View2D::vert, view2d_scroll_mapped(), View2D::winx, View2D::winy, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by UI_view2d_curRect_validate_resize(), and UI_view2d_region_reinit().
static int view2d_scroll_mapped | ( | int | scroll | ) | [static] |
Definition at line 74 of file view2d.c.
References V2D_SCROLL_HORIZONTAL, V2D_SCROLL_HORIZONTAL_HIDE, V2D_SCROLL_VERTICAL, and V2D_SCROLL_VERTICAL_HIDE.
Referenced by UI_view2d_mouse_in_scrollers(), UI_view2d_scrollers_calc(), UI_view2d_scrollers_draw(), UI_view2d_totRect_set_resize(), view2d_map_cur_using_mask(), and view2d_masks().
Definition at line 2020 of file view2d.c.
Referenced by clErrorString(), view3d_cached_text_draw_add(), view3d_cached_text_draw_begin(), and view3d_cached_text_draw_end().