<!-- ##### SECTION Title ##### -->
GnomeMessageBox

<!-- ##### SECTION Short_Description ##### -->
Message box display routines

<!-- ##### SECTION Long_Description ##### -->
  <para>
    The #GnomeMessageBox widget creates dialog boxes (of type
    #GnomeDialog) that contain a severity level (indicated by an icon
    and a title), a message to be displayed and a list of buttons that
    will be in the dialog.  
  </para>

  <para>
    The programmer will use strings desired for each button.  If the
    strings are any of the GNOME_STOCK macros, then instead of
    creating a button with the text, the button will be a GNOME stock
    button with a stock icon.
  </para>
  
  <para>
    The list of known types for message boxes are:
    %GNOME_MESSAGE_BOX_INFO, %GNOME_MESSAGE_BOX_WARNING,
    %GNOME_MESSAGE_BOX_ERROR, %GNOME_MESSAGE_BOX_QUESTION and
    %GNOME_MESSAGE_BOX_GENERIC.  
  </para>

  <para>
    Here is an example that informs the user of an error:

    <programlisting>
      GtkWidget *error_dialog;
      int ret;
      
      error_dialog = gnome_message_box_new (
              GNOME_MESSAGE_BOX_ERROR,
              "Wrong password",
              "Retry", "Ignore",
              NULL);
      ret = gnome_dialog_run (GNOME_DIALOG (error_dialog));
      switch (ret){
             case 0:
                    do_retry ();
                    break;
             case 1:
                    do_ignore ()
                    break;
             default:
                    /* User closed dialog with window manager,
                     * assume "ignore"
                     */
                    do_ignore ();
                    break;
      }
    </programlisting>

    This other example uses stock buttons:

    <programlisting>
      GtkWidget *yes_no_dialog;
      int ret;
      
      yes_no_dialog = gnome_message_box_new (
              GNOME_MESSAGE_BOX_QUESTION,
              "Do you want to make a chocolate cake?",
              GNOME_STOCK_BUTTON_YES,
              GNOME_STOCK_BUTTON_NO,
              NULL);
      ret = gnome_dialog_run (GNOME_DIALOG (yes_no_dialog));
      switch (ret){
             case 0:
                    make_chocolate_cake ();
                    break;
             case 1:
                    /* User does not desire chocolate cake *./
                    break;
             default:
                    /*
		     * User closed dialog with window manager,
                     * assume he is not into chocolate cake.
                     */
                    do_ignore ();
                    break;
      }
    </programlisting>
  </para>

<!-- ##### SECTION See_Also ##### -->
  <para>
    #GnomeDialog
  </para>

<!-- ##### STRUCT GnomeMessageBox ##### -->
<para>

</para>


<!-- ##### MACRO GNOME_MESSAGE_BOX_INFO ##### -->
  <para>
    Use this macro for displaying an informational message.
  </para>



<!-- ##### MACRO GNOME_MESSAGE_BOX_WARNING ##### -->
  <para>
    Use this macro for displaying a warning message.
  </para>



<!-- ##### MACRO GNOME_MESSAGE_BOX_ERROR ##### -->
  <para>
    Use this macro for displaying an error message.
  </para>



<!-- ##### MACRO GNOME_MESSAGE_BOX_QUESTION ##### -->
  <para>
    Use this macro when you want to query the user for information. 
  </para>



<!-- ##### MACRO GNOME_MESSAGE_BOX_GENERIC ##### -->
<para>
    Use this macro if none of the other message box types apply.
</para>



<!-- ##### STRUCT GnomeMessageBoxButton ##### -->
<para>

</para>


<!-- ##### FUNCTION gnome_message_box_new ##### -->
<para>

</para>

@message: 
@messagebox_type: 
@Varargs: 
@Returns: 


<!-- ##### FUNCTION gnome_message_box_newv ##### -->
<para>

</para>

@message: 
@messagebox_type: 
@buttons: 
@Returns: 


<!-- ##### FUNCTION gnome_message_box_set_modal ##### -->
<para>
Deprecated. Use <function>gtk_window_set_modal()</function>.
</para>

@messagebox: 


<!-- ##### FUNCTION gnome_message_box_set_default ##### -->
<para>
Deprecated. Use <function>gnome_dialog_set_modal()</function>.
</para>

@messagebox: 
@button: 
<!--
Local variables:
mode: sgml
sgml-parent-document: ("../gnomeui-docs.sgml" "book" "sect1" "")
End:
-->


