79 butrct.
ymax +=
U.pixelsize;
82 butrct.
xmin -=
U.pixelsize;
120 short dir1 = 0, dir2 = 0;
123 bool left =
false,
right =
false,
top =
false, down =
false;
133 if (butrct.
xmin - max_size_x + center_x > 0.0f) {
136 if (butrct.
xmax + max_size_x - center_x < win_x) {
139 if (butrct.
ymin - max_size_y + center_y > 0.0f) {
142 if (butrct.
ymax + max_size_y - center_y < win_y) {
146 if (
top == 0 && down == 0) {
147 if (butrct.
ymin - max_size_y < win_y - butrct.
ymax - max_size_y) {
216 float offset_x = 0, offset_y = 0;
219 const float offset_overlap =
max_ff(
U.pixelsize, 1.0f);
222 offset_x = (butrct.
xmin - block->
rect.
xmax) + offset_overlap;
231 offset_x = (butrct.
xmax - block->
rect.
xmin) - offset_overlap;
240 offset_y = (butrct.
ymax - block->
rect.
ymin) - offset_overlap;
254 offset_y = (butrct.
ymin - block->
rect.
ymax) + offset_overlap;
292 const int s1 = 40 *
U.dpi_fac;
293 const int s2 = 3 *
U.dpi_fac;
296 if (midx < block->rect.xmin) {
311 if (midy < block->rect.ymin) {
326 if (dir1 && (dir1 & block->
direction) == 0) {
338 uiSafetyRct *saferct = MEM_cnew<uiSafetyRct>(__func__);
369 if (handle_ctx_area) {
372 if (handle_ctx_region) {
418 const float xmin_orig = block->
rect.
xmin;
430 if (block->
rect.
xmax > winx - margin) {
431 const float xofs = winx - margin - block->
rect.
xmax;
437 const float xofs = (margin - block->
rect.
xmin);
450 const float xofs = block->
rect.
xmin - xmin_orig;
452 bt->rect.xmin += xofs;
453 bt->rect.xmax += xofs;
471 if (bt->rect.ymin < block->
rect.
ymin) {
475 if (bt->rect.ymax > block->
rect.
ymax) {
554 handle->
refresh = (block_old !=
nullptr);
568 block = handle_create_func(
C, handle, arg);
591 if (but ==
nullptr) {
614 uiSafetyRct *saferct = MEM_cnew<uiSafetyRct>(__func__);
623 int x_offset = 0, y_offset = 0;
633 x_offset += win_width - block->
rect.
xmin;
635 if (block->
rect.
xmax > winx - win_width) {
636 x_offset += winx - win_width - block->
rect.
xmax;
642 y_offset += win_width - block->
rect.
ymin;
644 if (block->
rect.
ymax > winy - win_width) {
645 y_offset += winy - win_width - block->
rect.
ymax;
650 if ((x_offset != 0) || (y_offset != 0)) {
656 if (
U.pie_initial_timeout > 0) {
669 if (
U.pie_animation_timeout > 0) {
681 const float unit_size =
U.widget_unit / block->
aspect;
817 if (region !=
nullptr) {
struct ScrArea * CTX_wm_area(const bContext *C)
void CTX_wm_region_set(bContext *C, struct ARegion *region)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_window_set(bContext *C, struct wmWindow *win)
struct ARegion * CTX_wm_region(const bContext *C)
void CTX_wm_area_set(bContext *C, struct ScrArea *area)
struct wmWindow * CTX_wm_window(const bContext *C)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
void BLI_rctf_translate(struct rctf *rect, float x, float y)
void BLI_rctf_union(struct rctf *rct_a, const struct rctf *rct_b)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
void BLI_rcti_translate(struct rcti *rect, int x, int y)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
void BLI_rctf_recenter(struct rctf *rect, float x, float y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
void BLI_rctf_init_minmax(struct rctf *rect)
void ED_region_tag_refresh_ui(struct ARegion *region)
void ED_region_floating_init(struct ARegion *region)
void ED_region_tag_redraw(struct ARegion *region)
void ED_region_update_rect(struct ARegion *region)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble right
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
Read Guarded memory(de)allocation.
void UI_block_theme_style_set(uiBlock *block, char theme_style)
@ UI_BLOCK_THEME_STYLE_POPUP
uiBut * UI_context_active_but_get(const struct bContext *C)
void UI_blocklist_free_inactive(const struct bContext *C, struct ARegion *region)
void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but)
void(* uiFreeArgFunc)(void *arg)
@ UI_BLOCK_BOUNDS_POPUP_CENTER
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
void UI_block_order_flip(uiBlock *block)
void UI_region_handlers_add(struct ListBase *handlers)
void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2], int r_xy[2])
void UI_block_translate(uiBlock *block, int x, int y)
void UI_block_update_from_old(const struct bContext *C, struct uiBlock *block)
uiBlock *(* uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1)
void ui_but_update(uiBut *but)
void ui_block_to_window_rctf(const ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
float ui_block_calc_pie_segment(uiBlock *block, const float event_xy[2])
#define UI_POPUP_MENU_TOP
#define UI_MENU_SUBMENU_PADDING
uiBlock *(* uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1)
@ UI_PIE_INITIAL_DIRECTION
#define UI_MENU_SCROLL_ARROW
@ UI_BLOCK_CONTAINS_SUBMENU_BUT
void ui_region_temp_remove(bContext *C, bScreen *screen, ARegion *region)
ARegion * ui_region_temp_add(bScreen *screen)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
static PyObject * create_func(PyObject *, PyObject *args)
struct ARegionType * type
uiPopupBlockHandle * handle
struct PieMenuData pie_data
eBlockBoundsCalc bounds_type
struct wmTimer * scrolltimer
struct ARegion * ctx_region
struct ScrArea * ctx_area
struct uiPopupBlockCreate popup_create_vars
struct wmEvent * eventstate
struct wmEvent * event_last_handled
void WM_cursor_set(wmWindow *win, int curs)
void wmGetProjectionMatrix(float mat[4][4], const rcti *winrct)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
int WM_window_pixels_y(const wmWindow *win)
bScreen * WM_window_get_active_screen(const wmWindow *win)
int WM_window_pixels_x(const wmWindow *win)