Blender  V3.3
UI_view2d.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
10 #pragma once
11 
12 #include "BLI_compiler_attrs.h"
13 #include "BLI_rect.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /* ------------------------------------------ */
20 /* Settings and Defines: */
21 
22 /* ---- General Defines ---- */
23 
24 /* generic value to use when coordinate lies out of view when converting */
25 #define V2D_IS_CLIPPED 12000
26 
27 /* Common View2D view types
28  * NOTE: only define a type here if it completely sets all (+/- a few) of the relevant flags
29  * and settings for a View2D region, and that set of settings is used in more
30  * than one specific place
31  */
33  /* custom view type (region has defined all necessary flags already) */
35  /* standard (only use this when setting up a new view, as a sensible base for most settings) */
37  /* listview (i.e. Outliner) */
39  /* Stack-view (this is basically a list where new items are added at the top). */
41  /* headers (this is basically the same as listview, but no y-panning) */
43  /* ui region containing panels */
45 };
46 
47 /* ---- Defines for Scroller Arguments ----- */
48 
49 /* ------ Defines for Scrollers ----- */
50 
53 /* Maximum has to include outline which varies with line width. */
54 #define V2D_SCROLL_HEIGHT ((0.45f * U.widget_unit) + (2.0f * U.pixelsize))
55 #define V2D_SCROLL_WIDTH ((0.45f * U.widget_unit) + (2.0f * U.pixelsize))
56 
57 /* Alpha of scrollbar when at minimum size. */
58 #define V2D_SCROLL_MIN_ALPHA (0.4f)
59 
60 /* Minimum size needs to include outline which varies with line width. */
61 #define V2D_SCROLL_MIN_WIDTH ((5.0f * U.dpi_fac) + (2.0f * U.pixelsize))
62 
63 /* When to start showing the full-width scroller. */
64 #define V2D_SCROLL_HIDE_WIDTH (AREAMINX * U.dpi_fac)
65 #define V2D_SCROLL_HIDE_HEIGHT (HEADERY * U.dpi_fac)
66 
68 #define V2D_SCROLL_HANDLE_HEIGHT (0.6f * U.widget_unit)
69 #define V2D_SCROLL_HANDLE_WIDTH (0.6f * U.widget_unit)
70 
72 #define V2D_SCROLL_HANDLE_SIZE_HOTSPOT (0.6f * U.widget_unit)
73 
75 #define V2D_SCROLL_THUMB_SIZE_MIN (30.0 * UI_DPI_FAC)
76 
77 /* ------ Define for UI_view2d_sync ----- */
78 
79 /* means copy it from another v2d */
80 #define V2D_LOCK_SET 0
81 /* means copy it to the other v2ds */
82 #define V2D_LOCK_COPY 1
83 
84 /* ------------------------------------------ */
85 /* Macros: */
86 
87 /* test if mouse in a scrollbar (assume that scroller availability has been tested) */
88 #define IN_2D_VERT_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->vert, co))
89 #define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->hor, co))
90 
91 #define IN_2D_VERT_SCROLL_RECT(v2d, rct) (BLI_rcti_isect(&v2d->vert, rct, NULL))
92 #define IN_2D_HORIZ_SCROLL_RECT(v2d, rct) (BLI_rcti_isect(&v2d->hor, rct, NULL))
93 
94 /* ------------------------------------------ */
95 /* Type definitions: */
96 
97 struct View2D;
98 struct View2DScrollers;
99 
100 struct ARegion;
101 struct Scene;
102 struct ScrArea;
103 struct bContext;
104 struct bScreen;
105 struct rctf;
106 struct rcti;
107 struct wmEvent;
108 struct wmGizmoGroupType;
109 struct wmKeyConfig;
110 struct wmOperator;
111 struct wmOperatorType;
112 
113 typedef struct View2DScrollers View2DScrollers;
114 
115 /* ----------------------------------------- */
116 /* Prototypes: */
117 
130 void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy);
131 
132 void UI_view2d_curRect_validate(struct View2D *v2d);
138 void UI_view2d_curRect_reset(struct View2D *v2d);
144 void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag);
145 
152 void UI_view2d_curRect_changed(const struct bContext *C, struct View2D *v2d);
153 
154 void UI_view2d_totRect_set(struct View2D *v2d, int width, int height);
158 void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, bool resize);
159 
160 void UI_view2d_mask_from_win(const struct View2D *v2d, struct rcti *r_mask);
161 
162 void UI_view2d_zoom_cache_reset(void);
163 
164 /* view matrix operations */
168 void UI_view2d_view_ortho(const struct View2D *v2d);
175 void UI_view2d_view_orthoSpecial(struct ARegion *region, struct View2D *v2d, bool xaxis);
179 void UI_view2d_view_restore(const struct bContext *C);
180 
181 /* grid drawing */
182 
187  const struct View2D *v2d, int colorid, float step, int level_size, int totlevels);
196 void UI_view2d_dot_grid_draw(const struct View2D *v2d,
197  int grid_color_id,
198  float min_step,
199  int grid_subdivisions);
200 
201 void UI_view2d_draw_lines_y__values(const struct View2D *v2d);
202 void UI_view2d_draw_lines_x__values(const struct View2D *v2d);
203 void UI_view2d_draw_lines_x__discrete_values(const struct View2D *v2d, bool display_minor_lines);
205  const struct Scene *scene,
206  bool display_minor_lines);
208  const struct Scene *scene,
209  bool display_seconds,
210  bool display_minor_lines);
212  const struct Scene *scene,
213  bool display_seconds);
214 
216  const struct Scene *scene,
217  bool display_seconds);
218 float UI_view2d_grid_resolution_y__values(const struct View2D *v2d);
219 
223 void UI_view2d_draw_scale_y__values(const struct ARegion *region,
224  const struct View2D *v2d,
225  const struct rcti *rect,
226  int colorid);
227 void UI_view2d_draw_scale_y__block(const struct ARegion *region,
228  const struct View2D *v2d,
229  const struct rcti *rect,
230  int colorid);
232  const struct View2D *v2d,
233  const struct rcti *rect,
234  const struct Scene *scene,
235  bool display_seconds,
236  int colorid);
237 void UI_view2d_draw_scale_x__frames_or_seconds(const struct ARegion *region,
238  const struct View2D *v2d,
239  const struct rcti *rect,
240  const struct Scene *scene,
241  bool display_seconds,
242  int colorid);
243 
244 /* Scroll-bar drawing. */
245 
250  const struct rcti *mask_custom,
251  struct View2DScrollers *r_scrollers);
252 
257  const struct rcti *mask_custom,
258  bool use_full_hide);
259 void UI_view2d_scrollers_draw(struct View2D *v2d, const struct rcti *mask_custom);
260 
261 /* List view tools. */
262 
275 void UI_view2d_listview_view_to_cell(float columnwidth,
276  float rowheight,
277  float startx,
278  float starty,
279  float viewx,
280  float viewy,
281  int *r_column,
282  int *r_row);
283 
284 /* Coordinate conversion. */
285 
286 float UI_view2d_region_to_view_x(const struct View2D *v2d, float x);
287 float UI_view2d_region_to_view_y(const struct View2D *v2d, float y);
295  const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL();
296 void UI_view2d_region_to_view_rctf(const struct View2D *v2d,
297  const struct rctf *rect_src,
298  struct rctf *rect_dst) ATTR_NONNULL();
299 
300 float UI_view2d_view_to_region_x(const struct View2D *v2d, float x);
301 float UI_view2d_view_to_region_y(const struct View2D *v2d, float y);
310  const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL();
311 
313  const float xy_a[2],
314  const float xy_b[2],
315  int r_region_a[2],
316  int r_region_b[2]) ATTR_NONNULL();
317 
327  const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL();
328 void UI_view2d_view_to_region_fl(const struct View2D *v2d,
329  float x,
330  float y,
331  float *r_region_x,
332  float *r_region_y) ATTR_NONNULL();
333 void UI_view2d_view_to_region_m4(const struct View2D *v2d, float matrix[4][4]) ATTR_NONNULL();
334 void UI_view2d_view_to_region_rcti(const struct View2D *v2d,
335  const struct rctf *rect_src,
336  struct rcti *rect_dst) ATTR_NONNULL();
338  const struct rctf *rect_src,
339  struct rcti *rect_dst) ATTR_NONNULL();
340 
341 /* Utilities. */
342 
346 struct View2D *UI_view2d_fromcontext(const struct bContext *C);
351 
358 void UI_view2d_scroller_size_get(const struct View2D *v2d, bool mapped, float *r_x, float *r_y);
367 void UI_view2d_scale_get(const struct View2D *v2d, float *r_x, float *r_y);
368 float UI_view2d_scale_get_x(const struct View2D *v2d);
369 float UI_view2d_scale_get_y(const struct View2D *v2d);
373 void UI_view2d_scale_get_inverse(const struct View2D *v2d, float *r_x, float *r_y);
374 
379 void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y);
380 void UI_view2d_center_set(struct View2D *v2d, float x, float y);
381 
388 void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac);
389 
401 char UI_view2d_mouse_in_scrollers_ex(const struct ARegion *region,
402  const struct View2D *v2d,
403  const int xy[2],
404  int *r_scroll) ATTR_NONNULL(1, 2, 3, 4);
405 char UI_view2d_mouse_in_scrollers(const struct ARegion *region,
406  const struct View2D *v2d,
407  const int xy[2]) ATTR_NONNULL(1, 2, 3);
408 char UI_view2d_rect_in_scrollers_ex(const struct ARegion *region,
409  const struct View2D *v2d,
410  const struct rcti *rect,
411  int *r_scroll) ATTR_NONNULL(1, 2, 3);
412 char UI_view2d_rect_in_scrollers(const struct ARegion *region,
413  const struct View2D *v2d,
414  const struct rcti *rect) ATTR_NONNULL(1, 2, 3);
415 
419 void UI_view2d_text_cache_add(struct View2D *v2d,
420  float x,
421  float y,
422  const char *str,
423  size_t str_len,
424  const unsigned char col[4]);
429  const struct rctf *rect_view,
430  const char *str,
431  size_t str_len,
432  const unsigned char col[4]);
433 void UI_view2d_text_cache_draw(struct ARegion *region);
434 
435 /* Operators. */
436 
437 void ED_operatortypes_view2d(void);
438 void ED_keymap_view2d(struct wmKeyConfig *keyconf);
439 
444 void UI_view2d_smooth_view(const struct bContext *C,
445  struct ARegion *region,
446  const struct rctf *cur,
447  int smooth_viewtx);
448 
449 #define UI_MARKER_MARGIN_Y (42 * UI_DPI_FAC)
450 #define UI_TIME_SCRUB_MARGIN_Y (23 * UI_DPI_FAC)
451 
452 /* Gizmo Types. */
453 
454 /* view2d_gizmo_navigate.c */
455 
459 void VIEW2D_GGT_navigate_impl(struct wmGizmoGroupType *gzgt, const char *idname);
460 
461 /* Edge pan. */
462 
466 typedef struct View2DEdgePanData {
468  struct bScreen *screen;
470  struct ScrArea *area;
472  struct ARegion *region;
474  struct View2D *v2d;
476  struct rctf limit;
477 
480  bool enabled;
482  float inside_pad;
484  float outside_pad;
489  float speed_ramp;
491  float max_speed;
493  float delay;
499 
502 
504  float facx, facy;
505 
506  /* Timers. */
510 
511 bool UI_view2d_edge_pan_poll(struct bContext *C);
512 
513 void UI_view2d_edge_pan_init(struct bContext *C,
514  struct View2DEdgePanData *vpd,
515  float inside_pad,
516  float outside_pad,
517  float speed_ramp,
518  float max_speed,
519  float delay,
520  float zoom_influence);
521 
526  struct View2DEdgePanData *vpd, float xmin, float xmax, float ymin, float ymax);
527 
529 
533 void UI_view2d_edge_pan_apply(struct bContext *C, struct View2DEdgePanData *vpd, const int xy[2])
534  ATTR_NONNULL(1, 2, 3);
535 
540  struct View2DEdgePanData *vpd,
541  const struct wmEvent *event);
542 
543 void UI_view2d_edge_pan_cancel(struct bContext *C, struct View2DEdgePanData *vpd);
544 
546 
548  float inside_pad,
549  float outside_pad,
550  float speed_ramp,
551  float max_speed,
552  float delay,
553  float zoom_influence);
554 
559  struct View2DEdgePanData *vpd,
560  struct wmOperator *op);
561 
562 #ifdef __cplusplus
563 }
564 #endif
#define ATTR_NONNULL(...)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
#define C
Definition: RandGen.cpp:25
void UI_view2d_draw_lines_y__values(const struct View2D *v2d)
void UI_view2d_draw_lines_x__discrete_values(const struct View2D *v2d, bool display_minor_lines)
bool UI_view2d_area_supports_sync(struct ScrArea *area)
Definition: view2d.cc:846
void UI_view2d_center_set(struct View2D *v2d, float x, float y)
Definition: view2d.cc:1946
void VIEW2D_GGT_navigate_impl(struct wmGizmoGroupType *gzgt, const char *idname)
char char char char void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, const char *str, size_t str_len, const unsigned char col[4])
Definition: view2d.cc:2068
void UI_view2d_scale_get(const struct View2D *v2d, float *r_x, float *r_y)
void UI_view2d_edge_pan_apply(struct bContext *C, struct View2DEdgePanData *vpd, const int xy[2]) ATTR_NONNULL(1
void UI_view2d_region_reinit(struct View2D *v2d, short type, int winx, int winy)
Definition: view2d.cc:217
void UI_view2d_smooth_view(const struct bContext *C, struct ARegion *region, const struct rctf *cur, int smooth_viewtx)
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]) ATTR_NONNULL()
Definition: view2d.cc:1749
float UI_view2d_view_to_region_x(const struct View2D *v2d, float x)
char char char char UI_view2d_rect_in_scrollers(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect) ATTR_NONNULL(1
void UI_view2d_edge_pan_operator_init(struct bContext *C, struct View2DEdgePanData *vpd, struct wmOperator *op)
void UI_view2d_view_to_region_rcti(const struct View2D *v2d, const struct rctf *rect_src, struct rcti *rect_dst) ATTR_NONNULL()
void UI_view2d_totRect_set(struct View2D *v2d, int width, int height)
Definition: view2d.cc:1022
struct View2D * UI_view2d_fromcontext(const struct bContext *C)
float UI_view2d_view_to_region_y(const struct View2D *v2d, float y)
struct View2DEdgePanData View2DEdgePanData
void UI_view2d_view_to_region_fl(const struct View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
void UI_view2d_draw_scale_y__block(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int colorid)
bool UI_view2d_edge_pan_poll(struct bContext *C)
float UI_view2d_grid_resolution_x__frames_or_seconds(const struct View2D *v2d, const struct Scene *scene, bool display_seconds)
Definition: view2d_draw.cc:450
float UI_view2d_grid_resolution_y__values(const struct View2D *v2d)
Definition: view2d_draw.cc:460
void UI_view2d_view_restore(const struct bContext *C)
void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, bool resize)
Definition: view2d.cc:963
void UI_view2d_curRect_reset(struct View2D *v2d)
Definition: view2d.cc:914
char UI_view2d_mouse_in_scrollers_ex(const struct ARegion *region, const struct View2D *v2d, const int xy[2], int *r_scroll) ATTR_NONNULL(1
void UI_view2d_view_orthoSpecial(struct ARegion *region, struct View2D *v2d, bool xaxis)
Definition: view2d.cc:1122
void UI_view2d_draw_lines_x__values(const struct View2D *v2d)
void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, const struct Scene *scene, bool display_seconds, int colorid)
Definition: view2d_draw.cc:571
void UI_view2d_multi_grid_draw(const struct View2D *v2d, int colorid, float step, int level_size, int totlevels)
void UI_view2d_draw_lines_x__discrete_frames_or_seconds(const struct View2D *v2d, const struct Scene *scene, bool display_seconds, bool display_minor_lines)
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)
Definition: view2d.cc:1619
void UI_view2d_scale_get_inverse(const struct View2D *v2d, float *r_x, float *r_y)
void UI_view2d_region_to_view_rctf(const struct View2D *v2d, const struct rctf *rect_src, struct rctf *rect_dst) ATTR_NONNULL()
void UI_view2d_view_to_region_m4(const struct View2D *v2d, float matrix[4][4]) ATTR_NONNULL()
char char UI_view2d_mouse_in_scrollers(const struct ARegion *region, const struct View2D *v2d, const int xy[2]) ATTR_NONNULL(1
bool UI_view2d_view_to_region_clip(const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void UI_view2d_view_ortho(const struct View2D *v2d)
float UI_view2d_scale_get_y(const struct View2D *v2d)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_zoom_cache_reset(void)
Definition: view2d.cc:1027
void UI_view2d_draw_lines_x__frames_or_seconds(const struct View2D *v2d, const struct Scene *scene, bool display_seconds)
void UI_view2d_draw_scale_x__frames_or_seconds(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, const struct Scene *scene, bool display_seconds, int colorid)
Definition: view2d_draw.cc:586
bool UI_view2d_view_to_region_rcti_clip(const struct View2D *v2d, const struct rctf *rect_src, struct rcti *rect_dst) ATTR_NONNULL()
void UI_view2d_dot_grid_draw(const struct View2D *v2d, int grid_color_id, float min_step, int grid_subdivisions)
void UI_view2d_edge_pan_operator_properties(struct wmOperatorType *ot)
void UI_view2d_text_cache_draw(struct ARegion *region)
Definition: view2d.cc:2128
void UI_view2d_view_to_region(const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void UI_view2d_mask_from_win(const struct View2D *v2d, struct rcti *r_mask)
void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag)
Definition: view2d.cc:851
void UI_view2d_curRect_changed(const struct bContext *C, struct View2D *v2d)
void UI_view2d_scrollers_draw(struct View2D *v2d, const struct rcti *mask_custom)
void ED_keymap_view2d(struct wmKeyConfig *keyconf)
Definition: view2d_ops.cc:2277
float UI_view2d_region_to_view_x(const struct View2D *v2d, float x)
Definition: view2d.cc:1655
float UI_view2d_scale_get_x(const struct View2D *v2d)
void ED_operatortypes_view2d(void)
Definition: view2d_ops.cc:2250
char char char UI_view2d_rect_in_scrollers_ex(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int *r_scroll) ATTR_NONNULL(1
eView2D_CommonViewTypes
Definition: UI_view2d.h:32
@ V2D_COMMONVIEW_LIST
Definition: UI_view2d.h:38
@ V2D_COMMONVIEW_STACK
Definition: UI_view2d.h:40
@ V2D_COMMONVIEW_HEADER
Definition: UI_view2d.h:42
@ V2D_COMMONVIEW_CUSTOM
Definition: UI_view2d.h:34
@ V2D_COMMONVIEW_STANDARD
Definition: UI_view2d.h:36
@ V2D_COMMONVIEW_PANELS_UI
Definition: UI_view2d.h:44
void UI_view2d_edge_pan_set_limits(struct View2DEdgePanData *vpd, float xmin, float xmax, float ymin, float ymax)
void UI_view2d_edge_pan_reset(struct View2DEdgePanData *vpd)
void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y)
Definition: view2d.cc:1936
void UI_view2d_edge_pan_operator_properties_ex(struct wmOperatorType *ot, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
void UI_view2d_scroller_size_get(const struct View2D *v2d, bool mapped, float *r_x, float *r_y)
void UI_view2d_draw_lines_x__discrete_time(const struct View2D *v2d, const struct Scene *scene, bool display_minor_lines)
void UI_view2d_draw_scale_y__values(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, int colorid)
void UI_view2d_edge_pan_init(struct bContext *C, struct View2DEdgePanData *vpd, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
float UI_view2d_region_to_view_y(const struct View2D *v2d, float y)
Definition: view2d.cc:1660
void void UI_view2d_edge_pan_apply_event(struct bContext *C, struct View2DEdgePanData *vpd, const struct wmEvent *event)
void UI_view2d_scrollers_draw_ex(struct View2D *v2d, const struct rcti *mask_custom, bool use_full_hide)
void UI_view2d_edge_pan_cancel(struct bContext *C, struct View2DEdgePanData *vpd)
struct View2D * UI_view2d_fromcontext_rwin(const struct bContext *C)
void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac)
Definition: view2d.cc:1954
void UI_view2d_scrollers_calc(struct View2D *v2d, const struct rcti *mask_custom, struct View2DScrollers *r_scrollers)
void UI_view2d_text_cache_add_rectf(struct View2D *v2d, const struct rctf *rect_view, const char *str, size_t str_len, const unsigned char col[4])
void UI_view2d_curRect_validate(struct View2D *v2d)
Definition: view2d.cc:828
Scene scene
#define str(s)
uint col
static void area(int d1, int d2, int e1, int e2, float weights[2])
double edge_pan_last_time
Definition: UI_view2d.h:507
double edge_pan_start_time_x
Definition: UI_view2d.h:508
struct rctf limit
Definition: UI_view2d.h:476
struct bScreen * screen
Definition: UI_view2d.h:468
struct View2D * v2d
Definition: UI_view2d.h:474
float zoom_influence
Definition: UI_view2d.h:498
struct ScrArea * area
Definition: UI_view2d.h:470
struct ARegion * region
Definition: UI_view2d.h:472
double edge_pan_start_time_y
Definition: UI_view2d.h:508
float xmax
Definition: DNA_vec_types.h:69
float xmin
Definition: DNA_vec_types.h:69
float ymax
Definition: DNA_vec_types.h:70
float ymin
Definition: DNA_vec_types.h:70
int xy[2]
Definition: wm_draw.c:135
wmOperatorType * ot
Definition: wm_files.c:3479