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/manipulators/intern/wm_manipulator_intern.h')
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h b/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h
index 6ddde1df9de..bf5c38b9e39 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h
@@ -38,8 +38,11 @@ struct GHashIterator;
/* -------------------------------------------------------------------- */
/* wmManipulator */
-bool wm_manipulator_deselect(struct wmManipulatorMap *mmap, struct wmManipulator *mpr);
-bool wm_manipulator_select(bContext *C, struct wmManipulatorMap *mmap, struct wmManipulator *mpr);
+
+bool wm_manipulator_select_set_ex(
+ struct wmManipulatorMap *mmap, struct wmManipulator *mpr, bool select,
+ bool use_array, bool use_callback);
+bool wm_manipulator_select_and_highlight(bContext *C, struct wmManipulatorMap *mmap, struct wmManipulator *mpr);
void wm_manipulator_calculate_scale(struct wmManipulator *mpr, const bContext *C);
void wm_manipulator_update(struct wmManipulator *mpr, const bContext *C, const bool refresh_map);
@@ -73,7 +76,8 @@ void wm_manipulatorgroup_intersectable_manipulators_to_list(
const struct wmManipulatorGroup *mgroup, struct ListBase *listbase);
void wm_manipulatorgroup_ensure_initialized(struct wmManipulatorGroup *mgroup, const struct bContext *C);
bool wm_manipulatorgroup_is_visible(const struct wmManipulatorGroup *mgroup, const struct bContext *C);
-bool wm_manipulatorgroup_is_visible_in_drawstep(const struct wmManipulatorGroup *mgroup, const int drawstep);
+bool wm_manipulatorgroup_is_visible_in_drawstep(
+ const struct wmManipulatorGroup *mgroup, const eWM_ManipulatorMapDrawStep drawstep);
void wm_manipulatorgrouptype_setup_keymap(
struct wmManipulatorGroupType *wgt, struct wmKeyConfig *keyconf);
@@ -82,13 +86,18 @@ void wm_manipulatorgrouptype_setup_keymap(
/* -------------------------------------------------------------------- */
/* wmManipulatorMap */
+typedef struct wmManipulatorMapSelectState {
+ struct wmManipulator **items;
+ int len, len_alloc;
+} wmManipulatorMapSelectState;
+
struct wmManipulatorMap {
- struct wmManipulatorMap *next, *prev;
struct wmManipulatorMapType *type;
ListBase groups; /* wmManipulatorGroup */
- char update_flag; /* private, update tagging */
+ /* private, update tagging (enum defined in C source). */
+ char update_flag[WM_MANIPULATORMAP_DRAWSTEP_MAX];
/**
* \brief Manipulator map runtime context
@@ -99,12 +108,10 @@ struct wmManipulatorMap {
struct {
/* we redraw the manipulator-map when this changes */
struct wmManipulator *highlight;
- /* user has clicked this manipulator and it gets all input */
- struct wmManipulator *active;
- /* array for all selected manipulators
- * TODO check on using BLI_array */
- struct wmManipulator **selected;
- int selected_len;
+ /* User has clicked this manipulator and it gets all input. */
+ struct wmManipulator *modal;
+ /* array for all selected manipulators */
+ struct wmManipulatorMapSelectState select;
} mmap_context;
};
@@ -121,10 +128,13 @@ struct wmManipulatorMapType {
ListBase grouptype_refs;
/* eManipulatorMapTypeUpdateFlags */
- uchar type_update_flag;
+ eWM_ManipulatorMapTypeUpdateFlag type_update_flag;
};
-void wm_manipulatormap_selected_clear(struct wmManipulatorMap *mmap);
-bool wm_manipulatormap_deselect_all(struct wmManipulatorMap *mmap, struct wmManipulator ***sel);
+void wm_manipulatormap_select_array_clear(struct wmManipulatorMap *mmap);
+bool wm_manipulatormap_deselect_all(struct wmManipulatorMap *mmap);
+void wm_manipulatormap_select_array_shrink(struct wmManipulatorMap *mmap, int len_subtract);
+void wm_manipulatormap_select_array_push_back(struct wmManipulatorMap *mmap, wmManipulator *mpr);
+void wm_manipulatormap_select_array_remove(struct wmManipulatorMap *mmap, wmManipulator *mpr);
-#endif \ No newline at end of file
+#endif