75#ifdef USE_UI_POPOVER_ONCE
96#ifdef USE_UI_POPOVER_ONCE
154 const int block_margin =
U.widget_unit / 2;
211 const int bounds_offset[2] = {
219 int bounds_offset[2] = {0, 0};
226 const Button *but =
nullptr;
227 const Button *but_first =
nullptr;
230 but_first = &but_iter;
243 bounds_offset[0] = -(pup->
ui_size_x / 2);
261 if (pup->
keymap !=
nullptr) {
278 Popover *pup = MEM_new<Popover>(__func__);
292#ifdef USE_UI_POPOVER_ONCE
309 handle->
popup =
true;
331 if (pt->
poll && (pt->
poll(
C, pt) ==
false)) {
336 Block *block =
nullptr;
375 Popover *pup = MEM_new<Popover>(__func__);
376 if (ui_menu_width == 0) {
385 if (from_active_button) {
388 if (but ==
nullptr) {
401 pup->
block->
handle = MEM_new<PopupBlockHandle>(__func__);
439 handle->
popup =
true;
460#ifdef USE_UI_POPOVER_ONCE
463 pup->is_once =
false;
#define RGN_ALIGN_ENUM_FROM_MASK(align)
#define RGN_TYPE_IS_HEADER_ANY(regiontype)
Read Blender memory allocation and freeing.
#define UI_DEFAULT_TEXT_POINTS
#define UI_POPOVER_WIDTH_UNITS
#define UI_MENU_WIDTH_MIN
void block_direction_set(Block *block, char direction)
@ BLOCK_THEME_STYLE_POPUP
void block_bounds_set_normal(Block *block, int addval)
static Block * block_func_POPOVER(bContext *C, PopupBlockHandle *handle, void *arg_pup)
void block_to_window_fl(const ARegion *region, const Block *block, float *x, float *y)
std::function< void(bContext *, Layout *, PanelType *)> PopoverCreateFunc
void block_flag_enable(Block *block, int flag)
bool block_is_menu(const Block *block) ATTR_WARN_UNUSED_RESULT
const uiStyle * style_get_dpi()
@ BLOCK_SHOW_SHORTCUT_ALWAYS
wmOperatorStatus popover_panel_invoke(bContext *C, const char *idname, bool keep_open, bool use_numselect, ReportList *reports)
void popover_end(bContext *C, Popover *pup, wmKeyMap *keymap)
bool block_active_only_flagged_buttons(const bContext *C, ARegion *region, Block *block)
void popup_handlers_add(bContext *C, ListBaseT< wmEventHandler > *handlers, PopupBlockHandle *popup, char flag)
Block * block_begin(const bContext *C, ARegion *region, std::string name, EmbossType emboss)
void block_theme_style_set(Block *block, char theme_style)
Layout * popover_layout(Popover *pup)
void UI_paneltype_draw(bContext *C, PanelType *pt, Layout *layout)
PopupBlockHandle * popup_block_create(bContext *C, ARegion *butregion, Button *but, BlockCreateFunc create_func, BlockHandleCreateFunc handle_create_func, void *arg, FreeArgFunc arg_free, bool can_refresh)
static void popover_create_block(bContext *C, ARegion *region, Popover *pup, wm::OpCallContext opcontext)
void item_paneltype_func(bContext *C, Layout *layout, void *arg_pt)
bool button_is_editable(const Button *but) ATTR_WARN_UNUSED_RESULT
void block_flag_disable(Block *block, int flag)
static void popover_keymap_fn(wmKeyMap *, wmKeyMapItem *, void *user_data)
int2 block_layout_resolve(Block *block)
Popover * popover_begin(bContext *C, int ui_menu_width, bool from_active_button, bool use_numselect) ATTR_NONNULL(1)
void block_bounds_set_popup(Block *block, int addval, const int bounds_offset[2])
static void block_free_func_POPOVER(void *arg_pup)
Button * region_active_but_get(const ARegion *region)
void block_region_set(Block *block, ARegion *region)
Layout & block_layout(Block *block, LayoutDirection direction, LayoutType type, int x, int y, int size, int em, int padding, const uiStyle *style)
PopupBlockHandle * popover_panel_create(bContext *C, ARegion *butregion, Button *but, PopoverCreateFunc popover_func, const PanelType *panel_type)
void popover_once_clear(Popover *pup)
void WM_event_set_keymap_handler_post_callback(wmEventHandler_Keymap *handler, void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data), void *user_data)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
wmWindow * CTX_wm_window(const bContext *C)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void ED_region_tag_refresh_ui(ARegion *region)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void WM_event_remove_keymap_handler(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap)
PanelType * WM_paneltype_find(const StringRef idname, bool quiet)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
wmEventHandler_Keymap * WM_event_add_keymap_handler_priority(ListBaseT< wmEventHandler > *handlers, wmKeyMap *keymap, int)
void WM_event_add_mousemove(wmWindow *win)
ARegion * CTX_wm_region(const bContext *C)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
ListBaseT< Panel > panels
bke::ARegionRuntime * runtime
eRegion_Alignment alignment
bool(*) poll(const bContext *C, PanelType *pt)
ListBaseT< ui::Block > uiblocks
ListBaseT< wmEventHandler > modalhandlers
std::ranges::transform_view< std::ranges::ref_view< const Vector< std::unique_ptr< Button > > >, Button &(*)(const std::unique_ptr< Button > &)> buttons() const
PopupBlockHandle * handle
void operator_context_set(wm::OpCallContext opcontext)
void context_copy(const bContextStore *context)
wmEventHandler_Keymap * keymap_handler
PopoverCreateFunc popover_func
const PanelType * panel_type
PopupBlockCreate popup_create_vars
int prev_bounds_offset[2]
bke::WindowRuntime * runtime