dialog_add_button()
Add a button to a dialog.
Synopsis:
#include <bps/dialog.h>
BPS_API int dialog_add_button(dialog_instance_t dialog, const char *label, bool enabled, const char *button_context, bool visible)
Arguments:
- dialog
-
The dialog to add a button to.
- label
-
The button label.
- enabled
-
If true, the button is enabled when the dialog is displayed; if false, the button is disabled when the dialog is displayed.
- button_context
-
The button context. This can be any data the application wants to associate with a button. If button_context is set and the button is pressed, the button_context is returned in the DIALOG_RESPONSE event.
- visible
-
If true, the button is visible when the dialog is displayed; if false, the button is not visible when the dialog is displayed.
Library:
libbpsDescription:
The dialog_add_button() function adds a button to the specified dialog.
Returns:
BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.