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:
authorCampbell Barton <ideasman42@gmail.com>2017-06-07 22:27:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-07 22:30:21 +0300
commit575db256dbb54cc013c729157115ba4be8c7b13e (patch)
tree39fdc86e417a6ebc0ab0e47400074aa98f86378a /source/blender/windowmanager/manipulators/WM_manipulator_types.h
parent8ff1bce40f3de5272eb3cb6475691f0d8d98bc52 (diff)
WM: add wmManipulatorType, from wmManipulator
Having the type in mixed in with each instance made it hard to expose types to RNA/Python.
Diffstat (limited to 'source/blender/windowmanager/manipulators/WM_manipulator_types.h')
-rw-r--r--source/blender/windowmanager/manipulators/WM_manipulator_types.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_types.h b/source/blender/windowmanager/manipulators/WM_manipulator_types.h
index 5fb909b06cf..01f5d1c0199 100644
--- a/source/blender/windowmanager/manipulators/WM_manipulator_types.h
+++ b/source/blender/windowmanager/manipulators/WM_manipulator_types.h
@@ -64,6 +64,51 @@ enum {
WM_MANIPULATOR_HIDDEN = (1 << 3),
};
+typedef struct wmManipulatorType {
+ struct wmManipulatorGroupType *next, *prev;
+
+ const char *idname; /* MAX_NAME */
+
+ uint size;
+
+ /* could become wmManipulatorType */
+ /* draw manipulator */
+ wmManipulatorFnDraw draw;
+
+ /* determines 3d intersection by rendering the manipulator in a selection routine. */
+ wmManipulatorFnDrawSelect draw_select;
+
+ /* determine if the mouse intersects with the manipulator. The calculation should be done in the callback itself */
+ wmManipulatorFnIntersect intersect;
+
+ /* handler used by the manipulator. Usually handles interaction tied to a manipulator type */
+ wmManipulatorFnHandler handler;
+
+ /* manipulator-specific handler to update manipulator attributes based on the property value */
+ wmManipulatorFnPropDataUpdate prop_data_update;
+
+ /* returns the final position which may be different from the origin, depending on the manipulator.
+ * used in calculations of scale */
+ wmManipulatorFnFinalPositionGet position_get;
+
+ /* activate a manipulator state when the user clicks on it */
+ wmManipulatorFnInvoke invoke;
+
+ /* called when manipulator tweaking is done - used to free data and reset property when cancelling */
+ wmManipulatorFnExit exit;
+
+ wmManipulatorFnCursorGet cursor_get;
+
+ /* called when manipulator selection state changes */
+ wmManipulatorFnSelect select;
+
+ /* maximum number of properties attached to the manipulator */
+ int prop_len_max;
+
+ /* RNA integration */
+ ExtensionRNA ext;
+} wmManipulatorType;
+
/* -------------------------------------------------------------------- */
/* wmManipulatorGroup */