<HTML
><HEAD
><TITLE
>GnomeEntry</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
REL="HOME"
TITLE="Gnome User Interface Library Reference Manual"
HREF="book1.html"><LINK
REL="UP"
TITLE="GNOME Widgets and Objects"
HREF="gnome-objects.html"><LINK
REL="PREVIOUS"
TITLE="GnomeDruidPageFinish"
HREF="gnomedruidpagefinish.html"><LINK
REL="NEXT"
TITLE="GnomeFileEntry"
HREF="gnomefileentry.html"></HEAD
><BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TH
COLSPAN="4"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="5"
>Gnome User Interface Library Reference Manual</FONT
></TH
></TR
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnomedruidpagefinish.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="gnome-objects.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnomefileentry.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="GNOMEENTRY"
>GnomeEntry</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN16976"
></A
><H2
>Name</H2
>GnomeEntry&nbsp;--&nbsp;Entry widget with history tracking.</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN16979"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;#include &lt;gnome.h&gt;


struct      <A
HREF="gnomeentry.html#GNOMEENTRY-STRUCT"
>GnomeEntry</A
>;
GtkWidget*  <A
HREF="gnomeentry.html#GNOME-ENTRY-NEW"
>gnome_entry_new</A
>                 (const gchar *history_id);
GtkWidget*  <A
HREF="gnomeentry.html#GNOME-ENTRY-GTK-ENTRY"
>gnome_entry_gtk_entry</A
>           (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry);
void        <A
HREF="gnomeentry.html#GNOME-ENTRY-SET-HISTORY-ID"
>gnome_entry_set_history_id</A
>      (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry,
                                             const gchar *history_id);
void        <A
HREF="gnomeentry.html#GNOME-ENTRY-PREPEND-HISTORY"
>gnome_entry_prepend_history</A
>     (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry,
                                             gint save,
                                             const gchar *text);
void        <A
HREF="gnomeentry.html#GNOME-ENTRY-APPEND-HISTORY"
>gnome_entry_append_history</A
>      (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry,
                                             gint save,
                                             const gchar *text);
void        <A
HREF="gnomeentry.html#GNOME-ENTRY-LOAD-HISTORY"
>gnome_entry_load_history</A
>        (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry);
void        <A
HREF="gnomeentry.html#GNOME-ENTRY-SAVE-HISTORY"
>gnome_entry_save_history</A
>        (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry);&#13;</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN17004"
></A
><H2
>Object Hierarchy</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkHBox
                           +----GtkCombo
                                 +----GnomeEntry</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN17013"
></A
><H2
>Description</H2
><P
>  This widget is a wrapper around the GtkEntry widget, but it provides
  a history mechanism for all the input entered into the widget.  The
  way this works is that a special identifier is provided when
  creating the <SPAN
CLASS="TYPE"
>GnomeEntry</SPAN
> widget, and this identifier
  is used to load and save the history of the text.</P
><P
>  Here is an example of how to use the widget

  <DIV
CLASS="EXAMPLE"
><P
><B
>Example 1. Sample usage of the GnomeEntry widget</B
></P
><TABLE
BORDER="0"
BGCOLOR="#D8F8D8"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>GtkWidget *gnomeentry, *gtkentry;
char *text;

...

/* create a gnome entry */
gnomeentry = gnome_entry_new("some_history_id");

/* get the GtkEntry widget */
gtkentry = gnome_entry_gtk_entry (GNOME_ENTRY (gnomeentry));

/* set the text to "BLAH" */
gtk_entry_set_text(GTK_ENTRY(gtkentry), "BLAH");

...

/*somewhere else we wish to retrieve the contents*/
text = gtk_entry_get_text(GTK_ENTRY(gtkentry));
     </PRE
></TD
></TR
></TABLE
></DIV
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN17022"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN17024"
></A
><H3
><A
NAME="GNOMEENTRY-STRUCT"
></A
>struct GnomeEntry</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GnomeEntry;</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17029"
></A
><H3
><A
NAME="GNOME-ENTRY-NEW"
></A
>gnome_entry_new ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>GtkWidget*  gnome_entry_new                 (const gchar *history_id);</PRE
></TD
></TR
></TABLE
><P
>Creates a new GnomeEntry widget.  If  <TT
CLASS="PARAMETER"
><I
>history_id</I
></TT
> is
not <TT
CLASS="LITERAL"
>NULL</TT
>, then the history list will be saved and restored between
uses under the given id.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>history_id</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> If not <TT
CLASS="LITERAL"
>NULL</TT
>, the text id under which history data is stored</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Newly-created GnomeEntry widget.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17053"
></A
><H3
><A
NAME="GNOME-ENTRY-GTK-ENTRY"
></A
>gnome_entry_gtk_entry ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>GtkWidget*  gnome_entry_gtk_entry           (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry);</PRE
></TD
></TR
></TABLE
><P
>Obtain pointer to GnomeEntry's internal text entry</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GnomeEntry object.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GtkEntry widget.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17074"
></A
><H3
><A
NAME="GNOME-ENTRY-SET-HISTORY-ID"
></A
>gnome_entry_set_history_id ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_entry_set_history_id      (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry,
                                             const gchar *history_id);</PRE
></TD
></TR
></TABLE
><P
>Set or clear the history id of the GnomeEntry widget.  If
<TT
CLASS="PARAMETER"
><I
>history_id</I
></TT
> is <TT
CLASS="LITERAL"
>NULL</TT
>, the widget's history id is cleared.  Otherwise,
the given id replaces the previous widget history id.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GnomeEntry object.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>history_id</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> If not <TT
CLASS="LITERAL"
>NULL</TT
>, the text id under which history data is stored</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17098"
></A
><H3
><A
NAME="GNOME-ENTRY-PREPEND-HISTORY"
></A
>gnome_entry_prepend_history ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_entry_prepend_history     (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry,
                                             gint save,
                                             const gchar *text);</PRE
></TD
></TR
></TABLE
><P
>Adds a history item of the given <TT
CLASS="PARAMETER"
><I
>text</I
></TT
> to the head of
the history list inside <TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>.  If <TT
CLASS="PARAMETER"
><I
>save</I
></TT
> is <TT
CLASS="LITERAL"
>TRUE</TT
>, the history
item will be saved in the config file (assuming that <TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>'s
history id is not <TT
CLASS="LITERAL"
>NULL</TT
>).</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GnomeEntry object.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>save</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> If <TT
CLASS="LITERAL"
>TRUE</TT
>, history entry will be saved to config file</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>text</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Text to add</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17131"
></A
><H3
><A
NAME="GNOME-ENTRY-APPEND-HISTORY"
></A
>gnome_entry_append_history ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_entry_append_history      (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry,
                                             gint save,
                                             const gchar *text);</PRE
></TD
></TR
></TABLE
><P
>Adds a history item of the given <TT
CLASS="PARAMETER"
><I
>text</I
></TT
> to the tail
of the history list inside <TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>.  If <TT
CLASS="PARAMETER"
><I
>save</I
></TT
> is <TT
CLASS="LITERAL"
>TRUE</TT
>, the
history item will be saved in the config file (assuming that
<TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>'s history id is not <TT
CLASS="LITERAL"
>NULL</TT
>).</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GnomeEntry object.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>save</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> If <TT
CLASS="LITERAL"
>TRUE</TT
>, history entry will be saved to config file</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>text</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Text to add</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17164"
></A
><H3
><A
NAME="GNOME-ENTRY-LOAD-HISTORY"
></A
>gnome_entry_load_history ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_entry_load_history        (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry);</PRE
></TD
></TR
></TABLE
><P
>Loads a stored history list from the GNOME config file,
if one is available.  If the history id of <TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
> is <TT
CLASS="LITERAL"
>NULL</TT
>,
nothing occurs.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GnomeEntry object.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN17182"
></A
><H3
><A
NAME="GNOME-ENTRY-SAVE-HISTORY"
></A
>gnome_entry_save_history ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_entry_save_history        (<A
HREF="gnomeentry.html"
>GnomeEntry</A
> *gentry);</PRE
></TD
></TR
></TABLE
><P
>Force the history items of the widget to be stored
in a configuration file.  If the history id of <TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
> is <TT
CLASS="LITERAL"
>NULL</TT
>,
nothing occurs.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>gentry</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Pointer to GnomeEntry object.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN17200"
></A
><H2
>See Also</H2
><P
>  <A
HREF="gnomefileentry.html"
>GnomeFileEntry</A
>, <A
HREF="gnomeiconentry.html"
>GnomeIconEntry</A
>, <A
HREF="gnomepixmapentry.html"
>GnomePixmapEntry</A
>, <A
HREF="gnomenumberentry.html"
>GnomeNumberEntry</A
></P
></DIV
><DIV
CLASS="NAVFOOTER"
><BR
CLEAR="all"><BR><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnomedruidpagefinish.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="gnome-objects.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnomefileentry.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>GnomeDruidPageFinish</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>GnomeFileEntry</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>