Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | SCREEN_DIR_IS_VERTICAL(dir) (ELEM(dir, SCREEN_DIR_N, SCREEN_DIR_S)) |
#define | SCREEN_DIR_IS_HORIZONTAL(dir) (ELEM(dir, SCREEN_DIR_W, SCREEN_DIR_E)) |
#define | AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */ |
#define | AZONESPOTH (0.6f * U.widget_unit) /* height of corner #AZone */ |
#define | AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */ |
#define | AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */ |
#define | AREAJOINTOLERANCEX (AREAMINX * U.dpi_fac) |
#define | AREAJOINTOLERANCEY (HEADERY * U.dpi_fac) |
#define | BORDERPADDING ((2.0f * U.dpi_fac) + U.pixelsize) |
Typedefs | |
typedef enum eScreenDir | eScreenDir |
typedef enum eScreenAxis | eScreenAxis |
Enumerations | |
enum | eScreenDir { SCREEN_DIR_NONE = -1 , SCREEN_DIR_W = 0 , SCREEN_DIR_N = 1 , SCREEN_DIR_E = 2 , SCREEN_DIR_S = 3 } |
enum | eScreenAxis { SCREEN_AXIS_H = 'h' , SCREEN_AXIS_V = 'v' } |
Variables | |
const char * | screen_context_dir [] |
Definition at line 45 of file screen_intern.h.
Definition at line 46 of file screen_intern.h.
Definition at line 41 of file screen_intern.h.
Definition at line 42 of file screen_intern.h.
Definition at line 40 of file screen_intern.h.
Definition at line 39 of file screen_intern.h.
#define BORDERPADDING ((2.0f * U.dpi_fac) + U.pixelsize) |
Expanded interaction influence of area borders.
Definition at line 51 of file screen_intern.h.
#define SCREEN_DIR_IS_HORIZONTAL | ( | dir | ) | (ELEM(dir, SCREEN_DIR_W, SCREEN_DIR_E)) |
Definition at line 30 of file screen_intern.h.
#define SCREEN_DIR_IS_VERTICAL | ( | dir | ) | (ELEM(dir, SCREEN_DIR_N, SCREEN_DIR_S)) |
Definition at line 29 of file screen_intern.h.
typedef enum eScreenAxis eScreenAxis |
typedef enum eScreenDir eScreenDir |
enum eScreenAxis |
Enumerator | |
---|---|
SCREEN_AXIS_H | Horizontal. |
SCREEN_AXIS_V | Vertical. |
Definition at line 32 of file screen_intern.h.
enum eScreenDir |
Enumerator | |
---|---|
SCREEN_DIR_NONE | This can mean unset, unknown or invalid. |
SCREEN_DIR_W | West/Left. |
SCREEN_DIR_N | North/Up. |
SCREEN_DIR_E | East/Right. |
SCREEN_DIR_S | South/Down. |
Definition at line 16 of file screen_intern.h.
void area_getoffsets | ( | ScrArea * | sa_a, |
ScrArea * | sa_b, | ||
eScreenDir | dir, | ||
int * | r_offset1, | ||
int * | r_offset2 | ||
) |
Get alignment offset of adjacent areas. 'dir' value is like area_getorientation().
Definition at line 305 of file screen_edit.c.
References BLI_assert, NULL, SCREEN_DIR_E, SCREEN_DIR_N, SCREEN_DIR_NONE, SCREEN_DIR_S, SCREEN_DIR_W, ScrArea::v1, ScrArea::v2, ScrArea::v3, ScrArea::v4, ScrVert::vec, vec2s::x, and vec2s::y.
Referenced by screen_area_join_aligned(), screen_area_join_ex(), and screen_draw_join_highlight().
eScreenDir area_getorientation | ( | ScrArea * | sa_a, |
ScrArea * | sa_b | ||
) |
with sa_a
as center, sa_b
is located at: 0=W, 1=N, 2=E, 3=S -1 = not valid check. used with join operator.
Definition at line 265 of file screen_edit.c.
References AREAJOINTOLERANCEX, AREAJOINTOLERANCEY, MAX2, MIN2, NULL, SCREEN_DIR_NONE, ScrArea::v1, ScrArea::v2, ScrArea::v3, ScrArea::v4, ScrVert::vec, vec2s::x, and vec2s::y.
Referenced by area_close_poll(), area_join_modal(), ED_area_has_shared_border(), screen_area_close(), screen_area_join_aligned(), screen_area_join_ex(), screen_area_options_invoke(), and screen_draw_join_highlight().
ScrArea* area_split | ( | const wmWindow * | win, |
bScreen * | screen, | ||
ScrArea * | area, | ||
eScreenAxis | dir_axis, | ||
float | fac, | ||
bool | merge | ||
) |
Definition at line 92 of file screen_edit.c.
References blender::compositor::area(), BKE_screen_remove_double_scredges(), BKE_screen_remove_double_scrverts(), BKE_screen_remove_unused_scredges(), ED_area_data_copy(), merge(), NULL, screen_addarea(), SCREEN_AXIS_H, screen_geom_edge_add(), screen_geom_find_area_split_point(), screen_geom_vertex_add(), blender::io::alembic::split(), and WM_window_rect_calc().
Referenced by area_split_apply(), and screen_area_trim().
Definition at line 969 of file screen_ops.c.
References blender::compositor::area(), area_actionzone_refresh_xy(), and xy.
Referenced by actionzone_modal(), ED_screen_area_active(), and screen_cursor_set().
we swap spaces for fullscreen to keep all allocated data area vertices were set
Definition at line 2122 of file area.c.
References BKE_area_region_copy(), BKE_area_region_free(), BKE_spacedata_copylist(), BKE_spacedata_freelist(), BKE_spacetype_from_id(), BLI_addtail(), BLI_freelistN(), ScrArea::flag, HEADER_NO_PULLDOWN, LISTBASE_FOREACH, ScrArea::regionbase, ScrArea::spacedata, ScrArea::spacetype, usdtokens::st(), and ScrArea::type.
Referenced by area_dupli_invoke(), area_split(), ED_area_swapspace(), ED_workspace_layout_duplicate(), and screen_data_copy().
Definition at line 2155 of file area.c.
References ScrArea::regionbase, ScrArea::spacedata, ScrArea::spacetype, SWAP, and ScrArea::type.
Referenced by ED_screen_state_toggle(), and screen_state_to_nonnormal().
int ed_screen_context | ( | const struct bContext * | C, |
const char * | member, | ||
struct bContextDataResult * | result | ||
) |
Entry point for the screen context.
Definition at line 2102 of file area.c.
References blender::compositor::area(), C, CTX_wm_area(), ED_region_visibility_change_update(), ED_region_visibility_change_update_animated(), ARegion::flag, ARegion::overlap, and RGN_FLAG_HIDDEN.
Referenced by ED_region_toggle_hidden(), and region_scale_toggle_hidden().
Empty screen, with 1 dummy area without space-data. Uses window size.
Definition at line 190 of file screen_edit.c.
References BKE_libblock_alloc(), bScreen::do_refresh, ID_SCR, bScreen::redraws_flag, screen_addarea(), screen_geom_edge_add(), screen_geom_vertex_add(), SPACE_EMPTY, TIME_ALL_3D_WIN, TIME_ALL_ANIM_WIN, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_workspace_layout_add().
Close a screen area, allowing most-aligned neighbor to take its place.
Definition at line 514 of file screen_edit.c.
References blender::compositor::area(), area_getorientation(), bScreen::areabase, C, float(), LISTBASE_FOREACH, MAX2, MIN2, NULL, screen_area_join_ex(), SCREEN_DIR_IS_VERTICAL, and SCREEN_DIR_NONE.
Referenced by area_close_exec(), and screen_area_join_ex().
Join any two neighboring areas. Might involve complex changes.
Definition at line 509 of file screen_edit.c.
References C, and screen_area_join_ex().
Referenced by area_join_apply(), and area_split_cancel().
void screen_area_spacelink_add | ( | struct Scene * | scene, |
ScrArea * | area, | ||
eSpace_Type | space_type | ||
) |
Definition at line 546 of file screen_edit.c.
References blender::compositor::area(), BKE_spacetype_from_id(), BLI_addhead(), BLI_listbase_clear(), SpaceType::create, SpaceLink::regionbase, and scene.
Referenced by ED_area_offscreen_create(), and screen_global_area_refresh().
void screen_change_prepare | ( | bScreen * | screen_old, |
bScreen * | screen_new, | ||
struct Main * | bmain, | ||
struct bContext * | C, | ||
wmWindow * | win | ||
) |
Definition at line 1089 of file screen_edit.c.
References bScreen::animtimer, blender::compositor::area(), bScreen::areabase, BLI_assert, BLI_findindex(), C, CTX_wm_manager(), ED_screen_exit(), LISTBASE_FOREACH, wmWindow::modalhandlers, NULL, Main::screens, UNUSED_VARS_NDEBUG, WM_event_remove_area_handler(), and WM_event_timer_sleep().
Referenced by ED_screen_change(), and ED_workspace_change().
Definition at line 1117 of file screen_edit.c.
References BKE_screen_view3d_scene_sync(), BKE_workspace_active_get(), BKE_workspace_layout_find(), C, CTX_wm_manager(), CTX_wm_window_set(), ED_screen_refresh(), NC_SCREEN, NC_WINDOW, ND_LAYOUTSET, NULL, scene, WM_event_add_mousemove(), WM_event_add_notifier(), WM_window_get_active_scene(), and wmWindow::workspace_hook.
Referenced by ED_screen_change(), and ED_workspace_change().
Definition at line 212 of file screen_edit.c.
References blender::compositor::area(), bScreen::areabase, BKE_screen_free_data(), BKE_screen_sort_scrvert(), BLI_duplicatelist(), BLI_listbase_clear(), ED_area_data_copy(), bScreen::edgebase, ListBase::first, bScreen::flag, from, LISTBASE_FOREACH, ScrVert::next, ScrArea::next, NULL, bScreen::regionbase, and bScreen::vertbase.
Referenced by ED_workspace_layout_duplicate().
Visual indication of the two areas involved in a proposed join.
sa1 | Area from which the resultant originates. |
sa2 | Target area that will be replaced. |
Definition at line 217 of file screen_draw.c.
References area_getoffsets(), area_getorientation(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4fv(), immVertexFormat(), MAX2, MIN2, SCREEN_DIR_IS_VERTICAL, SCREEN_DIR_NONE, ScrArea::totrct, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by area_join_draw_cb().
void screen_draw_split_preview | ( | struct ScrArea * | area, |
eScreenAxis | dir_axis, | ||
float | fac | ||
) |
Definition at line 302 of file screen_draw.c.
References blender::compositor::area(), BLI_assert, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4ub(), immVertex2f(), immVertexFormat(), pos, SCREEN_AXIS_H, SCREEN_AXIS_V, x, and y.
Referenced by area_split_draw_cb().
int screen_geom_area_height | ( | const ScrArea * | area | ) |
Definition at line 28 of file screen_geometry.c.
References blender::compositor::area().
Referenced by area_move_apply_do(), area_move_set_limits(), screen_geom_find_area_split_point(), and screen_geom_vertices_scale_pass().
ScrEdge* screen_geom_area_map_find_active_scredge | ( | const struct ScrAreaMap * | area_map, |
const rcti * | bounds_rect, | ||
int | mx, | ||
int | my | ||
) |
bounds_rect | Either window or screen bounds. Used to exclude edges along window/screen edges. |
int screen_geom_area_width | ( | const ScrArea * | area | ) |
Definition at line 32 of file screen_geometry.c.
References blender::compositor::area().
Referenced by area_move_set_limits(), and screen_geom_find_area_split_point().
Definition at line 62 of file screen_geometry.c.
References AREAMAP_FROM_SCREEN, screen_geom_edge_add_ex(), v1, and v2.
Referenced by area_split(), screen_add(), and screen_area_join_aligned().
ScrEdge* screen_geom_edge_add_ex | ( | ScrAreaMap * | area_map, |
ScrVert * | v1, | ||
ScrVert * | v2 | ||
) |
Definition at line 51 of file screen_geometry.c.
References BKE_screen_sort_scrvert(), BLI_addtail(), ScrAreaMap::edgebase, MEM_callocN, v1, ScrEdge::v1, v2, and ScrEdge::v2.
Referenced by screen_area_create_with_geometry(), and screen_geom_edge_add().
Definition at line 67 of file screen_geometry.c.
References ScrEdge::v1, ScrEdge::v2, ScrVert::vec, and vec2s::y.
Referenced by area_move_init(), area_split_invoke(), screen_area_edge_from_cursor(), screen_cursor_set(), and screen_geom_area_map_find_active_scredge().
ScrEdge* screen_geom_find_active_scredge | ( | const wmWindow * | win, |
const bScreen * | screen, | ||
int | mx, | ||
int | my | ||
) |
Need win size to make sure not to include edges along screen edge.
Definition at line 109 of file screen_geometry.c.
References AREAMAP_FROM_SCREEN, wmWindow::global_areas, NULL, screen_geom_area_map_find_active_scredge(), USER_APP_LOCK_EDGE_RESIZE, WM_window_rect_calc(), and WM_window_screen_rect_calc().
Referenced by area_move_init(), and screen_cursor_set().
short screen_geom_find_area_split_point | ( | const ScrArea * | area, |
const rcti * | window_rect, | ||
eScreenAxis | dir_axis, | ||
float | fac | ||
) |
Definition at line 280 of file screen_geometry.c.
References blender::compositor::area(), AREAMINX, CLAMP, ED_area_headersize(), round_fl_to_short(), SCREEN_AXIS_H, SCREEN_AXIS_V, screen_geom_area_height(), screen_geom_area_width(), x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by area_split().
Select all edges that are directly or indirectly connected to edge.
Definition at line 348 of file screen_geometry.c.
References ED_screen_verts_iter, bScreen::edgebase, LISTBASE_FOREACH, SCREEN_AXIS_H, SCREEN_AXIS_V, and WM_window_get_active_screen().
Referenced by area_move_init(), and screen_geom_vertices_scale_pass().
Definition at line 46 of file screen_geometry.c.
References AREAMAP_FROM_SCREEN, screen_geom_vertex_add_ex(), x, and y.
Referenced by area_split(), and screen_add().
ScrVert* screen_geom_vertex_add_ex | ( | ScrAreaMap * | area_map, |
short | x, | ||
short | y | ||
) |
Definition at line 37 of file screen_geometry.c.
References BLI_addtail(), MEM_callocN, ScrVert::vec, ScrAreaMap::vertbase, x, vec2s::x, y, and vec2s::y.
Referenced by screen_area_create_with_geometry(), and screen_geom_vertex_add().
Main screen-layout calculation function.
Definition at line 233 of file screen_geometry.c.
References blender::compositor::area(), ScrAreaMap::areabase, ED_area_global_size_y(), GLOBAL_AREA_ALIGN_BOTTOM, GLOBAL_AREA_ALIGN_TOP, GLOBAL_AREA_IS_HIDDEN, wmWindow::global_areas, height, LISTBASE_FOREACH, screen_geom_vertices_scale_pass(), WM_window_rect_calc(), WM_window_screen_rect_calc(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_screen_refresh().
Prepare a newly created screen for initializing it as active screen.
Definition at line 258 of file screen_edit.c.
References bScreen::do_draw, bScreen::do_refresh, bScreen::winid, and wmWindow::winid.
void SCREEN_OT_screenshot | ( | struct wmOperatorType * | ot | ) |
Definition at line 247 of file screendump.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, and screen_screenshot_impl().
Referenced by ED_operatortypes_screen().
void SCREEN_OT_screenshot_area | ( | struct wmOperatorType * | ot | ) |
Definition at line 258 of file screendump.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, ot, and screen_screenshot_impl().
Referenced by ED_operatortypes_screen().
bool workspace_layout_set_poll | ( | const struct WorkSpaceLayout * | layout | ) |
|
extern |
Definition at line 56 of file screen_context.c.
Referenced by bpy_context_members(), and ed_screen_context().