<HTML ><HEAD ><TITLE >GnomeEntry</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.74b"><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 CLASS="REFENTRY" 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 ><<< 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 >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="GNOMEENTRY" >GnomeEntry</A ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN17036" ></A ><H2 >Name</H2 >GnomeEntry -- Entry widget with history tracking.</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN17039" ></A ><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > #include <gnome.h> struct <A HREF="gnomeentry.html#GNOMEENTRY-STRUCT" >GnomeEntry</A >; <GTKDOCLINK HREF="GTKWIDGET" >GtkWidget</GTKDOCLINK >* <A HREF="gnomeentry.html#GNOME-ENTRY-NEW" >gnome_entry_new</A > (const <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *history_id); <GTKDOCLINK HREF="GTKWIDGET" >GtkWidget</GTKDOCLINK >* <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 <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *history_id); void <A HREF="gnomeentry.html#GNOME-ENTRY-PREPEND-HISTORY" >gnome_entry_prepend_history</A > (<A HREF="gnomeentry.html" >GnomeEntry</A > *gentry, <GTKDOCLINK HREF="GINT" >gint</GTKDOCLINK > save, const <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *text); void <A HREF="gnomeentry.html#GNOME-ENTRY-APPEND-HISTORY" >gnome_entry_append_history</A > (<A HREF="gnomeentry.html" >GnomeEntry</A > *gentry, <GTKDOCLINK HREF="GINT" >gint</GTKDOCLINK > save, const <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *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); </PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN17064" ></A ><H2 >Object Hierarchy</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > <GTKDOCLINK HREF="GTKOBJECT" >GtkObject</GTKDOCLINK > +----<GTKDOCLINK HREF="GTKWIDGET" >GtkWidget</GTKDOCLINK > +----<GTKDOCLINK HREF="GTKCONTAINER" >GtkContainer</GTKDOCLINK > +----<GTKDOCLINK HREF="GTKBOX" >GtkBox</GTKDOCLINK > +----<GTKDOCLINK HREF="GTKHBOX" >GtkHBox</GTKDOCLINK > +----<GTKDOCLINK HREF="GTKCOMBO" >GtkCombo</GTKDOCLINK > +----GnomeEntry</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN17073" ></A ><H2 >Description</H2 ><P > This widget is a wrapper around the <GTKDOCLINK HREF="GTKENTRY" >GtkEntry</GTKDOCLINK > 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" ><A NAME="AEN17079" ></A ><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="AEN17082" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN17084" ></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="AEN17089" ></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" ><GTKDOCLINK HREF="GTKWIDGET" >GtkWidget</GTKDOCLINK >* gnome_entry_new (const <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *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" ><A NAME="AEN17099" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >history_id</I ></TT > :</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" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Newly-created GnomeEntry widget.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN17113" ></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" ><GTKDOCLINK HREF="GTKWIDGET" >GtkWidget</GTKDOCLINK >* 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" ><A NAME="AEN17121" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >gentry</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Pointer to GnomeEntry object.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Pointer to GtkEntry widget.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN17134" ></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 <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *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" ><A NAME="AEN17144" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >gentry</I ></TT > :</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 > :</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 ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN17158" ></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, <GTKDOCLINK HREF="GINT" >gint</GTKDOCLINK > save, const <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *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" ><A NAME="AEN17173" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >gentry</I ></TT > :</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 > :</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 > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Text to add</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN17191" ></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, <GTKDOCLINK HREF="GINT" >gint</GTKDOCLINK > save, const <GTKDOCLINK HREF="GCHAR" >gchar</GTKDOCLINK > *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" ><A NAME="AEN17206" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >gentry</I ></TT > :</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 > :</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 > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Text to add</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN17224" ></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" ><A NAME="AEN17233" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >gentry</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Pointer to GnomeEntry object.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN17242" ></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" ><A NAME="AEN17251" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >gentry</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > Pointer to GnomeEntry object.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN17260" ></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 ><<< 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 >>></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 >