|
Blender V5.0
|
#include "ED_screen.hh"#include "ED_screen_types.hh"#include "GPU_batch_presets.hh"#include "GPU_immediate.hh"#include "GPU_platform.hh"#include "GPU_state.hh"#include "BKE_global.hh"#include "BKE_screen.hh"#include "BLF_api.hh"#include "BLI_listbase.h"#include "BLI_math_color.h"#include "BLI_math_vector.h"#include "BLI_rect.h"#include "BLI_time.h"#include "BLT_translation.hh"#include "WM_api.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "screen_intern.hh"Go to the source code of this file.
Classes | |
| struct | AreaAnimateHighlightData |
Macros | |
| #define | CORNER_RESOLUTION 3 |
Functions | |
| static void | do_vert_pair (blender::gpu::VertBuf *vbo, uint pos, uint *vidx, int corner, int i) |
| static blender::gpu::Batch * | batch_screen_edges_get (int *corner_len) |
| static void | drawscredge_area (const ScrArea &area, float edge_thickness) |
| Screen edges drawing. | |
| void | ED_screen_draw_edges (wmWindow *win) |
| void | screen_draw_move_highlight (const wmWindow *win, bScreen *screen, eScreenAxis dir_axis, float anim_factor) |
| void | screen_draw_region_scale_highlight (ARegion *region) |
| static void | screen_draw_area_drag_tip (const wmWindow *win, int x, int y, const ScrArea *source, const std::string &hint) |
| static void | screen_draw_area_closed (int xmin, int xmax, int ymin, int ymax, float anim_factor) |
| void | screen_draw_join_highlight (const wmWindow *win, ScrArea *sa1, ScrArea *sa2, eScreenDir dir, float anim_factor) |
| static void | rounded_corners (rctf rect, float color[4], int corners) |
| void | screen_draw_dock_preview (const wmWindow *win, ScrArea *source, ScrArea *target, AreaDockTarget dock_target, float factor, int x, int y, float anim_factor) |
| void | screen_draw_split_preview (ScrArea *area, const eScreenAxis dir_axis, const float factor) |
| static void | area_animate_highlight_cb (const wmWindow *, void *userdata) |
| void | screen_animate_area_highlight (wmWindow *win, bScreen *screen, const rcti *rect, float inner[4], float outline[4], float seconds) |
| #define CORNER_RESOLUTION 3 |
Definition at line 37 of file screen_draw.cc.
Referenced by batch_screen_edges_get(), and do_vert_pair().
|
static |
Definition at line 676 of file screen_draw.cc.
References BLI_time_now_seconds(), data, EDITORRADIUS, MEM_freeN(), pow, U, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), and WM_draw_cb_exit().
Referenced by screen_animate_area_highlight().
|
static |
Definition at line 65 of file screen_draw.cc.
References CORNER_RESOLUTION, do_vert_pair(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, gpu_batch_presets_register(), GPU_PRIM_TRI_STRIP, GPU_vertbuf_create_with_format(), GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), and pos.
Referenced by drawscredge_area(), and ED_screen_draw_edges().
|
static |
Definition at line 39 of file screen_draw.cc.
References copy_v2_v2(), CORNER_RESOLUTION, cosf, fabsf, GPU_vertbuf_attr_set(), i, M_PI_2, max_ff(), mul_v2_fl(), mul_v2_v2fl(), pos, roundf, and sinf.
Referenced by batch_screen_edges_get().
Screen edges drawing.
Definition at line 100 of file screen_draw.cc.
References batch, batch_screen_edges_get(), BLI_rctf_pad(), BLI_rctf_rcti_copy(), GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_SHADER_2D_AREA_BORDERS, and ScrArea::totrct.
Referenced by ED_screen_draw_edges().
| void ED_screen_draw_edges | ( | wmWindow * | win | ) |
Only for edge lines between areas.
Definition at line 112 of file screen_draw.cc.
References bScreen::active_region, bScreen::areabase, ScrAreaMap::areabase, AZONE_REGION_SCROLL, batch, batch_screen_edges_get(), BKE_screen_find_area_xy(), BLI_listbase_is_empty(), BLI_listbase_is_single(), BLI_rctf_pad(), BLI_rctf_rcti_copy(), BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_do_minmax_v(), BLI_rcti_init_minmax(), BLI_rcti_size_x(), BLI_rcti_size_y(), bounds(), col, bScreen::do_draw, wmWindow::drawcalls, drawscredge_area(), ED_area_actionzone_find_xy(), EDITORRADIUS, wmWindow::eventstate, ListBase::first, float, G, G_TRANSFORM_WM, wmWindow::global_areas, GPU_BACKEND_OPENGL, GPU_batch_program_set_builtin(), GPU_batch_uniform_1f, GPU_batch_uniform_1i, GPU_batch_uniform_4fv, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_DEVICE_INTEL_UHD, GPU_DRIVER_ANY, GPU_flush(), GPU_OS_UNIX, GPU_scissor(), GPU_scissor_test(), GPU_SHADER_2D_AREA_BORDERS, GPU_type_matches_ex(), LISTBASE_FOREACH, padding(), pos, SCREENNORMAL, SPACE_TYPE_ANY, bScreen::state, TH_EDITOR_BORDER, TH_EDITOR_OUTLINE, TH_EDITOR_OUTLINE_ACTIVE, AZone::type, U, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UI_SCALE_FAC, ARegion::winrct, WM_window_get_active_screen(), rcti::xmin, wmEvent::xy, and rcti::ymin.
Referenced by wm_draw_window_onscreen().
Definition at line 454 of file screen_draw.cc.
References EDITORRADIUS, GPU_PRIM_TRI_FAN, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), mul_v2_fl(), pos, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by screen_draw_dock_preview(), and screen_draw_split_preview().
| void screen_animate_area_highlight | ( | wmWindow * | win, |
| bScreen * | screen, | ||
| const rcti * | rect, | ||
| float | inner[4], | ||
| float | outline[4], | ||
| float | seconds ) |
Definition at line 720 of file screen_draw.cc.
References area_animate_highlight_cb(), BLI_rctf_rcti_copy(), BLI_time_now_seconds(), copy_v4_v4(), data, MEM_callocN(), and WM_draw_cb_activate().
Referenced by area_close_exec(), area_docking_apply(), area_join_apply(), area_join_modal(), area_split_modal(), and screen_area_join_ex().
|
static |
Definition at line 369 of file screen_draw.cc.
References EDITORRADIUS, float, U, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), and UI_draw_roundbox_corner_set().
Referenced by screen_draw_join_highlight().
|
static |
Definition at line 308 of file screen_draw.cc.
References BLF_color4fv(), BLF_descender(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_height_max(), BLF_position(), BLF_size(), BLF_width(), ED_area_icon(), ED_area_name(), ICON_DEFAULT_WIDTH, IFACE_, uiWidgetColors::inner, left, uiFontStyle::points, rgba_uchar_to_float(), uiWidgetColors::roundness, uiWidgetColors::text, top, bTheme::tui, U, UI_CNR_ALL, UI_DEFAULT_TOOLTIP_POINTS, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_FSTYLE_TOOLTIP, UI_GetTheme(), UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, UI_SCALE_FAC, uiFontStyle::uifont_id, ThemeUI::wcol_tooltip, WM_window_native_pixel_x(), x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by screen_draw_dock_preview(), and screen_draw_join_highlight().
| void screen_draw_dock_preview | ( | const wmWindow * | win, |
| ScrArea * | source, | ||
| ScrArea * | target, | ||
| AreaDockTarget | dock_target, | ||
| float | factor, | ||
| int | x, | ||
| int | y, | ||
| float | anim_factor ) |
Definition at line 522 of file screen_draw.cc.
References AREAMINX, BLI_rctf_rcti_copy(), Bottom, Center, EDITORRADIUS, ELEM, float, HEADERY, IFACE_, Left, None, Right, rounded_corners(), screen_draw_area_drag_tip(), split(), TH_EDITOR_BORDER, Top, ScrArea::totrct, U, 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, ScrArea::winx, ScrArea::winy, x, rctf::xmax, rctf::xmin, y, 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, | ||
| float | anim_factor ) |
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 378 of file screen_draw.cc.
References area_getoffsets(), EDITORRADIUS, wmWindow::eventstate, IFACE_, SCREEN_DIR_IS_VERTICAL, SCREEN_DIR_NONE, screen_draw_area_closed(), screen_draw_area_drag_tip(), ScrArea::totrct, U, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, wmEvent::xy, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by area_join_draw_cb().
| void screen_draw_move_highlight | ( | const wmWindow * | win, |
| bScreen * | screen, | ||
| eScreenAxis | dir_axis, | ||
| float | anim_factor ) |
Definition at line 224 of file screen_draw.cc.
References BLI_rctf_pad(), bScreen::edgebase, float, LISTBASE_FOREACH, SCREEN_AXIS_H, TH_EDITOR_BORDER, U, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UI_SCALE_FAC, WM_window_screen_rect_calc(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_move_draw_cb(), and area_move_out_draw_cb().
| void screen_draw_region_scale_highlight | ( | ARegion * | region | ) |
Definition at line 267 of file screen_draw.cc.
References ARegion::alignment, BLI_rctf_rcti_copy(), EDITORRADIUS, RGN_ALIGN_BOTTOM, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_ALIGN_TOP, U, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_SCALE_FAC, ARegion::winrct, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by region_scale_draw_cb().
| void screen_draw_split_preview | ( | ScrArea * | area, |
| const eScreenAxis | dir_axis, | ||
| const float | factor ) |
Definition at line 604 of file screen_draw.cc.
References BLI_rctf_rcti_copy(), EDITORRADIUS, float, rounded_corners(), SCREEN_AXIS_H, SCREEN_AXIS_V, TH_EDITOR_BORDER, ScrArea::totrct, U, 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(), UI_SCALE_FAC, x, rctf::xmax, rcti::xmax, rctf::xmin, y, rctf::ymax, rcti::ymax, and rctf::ymin.
Referenced by area_join_draw_cb(), and area_split_draw_cb().