41 #include "../gizmo_library_intern.h"
43 #define GIZMO_MARGIN_OFFSET_SCALE 1.5f
47 float matrix_final_no_offset[4][4];
48 float asp[2] = {1.0f, 1.0f};
49 if (dims[0] > dims[1]) {
50 asp[0] = dims[1] / dims[0];
53 asp[1] = dims[0] / dims[1];
55 float x_axis[3], y_axis[3];
63 float len_x_axis =
len_v3(x_axis);
64 float len_y_axis =
len_v3(y_axis);
66 if (len_x_axis == 0.0f || len_y_axis == 0.0f) {
70 scale[0] = 1.0f / len_x_axis;
71 scale[1] = 1.0f / len_y_axis;
86 margin[0] = ((handle_size * scale_xy[0]));
87 margin[1] = ((handle_size * scale_xy[1]));
98 const float margin[2],
100 const float line_width)
142 const int highlighted,
144 const float margin[2],
145 const float line_width,
147 const int draw_options)
154 switch (highlighted) {
158 .xmax = -
size[0] + margin[0],
159 .ymin = -
size[1] + margin[1],
160 .ymax =
size[1] - margin[1],
178 .xmin =
size[0] - margin[0],
180 .ymin = -
size[1] + margin[1],
181 .ymax =
size[1] - margin[1],
199 .xmin = -
size[0] + margin[0],
200 .xmax =
size[0] - margin[0],
202 .ymax = -
size[1] + margin[1],
220 .xmin = -
size[0] + margin[0],
221 .xmax =
size[0] - margin[0],
222 .ymin =
size[1] - margin[1],
242 .xmax = -
size[0] + margin[0],
244 .ymax = -
size[1] + margin[1],
263 .xmax = -
size[0] + margin[0],
264 .ymin =
size[1] - margin[1],
283 .xmin =
size[0] - margin[0],
286 .ymax = -
size[1] + margin[1],
304 .xmin =
size[0] - margin[0],
306 .ymin =
size[1] - margin[1],
324 const float rotate_pt[2] = {0.0f,
size[1] + margin[1]};
325 const rctf r_rotate = {
326 .
xmin = rotate_pt[0] - margin[0] / 2.0f,
327 .xmax = rotate_pt[0] + margin[0] / 2.0f,
328 .ymin = rotate_pt[1] - margin[1] / 2.0f,
329 .ymax = rotate_pt[1] + margin[1] / 2.0f,
398 for (
uint i = 0; i < verts_len; i++) {
410 immUniform1f(
"lineWidth", (line_width * 3.0f) *
U.pixelsize);
414 for (
uint i = 0; i < verts_len; i++) {
423 for (
uint i = 0; i < verts_len; i++) {
442 uint pos,
float x,
float y,
float rad_x,
float rad_y,
bool solid)
476 const float margin[2],
477 const float color[3],
478 const int transform_flag,
479 const int draw_options,
480 const float line_width)
521 const float rad[2] = {margin[0] / 2, margin[1] / 2};
537 const float margin[2],
538 const float color[3],
539 const int transform_flag,
546 const int resolu = 12;
547 const float rad[2] = {margin[0] / 3, margin[1] / 3};
561 const float handle[2] = {
565 circle_fn(
pos, handle[0], handle[1], rad[0], rad[1], resolu);
575 const bool highlight,
581 float matrix_final[4][4];
587 const float size_real[2] = {dims[0] / 2.0f, dims[1] / 2.0f};
611 const float size[2] = {size_real[0] + margin[0] / 2, size_real[1] + margin[1] / 2};
614 int scale_parts[] = {
625 for (
int i = 0; i <
ARRAY_SIZE(scale_parts); i++) {
649 .xmin = -size_real[0],
650 .ymin = -size_real[1],
651 .xmax = size_real[0],
652 .ymax = size_real[1],
655 float color[4], black[3] = {0, 0, 0};
692 float color[4], black[3] = {0, 0, 0};
697 float outline_line_width = gz->
line_width + 3.0f;
737 switch (highlight_part) {
763 float point_local[2];
766 const float size_real[2] = {dims[0] / 2.0f, dims[1] / 2.0f};
779 const float size[2] = {size_real[0] + margin[0] / 2, size_real[1] + margin[1] / 2};
787 r.xmin = -margin[0] / 2;
788 r.ymin = -margin[1] / 2;
789 r.xmax = margin[0] / 2;
790 r.ymax = margin[1] / 2;
793 r.xmin = -
size[0] + margin[0];
794 r.ymin = -
size[1] + margin[1];
795 r.xmax =
size[0] - margin[0];
796 r.ymax =
size[1] - margin[1];
807 const rctf r_xmin = {
810 .xmax = -
size[0] + margin[0],
813 const rctf r_xmax = {
819 const rctf r_ymin = {
823 .ymax = -
size[1] + margin[1],
825 const rctf r_ymax = {
827 .ymin =
size[1] - margin[1],
865 const rctf r_rotate = {
866 .
xmin = r_rotate_pt[0] - margin[0] / 2.0f,
867 .xmax = r_rotate_pt[0] + margin[0] / 2.0f,
868 .ymin = r_rotate_pt[1] - margin[1] / 2.0f,
869 .ymax = r_rotate_pt[1] + margin[1] / 2.0f,
901 C, gz, (
const float[2]){
UNPACK2(event->
mval)}, 2,
false,
data->orig_mouse) == 0) {
912 bool x =
true,
y =
true;
957 r_constrain_axis[0] =
x;
958 r_constrain_axis[1] =
y;
978 float point_local[2];
984 float matrix_back[4][4];
989 C, gz, (
const float[2]){
UNPACK2(event->
mval)}, 2,
false, point_local);
1008 (point_local[0] -
data->orig_mouse[0]);
1010 (point_local[1] -
data->orig_mouse[1]);
1014 #define MUL_V2_V3_M4_FINAL(test_co, mouse_co) \
1016 test_co, data->orig_matrix_final_no_offset, ((const float[3]){UNPACK2(mouse_co), 0.0}))
1033 float matrix_space_inv[4][4];
1034 float matrix_rotate[4][4];
1042 mul_m4_m4m4(matrix_rotate, matrix_rotate, matrix_space_inv);
1051 #undef MUL_V2_V3_M4_FINAL
1057 bool constrain_axis[2] = {
false};
1067 float delta_orig[2], delta_curr[2];
1068 for (
int i = 0; i < 2; i++) {
1069 delta_orig[i] = ((
data->orig_mouse[i] -
data->orig_matrix_offset[3][i]) / dims[i]) -
1071 delta_curr[i] = ((point_local[i] -
data->orig_matrix_offset[3][i]) / dims[i]) - pivot[i];
1074 float scale[2] = {1.0f, 1.0f};
1075 for (
int i = 0; i < 2; i++) {
1076 if (constrain_axis[i] ==
false) {
1077 if (delta_orig[i] < 0.0f) {
1078 delta_orig[i] *= -1.0f;
1079 delta_curr[i] *= -1.0f;
1083 scale[i] = 1.0f + ((delta_curr[i] - delta_orig[i]) /
len_v3(
data->orig_matrix_offset[i]));
1094 if (constrain_axis[0] ==
false && constrain_axis[1] ==
false) {
1095 scale[1] = scale[0] = (scale[1] + scale[0]) / 2.0f;
1097 else if (constrain_axis[0] ==
false) {
1098 scale[1] = scale[0];
1100 else if (constrain_axis[1] ==
false) {
1101 scale[0] = scale[1];
1109 float matrix_scale[4][4];
1116 (
const float[3]){pivot[0] * dims[0], pivot[1] * dims[1], 0.0f});
1174 gzt->
idname =
"GIZMO_GT_cage_2d";
1204 "XFORM_CENTER_HANDLE",
1210 static float unit_v2[2] = {1.0f, 1.0f};
1212 gzt->
srna,
"dimensions", 2, unit_v2, 0, FLT_MAX,
"Dimensions",
"", 0.0f, FLT_MAX);
1216 rna_enum_draw_style,
1222 rna_enum_draw_options,
typedef float(TangentPoint)[2]
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
Dial * BLI_dial_init(const float start_position[2], float threshold)
float BLI_dial_angle(Dial *dial, const float current_position[2])
MINLINE int signum_i(float a)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void transform_pivot_set_m4(float mat[4][4], const float pivot[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void rotate_m4(float mat[4][4], char axis, float angle)
void mul_v3_mat3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void mul_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v2(float r[2])
MINLINE void zero_v3(float r[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2])
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
#define ARRAY_SET_ITEMS(...)
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y
@ ED_GIZMO_CAGE2D_PART_TRANSLATE
@ ED_GIZMO_CAGE2D_PART_ROTATE
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MAX_X
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y
@ ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y
@ ED_GIZMO_CAGE2D_STYLE_BOX
@ ED_GIZMO_CAGE2D_STYLE_CIRCLE
@ ED_GIZMO_CAGE2D_DRAW_FLAG_XFORM_CENTER_HANDLE
@ ED_GIZMO_CAGE2D_XFORM_FLAG_TRANSLATE
@ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_SIGNED
@ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE
@ ED_GIZMO_CAGE2D_XFORM_FLAG_ROTATE
@ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_UNIFORM
void ED_region_tag_redraw_editor_overlays(struct ARegion *region)
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void GPU_matrix_pop(void)
#define GPU_matrix_mul(x)
void GPU_matrix_push(void)
bool GPU_select_load_id(unsigned int id)
@ GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_3D_POLYLINE_FLAT_COLOR
@ GPU_SHADER_2D_FLAT_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_viewport_size_get_f(float coords[4])
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
@ WM_GIZMO_STATE_HIGHLIGHT
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
static void GIZMO_GT_cage_2d(wmGizmoType *gzt)
#define GIZMO_MARGIN_OFFSET_SCALE
static bool gizmo_calc_rect_view_scale(const wmGizmo *gz, const float dims[2], float scale[2])
static int gizmo_cage2d_get_cursor(wmGizmo *gz)
static void cage2d_draw_box_interaction(const float color[4], const int highlighted, const float size[2], const float margin[2], const float line_width, const bool is_solid, const int draw_options)
static void cage2d_draw_box_corners(const rctf *r, const float margin[2], const float color[3], const float line_width)
static void cage2d_draw_circle_wire(const rctf *r, const float margin[2], const float color[3], const int transform_flag, const int draw_options, const float line_width)
static int gizmo_cage2d_modal(bContext *C, wmGizmo *gz, const wmEvent *event, eWM_GizmoFlagTweak UNUSED(tweak_flag))
static void gizmo_cage2d_draw(const bContext *UNUSED(C), wmGizmo *gz)
struct RectTransformInteraction RectTransformInteraction
static void gizmo_rect_pivot_from_scale_part(int part, float r_pt[2], bool r_constrain_axis[2])
static int gizmo_cage2d_test_select(bContext *C, wmGizmo *gz, const int mval[2])
static void imm_draw_point_aspect_2d(uint pos, float x, float y, float rad_x, float rad_y, bool solid)
static int gizmo_cage2d_invoke(bContext *C, wmGizmo *gz, const wmEvent *event)
#define MUL_V2_V3_M4_FINAL(test_co, mouse_co)
static void gizmo_cage2d_setup(wmGizmo *gz)
static void gizmo_cage2d_exit(bContext *C, wmGizmo *gz, const bool cancel)
static void gizmo_cage2d_draw_select(const bContext *UNUSED(C), wmGizmo *gz, int select_id)
void ED_gizmotypes_cage_2d(void)
static void gizmo_cage2d_draw_intern(wmGizmo *gz, const bool select, const bool highlight, const int select_id)
static bool gizmo_calc_rect_view_margin(const wmGizmo *gz, const float dims[2], float margin[2])
static void cage2d_draw_circle_handles(const rctf *r, const float margin[2], const float color[3], const int transform_flag, bool solid)
static void gizmo_cage2d_property_update(wmGizmo *gz, wmGizmoProperty *gz_prop)
SyclQueue void void size_t num_bytes void
bool gizmo_window_project_2d(bContext *C, const struct wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2])
void gizmo_color_get(const struct wmGizmo *gz, bool highlight, float r_color[4])
struct @653::@656 attr_id
void *(* MEM_callocN)(size_t len, const char *str)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
eWM_GizmoFlagGroupTypeFlag flag
struct wmGizmoGroupType * type
const struct wmGizmoPropertyType * type
wmGizmoFnTestSelect test_select
wmGizmoFnCursorGet cursor_get
wmGizmoFnDrawSelect draw_select
wmGizmoFnPropertyUpdate property_update
struct wmGizmoGroup * parent_gzgroup
float matrix_offset[4][4]
void WM_event_add_mousemove(wmWindow *win)
void WM_gizmo_calc_matrix_final(const wmGizmo *gz, float r_mat[4][4])
void WM_gizmo_calc_matrix_final_no_offset(const wmGizmo *gz, float r_mat[4][4])
wmGizmoProperty * WM_gizmo_target_property_find(wmGizmo *gz, const char *idname)
void WM_gizmo_target_property_float_get_array(const wmGizmo *gz, wmGizmoProperty *gz_prop, float *value)
void WM_gizmotype_target_property_def(wmGizmoType *gzt, const char *idname, int data_type, int array_length)
void WM_gizmo_target_property_float_set_array(bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float *value)
int WM_gizmo_target_property_array_length(const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop)
void WM_gizmotype_append(void(*gtfunc)(struct wmGizmoType *))