72 #ifdef USE_UI_POPOVER_ONCE
85 #ifdef USE_UI_POPOVER_ONCE
130 const int block_margin =
U.widget_unit / 2;
181 int bounds_offset[2] = {0, 0};
188 uiBut *but =
nullptr;
189 uiBut *but_first =
nullptr;
192 but_first = but_iter;
205 bounds_offset[0] = -(pup->
ui_size_x / 2);
223 if (pup->
keymap !=
nullptr) {
238 uiPopover *pup = MEM_cnew<uiPopover>(__func__);
254 #ifdef USE_UI_POPOVER_ONCE
273 handle->
popup =
true;
294 if (pt->
poll && (pt->
poll(
C, pt) ==
false)) {
329 uiPopover *pup = MEM_cnew<uiPopover>(__func__);
330 if (ui_menu_width == 0) {
336 uiBut *but =
nullptr;
338 if (from_active_button) {
341 if (but ==
nullptr) {
353 pup->
block->
handle = MEM_cnew<uiPopupBlockHandle>(__func__);
390 handle->
popup =
true;
414 #ifdef USE_UI_POPOVER_ONCE
typedef float(TangentPoint)[2]
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
#define RGN_ALIGN_ENUM_FROM_MASK(align)
#define RGN_TYPE_IS_HEADER_ANY(regiontype)
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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 width
Read Guarded memory(de)allocation.
void UI_paneltype_draw(struct bContext *C, struct PanelType *pt, struct uiLayout *layout)
const struct uiStyle * UI_style_get_dpi(void)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
void UI_block_bounds_set_normal(struct uiBlock *block, int addval)
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
@ UI_BLOCK_THEME_STYLE_POPUP
void UI_block_flag_disable(uiBlock *block, int flag)
void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context)
void UI_popup_handlers_add(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup, char flag)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const struct uiStyle *style)
uiBut * UI_region_active_but_get(const struct ARegion *region)
bool UI_block_active_only_flagged_buttons(const struct bContext *C, struct ARegion *region, struct uiBlock *block)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
void UI_block_direction_set(uiBlock *block, char direction)
#define UI_DEFAULT_TEXT_POINTS
void UI_block_flag_enable(uiBlock *block, int flag)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
void UI_block_region_set(uiBlock *block, struct ARegion *region)
@ UI_BLOCK_SHOW_SHORTCUT_ALWAYS
@ WM_OP_INVOKE_REGION_WIN
void ui_block_to_window_fl(const ARegion *region, uiBlock *block, float *r_x, float *r_y)
uiPopupBlockHandle * ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg, uiFreeArgFunc arg_free)
#define UI_POPOVER_WIDTH_UNITS
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *arg_pt)
bool ui_but_is_editable(const uiBut *but) ATTR_WARN_UNUSED_RESULT
#define UI_MENU_WIDTH_MIN
void UI_popover_end(bContext *C, uiPopover *pup, wmKeyMap *keymap)
uiPopupBlockHandle * ui_popover_panel_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
static void ui_block_free_func_POPOVER(void *arg_pup)
void UI_popover_once_clear(uiPopover *pup)
uiLayout * UI_popover_layout(uiPopover *pup)
static void popover_keymap_fn(wmKeyMap *UNUSED(keymap), wmKeyMapItem *UNUSED(kmi), void *user_data)
int UI_popover_panel_invoke(bContext *C, const char *idname, bool keep_open, ReportList *reports)
static void ui_popover_create_block(bContext *C, uiPopover *pup, wmOperatorCallContext opcontext)
static uiBlock * ui_block_func_POPOVER(bContext *C, uiPopupBlockHandle *handle, void *arg_pup)
uiPopover * UI_popover_begin(bContext *C, int ui_menu_width, bool from_active_button)
void(* MEM_freeN)(void *vmemh)
bool(* poll)(const struct bContext *C, struct PanelType *pt)
uiPopupBlockHandle * handle
struct bContextStore * context
uiMenuCreateFunc menu_func
struct wmEventHandler_Keymap * keymap_handler
struct ARegion * ctx_region
struct uiPopupBlockCreate popup_create_vars
int prev_bounds_offset[2]
struct wmEvent * eventstate
void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmEventHandler_Keymap * WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMap *keymap, int UNUSED(priority))
void WM_event_set_keymap_handler_post_callback(wmEventHandler_Keymap *handler, void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data), void *user_data)
void WM_event_add_mousemove(wmWindow *win)
PanelType * WM_paneltype_find(const char *idname, bool quiet)