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:
authorMartin Poirier <theeth@yahoo.com>2010-02-20 23:29:09 +0300
committerMartin Poirier <theeth@yahoo.com>2010-02-20 23:29:09 +0300
commitaa67aa9ecc05efeb2546e41d85f6975e77157e3d (patch)
tree1465032d2ddd648e1887768f441960bfbc91520c /source/blender/editors/include/ED_numinput.h
parent02e7871149fb369a12725a319cb09accad7790b9 (diff)
Split numinput from transform (reusable in other operator).
Use in marker move operator.
Diffstat (limited to 'source/blender/editors/include/ED_numinput.h')
-rw-r--r--source/blender/editors/include/ED_numinput.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h
new file mode 100644
index 00000000000..381131c8b2d
--- /dev/null
+++ b/source/blender/editors/include/ED_numinput.h
@@ -0,0 +1,56 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef ED_NUMINPUT_H
+#define ED_NUMINPUT_H
+
+
+typedef struct NumInput {
+ short idx;
+ short idx_max;
+ short flag; /* Different flags to indicate different behaviors */
+ char inv[3]; /* If the value is inverted or not */
+ float val[3]; /* Direct value of the input */
+ int ctrl[3]; /* Control to indicate what to do with the numbers that are typed */
+} NumInput ;
+
+/* NUMINPUT FLAGS */
+#define NUM_NULL_ONE 2
+#define NUM_NO_NEGATIVE 4
+#define NUM_NO_ZERO 8
+#define NUM_NO_FRACTION 16
+#define NUM_AFFECT_ALL 32
+
+/*********************** NumInput ********************************/
+
+void initNumInput(NumInput *n);
+void outputNumInput(NumInput *n, char *str);
+short hasNumInput(NumInput *n);
+void applyNumInput(NumInput *n, float *vec);
+char handleNumInput(NumInput *n, struct wmEvent *event, float increment);
+
+#define NUM_MODAL_INCREMENT_UP 18
+#define NUM_MODAL_INCREMENT_DOWN 19
+
+#endif