|
Blender V4.3
|
#include "DNA_space_types.h"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 * UI_SCALE_FAC) |
| #define | AREAJOINTOLERANCEY (HEADERY * UI_SCALE_FAC) |
| #define | BORDERPADDING ((3.0f * UI_SCALE_FAC) + U.pixelsize) |
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' } |
| enum class | AreaDockTarget { None , Right , Left , Top , Bottom , Center } |
Variables | |
| const char * | screen_context_dir [] |
| #define AREAJOINTOLERANCEX (AREAMINX * UI_SCALE_FAC) |
Definition at line 65 of file screen_intern.hh.
Referenced by area_getorientation(), screen_area_trim(), and screen_areas_can_align().
| #define AREAJOINTOLERANCEY (HEADERY * UI_SCALE_FAC) |
Definition at line 66 of file screen_intern.hh.
Referenced by area_getorientation(), screen_area_trim(), and screen_areas_can_align().
Definition at line 61 of file screen_intern.hh.
Referenced by area_actionzone_refresh_xy().
Definition at line 62 of file screen_intern.hh.
Referenced by area_actionzone_refresh_xy(), and fullscreen_azone_init().
Definition at line 60 of file screen_intern.hh.
Referenced by area_azone_init().
| #define AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */ |
Definition at line 59 of file screen_intern.hh.
Referenced by area_actionzone_refresh_xy(), and area_azone_init().
| #define BORDERPADDING ((3.0f * UI_SCALE_FAC) + U.pixelsize) |
Expanded interaction influence of area borders.
Definition at line 71 of file screen_intern.hh.
Referenced by ED_screen_draw_edges(), ED_screen_set_active_region(), and screen_geom_area_map_find_active_scredge().
| #define SCREEN_DIR_IS_HORIZONTAL | ( | dir | ) | (ELEM(dir, SCREEN_DIR_W, SCREEN_DIR_E)) |
Definition at line 41 of file screen_intern.hh.
Referenced by screen_areas_align(), and screen_areas_can_align().
| #define SCREEN_DIR_IS_VERTICAL | ( | dir | ) | (ELEM(dir, SCREEN_DIR_N, SCREEN_DIR_S)) |
Definition at line 40 of file screen_intern.hh.
Referenced by actionzone_modal(), area_split_invoke(), screen_area_close(), screen_area_trim(), screen_areas_can_align(), and screen_draw_join_highlight().
|
strong |
| Enumerator | |
|---|---|
| None | |
| Right | |
| Left | |
| Top | |
| Bottom | |
| Center | |
Definition at line 50 of file screen_intern.hh.
| enum eScreenAxis |
| Enumerator | |
|---|---|
| SCREEN_AXIS_H | Horizontal. |
| SCREEN_AXIS_V | Vertical. |
Definition at line 43 of file screen_intern.hh.
| 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 27 of file screen_intern.hh.
| 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 310 of file screen_edit.cc.
References BLI_assert, 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 area_docking_apply(), screen_area_join_ex(), screen_areas_can_align(), 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 270 of file screen_edit.cc.
References AREAJOINTOLERANCEX, AREAJOINTOLERANCEY, int, SCREEN_DIR_NONE, ScrArea::v1, ScrArea::v3, ScrVert::vec, vec2s::x, and vec2s::y.
Referenced by area_close_poll(), area_docking_apply(), area_join_exec(), area_join_init(), area_join_update_data(), ED_area_has_shared_border(), screen_area_close(), screen_area_join_aligned(), screen_area_join_ex(), and screen_area_options_invoke().
| ScrArea * area_split | ( | const wmWindow * | win, |
| bScreen * | screen, | ||
| ScrArea * | area, | ||
| eScreenAxis | dir_axis, | ||
| float | fac, | ||
| bool | merge ) |
Definition at line 95 of file screen_edit.cc.
References BKE_screen_remove_double_scredges(), BKE_screen_remove_double_scrverts(), BKE_screen_remove_unused_scredges(), ED_area_data_copy(), merge(), screen_addarea(), SCREEN_AXIS_H, screen_geom_edge_add(), screen_geom_find_area_split_point(), screen_geom_vertex_add(), and WM_window_rect_calc().
Referenced by area_docking_apply(), area_join_modal(), area_split_apply(), and screen_area_trim().
Definition at line 1038 of file screen_ops.cc.
References area_actionzone_refresh_xy(), and xy.
Referenced by actionzone_modal(), ED_screen_area_active(), ED_screen_draw_edges(), and screen_cursor_set().
We swap spaces for full-screen to keep all allocated data area vertices were set.
Definition at line 2281 of file area.cc.
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, and ScrArea::type.
Referenced by area_dupli_fn(), area_split(), ED_area_swapspace(), ED_workspace_layout_duplicate(), and screen_data_copy().
Definition at line 2314 of file area.cc.
References ScrArea::regionbase, ScrArea::spacedata, ScrArea::spacetype, and ScrArea::type.
Referenced by ED_screen_state_toggle(), and screen_state_to_nonnormal().
| int ed_screen_context | ( | const bContext * | C, |
| const char * | member, | ||
| bContextDataResult * | result ) |
Entry point for the screen context.
Definition at line 1218 of file screen_context.cc.
References BLI_ghash_lookup(), callback, CTX_data_dir(), CTX_data_dir_set(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_OK, ed_screen_context_functions, ensure_ed_screen_context_functions(), and screen_context_dir.
Referenced by screen_refresh().
Definition at line 2261 of file area.cc.
References CTX_wm_area(), ED_region_visibility_change_update(), ED_region_visibility_change_update_animated(), 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 193 of file screen_edit.cc.
References BKE_libblock_alloc(), bScreen::do_refresh, ID_SCR, 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 567 of file screen_edit.cc.
References area_getorientation(), float, LISTBASE_FOREACH, screen_area_join_ex(), SCREEN_DIR_IS_VERTICAL, and SCREEN_DIR_NONE.
Referenced by area_close_exec(), area_docking_apply(), area_join_modal(), and screen_area_join_ex().
Join any two neighboring areas. Might involve complex changes.
Definition at line 562 of file screen_edit.cc.
References screen_area_join_ex().
Referenced by area_docking_apply(), area_join_apply(), and area_split_cancel().
| void screen_area_spacelink_add | ( | const Scene * | scene, |
| ScrArea * | area, | ||
| eSpace_Type | space_type ) |
Definition at line 599 of file screen_edit.cc.
References BKE_spacetype_from_id(), BLI_addhead(), BLI_listbase_clear(), SpaceType::create, and SpaceLink::regionbase.
Referenced by area_init_type_fallback(), ED_area_offscreen_create(), and screen_global_area_refresh().
| void screen_change_prepare | ( | bScreen * | screen_old, |
| bScreen * | screen_new, | ||
| Main * | bmain, | ||
| bContext * | C, | ||
| wmWindow * | win ) |
Definition at line 1274 of file screen_edit.cc.
References bScreen::animtimer, bScreen::areabase, BLI_assert, BLI_findindex(), CTX_wm_manager(), ED_screen_exit(), LISTBASE_FOREACH, wmWindow::modalhandlers, 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 1302 of file screen_edit.cc.
References BKE_screen_view3d_scene_sync(), BKE_workspace_active_get(), BKE_workspace_layout_find(), CTX_wm_manager(), CTX_wm_window_set(), ED_screen_refresh(), NC_SCREEN, NC_WINDOW, ND_LAYOUTSET, 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 215 of file screen_edit.cc.
References BKE_screen_free_data(), BKE_screen_sort_scrvert(), BLI_duplicatelist(), BLI_listbase_clear(), ED_area_data_copy(), LISTBASE_FOREACH, ScrVert::newv, ScrArea::next, ScrVert::next, and ScrArea::v1.
Referenced by ED_workspace_layout_duplicate().
| void screen_draw_dock_preview | ( | ScrArea * | source, |
| ScrArea * | target, | ||
| AreaDockTarget | dock_target, | ||
| float | factor, | ||
| int | x, | ||
| int | y ) |
Definition at line 520 of file screen_draw.cc.
References AREAMINX, BLI_rctf_rcti_copy(), Bottom, Center, ELEM, HEADERY, IFACE_, Left, None, Right, rounded_corners(), screen_draw_area_drag_tip(), split(), TH_EDITOR_BORDER, Top, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_NONE, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UI_SCALE_FAC, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_join_dock_cb().
| void screen_draw_join_highlight | ( | const wmWindow * | win, |
| ScrArea * | sa1, | ||
| ScrArea * | sa2, | ||
| eScreenDir | dir ) |
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 379 of file screen_draw.cc.
References area_getoffsets(), wmWindow::eventstate, IFACE_, SCREEN_DIR_IS_VERTICAL, SCREEN_DIR_NONE, screen_draw_area_closed(), screen_draw_area_drag_tip(), ScrArea::totrct, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), rcti::xmax, rctf::xmin, rcti::xmin, wmEvent::xy, rcti::ymax, and rcti::ymin.
Referenced by area_join_draw_cb().
| void screen_draw_move_highlight | ( | bScreen * | screen, |
| eScreenAxis | dir_axis ) |
Definition at line 278 of file screen_draw.cc.
References BLI_rctf_pad(), float, LISTBASE_FOREACH, SCREEN_AXIS_H, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_move_draw_cb().
| void screen_draw_split_preview | ( | ScrArea * | area, |
| eScreenAxis | dir_axis, | ||
| float | factor ) |
Definition at line 594 of file screen_draw.cc.
References BLI_rctf_rcti_copy(), rounded_corners(), SCREEN_AXIS_H, SCREEN_AXIS_V, TH_EDITOR_BORDER, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_join_draw_cb(), and area_split_draw_cb().
Definition at line 30 of file screen_geometry.cc.
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 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. |
Definition at line 74 of file screen_geometry.cc.
References abs(), BORDERPADDING, CLAMP_MIN, ScrAreaMap::edgebase, LISTBASE_FOREACH, max, min, screen_geom_edge_is_horizontal(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by actionzone_modal(), area_split_invoke(), screen_area_edge_from_cursor(), and screen_geom_find_active_scredge().
Definition at line 34 of file screen_geometry.cc.
Referenced by area_move_set_limits(), and screen_geom_find_area_split_point().
Definition at line 64 of file screen_geometry.cc.
References AREAMAP_FROM_SCREEN, screen_geom_edge_add_ex(), 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 53 of file screen_geometry.cc.
References BKE_screen_sort_scrvert(), BLI_addtail(), ScrAreaMap::edgebase, MEM_callocN, ScrEdge::v1, ScrEdge::v2, and v2.
Referenced by screen_area_create_with_geometry(), and screen_geom_edge_add().
| bool screen_geom_edge_is_horizontal | ( | ScrEdge * | se | ) |
Definition at line 69 of file screen_geometry.cc.
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 111 of file screen_geometry.cc.
References AREAMAP_FROM_SCREEN, wmWindow::global_areas, 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 283 of file screen_geometry.cc.
References AREAMINX, CLAMP, ED_area_headersize(), round_fl_to_short(), SCREEN_AXIS_H, SCREEN_AXIS_V, screen_geom_area_height(), screen_geom_area_width(), UI_SCALE_FAC, 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 351 of file screen_geometry.cc.
References ED_screen_verts_iter, 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 48 of file screen_geometry.cc.
References AREAMAP_FROM_SCREEN, and screen_geom_vertex_add_ex().
Referenced by area_split(), and screen_add().
| ScrVert * screen_geom_vertex_add_ex | ( | ScrAreaMap * | area_map, |
| short | x, | ||
| short | y ) |
Definition at line 39 of file screen_geometry.cc.
References BLI_addtail(), MEM_callocN, ScrVert::vec, ScrAreaMap::vertbase, vec2s::x, x, vec2s::y, and y.
Referenced by screen_area_create_with_geometry(), and screen_geom_vertex_add().
Main screen-layout calculation function.
Definition at line 236 of file screen_geometry.cc.
References ScrAreaMap::areabase, ED_area_global_size_y(), GLOBAL_AREA_ALIGN_BOTTOM, GLOBAL_AREA_ALIGN_TOP, GLOBAL_AREA_IS_HIDDEN, wmWindow::global_areas, 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 screen_refresh().
Prepare a newly created screen for initializing it as active screen.
Definition at line 263 of file screen_edit.cc.
References bScreen::do_draw, bScreen::do_refresh, bScreen::winid, and wmWindow::winid.
| void SCREEN_OT_screenshot | ( | wmOperatorType * | ot | ) |
Definition at line 259 of file screendump.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, and screen_screenshot_impl().
Referenced by ED_operatortypes_screen().
| void SCREEN_OT_screenshot_area | ( | wmOperatorType * | ot | ) |
Definition at line 270 of file screendump.cc.
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 WorkSpaceLayout * | layout | ) |
Definition at line 89 of file workspace_layout_edit.cc.
References BKE_screen_is_fullscreen_area(), BKE_screen_is_used(), BKE_workspace_layout_screen_get(), and USER_HIDE_DOT.
Referenced by workspace_change_find_new_layout_cb(), workspace_layout_cycle_iter_cb(), and workspace_layout_delete_find_new().
| const char* screen_context_dir[] |
Definition at line 194 of file screen_intern.hh.