Blender  V3.3
Classes | Typedefs | Enumerations | Functions
wm_gizmo_intern.h File Reference
#include "wm_gizmo_fn.h"

Go to the source code of this file.

Classes

struct  wmGizmoMapSelectState
 
struct  wmGizmoMap
 
struct  wmGizmoMapType
 

Typedefs

typedef struct wmGizmoMapSelectState wmGizmoMapSelectState
 

Enumerations

enum  { WM_GIZMO_IS_VISIBLE_UPDATE = (1 << 0) , WM_GIZMO_IS_VISIBLE_DRAW = (1 << 1) }
 
enum  {
  TWEAK_MODAL_CANCEL = 1 , TWEAK_MODAL_CONFIRM , TWEAK_MODAL_PRECISION_ON , TWEAK_MODAL_PRECISION_OFF ,
  TWEAK_MODAL_SNAP_ON , TWEAK_MODAL_SNAP_OFF
}
 

Functions

bool wm_gizmo_select_set_ex (struct wmGizmoMap *gzmap, struct wmGizmo *gz, bool select, bool use_array, bool use_callback)
 
bool wm_gizmo_select_and_highlight (bContext *C, struct wmGizmoMap *gzmap, struct wmGizmo *gz)
 
void wm_gizmo_calculate_scale (struct wmGizmo *gz, const bContext *C)
 
void wm_gizmo_update (struct wmGizmo *gz, const bContext *C, bool refresh_map)
 
int wm_gizmo_is_visible (struct wmGizmo *gz)
 
struct wmGizmoGroupwm_gizmogroup_new_from_type (struct wmGizmoMap *gzmap, struct wmGizmoGroupType *gzgt)
 
void wm_gizmogroup_free (bContext *C, struct wmGizmoGroup *gzgroup)
 
void wm_gizmogroup_gizmo_register (struct wmGizmoGroup *gzgroup, struct wmGizmo *gz)
 
struct wmGizmoGroupwm_gizmogroup_find_by_type (const struct wmGizmoMap *gzmap, const struct wmGizmoGroupType *gzgt)
 
struct wmGizmowm_gizmogroup_find_intersected_gizmo (wmWindowManager *wm, const struct wmGizmoGroup *gzgroup, struct bContext *C, int event_modifier, const int mval[2], int *r_part)
 
void wm_gizmogroup_intersectable_gizmos_to_list (wmWindowManager *wm, const struct wmGizmoGroup *gzgroup, int event_modifier, struct BLI_Buffer *visible_gizmos)
 
bool wm_gizmogroup_is_visible_in_drawstep (const struct wmGizmoGroup *gzgroup, eWM_GizmoFlagMapDrawStep drawstep)
 
void wm_gizmogrouptype_setup_keymap (struct wmGizmoGroupType *gzgt, struct wmKeyConfig *keyconf)
 
wmKeyMapwm_gizmogroup_tweak_modal_keymap (struct wmKeyConfig *keyconf)
 
void wm_gizmomap_select_array_clear (struct wmGizmoMap *gzmap)
 
bool wm_gizmomap_deselect_all (struct wmGizmoMap *gzmap)
 
void wm_gizmomap_select_array_shrink (struct wmGizmoMap *gzmap, int len_subtract)
 
void wm_gizmomap_select_array_push_back (struct wmGizmoMap *gzmap, wmGizmo *gz)
 
void wm_gizmomap_select_array_remove (struct wmGizmoMap *gzmap, wmGizmo *gz)
 

Typedef Documentation

◆ wmGizmoMapSelectState

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WM_GIZMO_IS_VISIBLE_UPDATE 
WM_GIZMO_IS_VISIBLE_DRAW 

Definition at line 32 of file wm_gizmo_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
TWEAK_MODAL_CANCEL 
TWEAK_MODAL_CONFIRM 
TWEAK_MODAL_PRECISION_ON 
TWEAK_MODAL_PRECISION_OFF 
TWEAK_MODAL_SNAP_ON 
TWEAK_MODAL_SNAP_OFF 

Definition at line 40 of file wm_gizmo_intern.h.

Function Documentation

◆ wm_gizmo_calculate_scale()

void wm_gizmo_calculate_scale ( struct wmGizmo gz,
const bContext C 
)

◆ wm_gizmo_is_visible()

int wm_gizmo_is_visible ( struct wmGizmo gz)

◆ wm_gizmo_select_and_highlight()

bool wm_gizmo_select_and_highlight ( bContext C,
struct wmGizmoMap gzmap,
struct wmGizmo gz 
)

◆ wm_gizmo_select_set_ex()

bool wm_gizmo_select_set_ex ( struct wmGizmoMap gzmap,
struct wmGizmo gz,
bool  select,
bool  use_array,
bool  use_callback 
)

Add/Remove gizmo to selection. Reallocates memory for selected gizmos so better not call for selecting multiple ones.

Returns
if the selection has changed.

Definition at line 357 of file wm_gizmo.c.

References select(), wmGizmoType::select_refresh, wmGizmo::state, wmGizmo::type, WM_GIZMO_STATE_SELECT, wm_gizmomap_select_array_push_back(), and wm_gizmomap_select_array_remove().

Referenced by WM_gizmo_select_set(), WM_gizmo_select_unlink(), and wm_gizmomap_deselect_all().

◆ wm_gizmo_update()

void wm_gizmo_update ( struct wmGizmo gz,
const bContext C,
bool  refresh_map 
)

Definition at line 474 of file wm_gizmo.c.

References C, gizmo_update_prop_data(), and wm_gizmo_calculate_scale().

Referenced by gizmo_prepare_drawing().

◆ wm_gizmogroup_find_by_type()

struct wmGizmoGroup* wm_gizmogroup_find_by_type ( const struct wmGizmoMap gzmap,
const struct wmGizmoGroupType gzgt 
)

◆ wm_gizmogroup_find_intersected_gizmo()

struct wmGizmo* wm_gizmogroup_find_intersected_gizmo ( wmWindowManager wm,
const struct wmGizmoGroup gzgroup,
struct bContext C,
int  event_modifier,
const int  mval[2],
int *  r_part 
)

◆ wm_gizmogroup_free()

void wm_gizmogroup_free ( bContext C,
struct wmGizmoGroup gzgroup 
)

◆ wm_gizmogroup_gizmo_register()

void wm_gizmogroup_gizmo_register ( struct wmGizmoGroup gzgroup,
struct wmGizmo gz 
)

Add gizmo to gzgroup and make sure its name is unique within the group.

Definition at line 132 of file wm_gizmo_group.c.

References BLI_addtail(), BLI_assert, BLI_findindex(), wmGizmoGroup::gizmos, and wmGizmo::parent_gzgroup.

Referenced by wm_gizmo_register().

◆ wm_gizmogroup_intersectable_gizmos_to_list()

void wm_gizmogroup_intersectable_gizmos_to_list ( wmWindowManager wm,
const struct wmGizmoGroup gzgroup,
int  event_modifier,
struct BLI_Buffer visible_gizmos 
)

Adds all gizmos of gzgroup that can be selected to the head of listbase. Added items need freeing!

◆ wm_gizmogroup_is_visible_in_drawstep()

bool wm_gizmogroup_is_visible_in_drawstep ( const struct wmGizmoGroup gzgroup,
eWM_GizmoFlagMapDrawStep  drawstep 
)

◆ wm_gizmogroup_new_from_type()

struct wmGizmoGroup* wm_gizmogroup_new_from_type ( struct wmGizmoMap gzmap,
struct wmGizmoGroupType gzgt 
)

◆ wm_gizmogroup_tweak_modal_keymap()

wmKeyMap* wm_gizmogroup_tweak_modal_keymap ( struct wmKeyConfig keyconf)

◆ wm_gizmogrouptype_setup_keymap()

void wm_gizmogrouptype_setup_keymap ( struct wmGizmoGroupType gzgt,
struct wmKeyConfig keyconf 
)

◆ wm_gizmomap_deselect_all()

bool wm_gizmomap_deselect_all ( struct wmGizmoMap gzmap)

Deselect all selected gizmos in gzmap.

Returns
if selection has changed.

Definition at line 855 of file wm_gizmo_map.c.

References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, NULL, wmGizmoMap::select, wm_gizmo_select_set_ex(), and wm_gizmomap_select_array_clear().

Referenced by gizmo_select_invoke(), and WM_gizmomap_select_all().

◆ wm_gizmomap_select_array_clear()

void wm_gizmomap_select_array_clear ( struct wmGizmoMap gzmap)

◆ wm_gizmomap_select_array_push_back()

void wm_gizmomap_select_array_push_back ( struct wmGizmoMap gzmap,
wmGizmo gz 
)

◆ wm_gizmomap_select_array_remove()

void wm_gizmomap_select_array_remove ( struct wmGizmoMap gzmap,
wmGizmo gz 
)

◆ wm_gizmomap_select_array_shrink()

void wm_gizmomap_select_array_shrink ( struct wmGizmoMap gzmap,
int  len_subtract 
)