Blender V5.3
interface_region_popover.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_listbase.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_rect.hh"
#include "BKE_context.hh"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "ED_screen.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface_layout.hh"
#include "interface_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ui::Popover

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ui

Functions

Popup Menu with Callback or String
static void blender::ui::popover_create_block (bContext *C, ARegion *region, Popover *pup, wm::OpCallContext opcontext)
static Block * blender::ui::block_func_POPOVER (bContext *C, PopupBlockHandle *handle, void *arg_pup)
static void blender::ui::block_free_func_POPOVER (void *arg_pup)
Interface Region Functions

interface_region_*.cc sources.

PopupBlockHandle * blender::ui::popover_panel_create (bContext *C, ARegion *butregion, Button *but, PopoverCreateFunc popover_func, const PanelType *panel_type)
Standard Popover Panels
wmOperatorStatus blender::ui::popover_panel_invoke (bContext *C, const char *idname, bool keep_open, bool use_numselect, ReportList *reports)
Popup Menu API with begin & end
Popover * blender::ui::popover_begin (bContext *C, int ui_menu_width, bool from_active_button, bool use_numselect) ATTR_NONNULL(1)
static void blender::ui::popover_keymap_fn (wmKeyMap *, wmKeyMapItem *, void *user_data)
void blender::ui::popover_end (bContext *C, Popover *pup, wmKeyMap *keymap)
Layout * blender::ui::popover_layout (Popover *pup)

Detailed Description

Pop-Over Region

Note
This is very close to interface_region_menu_popup.cc.

We could even merge them, however menu logic is already over-loaded. PopOver's have the following differences.

  • UI is not constrained to a list.
  • Pressing a button won't close the pop-over.
  • Different draw style (to show this is has different behavior from a menu).
  • #PanelType are used instead of #MenuType.
  • No menu flipping support.
  • No moving the menu to fit the mouse cursor.
  • No key accelerators to access menu items (if we add support they would work differently).
  • No arrow key navigation.
  • No menu memory.
  • No title.

Definition in file interface_region_popover.cc.