<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >Talking to the user: GnomeDialog, GnomeMessageBox, GnomeAppBar, and utility functions.</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.74b"><LINK REL="HOME" TITLE="Gnome Developers' Information" HREF="book1.html"><LINK REL="PREVIOUS" TITLE="Getting started with the canvas" HREF="gnome-canvas-getting-started.html"><LINK REL="NEXT" TITLE="Using GnomeAppBar directly" HREF="gnomeappbar.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Gnome Developers' Information</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="gnome-canvas-getting-started.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="gnomeappbar.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="DIALOGAPPUTIL-DOCS" >Talking to the user: <SPAN CLASS="TYPE" >GnomeDialog</SPAN >, <SPAN CLASS="TYPE" >GnomeMessageBox</SPAN >, <SPAN CLASS="TYPE" >GnomeAppBar</SPAN >, and utility functions.</A ></H1 ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="INTRODUCTION" >Introduction</A ></H1 ><P > Gnome strives to provide the user with a maximum level of configurability, and the programmer with a maximum level of convenience. Happily, these two goals tend to go hand in hand: fewer decisions for the programmer means more decisions for the user. </P ><P > This section describes Gnome's facilities for communicating simple messages or questions to the user, and retrieving a response. The main widgets involved are <SPAN CLASS="TYPE" >GnomeDialog</SPAN > and <SPAN CLASS="TYPE" >GnomeAppBar</SPAN > (a statusbar, but that name was taken). Gnome also provides convenience functions which give the user greater choice as a side effect. For example, if you call <TT CLASS="FUNCTION" >gnome_app_message()</TT > instead of creating a dialog directly, the user can request that messages appear in the app bar instead. </P ><P > Some functionality is missing, and some of the API is suboptimal. Hopefully this will be fixed eventually. In particular: </P ><P ></P ><UL ><LI ><P > <SPAN CLASS="TYPE" >GnomeAppBar</SPAN > does not work in interactive mode, so all questions must be asked via dialog. Full Emacs-minibuffer-style functionality needs to be added. </P ></LI ><LI ><P > <SPAN CLASS="TYPE" >GnomeAppBar</SPAN > should use <SPAN CLASS="TYPE" >GnomePreferencesType</SPAN > for its has_progress parameter, and not use a progress bar if the user wants progress dialogs instead. </P ></LI ><LI ><P > Nonstandard function pointer callbacks are a poor substitute for Gtk signals and unpleasant in non-C bindings. One possible solution is to create a <SPAN CLASS="TYPE" >GtkObject</SPAN > to represent the user interaction, complete with signals. <SPAN CLASS="TYPE" >GnomeQuestion</SPAN >, for example, with a "answered" and "cancelled" signal. More complex, but more flexible. </P ></LI ><LI ><P > It is all sort of clunky feeling. Perhaps convenience functions are inherently inelegant? </P ></LI ></UL ><P > Patches and suggestions are always welcome. Please think about how the API could be improved as you read this and use the facilities, then send along your thoughts. </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="gnome-canvas-getting-started.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="gnomeappbar.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Getting started with the canvas</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Using <SPAN CLASS="TYPE" >GnomeAppBar</SPAN > directly</TD ></TR ></TABLE ></DIV ></BODY ></HTML >