Go to the source code of this file.
Module GUI functions | |
*int | gocr_guiBeginWindow (wchar_t *title, wchar_t **buttons) |
starts a window. | |
int | gocr_guiEndWindow (void) |
ends a window. | |
int | gocr_guiDisplayCheckButton (wchar_t *description, wchar_t *value, int *result) |
adds a check button to a window. | |
int | gocr_guiDisplayImage (gocr_Image *image) |
adds an image to a window. | |
int | gocr_guiDisplayRadioButtons (wchar_t *description, wchar_t **values, int *result) |
adds a radio button group to a window. | |
int | gocr_guiDisplaySpinButton (wchar_t *description, float min, float max, float step, float *result) |
adds a spin button to a window. | |
int | gocr_guiDisplayText (wchar_t *text) |
adds an informative text to a window. | |
int | gocr_guiDisplayTextField (wchar_t *description, wchar_t **result) |
adds a text field to a window. |
|
starts a window. This functions tells the GUI to start a new window. You may set the window title, or pass NULL if you don't want any (the GUI will provide a default one). The buttons parameter is a NULL terminated array of (wchar_t) strings. For each string a button will be inserted at the bottom of the window. gocr_guiEndWindow() will return the array index of the clicked button. Example: you want two buttons, "OK" or "Cancel":
wchar_t *buttons[3] = { "OK", "Cancel", NULL }; gocr_guiBeginWindow("Title", buttons); ... switch ( gocr_guiEndWindow() ) { case '0': ok(); break; case '1': cancel(); break; case '0': error() break; } If the "OK" button is clicked, gocr_guiEndWindow will return 0; if the Cancel button is clicked, gocr_guiEndWindow will return 1. Note that whenever a button is clicked the window will close.
|
|
ends a window. long description. See also gocr_guiBeginWindow.
|
|
adds a check button to a window. Adds a check button to a window. A check button is a small box that can be turned on or off, with a text besides it explaining what is it for.
|
|
adds an image to a window. Adds an image to a window. The image won't be editable, and is for illustration purposes only. The GUI is responsible to convert it to a displayable format.
|
|
adds a radio button group to a window. Adds a radio button group to a window. A radio button group is a set of options, and you can select only one of them.
|
|
adds a spin button to a window. Adds a spin button to a window. A spin button is a numeric field that has a mininum and a maximum value, and two small icons that let the user increase or decrase that value by a certain step. This function checks if max is greater than min, and if step is less than (max-min).
|
|
adds an informative text to a window. Adds an informative text to a window. The text can't be changed by the user.
|
|
adds a text field to a window. Adds a text field to a window. A text field is a space to let the user input some text of any kind.
|