GrafX2 2.9.3227
The ultimate 256-color painting program
|
Text input functions. More...
Enumerations | |
enum | INPUT_TYPE { INPUT_TYPE_STRING =0 , INPUT_TYPE_INTEGER =1 , INPUT_TYPE_FILENAME =2 , INPUT_TYPE_DECIMAL =3 , INPUT_TYPE_HEXA =4 } |
Functions | |
byte | Readline (word x_pos, word y_pos, char *str, byte visible_size, enum INPUT_TYPE input_type) |
Lets the user input a line of text, exit by Esc or Return. More... | |
byte | Readline_ex (word x_pos, word y_pos, char *str, byte visible_size, byte max_size, enum INPUT_TYPE input_type, byte decimal_places) |
Lets the user input a line of text, exit by Esc or Return. More... | |
byte | Readline_ex_unicode (word x_pos, word y_pos, char *str, word *unicode_str, byte visible_size, byte max_size, enum INPUT_TYPE input_type, byte decimal_places) |
Lets the user input a line of text, exit by Esc or Return. More... | |
void | Sprint_double (char *str, double value, byte decimal_places, byte min_positions) |
Converts a double to string. More... | |
Text input functions.
enum INPUT_TYPE |
byte Readline | ( | word | x_pos, |
word | y_pos, | ||
char * | str, | ||
byte | visible_size, | ||
enum INPUT_TYPE | input_type | ||
) |
Lets the user input a line of text, exit by Esc or Return.
x_pos | Coordinates of input, in window coordinates before scaling. |
y_pos | Coordinates of input, in window coordinates before scaling. |
str | The original string value (will be modified, unless user cancels. |
visible_size | Number of characters visible and editable. |
input_type | one of enum INPUT_TYPE |
References INPUT_TYPE_FILENAME, and Readline_ex().
Referenced by Button_Airbrush_menu(), Button_Anim_time(), Button_Colorize_menu(), Button_Grid_menu(), Button_Load_or_Save(), Button_Palette(), Button_Quick_shade_menu(), Button_Resolution(), Button_Settings(), Button_Smooth_menu(), Button_Text(), Button_Tiling_menu(), Button_Transform_menu(), Load_SCR(), Menu_shade(), and Requester_window().
byte Readline_ex | ( | word | x_pos, |
word | y_pos, | ||
char * | str, | ||
byte | visible_size, | ||
byte | max_size, | ||
enum INPUT_TYPE | input_type, | ||
byte | decimal_places | ||
) |
Lets the user input a line of text, exit by Esc or Return.
x_pos | Coordinates of input, in window coordinates before scaling. |
y_pos | Coordinates of input, in window coordinates before scaling. |
str | The original string value (will be modified, unless user cancels. |
visible_size | Number of characters visible. |
max_size | Number of characters editable. |
input_type | one of enum INPUT_TYPE |
decimal_places | Number of decimal places (used only with decimal type) |
References NULL, and Readline_ex_unicode().
Referenced by Button_Load_or_Save(), Button_Text(), and Readline().
byte Readline_ex_unicode | ( | word | x_pos, |
word | y_pos, | ||
char * | str, | ||
word * | unicode_str, | ||
byte | visible_size, | ||
byte | max_size, | ||
enum INPUT_TYPE | input_type, | ||
byte | decimal_places | ||
) |
Lets the user input a line of text, exit by Esc or Return.
x_pos,y_pos | Coordinates of input, in window coordinates before scaling. |
str | The original string value. Will be modified, unless user cancels or unicode_str is not NULL. |
unicode_str | The original unicode string value or NULL for ANSI editing. Will be modified if not NULL, unless user cancels. |
visible_size | Number of characters visible. |
max_size | Number of characters editable. |
input_type | one of enum INPUT_TYPE |
decimal_places | Number of decimal places (used only with decimal type) |
References BACKGROUND_COLOR, Cleanup_string(), Cleanup_string_unicode(), Close_popup(), Config, Display_cursor(), Display_whole_string(), Display_whole_string_unicode(), Flush_update(), Fround(), Get_input(), GFX2_GetTextClipboard(), GFX2_INFO, GFX2_Log(), GFX2_WARNING, Hide_cursor, Init_virtual_keyboard(), Input_sticky_control, INPUT_TYPE_DECIMAL, INPUT_TYPE_FILENAME, INPUT_TYPE_HEXA, INPUT_TYPE_INTEGER, INPUT_TYPE_STRING, Insert_character(), Insert_character_unicode(), Key, Key_ANSI, KEY_BACKSPACE, KEY_CAPSLOCK, KEY_CLEAR, KEY_DELETE, KEY_END, KEY_ESC, KEY_HOME, KEY_LEFT, KEY_NONE, KEY_RETURN, KEY_RIGHT, Key_UNICODE, Keyboard_click_allowed, label, LEFT_SIDE, LEFT_TRIANGLE_CHARACTER, MC_Black, MC_Light, Menu_factor_X, Menu_factor_Y, Mouse_K, Mouse_X, NULL, Pixel_height, Pixel_width, Prepend_string(), Prepend_string_unicode(), Print_in_window(), Print_in_window_limited(), Remove_character(), Remove_character_unicode(), RIGHT_SIDE, RIGHT_TRIANGLE_CHARACTER, Screen_FillRect(), SHORTCUT_PASTE, Sprint_double(), TEXT_COLOR, Unicode_char_strlcat(), Unicode_char_strlcpy(), Unicode_strlcpy(), Unicode_strlen(), Update_rect(), Update_window_area, T_Config::Use_virtual_keyboard, Valid_character(), VIRT_KEY_DEFAULT_ON, Wait_end_of_click(), Window_clicked_button(), Window_display_frame_in(), Window_height, Window_pos_X, Window_pos_Y, Window_set_normal_button(), and Window_width.
Referenced by Button_Load_or_Save(), and Readline_ex().
Converts a double to string.
str | Target string, should be pre-allocated and at least 40 characters, to be safe. |
value | The number to convert |
decimal_places | Number of decimal places to keep. 15 seems the maximum. |
min_positions | Minimum number of characters: Will pad spaces on the left to meet this minimum. |
Referenced by Readline_ex_unicode().