Int_GetString Description
Int_GetString(
char *Int_Caption
,
char *Int_Text
,
char *Int_Fillin
,
char *Int_MaxLength
);
This function presents user with the dialog asking to enter a string.
Parameters
char *Int_Caption
Caption of the dialog box. String length should be less than 256.
char *Int_Text
Text in the dialog box. String length should be less than 256 and may contain the character sequence , which will be interpreted as CR.
char *Int_Fillin
Default string and return string from user. When the user enters more characters than are allocated for filling, the returned string will be truncated. Macro is responsible for buffer allocation.
char *Int_MaxLength
Maximum length of the string to be possibly entered by the user. The width of the input is also affected by this parameter. The upper limit is 256.
Return Values
The function returns number of characters copied to the Int_Fillin buffer. When the Cancel button is pressed the -1 value is returned.
Int_GetValue Description
Int_GetValue(
char *Int_Caption
,
char *Int_Text
,
double Int_DefaultValue
,
int Int_ShowDefault
,
char *Int_MaxLength
);
This function presenting user with a dialog asking to enter a value.
Parameters
char *Int_Caption
Caption of the dialog box. String length should be less than 256.
char *Int_Text
Text in the dialog box. String length should be less than 256 and may contain the character sequence , which will be interpreted as CR.
double Int_DefaultValue
Default value to be returned when the user does not enter a value.
int Int_ShowDefault
Display default value when non-zero.
char *Int_MaxLength
Maximum length of the string to be possibly entered by the user. The width of the input is also affected by this parameter. The upper limit is 256.
Return Values
The function returns a value the user entered.
// Int_GetValue example - asks you to define center and radius of the circle, then pre-draws it, finish the drawing yourself.
int x, y, radius;
char buf[100];
Int_CreateTextWindow("Specify diameter", 0, RGB(0,0,128), RGB_WHITE, 100);
radius = Int_GetValue("Specify diameter","Diameter", 20, 1, 10);
Int_CreateTextWindow("Specify x, y", 0, RGB(0,0,128), RGB_WHITE, 100);
x = Int_GetValue("Specify x", "x", 300, 1, 10);
y = Int_GetValue("Specify y","y",300, 1, 10);
Int_CreateTextWindow("Draw by hand the pre-drawn circle, use secondary mouse button to finish.", 0, RGB(0,0,128), RGB_WHITE, 100);
Int_DrawCircle(CIRCLE_PREDRAW, RGB_RED, &x, &y, &radius, 1);
sprintf(buf,"x , y = %i, %i, radius = %i","x, y, radius");
WaitText(0,buf);
Int_CloseTextWindow();
Int_GetValueEx Description
Int_GetValueEx(
char *Int_Caption
,
char *Int_Text
,
double Int_DefaultValue
,
int Int_ShowDefault
,
char *Int_MaxLength
,
int *Int_ButtonClicked
);
This function presenting user with a dialog asking to enter a value.
Parameters
char *Int_Caption
Caption of the dialog box. String length should be less than 256.
char *Int_Text
Text in the dialog box. String length should be less than 256 and may contain the character sequence , which will be interpreted as CR.
double Int_DefaultValue
Default value to be returned when the user does not enter a value.
int Int_ShowDefault
Display default value when non-zero.
char *Int_MaxLength
Maximum length of the string to be possibly entered by the user. The width of the input is also affected by this parameter. The upper limit is 256.
int *Int_ButtonClicked
This parameter is set by the dialog box when leaving.
Return Values
The function returns a value the user entered.
Int_Query Description
Int_Query(
char *Int_Caption
,
char *Int_Query
,
char *Int_Button
);
This function displays a window that disappears when its push button is clicked, thereby modifying the variable Int_QueryPressed.
Parameters
char *Int_Caption
Caption of the window. String length should be less than 256.
char *Int_Query
Text in the window. String length should be less than 256 and may contain the character sequence , which will be interpreted as CR.
char *Int_Button
Text in the push button. String length should be less than 256.
Note
The string can be defined by the sprintf function or simply like a constant, to mark the tabs use /t symbol.
Int_Question Description
int Int_Question(
char *Caption
,
char *Question
,
char *Text1
,
char *Text2
,
char *Text3
,
char *Text4
,
int DefIndex
,
int MoveUp
);
This function displays a dialog box containing a question and a maximum of 4 push buttons.
Parameters
char *Caption
Text displayed in the caption.
char *Question
Text of the question.
char *Text1
Text in the push button.
char *Text2
Text in the push button.
char *Text3
Text in the push button.
char *Text4
Text in the push button. String length should be less than 256.
int DefIndex
The button of the specified answer will be in focus when the question window appears.
int MoveUp
Moves the question window on the top of the screen.
0 | Place the window to center. |
1 | Place the window to the top. |
Return Values
int Returns index of the pressed button (answer).
Note
The string can be defined by the sprintf function or simply like a constant, to mark the tabs use /t symbol.