Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_numinput.h
| Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
| * #hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not | * #hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not | ||||
| * (i.e. to call #outputNumInput). | * (i.e. to call #outputNumInput). | ||||
| * | * | ||||
| * Those two steps have to be separated | * Those two steps have to be separated | ||||
| * (so do not use a common call to #hasNumInput() to do both in the same time!). | * (so do not use a common call to #hasNumInput() to do both in the same time!). | ||||
| */ | */ | ||||
| void initNumInput(NumInput *n); | void initNumInput(NumInput *n); | ||||
| /** | |||||
| * \param str: Must be NUM_STR_REP_LEN * (idx_max + 1) length. | |||||
| */ | |||||
| void outputNumInput(NumInput *n, char *str, struct UnitSettings *unit_settings); | void outputNumInput(NumInput *n, char *str, struct UnitSettings *unit_settings); | ||||
| bool hasNumInput(const NumInput *n); | bool hasNumInput(const NumInput *n); | ||||
| /** | |||||
| * \warning \a vec must be set beforehand otherwise we risk uninitialized vars. | |||||
| */ | |||||
| bool applyNumInput(NumInput *n, float *vec); | bool applyNumInput(NumInput *n, float *vec); | ||||
| bool handleNumInput(struct bContext *C, NumInput *n, const struct wmEvent *event); | bool handleNumInput(struct bContext *C, NumInput *n, const struct wmEvent *event); | ||||
| /** Share with `TFM_MODAL_CANCEL` in `transform.h`. */ | /** Share with `TFM_MODAL_CANCEL` in `transform.h`. */ | ||||
| #define NUM_MODAL_INCREMENT_UP 18 | #define NUM_MODAL_INCREMENT_UP 18 | ||||
| #define NUM_MODAL_INCREMENT_DOWN 19 | #define NUM_MODAL_INCREMENT_DOWN 19 | ||||
| bool user_string_to_number(bContext *C, | bool user_string_to_number(bContext *C, | ||||
| Show All 12 Lines | |||||