Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h116
1 files changed, 56 insertions, 60 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h b/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h
index 6263bfaf58d..1a0babdccb5 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_intern.h
@@ -18,7 +18,6 @@
* \ingroup wm
*/
-
#ifndef __WM_GIZMO_INTERN_H__
#define __WM_GIZMO_INTERN_H__
@@ -32,10 +31,8 @@ struct wmKeyConfig;
/* -------------------------------------------------------------------- */
/* wmGizmo */
-
bool wm_gizmo_select_set_ex(
- struct wmGizmoMap *gzmap, struct wmGizmo *gz, bool select,
- bool use_array, bool use_callback);
+ 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);
@@ -43,76 +40,75 @@ void wm_gizmo_update(struct wmGizmo *gz, const bContext *C, const bool refresh_m
int wm_gizmo_is_visible(struct wmGizmo *gz);
enum {
- WM_GIZMO_IS_VISIBLE_UPDATE = (1 << 0),
- WM_GIZMO_IS_VISIBLE_DRAW = (1 << 1),
+ WM_GIZMO_IS_VISIBLE_UPDATE = (1 << 0),
+ WM_GIZMO_IS_VISIBLE_DRAW = (1 << 1),
};
/* -------------------------------------------------------------------- */
/* wmGizmoGroup */
enum {
- TWEAK_MODAL_CANCEL = 1,
- TWEAK_MODAL_CONFIRM,
- TWEAK_MODAL_PRECISION_ON,
- TWEAK_MODAL_PRECISION_OFF,
- TWEAK_MODAL_SNAP_ON,
- TWEAK_MODAL_SNAP_OFF,
+ TWEAK_MODAL_CANCEL = 1,
+ TWEAK_MODAL_CONFIRM,
+ TWEAK_MODAL_PRECISION_ON,
+ TWEAK_MODAL_PRECISION_OFF,
+ TWEAK_MODAL_SNAP_ON,
+ TWEAK_MODAL_SNAP_OFF,
};
-struct wmGizmoGroup *wm_gizmogroup_new_from_type(
- struct wmGizmoMap *gzmap, struct wmGizmoGroupType *gzgt);
+struct wmGizmoGroup *wm_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 wmGizmo *wm_gizmogroup_find_intersected_gizmo(
- const struct wmGizmoGroup *gzgroup, struct bContext *C, const struct wmEvent *event,
- int *r_part);
-void wm_gizmogroup_intersectable_gizmos_to_list(
- const struct wmGizmoGroup *gzgroup, struct ListBase *listbase);
-bool wm_gizmogroup_is_visible_in_drawstep(
- const struct wmGizmoGroup *gzgroup, const eWM_GizmoFlagMapDrawStep drawstep);
-
-void wm_gizmogrouptype_setup_keymap(
- struct wmGizmoGroupType *gzgt, struct wmKeyConfig *keyconf);
+struct wmGizmo *wm_gizmogroup_find_intersected_gizmo(const struct wmGizmoGroup *gzgroup,
+ struct bContext *C,
+ const struct wmEvent *event,
+ int *r_part);
+void wm_gizmogroup_intersectable_gizmos_to_list(const struct wmGizmoGroup *gzgroup,
+ struct ListBase *listbase);
+bool wm_gizmogroup_is_visible_in_drawstep(const struct wmGizmoGroup *gzgroup,
+ const eWM_GizmoFlagMapDrawStep drawstep);
+void wm_gizmogrouptype_setup_keymap(struct wmGizmoGroupType *gzgt, struct wmKeyConfig *keyconf);
/* -------------------------------------------------------------------- */
/* wmGizmoMap */
typedef struct wmGizmoMapSelectState {
- struct wmGizmo **items;
- int len, len_alloc;
+ struct wmGizmo **items;
+ int len, len_alloc;
} wmGizmoMapSelectState;
struct wmGizmoMap {
- struct wmGizmoMapType *type;
- ListBase groups; /* wmGizmoGroup */
-
- /* private, update tagging (enum defined in C source). */
- char update_flag[WM_GIZMOMAP_DRAWSTEP_MAX];
-
- /** Private, true when not yet used. */
- bool is_init;
-
- /**
- * \brief Gizmo map runtime context
- *
- * Contains information about this gizmo-map. Currently
- * highlighted gizmo, currently selected gizmos, ...
- */
- struct {
- /* we redraw the gizmo-map when this changes */
- struct wmGizmo *highlight;
- /* User has clicked this gizmo and it gets all input. */
- struct wmGizmo *modal;
- /* array for all selected gizmos */
- struct wmGizmoMapSelectState select;
- /* cursor location at point of entering modal (see: WM_GIZMO_MOVE_CURSOR) */
- int event_xy[2];
- short event_grabcursor;
- /* until we have nice cursor push/pop API. */
- int last_cursor;
- } gzmap_context;
+ struct wmGizmoMapType *type;
+ ListBase groups; /* wmGizmoGroup */
+
+ /* private, update tagging (enum defined in C source). */
+ char update_flag[WM_GIZMOMAP_DRAWSTEP_MAX];
+
+ /** Private, true when not yet used. */
+ bool is_init;
+
+ /**
+ * \brief Gizmo map runtime context
+ *
+ * Contains information about this gizmo-map. Currently
+ * highlighted gizmo, currently selected gizmos, ...
+ */
+ struct {
+ /* we redraw the gizmo-map when this changes */
+ struct wmGizmo *highlight;
+ /* User has clicked this gizmo and it gets all input. */
+ struct wmGizmo *modal;
+ /* array for all selected gizmos */
+ struct wmGizmoMapSelectState select;
+ /* cursor location at point of entering modal (see: WM_GIZMO_MOVE_CURSOR) */
+ int event_xy[2];
+ short event_grabcursor;
+ /* until we have nice cursor push/pop API. */
+ int last_cursor;
+ } gzmap_context;
};
/**
@@ -122,13 +118,13 @@ struct wmGizmoMap {
* \note There is only ever one of these for every (area, region) combination.
*/
struct wmGizmoMapType {
- struct wmGizmoMapType *next, *prev;
- short spaceid, regionid;
- /* types of gizmo-groups for this gizmo-map type */
- ListBase grouptype_refs;
+ struct wmGizmoMapType *next, *prev;
+ short spaceid, regionid;
+ /* types of gizmo-groups for this gizmo-map type */
+ ListBase grouptype_refs;
- /* eGizmoMapTypeUpdateFlags */
- eWM_GizmoFlagMapTypeUpdateFlag type_update_flag;
+ /* eGizmoMapTypeUpdateFlags */
+ eWM_GizmoFlagMapTypeUpdateFlag type_update_flag;
};
void wm_gizmomap_select_array_clear(struct wmGizmoMap *gzmap);