Go to the source code of this file.
|
| typedef struct _NvdInputBox | NvdInputBox |
| | A simple input box that accepts text input from the user.
|
◆ NvdInputBox
A simple input box that accepts text input from the user.
An NvdInputBox provides the user with a small prompt (commonly a dialog window similar) to NvdDialogBox that requests some text input from the user. When the input is submitted, the library returns the submitted text. For convenience and compatibility reasons, the input is guaranteed to be limited to a single line.
- Note
- Just like NvdDialogBox and some other APIs, reusing an NvdInputBox is undefined behaviour, depending on the platform.
- See also
- NvdDialogBox
- Since
- v0.10.0
◆ nvd_input_box_get_string()
Retrieves the text entered by the user in an NvdInputBox.
- Parameters
-
| box | The input box to get the string from. May not be NULL. |
- Returns
- A constant pointer to an NvdDynamicString containing the user's input.
- Note
- Invalid data may be given by the user. Make sure you check the string for validity.
- Since
- v0.10.0
◆ nvd_input_box_new()
Constructs a new NvdInputBox and returns it.
- Parameters
-
| title | The title of the input box, cannot be NULL |
| msg | The message of the input box. If NULL, then a preconfigured string will be displayed. |
- Since
- v0.10.0
- Warning
- By default on Windows the dialog will use a fallback theme, since NvDialog does not want to force a manifest to load the proper theme as required by WinAPI. This may make controls look a bit outdated. To fix it, you must either supply your own .rc file and change the theming manually, or embed, at your own risk of breaking other libraries, the .rc file directly into NvDialog. If you do the former, do it before initializing the library. This does not apply on macOS and Linux.
- Returns
- A new NvdInputBox on success, NULL otherwise.
◆ nvd_show_input_box()
Displays the NvdInputBox given to the user.
- Parameters
-
| box | The input box to display. May not be NULL. |
- Note
- To retrieve the input of the user, use nvd_input_box_get_string.
- Since
- v0.10.0