70#ifdef USE_UI_POPOVER_ONCE
91#ifdef USE_UI_POPOVER_ONCE
139 const int block_margin =
U.widget_unit / 2;
153 if (!handle->refresh) {
169 if (region && region->panels.first) {
196 const int bounds_offset[2] = {
204 int bounds_offset[2] = {0, 0};
210 if (!handle->refresh) {
211 uiBut *but =
nullptr;
212 uiBut *but_first =
nullptr;
215 but_first = but_iter;
228 bounds_offset[0] = -(pup->
ui_size_x / 2);
246 if (pup->
keymap !=
nullptr) {
263 uiPopover *pup = MEM_new<uiPopover>(__func__);
278#ifdef USE_UI_POPOVER_ONCE
295 handle->popup =
true;
316 if (pt->
poll && (pt->
poll(C, pt) ==
false)) {
351 uiPopover *pup = MEM_new<uiPopover>(__func__);
352 if (ui_menu_width == 0) {
358 uiBut *but =
nullptr;
360 if (from_active_button) {
363 if (but ==
nullptr) {
376 pup->
block->
handle = MEM_cnew<uiPopupBlockHandle>(__func__);
413 handle->popup =
true;
434#ifdef USE_UI_POPOVER_ONCE
wmWindow * CTX_wm_window(const bContext *C)
ARegion * CTX_wm_region(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)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT 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)
Read Guarded memory(de)allocation.
void UI_block_theme_style_set(uiBlock *block, char theme_style)
@ UI_BLOCK_SHOW_SHORTCUT_ALWAYS
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
uiBut * UI_region_active_but_get(const ARegion *region)
void UI_block_bounds_set_normal(uiBlock *block, int addval)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const uiStyle *style)
const uiStyle * UI_style_get_dpi()
void UI_block_flag_disable(uiBlock *block, int flag)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, eUIEmbossType emboss)
bool UI_block_active_only_flagged_buttons(const bContext *C, ARegion *region, uiBlock *block)
void UI_paneltype_draw(bContext *C, PanelType *pt, uiLayout *layout)
@ UI_BLOCK_THEME_STYLE_POPUP
void UI_popup_handlers_add(bContext *C, ListBase *handlers, uiPopupBlockHandle *popup, char flag)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void UI_block_region_set(uiBlock *block, ARegion *region)
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 uiLayoutContextCopy(uiLayout *layout, const bContextStore *context)
@ WM_OP_INVOKE_REGION_WIN
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void ui_block_to_window_fl(const ARegion *region, const uiBlock *block, float *x, float *y)
uiPopupBlockHandle * ui_popup_block_create(bContext *C, ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg, uiFreeArgFunc arg_free, bool can_refresh)
void ui_item_paneltype_func(bContext *C, uiLayout *layout, void *arg_pt)
#define UI_POPOVER_WIDTH_UNITS
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
bool ui_but_is_editable(const uiBut *but) ATTR_WARN_UNUSED_RESULT
std::function< void(bContext *, uiLayout *, PanelType *)> uiPopoverCreateFunc
#define UI_MENU_WIDTH_MIN
void UI_popover_end(bContext *C, uiPopover *pup, wmKeyMap *keymap)
static void ui_block_free_func_POPOVER(void *arg_pup)
void UI_popover_once_clear(uiPopover *pup)
static uiBlock * ui_block_func_POPOVER(bContext *C, uiPopupBlockHandle *handle, void *arg_pup)
uiLayout * UI_popover_layout(uiPopover *pup)
uiPopover * UI_popover_begin(bContext *C, int ui_menu_width, bool from_active_button)
int UI_popover_panel_invoke(bContext *C, const char *idname, bool keep_open, ReportList *reports)
uiPopupBlockHandle * ui_popover_panel_create(bContext *C, ARegion *butregion, uiBut *but, uiPopoverCreateFunc popover_func, const PanelType *panel_type)
static void popover_keymap_fn(wmKeyMap *, wmKeyMapItem *, void *user_data)
static void ui_popover_create_block(bContext *C, ARegion *region, uiPopover *pup, wmOperatorCallContext opcontext)
bool(* poll)(const bContext *C, PanelType *pt)
blender::float2 offset_units_xy
uiPopupBlockHandle * handle
const bContextStore * context
uiPopoverCreateFunc popover_func
const PanelType * panel_type
wmEventHandler_Keymap * keymap_handler
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)
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)