Blender V5.3
interface_region_menu_pie.cc File Reference
#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_listbase.hh"
#include "BLI_string_utf8.hh"
#include "BLI_time.hh"
#include "BLI_utildefines.hh"
#include "BKE_context.hh"
#include "BKE_screen.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "RNA_access.hh"
#include "RNA_path.hh"
#include "RNA_prototypes.hh"
#include "UI_interface_layout.hh"
#include "BLT_translation.hh"
#include "interface_intern.hh"
#include "interface_regions_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ui::PieMenu
struct  blender::ui::PieMenuLevelData

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ui

Functions

Pie Menu
static Block * blender::ui::block_func_PIE (bContext *, PopupBlockHandle *handle, void *arg_pie)
static float blender::ui::pie_menu_title_width (const char *name, int icon)
PieMenu * blender::ui::pie_menu_begin (bContext *C, const char *title, int icon, const wmEvent *event) ATTR_NONNULL()
void blender::ui::pie_menu_end (bContext *C, PieMenu *pie)
Layout * blender::ui::pie_menu_layout (PieMenu *pie)
wmOperatorStatus blender::ui::pie_menu_invoke (bContext *C, const char *idname, const wmEvent *event)
Pie Menu Levels

Pie menus can't contain more than 8 items (yet). When using ##Layout::operator_enum, a "More" button is created that calls a new pie menu if the enum has too many items. We call this a new "level". Indirect recursion is used, so that a theoretically unlimited number of items is supported.

This is a implementation specifically for operator enums, needed since the object mode pie now has more than 8 items. Ideally we'd have some way of handling this for all kinds of pie items, but that's tricky.

  • Julian (Feb 2016)
static void blender::ui::pie_menu_level_invoke (bContext *C, void *argN, void *arg2)
Interface Region Functions

interface_region_*.cc sources.

void blender::ui::pie_menu_level_create (Block *block, wmOperatorType *ot, StringRefNull propname, IDProperty *properties, const EnumPropertyItem *items, int totitem, wm::OpCallContext context, eUI_Item_Flag flag)

Detailed Description

Pie Menu Region

Definition in file interface_region_menu_pie.cc.