Blender V5.3
wm_gizmo_group.cc File Reference
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.hh"
#include "BLI_rect.hh"
#include "BLI_string.hh"
#include "BLI_vector.hh"
#include "BKE_context.hh"
#include "BKE_main.hh"
#include "BKE_screen.hh"
#include "BKE_workspace.hh"
#include "RNA_access.hh"
#include "WM_api.hh"
#include "WM_keymap.hh"
#include "WM_types.hh"
#include "wm_event_system.hh"
#include "ED_screen.hh"
#include "ED_undo.hh"
#include "wm_gizmo_intern.hh"
#include "wm_gizmo_wmapi.hh"

Go to the source code of this file.

Classes

struct  blender::GizmoTweakData

Namespaces

namespace  blender
 BMesh Iterators.

Functions

wmGizmoGroup
wmGizmoGroup * blender::wm_gizmogroup_new_from_type (wmGizmoMap *gzmap, wmGizmoGroupType *gzgt)
wmGizmoGroup * blender::wm_gizmogroup_find_by_type (const wmGizmoMap *gzmap, const wmGizmoGroupType *gzgt)
void blender::wm_gizmogroup_free (bContext *C, wmGizmoGroup *gzgroup)
void blender::WM_gizmo_group_tag_remove (wmGizmoGroup *gzgroup)
void blender::wm_gizmogroup_gizmo_register (wmGizmoGroup *gzgroup, wmGizmo *gz)
int blender::WM_gizmo_cmp_temp_fl (const void *gz_a_ptr, const void *gz_b_ptr)
int blender::WM_gizmo_cmp_temp_fl_reverse (const void *gz_a_ptr, const void *gz_b_ptr)
static bool blender::wm_gizmo_keymap_uses_event_modifier (wmWindowManager *wm, const wmGizmoGroup *gzgroup, const wmGizmo *gz, const int event_modifier, int *r_gzgroup_keymap_uses_modifier)
wmGizmo * blender::wm_gizmogroup_find_intersected_gizmo (wmWindowManager *wm, const wmGizmoGroup *gzgroup, bContext *C, const int event_modifier, const int mval[2], int *r_part)
void blender::wm_gizmogroup_intersectable_gizmos_to_list (wmWindowManager *wm, wmGizmoGroup *gzgroup, const int event_modifier, Vector< wmGizmo *, 128 > *r_visible_gizmos)
void blender::WM_gizmogroup_ensure_init (const bContext *C, wmGizmoGroup *gzgroup)
void blender::WM_gizmo_group_remove_by_tool (bContext *C, Main *bmain, const wmGizmoGroupType *gzgt, const bToolRef *tref)
bool blender::wm_gizmogroup_is_visible_in_drawstep (const wmGizmoGroup *gzgroup, const eWM_GizmoFlagMapDrawStep drawstep)
bool blender::wm_gizmogroup_is_any_selected (const wmGizmoGroup *gzgroup)
Gizmo Operators

Basic operators for gizmo interaction with user configurable keymaps.

static wmOperatorStatus blender::gizmo_select_invoke (bContext *C, wmOperator *op, const wmEvent *)
void blender::GIZMOGROUP_OT_gizmo_select (wmOperatorType *ot)
static bool blender::gizmo_tweak_start (bContext *C, wmGizmoMap *gzmap, wmGizmo *gz, const wmEvent *event)
static bool blender::gizmo_tweak_start_and_finish (bContext *C, wmGizmoMap *gzmap, wmGizmo *gz, const wmEvent *event, bool *r_is_modal)
static void blender::gizmo_tweak_finish (bContext *C, wmOperator *op, const bool cancel, bool clear_modal)
static wmOperatorStatus blender::gizmo_tweak_modal (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::gizmo_tweak_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void blender::GIZMOGROUP_OT_gizmo_tweak (wmOperatorType *ot)
wmKeyMap * blender::wm_gizmogroup_tweak_modal_keymap (wmKeyConfig *keyconf)
wmGizmoGroup (Key-map callbacks)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic (const wmGizmoGroupType *, wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic_drag (const wmGizmoGroupType *, wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic_maybe_drag (const wmGizmoGroupType *, wmKeyConfig *kc)
static wmKeyMap * blender::WM_gizmogroup_keymap_template_select_ex (wmKeyConfig *kc, const char *name, const wmGizmoMapType_Params *params)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic_select (const wmGizmoGroupType *, wmKeyConfig *kc)
wmGizmo (Key-map access)

Key config version so these can be called from wmGizmoGroupFnSetupKeymap.

wmKeyMap * blender::WM_gizmo_keymap_generic_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_select_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_select (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_drag_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_drag (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_press_drag_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_press_drag (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_maybe_drag_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_maybe_drag (wmWindowManager *wm)
wmGizmoGroupType
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_find_ptr (wmGizmoMapType *gzmap_type, const wmGizmoGroupType *gzgt)
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_find (wmGizmoMapType *gzmap_type, const StringRef idname)
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_link (wmGizmoMapType *gzmap_type, const StringRef idname)
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_link_ptr (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
void blender::WM_gizmomaptype_group_init_runtime_keymap (const Main *bmain, wmGizmoGroupType *gzgt)
void blender::WM_gizmomaptype_group_init_runtime (const Main *bmain, wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
wmGizmoGroup * blender::WM_gizmomaptype_group_init_runtime_with_region (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt, ARegion *region)
void blender::WM_gizmomaptype_group_free (wmGizmoGroupTypeRef *gzgt_ref)
void blender::WM_gizmomaptype_group_unlink (bContext *C, Main *bmain, wmGizmoMapType *gzmap_type, const wmGizmoGroupType *gzgt)
void blender::wm_gizmogrouptype_setup_keymap (wmGizmoGroupType *gzgt, wmKeyConfig *keyconf)
High Level Add/Remove API

For use directly from operators & RNA registration.

Note
In context of gizmo API these names are a bit misleading, but for general use terms its OK. WM_gizmo_group_type_add would be more correctly called: WM_gizmomaptype_grouptype_reference_link but for general purpose API this is too detailed & annoying.
We may want to return a value if there is nothing to remove.
void blender::WM_gizmo_group_type_add_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_add_ptr (wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_add (const StringRef idname)
bool blender::WM_gizmo_group_type_ensure_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
bool blender::WM_gizmo_group_type_ensure_ptr (wmGizmoGroupType *gzgt)
bool blender::WM_gizmo_group_type_ensure (const StringRef idname)
void blender::WM_gizmo_group_type_remove_ptr_ex (Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_remove_ptr (Main *bmain, wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_remove (Main *bmain, const StringRef idname)
void blender::WM_gizmo_group_type_reinit_ptr_ex (Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_reinit_ptr (Main *bmain, wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_reinit (Main *bmain, const StringRef idname)
void blender::WM_gizmo_group_type_unlink_delayed_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_unlink_delayed_ptr (wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_unlink_delayed (const StringRef idname)
void blender::WM_gizmo_group_unlink_delayed_ptr_from_space (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type, ScrArea *area)
Gizmo Group Type Callback Wrappers
bool blender::WM_gizmo_group_type_poll (const bContext *C, const wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_refresh (const bContext *C, wmGizmoGroup *gzgroup)