|
Blender V4.3
|
Go to the source code of this file.
Typedefs | |
| typedef enum eStrCursorJumpType | eStrCursorJumpType |
| typedef enum eStrCursorJumpDirection | eStrCursorJumpDirection |
Enumerations | |
| enum | eStrCursorJumpType { STRCUR_JUMP_NONE , STRCUR_JUMP_DELIM , STRCUR_JUMP_ALL } |
| enum | eStrCursorJumpDirection { STRCUR_DIR_PREV , STRCUR_DIR_NEXT } |
Functions | |
| bool | BLI_str_cursor_step_next_utf8 (const char *str, int str_maxlen, int *pos) |
| bool | BLI_str_cursor_step_prev_utf8 (const char *str, int str_maxlen, int *pos) |
| bool | BLI_str_cursor_step_next_utf32 (const char32_t *str, int str_maxlen, int *pos) |
| bool | BLI_str_cursor_step_prev_utf32 (const char32_t *str, int str_maxlen, int *pos) |
| void | BLI_str_cursor_step_utf8 (const char *str, int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step) |
| void | BLI_str_cursor_step_utf32 (const char32_t *str, int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step) |
| void | BLI_str_cursor_step_bounds_utf8 (const char *str, int str_maxlen, int pos, int *r_start, int *r_end) |
| void | BLI_str_cursor_step_bounds_utf32 (const char32_t *str, int str_maxlen, int pos, int *r_start, int *r_end) |
| typedef enum eStrCursorJumpDirection eStrCursorJumpDirection |
| typedef enum eStrCursorJumpType eStrCursorJumpType |
| Enumerator | |
|---|---|
| STRCUR_DIR_PREV | |
| STRCUR_DIR_NEXT | |
Definition at line 21 of file BLI_string_cursor_utf8.h.
| enum eStrCursorJumpType |
| Enumerator | |
|---|---|
| STRCUR_JUMP_NONE | |
| STRCUR_JUMP_DELIM | |
| STRCUR_JUMP_ALL | |
Definition at line 15 of file BLI_string_cursor_utf8.h.
| void BLI_str_cursor_step_bounds_utf32 | ( | const char32_t * | str, |
| int | str_maxlen, | ||
| int | pos, | ||
| int * | r_start, | ||
| int * | r_end ) |
A UTF32 version of BLI_str_cursor_step_bounds_utf8
Definition at line 401 of file string_cursor_utf8.c.
References BLI_assert, BLI_str_cursor_step_utf32(), cursor_delim_type_unicode(), next, pos, str, STRCUR_DELIM_NONE, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, and STRCUR_JUMP_DELIM.
Referenced by font_select_word_exec().
| void BLI_str_cursor_step_bounds_utf8 | ( | const char * | str, |
| int | str_maxlen, | ||
| int | pos, | ||
| int * | r_start, | ||
| int * | r_end ) |
Given a position within a string, return the start and end of the closest sequence of delimited characters. Typically a word, but can be a sequence of characters (including spaces).
r_end (by convention).| str | The string with a cursor position |
| str_maxlen | The maximum characters to consider |
| pos | The starting cursor position. |
| r_start | returned start of word/sequence boundary (0-based) |
| r_end | returned end of word/sequence boundary (0-based) |
Definition at line 372 of file string_cursor_utf8.c.
References BLI_assert, BLI_str_cursor_step_utf8(), cursor_delim_type_utf8(), next, pos, str, STRCUR_DELIM_NONE, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, and STRCUR_JUMP_DELIM.
Referenced by console_selectword_invoke(), text_select_word_exec(), and ui_do_but_textedit().
Definition at line 261 of file string_cursor_utf8.c.
References BLI_assert, BLI_wcwidth_or_error(), pos, and str.
Referenced by BLI_str_cursor_step_utf32(), delete_exec(), move_cursor(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Definition at line 137 of file string_cursor_utf8.c.
References BLI_assert, BLI_str_find_next_char_utf8(), BLI_str_utf8_char_width_or_error(), int, pos, and str.
Referenced by BLI_str_cursor_step_utf8(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), txt_delete_char(), and txt_move_right().
Definition at line 277 of file string_cursor_utf8.c.
References BLI_assert, BLI_wcwidth_or_error(), pos, str, and UNUSED_VARS_NDEBUG.
Referenced by BLI_str_cursor_step_utf32(), delete_exec(), move_cursor(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Definition at line 161 of file string_cursor_utf8.c.
References BLI_assert, BLI_str_find_prev_char_utf8(), BLI_str_utf8_char_width_or_error(), int, pos, and str.
Referenced by blf_str_offset_from_cursor_position(), BLI_str_cursor_step_utf8(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), txt_backspace_char(), txt_move_left(), and ui_textedit_set_cursor_pos().
| void BLI_str_cursor_step_utf32 | ( | const char32_t * | str, |
| int | str_maxlen, | ||
| int * | pos, | ||
| eStrCursorJumpDirection | direction, | ||
| eStrCursorJumpType | jump, | ||
| bool | use_init_step ) |
Definition at line 294 of file string_cursor_utf8.c.
References BLI_assert, BLI_assert_unreachable, BLI_str_cursor_step_next_utf32(), BLI_str_cursor_step_prev_utf32(), cursor_delim_type_unicode(), jump(), pos, str, STRCUR_DELIM_NONE, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_ALL, STRCUR_JUMP_DELIM, and STRCUR_JUMP_NONE.
Referenced by BLI_str_cursor_step_bounds_utf32(), delete_exec(), and move_cursor().
| void BLI_str_cursor_step_utf8 | ( | const char * | str, |
| int | str_maxlen, | ||
| int * | pos, | ||
| eStrCursorJumpDirection | direction, | ||
| eStrCursorJumpType | jump, | ||
| bool | use_init_step ) |
Definition at line 180 of file string_cursor_utf8.c.
References BLI_assert, BLI_assert_unreachable, BLI_str_cursor_step_next_utf8(), BLI_str_cursor_step_prev_utf8(), cursor_delim_type_utf8(), jump(), pos, str, STRCUR_DELIM_NONE, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_ALL, STRCUR_JUMP_DELIM, and STRCUR_JUMP_NONE.
Referenced by BLI_str_cursor_step_bounds_utf8(), console_delete_exec(), console_move_exec(), handleNumInput(), txt_jump_left(), txt_jump_right(), ui_textedit_delete(), and ui_textedit_move().