The ac_request() function with the "editstringdialog" directive invokes a dialog for a string.

Call:

int res = ac_request("editstringdialog",string smessage, string sdefaultstr);


Here:

smessage - message in the title of the dialog panel, ssdefaultstr - string that will be substituted by default in the dialog editing line.

Returns 0 if the user refused input (pressed the "Cancel" button, pressed the button with a cross on the dialog frame or the "Esc" key on the keyboard).


Example.

Get the name of the architect from the user. By default, suggest the value "Ivanov VV".

int res = ac_request("editstringdialog","Enter the name of the architect","Ivanov V.V.");