Blender  V3.3
Classes
interface_region_popover.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "interface_intern.h"
#include "interface_regions_intern.h"

Go to the source code of this file.

Classes

struct  uiPopover
 

Functions

Popup Menu with Callback or String
static void ui_popover_create_block (bContext *C, uiPopover *pup, wmOperatorCallContext opcontext)
 
static uiBlockui_block_func_POPOVER (bContext *C, uiPopupBlockHandle *handle, void *arg_pup)
 
static void ui_block_free_func_POPOVER (void *arg_pup)
 
uiPopupBlockHandleui_popover_panel_create (bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
 
Standard Popover Panels
int UI_popover_panel_invoke (bContext *C, const char *idname, bool keep_open, ReportList *reports)
 
Popup Menu API with begin & end
uiPopoverUI_popover_begin (bContext *C, int ui_menu_width, bool from_active_button)
 
static void popover_keymap_fn (wmKeyMap *UNUSED(keymap), wmKeyMapItem *UNUSED(kmi), void *user_data)
 
void UI_popover_end (bContext *C, uiPopover *pup, wmKeyMap *keymap)
 
uiLayoutUI_popover_layout (uiPopover *pup)
 
void UI_popover_once_clear (uiPopover *pup)
 

Detailed Description

Pop-Over Region

Note
This is very close to 'interface_region_menu_popup.c'

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

Definition in file interface_region_popover.cc.

Function Documentation

◆ popover_keymap_fn()

static void popover_keymap_fn ( wmKeyMap UNUSEDkeymap,
wmKeyMapItem UNUSEDkmi,
void user_data 
)
static

◆ ui_block_free_func_POPOVER()

static void ui_block_free_func_POPOVER ( void arg_pup)
static

◆ ui_block_func_POPOVER()

static uiBlock* ui_block_func_POPOVER ( bContext C,
uiPopupBlockHandle handle,
void arg_pup 
)
static

◆ UI_popover_begin()

uiPopover* UI_popover_begin ( struct bContext C,
int  menu_width,
bool  from_active_button 
)

Only return handler, and set optional title.

Parameters
from_active_buttonUse the active button for positioning, use when the popover is activated from an operator instead of directly from the button.

Definition at line 327 of file interface_region_popover.cc.

References uiPopover::block, uiPopover::but, uiPopover::butregion, C, CTX_wm_region(), uiBlock::handle, ui_popover_create_block(), UI_POPOVER_WIDTH_UNITS, UI_region_active_but_get(), uiPopover::ui_size_x, and WM_OP_EXEC_REGION_WIN.

Referenced by UI_popover_panel_invoke().

◆ ui_popover_create_block()

static void ui_popover_create_block ( bContext C,
uiPopover pup,
wmOperatorCallContext  opcontext 
)
static

◆ UI_popover_end()

void UI_popover_end ( struct bContext C,
struct uiPopover pup,
struct wmKeyMap keymap 
)

◆ UI_popover_layout()

uiLayout* UI_popover_layout ( uiPopover pup)

Definition at line 409 of file interface_region_popover.cc.

References uiPopover::layout.

Referenced by UI_popover_panel_invoke().

◆ UI_popover_once_clear()

void UI_popover_once_clear ( uiPopover pup)

Definition at line 415 of file interface_region_popover.cc.

References uiPopover::is_once.

Referenced by ui_handle_menu_event().

◆ ui_popover_panel_create()

uiPopupBlockHandle* ui_popover_panel_create ( bContext C,
ARegion butregion,
uiBut but,
uiMenuCreateFunc  menu_func,
void arg 
)

◆ UI_popover_panel_invoke()

int UI_popover_panel_invoke ( bContext C,
const char *  idname,
bool  keep_open,
ReportList reports 
)