Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_view2d_types.h
| Show All 13 Lines | |||||
| #endif | #endif | ||||
| /* ---------------------------------- */ | /* ---------------------------------- */ | ||||
| /** View 2D data - stored per region. */ | /** View 2D data - stored per region. */ | ||||
| typedef struct View2D { | typedef struct View2D { | ||||
| /** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */ | /** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */ | ||||
| rctf tot, cur; | rctf tot, cur; | ||||
| /** Vert - vertical scrollbar region; hor - horizontal scrollbar region. */ | /** Vert - vertical scroll-bar region; hor - horizontal scroll-bar region. */ | ||||
| rcti vert, hor; | rcti vert, hor; | ||||
| /** Mask - region (in screenspace) within which 'cur' can be viewed. */ | /** Mask - region (in screen-space) within which 'cur' can be viewed. */ | ||||
| rcti mask; | rcti mask; | ||||
| /** Min/max sizes of 'cur' rect (only when keepzoom not set). */ | /** Min/max sizes of 'cur' rect (only when keepzoom not set). */ | ||||
| float min[2], max[2]; | float min[2], max[2]; | ||||
| /** Allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set. */ | /** Allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set. */ | ||||
| float minzoom, maxzoom; | float minzoom, maxzoom; | ||||
| /** Scroll - scrollbars to display (bit-flag). */ | /** Scroll - scroll-bars to display (bit-flag). */ | ||||
| short scroll; | short scroll; | ||||
| /** Scroll_ui - temp settings used for UI drawing of scrollers. */ | /** Scroll_ui - temp settings used for UI drawing of scrollers. */ | ||||
| short scroll_ui; | short scroll_ui; | ||||
| /** Keeptot - 'cur' rect cannot move outside the 'tot' rect? */ | /** Keeptot - 'cur' rect cannot move outside the 'tot' rect? */ | ||||
| short keeptot; | short keeptot; | ||||
| /** Keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits. */ | /** Keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits. */ | ||||
| short keepzoom; | short keepzoom; | ||||
| Show All 10 Lines | typedef struct View2D { | ||||
| /** Storage of previous winx/winy values encountered by UI_view2d_curRect_validate(), | /** Storage of previous winx/winy values encountered by UI_view2d_curRect_validate(), | ||||
| * for keepaspect. */ | * for keepaspect. */ | ||||
| short oldwinx, oldwiny; | short oldwinx, oldwiny; | ||||
| /** Pivot point for transforms (rotate and scale). */ | /** Pivot point for transforms (rotate and scale). */ | ||||
| short around; | short around; | ||||
| /* Usually set externally (as in, not in view2d files). */ | /* Usually set externally (as in, not in view2d files). */ | ||||
| /** Alpha of vertical and horizontal scrollbars (range is [0, 255]). */ | /** Alpha of vertical and horizontal scroll-bars (range is [0, 255]). */ | ||||
| char alpha_vert, alpha_hor; | char alpha_vert, alpha_hor; | ||||
| char _pad[6]; | char _pad[6]; | ||||
| /* animated smooth view */ | /* animated smooth view */ | ||||
| struct SmoothView2DStore *sms; | struct SmoothView2DStore *sms; | ||||
| struct wmTimer *smooth_timer; | struct wmTimer *smooth_timer; | ||||
| } View2D; | } View2D; | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | enum { | ||||
| /* zoom, pan or similar action is in progress */ | /* zoom, pan or similar action is in progress */ | ||||
| V2D_IS_NAVIGATING = (1 << 9), | V2D_IS_NAVIGATING = (1 << 9), | ||||
| /* view settings need to be set still... */ | /* view settings need to be set still... */ | ||||
| V2D_IS_INIT = (1 << 10), | V2D_IS_INIT = (1 << 10), | ||||
| }; | }; | ||||
| /** Scroller flags for View2D (#View2D.scroll). */ | /** Scroller flags for View2D (#View2D.scroll). */ | ||||
| enum { | enum { | ||||
| /* left scrollbar */ | /* Left scroll-bar. */ | ||||
| V2D_SCROLL_LEFT = (1 << 0), | V2D_SCROLL_LEFT = (1 << 0), | ||||
| V2D_SCROLL_RIGHT = (1 << 1), | V2D_SCROLL_RIGHT = (1 << 1), | ||||
| V2D_SCROLL_VERTICAL = (V2D_SCROLL_LEFT | V2D_SCROLL_RIGHT), | V2D_SCROLL_VERTICAL = (V2D_SCROLL_LEFT | V2D_SCROLL_RIGHT), | ||||
| /* horizontal scrollbar */ | /* Horizontal scroll-bar. */ | ||||
| V2D_SCROLL_TOP = (1 << 2), | V2D_SCROLL_TOP = (1 << 2), | ||||
| V2D_SCROLL_BOTTOM = (1 << 3), | V2D_SCROLL_BOTTOM = (1 << 3), | ||||
| /* UNUSED = (1 << 4), */ | /* UNUSED = (1 << 4), */ | ||||
| V2D_SCROLL_HORIZONTAL = (V2D_SCROLL_TOP | V2D_SCROLL_BOTTOM), | V2D_SCROLL_HORIZONTAL = (V2D_SCROLL_TOP | V2D_SCROLL_BOTTOM), | ||||
| /* display vertical scale handles */ | /* display vertical scale handles */ | ||||
| V2D_SCROLL_VERTICAL_HANDLES = (1 << 5), | V2D_SCROLL_VERTICAL_HANDLES = (1 << 5), | ||||
| /* display horizontal scale handles */ | /* display horizontal scale handles */ | ||||
| V2D_SCROLL_HORIZONTAL_HANDLES = (1 << 6), | V2D_SCROLL_HORIZONTAL_HANDLES = (1 << 6), | ||||
| /* induce hiding of scrollbars - set by region drawing in response to size of region */ | /* Induce hiding of scroll-bar - set by region drawing in response to size of region. */ | ||||
| V2D_SCROLL_VERTICAL_HIDE = (1 << 7), | V2D_SCROLL_VERTICAL_HIDE = (1 << 7), | ||||
| V2D_SCROLL_HORIZONTAL_HIDE = (1 << 8), | V2D_SCROLL_HORIZONTAL_HIDE = (1 << 8), | ||||
| /* scrollbar extends beyond its available window - | /* Scroll-bar extends beyond its available window - | ||||
| * set when calculating scrollbars for drawing */ | * set when calculating scroll-bar for drawing */ | ||||
| V2D_SCROLL_VERTICAL_FULLR = (1 << 9), | V2D_SCROLL_VERTICAL_FULLR = (1 << 9), | ||||
| V2D_SCROLL_HORIZONTAL_FULLR = (1 << 10), | V2D_SCROLL_HORIZONTAL_FULLR = (1 << 10), | ||||
| }; | }; | ||||
| /** scroll_ui, activate flag for drawing. */ | /** scroll_ui, activate flag for drawing. */ | ||||
| enum { | enum { | ||||
| V2D_SCROLL_H_ACTIVE = (1 << 0), | V2D_SCROLL_H_ACTIVE = (1 << 0), | ||||
| V2D_SCROLL_V_ACTIVE = (1 << 1), | V2D_SCROLL_V_ACTIVE = (1 << 1), | ||||
| Show All 19 Lines | |||||