Blender V2.61 - r43446
Defines | Typedefs | Enumerations | Functions | Variables

UI_view2d.h File Reference

Go to the source code of this file.

Defines

#define V2D_IS_CLIPPED   12000
#define V2D_ARG_DUMMY   -1
#define V2D_SCROLL_HEIGHT   17
#define V2D_SCROLL_WIDTH   17
#define V2D_SCROLLER_HANDLE_SIZE   12
#define V2D_LOCK_SET   0
#define V2D_LOCK_COPY   1
#define IN_2D_VERT_SCROLL(v2d, co)   (BLI_in_rcti(&v2d->vert, co[0], co[1]))
#define IN_2D_HORIZ_SCROLL(v2d, co)   (BLI_in_rcti(&v2d->hor, co[0], co[1]))

Typedefs

typedef struct View2DGrid View2DGrid
typedef struct View2DScrollers View2DScrollers

Enumerations

enum  {
  V2D_COMMONVIEW_CUSTOM = -1, V2D_COMMONVIEW_STANDARD, V2D_COMMONVIEW_LIST, V2D_COMMONVIEW_STACK,
  V2D_COMMONVIEW_HEADER, V2D_COMMONVIEW_PANELS_UI
}
enum  {
  V2D_UNIT_SECONDS = 0, V2D_UNIT_FRAMES, V2D_UNIT_FRAMESCALE, V2D_UNIT_VALUES,
  V2D_UNIT_DEGREES, V2D_UNIT_TIME, V2D_UNIT_SECONDSSEQ
}
enum  { V2D_GRID_NOCLAMP = 0, V2D_GRID_CLAMP }
enum  {
  V2D_HORIZONTAL_LINES = (1<<0), V2D_VERTICAL_LINES = (1<<1), V2D_HORIZONTAL_AXIS = (1<<2), V2D_VERTICAL_AXIS = (1<<3),
  V2D_HORIZONTAL_FINELINES = (1<<4), V2D_GRIDLINES_MAJOR = (V2D_VERTICAL_LINES|V2D_VERTICAL_AXIS|V2D_HORIZONTAL_LINES|V2D_HORIZONTAL_AXIS), V2D_GRIDLINES_ALL = (V2D_GRIDLINES_MAJOR|V2D_HORIZONTAL_FINELINES)
}

Functions

void UI_view2d_region_reinit (struct View2D *v2d, short type, int winx, int winy)
void UI_view2d_curRect_validate (struct View2D *v2d)
void UI_view2d_curRect_validate_resize (struct View2D *v2d, int resize)
void UI_view2d_curRect_reset (struct View2D *v2d)
void UI_view2d_sync (struct bScreen *screen, struct ScrArea *sa, struct View2D *v2dcur, int flag)
void UI_view2d_totRect_set (struct View2D *v2d, int width, int height)
void UI_view2d_totRect_set_resize (struct View2D *v2d, int width, int height, int resize)
int UI_view2d_tab_set (struct View2D *v2d, int tab)
void UI_view2d_view_ortho (struct View2D *v2d)
void UI_view2d_view_orthoSpecial (struct ARegion *ar, struct View2D *v2d, short xaxis)
void UI_view2d_view_restore (const struct bContext *C)
View2DGridUI_view2d_grid_calc (struct Scene *scene, struct View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int winx, int winy)
void UI_view2d_grid_draw (struct View2D *v2d, View2DGrid *grid, int flag)
void UI_view2d_constant_grid_draw (struct View2D *v2d)
void UI_view2d_grid_size (View2DGrid *grid, float *r_dx, float *r_dy)
void UI_view2d_grid_free (View2DGrid *grid)
View2DScrollersUI_view2d_scrollers_calc (const struct bContext *C, struct View2D *v2d, short xunits, short xclamp, short yunits, short yclamp)
void UI_view2d_scrollers_draw (const struct bContext *C, struct View2D *v2d, View2DScrollers *scrollers)
void UI_view2d_scrollers_free (View2DScrollers *scrollers)
void UI_view2d_listview_cell_to_view (struct View2D *v2d, short columnwidth, short rowheight, float startx, float starty, int column, int row, struct rctf *rect)
void UI_view2d_listview_view_to_cell (struct View2D *v2d, short columnwidth, short rowheight, float startx, float starty, float viewx, float viewy, int *column, int *row)
void UI_view2d_listview_visible_cells (struct 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 (struct View2D *v2d, int x, int y, float *viewx, float *viewy)
void UI_view2d_view_to_region (struct View2D *v2d, float x, float y, int *regionx, int *regiony)
void UI_view2d_to_region_no_clip (struct View2D *v2d, float x, float y, int *regionx, int *region_y)
struct View2DUI_view2d_fromcontext (const struct bContext *C)
struct View2DUI_view2d_fromcontext_rwin (const struct bContext *C)
void UI_view2d_getscale (struct View2D *v2d, float *x, float *y)
short UI_view2d_mouse_in_scrollers (const struct bContext *C, struct View2D *v2d, int x, int y)
void UI_view2d_text_cache_add (struct View2D *v2d, float x, float y, const char *str, const char col[4])
void UI_view2d_text_cache_rectf (struct View2D *v2d, struct rctf *rect, const char *str, const char col[4])
void UI_view2d_text_cache_draw (struct ARegion *ar)
void UI_view2d_operatortypes (void)
void UI_view2d_keymap (struct wmKeyConfig *keyconf)

Variables

enum { ... }  eView2D_CommonViewTypes
enum { ... }  eView2D_Units
enum { ... }  eView2D_Clamp
enum { ... }  eView2D_Gridlines

Detailed Description

Definition in file UI_view2d.h.


Define Documentation

#define IN_2D_HORIZ_SCROLL (   v2d,
  co 
)    (BLI_in_rcti(&v2d->hor, co[0], co[1]))

Definition at line 124 of file UI_view2d.h.

Referenced by UI_view2d_mouse_in_scrollers().

#define IN_2D_VERT_SCROLL (   v2d,
  co 
)    (BLI_in_rcti(&v2d->vert, co[0], co[1]))

Definition at line 123 of file UI_view2d.h.

Referenced by UI_view2d_mouse_in_scrollers().

#define V2D_ARG_DUMMY   -1
#define V2D_IS_CLIPPED   12000

Definition at line 43 of file UI_view2d.h.

Referenced by UI_view2d_text_cache_add(), and UI_view2d_view_to_region().

#define V2D_LOCK_COPY   1
#define V2D_LOCK_SET   0

Definition at line 114 of file UI_view2d.h.

#define V2D_SCROLL_HEIGHT   17
#define V2D_SCROLL_WIDTH   17
#define V2D_SCROLLER_HANDLE_SIZE   12

Typedef Documentation

typedef struct View2DGrid View2DGrid

Definition at line 140 of file UI_view2d.h.

Definition at line 141 of file UI_view2d.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
V2D_COMMONVIEW_CUSTOM 
V2D_COMMONVIEW_STANDARD 
V2D_COMMONVIEW_LIST 
V2D_COMMONVIEW_STACK 
V2D_COMMONVIEW_HEADER 
V2D_COMMONVIEW_PANELS_UI 

Definition at line 50 of file UI_view2d.h.

anonymous enum
Enumerator:
V2D_UNIT_SECONDS 
V2D_UNIT_FRAMES 
V2D_UNIT_FRAMESCALE 
V2D_UNIT_VALUES 
V2D_UNIT_DEGREES 
V2D_UNIT_TIME 
V2D_UNIT_SECONDSSEQ 

Definition at line 71 of file UI_view2d.h.

anonymous enum
Enumerator:
V2D_GRID_NOCLAMP 
V2D_GRID_CLAMP 

Definition at line 85 of file UI_view2d.h.

anonymous enum
Enumerator:
V2D_HORIZONTAL_LINES 
V2D_VERTICAL_LINES 
V2D_HORIZONTAL_AXIS 
V2D_VERTICAL_AXIS 
V2D_HORIZONTAL_FINELINES 
V2D_GRIDLINES_MAJOR 
V2D_GRIDLINES_ALL 

Definition at line 91 of file UI_view2d.h.


Function Documentation

void UI_view2d_constant_grid_draw ( struct View2D v2d)
void UI_view2d_curRect_reset ( struct View2D v2d)
void UI_view2d_curRect_validate ( struct View2D v2d)
void UI_view2d_curRect_validate_resize ( struct View2D v2d,
int  resize 
)
struct View2D* UI_view2d_fromcontext ( const struct bContext C) [read]
struct View2D* UI_view2d_fromcontext_rwin ( const struct bContext C) [read]
void UI_view2d_getscale ( struct View2D v2d,
float *  x,
float *  y 
)
View2DGrid* UI_view2d_grid_calc ( struct Scene scene,
struct View2D v2d,
short  xunits,
short  xclamp,
short  yunits,
short  yclamp,
int  winx,
int  winy 
)
void UI_view2d_grid_draw ( struct View2D v2d,
View2DGrid grid,
int  flag 
)
void UI_view2d_grid_free ( View2DGrid grid)
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_keymap ( struct wmKeyConfig keyconf)
void UI_view2d_listview_cell_to_view ( struct View2D v2d,
short  columnwidth,
short  rowheight,
float  startx,
float  starty,
int  column,
int  row,
struct rctf rect 
)
void UI_view2d_listview_view_to_cell ( struct View2D v2d,
short  columnwidth,
short  rowheight,
float  startx,
float  starty,
float  viewx,
float  viewy,
int *  column,
int *  row 
)
void UI_view2d_listview_visible_cells ( struct View2D v2d,
short  columnwidth,
short  rowheight,
float  startx,
float  starty,
int *  column_min,
int *  column_max,
int *  row_min,
int *  row_max 
)
short UI_view2d_mouse_in_scrollers ( const struct bContext C,
struct View2D v2d,
int  x,
int  y 
)
void UI_view2d_operatortypes ( void  )
void UI_view2d_region_reinit ( struct 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 ( struct 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 struct bContext C,
struct View2D v2d,
short  xunits,
short  xclamp,
short  yunits,
short  yclamp 
)
void UI_view2d_scrollers_draw ( const struct bContext C,
struct View2D v2d,
View2DScrollers scrollers 
)
void UI_view2d_scrollers_free ( View2DScrollers scrollers)
void UI_view2d_sync ( struct bScreen screen,
struct ScrArea sa,
struct View2D v2dcur,
int  flag 
)
int UI_view2d_tab_set ( struct View2D v2d,
int  tab 
)
void UI_view2d_text_cache_add ( struct View2D v2d,
float  x,
float  y,
const char *  str,
const char  col[4] 
)
void UI_view2d_text_cache_draw ( struct ARegion ar)
void UI_view2d_text_cache_rectf ( struct View2D v2d,
struct rctf rect,
const char *  str,
const char  col[4] 
)
void UI_view2d_to_region_no_clip ( struct View2D v2d,
float  x,
float  y,
int *  regionx,
int *  region_y 
)
void UI_view2d_totRect_set ( struct View2D v2d,
int  width,
int  height 
)
void UI_view2d_totRect_set_resize ( struct View2D v2d,
int  width,
int  height,
int  resize 
)
void UI_view2d_view_ortho ( struct View2D v2d)
void UI_view2d_view_orthoSpecial ( struct ARegion ar,
struct View2D v2d,
short  xaxis 
)
void UI_view2d_view_restore ( const struct bContext C)
void UI_view2d_view_to_region ( struct View2D v2d,
float  x,
float  y,
int *  regionx,
int *  regiony 
)

Variable Documentation

enum { ... } eView2D_Clamp
enum { ... } eView2D_Gridlines
enum { ... } eView2D_Units