Blender V5.3
blender::wmGesture Struct Reference

#include <WM_types.hh>

Public Attributes

wmGesture * next
wmGesture * prev
int event_type
uint8_t event_modifier
short event_keymodifier
int type
rcti winrct
int points
int points_alloc
int modal_state
bool draw_active_side
int2 mval
float2 init_mval_view
uint is_active: 1
uint is_active_prev: 1
uint wait_for_input: 1
uint move: 1
uint use_snap: 1
uint use_flip: 1
uint use_smooth: 1
void * customdata
wmGenericUserData user_data
ui::View2DEdgePanData * edge_pan_data

Detailed Description

wmGesture is registered to #wmWindow.gesture, handled by operator callbacks.

Definition at line 663 of file WM_types.hh.

Member Data Documentation

◆ customdata

void* blender::wmGesture::customdata

customdata

  • for border is a rcti.
  • for circle is rcti, (xmin, ymin) is center, xmax radius.
  • for lasso is short array.
  • for straight line is a rcti: (xmin, ymin) is start, (xmax, ymax) is end.

Definition at line 722 of file WM_types.hh.

Referenced by blender::draw_filled_lasso(), blender::draw_lasso_smooth_stroke_indicator(), blender::draw_start_vertex_circle(), blender::gesture_polyline_valid_points(), blender::wm_gesture_draw_circle(), blender::wm_gesture_draw_cross(), blender::wm_gesture_draw_lasso(), blender::wm_gesture_draw_line(), blender::wm_gesture_draw_polyline(), and blender::wm_gesture_draw_rect().

◆ draw_active_side

bool blender::wmGesture::draw_active_side

Optional, draw the active side of the straight-line gesture.

Definition at line 681 of file WM_types.hh.

Referenced by blender::wm_gesture_draw_line().

◆ edge_pan_data

ui::View2DEdgePanData* blender::wmGesture::edge_pan_data

Definition at line 726 of file WM_types.hh.

◆ event_keymodifier

short blender::wmGesture::event_keymodifier

#wmEvent.keymodifier.

Definition at line 670 of file WM_types.hh.

◆ event_modifier

uint8_t blender::wmGesture::event_modifier

#wmEvent.modifier.

Definition at line 668 of file WM_types.hh.

◆ event_type

int blender::wmGesture::event_type

#wmEvent.type.

Definition at line 666 of file WM_types.hh.

◆ init_mval_view

float2 blender::wmGesture::init_mval_view

Mouse position the gesture started at in view space. Used by edge panning.

Definition at line 685 of file WM_types.hh.

◆ is_active

uint blender::wmGesture::is_active

For modal operators which may be running idle, waiting for an event to activate the gesture. Typically this is set when the user is click-dragging the gesture (box and circle select for eg).

Definition at line 692 of file WM_types.hh.

Referenced by blender::wm_gesture_draw().

◆ is_active_prev

uint blender::wmGesture::is_active_prev

Previous value of is-active (use to detect first run & edge cases).

Definition at line 694 of file WM_types.hh.

◆ modal_state

int blender::wmGesture::modal_state

Definition at line 679 of file WM_types.hh.

◆ move

uint blender::wmGesture::move

Use for gestures that can be moved, like box selection.

Definition at line 698 of file WM_types.hh.

◆ mval

int2 blender::wmGesture::mval

Latest mouse position relative to area. Currently only used by lasso drawing code.

Definition at line 683 of file WM_types.hh.

Referenced by blender::draw_lasso_smooth_stroke_indicator(), blender::draw_start_vertex_circle(), blender::gesture_polyline_valid_points(), and blender::wm_gesture_draw_polyline().

◆ next

wmGesture* blender::wmGesture::next

Definition at line 664 of file WM_types.hh.

Referenced by blender::wm_gesture_draw().

◆ points

◆ points_alloc

int blender::wmGesture::points_alloc

Optional, maximum amount of points stored.

Definition at line 678 of file WM_types.hh.

◆ prev

wmGesture * blender::wmGesture::prev

Definition at line 664 of file WM_types.hh.

◆ type

int blender::wmGesture::type

Gesture type define.

Definition at line 672 of file WM_types.hh.

Referenced by blender::draw_filled_lasso(), blender::wm_gesture_draw(), and blender::wm_gesture_draw_lasso().

◆ use_flip

uint blender::wmGesture::use_flip

For gestures that support flip, stores if flip is enabled using the modal keymap toggle.

Definition at line 708 of file WM_types.hh.

Referenced by blender::wm_gesture_draw_line().

◆ use_smooth

uint blender::wmGesture::use_smooth

For gestures that support smoothing, stores if smoothing is enabled using the modal keymap toggle.

Definition at line 713 of file WM_types.hh.

Referenced by blender::wm_gesture_draw_lasso().

◆ use_snap

uint blender::wmGesture::use_snap

For gestures that support snapping, stores if snapping is enabled using the modal keymap toggle.

Definition at line 703 of file WM_types.hh.

◆ user_data

wmGenericUserData blender::wmGesture::user_data

Free pointer to use for operator allocations (if set, its freed on exit).

Definition at line 725 of file WM_types.hh.

◆ wait_for_input

uint blender::wmGesture::wait_for_input

Use for gestures that support both immediate or delayed activation.

Definition at line 696 of file WM_types.hh.

◆ winrct

rcti blender::wmGesture::winrct

Bounds of region to draw gesture within.

Definition at line 674 of file WM_types.hh.

Referenced by blender::draw_filled_lasso(), and blender::wm_gesture_draw().


The documentation for this struct was generated from the following file: