GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Enumerations | Functions
gp_dialog_msg.h File Reference

A message dialogs. More...

#include <core/gp_compiler.h>
#include <widgets/gp_widget_types.h>

Go to the source code of this file.

Enumerations

enum  gp_dialog_msg_type { GP_DIALOG_MSG_INFO , GP_DIALOG_MSG_WARN , GP_DIALOG_MSG_ERR , GP_DIALOG_MSG_QUESTION }
 A message dialog type. More...
 
enum  gp_dialog_retval { GP_DIALOG_EXIT = 1 , GP_DIALOG_YES = 1 , GP_DIALOG_NO = 2 , GP_DIALOG_ERR = 99 }
 A dialog return value. More...
 

Functions

int gp_dialog_msg_run (enum gp_dialog_msg_type type, const char *title, const char *msg)
 Runs a dialog.
 
int gp_dialog_msg_printf_run (enum gp_dialog_msg_type type, const char *title, const char *fmt,...)
 Runs a dialog.
 

Detailed Description

A message dialogs.

An info dialog

A warning dialog

An error dialog

A question dialog

Definition in file gp_dialog_msg.h.

Enumeration Type Documentation

◆ gp_dialog_msg_type

A message dialog type.

Enumerator
GP_DIALOG_MSG_INFO 

An info dialog

GP_DIALOG_MSG_WARN 

A warning dialog

GP_DIALOG_MSG_ERR 

An error dialog

GP_DIALOG_MSG_QUESTION 

A yes or no question dialog

Definition at line 35 of file gp_dialog_msg.h.

◆ gp_dialog_retval

A dialog return value.

Enumerator
GP_DIALOG_EXIT 

Generic exit -> no value reported

GP_DIALOG_YES 

Answer to a question dialog

GP_DIALOG_NO 

Answer to a question dialog

GP_DIALOG_ERR 

Internal error

Definition at line 49 of file gp_dialog_msg.h.

Function Documentation

◆ gp_dialog_msg_printf_run()

int gp_dialog_msg_printf_run ( enum gp_dialog_msg_type  type,
const char *  title,
const char *  fmt,
  ... 
)

Runs a dialog.

Parameters
typeA dialog type - enum gp_dialog_msg_type.
titleA dialog title.
fmtA printf-like format string for the dialog message.
...A printf-like parameters.
Returns
Returns enum gp_dialog_retval.

◆ gp_dialog_msg_run()

int gp_dialog_msg_run ( enum gp_dialog_msg_type  type,
const char *  title,
const char *  msg 
)

Runs a dialog.

Parameters
typeA dialog type - enum gp_dialog_msg_type.
titleA dialog title.
msgA dialog message.
Returns
Returns enum gp_dialog_retval.