GrafX2 2.9.3227
The ultimate 256-color painting program
Dialog windows

Popups that show or ask an information to the user. More...

Data Structures

struct  T_MultipleChoice
 

Functions

byte Confirmation_box (const char *message)
 Window asking for confirmation before an action is performed. More...
 
void Warning_message (const char *message)
 Window that shows a warning message and wait for a click on the OK button. More...
 
void Warning_with_format (const char *message,...)
 Window that shows a warning message and waits for a click on the OK button. More...
 
void Verbose_message (const char *caption, const char *message)
 Window that shows a big message (up to 35x13), and waits for a click on OK. More...
 
int Requester_window (const char *message, int initial_value)
 Window that allows you to enter a single value. More...
 
int Dialog_multiple_choice (const char *title, const T_MultipleChoice *choices, int initial_choice)
 Ask the user to choose between multiple choices. More...
 

Detailed Description

Popups that show or ask an information to the user.

Function Documentation

◆ Confirmation_box()

byte Confirmation_box ( const char *  message)

Window asking for confirmation before an action is performed.

This function is able to display multi-line messages and center the lines, but the carriage returns have to be explicit. The function will clip the message in case of problem.

Returns
1 if user pressed OK, 0 if CANCEL

References Close_window(), Display_cursor(), Key, KEY_ESC, KEY_n, KEY_RETURN, KEY_y, Max(), MC_Black, MC_Light, NULL, Open_window(), Print_in_window(), Update_window_area, Window_clicked_button(), Window_height, Window_set_normal_button(), and Window_width.

Referenced by Button_Autosave(), Button_Kill(), Button_Load_or_Save(), Button_Quit_local_function(), Button_Reload(), Load_picture(), Main_handler(), Save_image(), and Save_picture().

◆ Warning_message()

◆ Warning_with_format()

void Warning_with_format ( const char *  template,
  ... 
)

Window that shows a warning message and waits for a click on the OK button.

This has the added advantage of supporting the printf interface.

References Verbose_message().

Referenced by C64_pixels_to_FLI(), Encode_C64_hires(), Encode_C64_multicolor(), Load_Unicode_font(), and Save_MOTO().

◆ Verbose_message()

void Verbose_message ( const char *  caption,
const char *  message 
)

◆ Requester_window()

int Requester_window ( const char *  message,
int  initial_value 
)

◆ Dialog_multiple_choice()