<HTML
><HEAD
><TITLE
>gnome-popup-help</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 User Interface Library"
HREF="libgnomeui.html"><LINK
REL="PREVIOUS"
TITLE="gnome-mdi-session"
HREF="gnomeui-gnome-mdi-session.html"><LINK
REL="NEXT"
TITLE="gnome-popup-menu"
HREF="gnomeui-gnome-popup-menu.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="gnomeui-gnome-mdi-session.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="libgnomeui.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnomeui-gnome-popup-menu.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="GNOMEUI-GNOME-POPUP-HELP"
>gnome-popup-help</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN4681"
></A
><H2
>Name</H2
>gnome-popup-help&nbsp;--&nbsp;  A popup-help system for GtkWidgets.</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN4684"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;#include &lt;gnome.h&gt;


#define     <A
HREF="gnomeui-gnome-popup-help.html#GNOME-WIDGET-ADD-HELP"
>gnome_widget_add_help</A
>           (widget, help)
void        <A
HREF="gnomeui-gnome-popup-help.html#GNOME-WIDGET-ADD-HELP-WITH-UIDATA"
>gnome_widget_add_help_with_uidata</A
>
                                            (<GTKDOCLINK
HREF="GTKWIDGET"
>GtkWidget</GTKDOCLINK
> *widget,
                                             <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *help,
                                             <A
HREF="gnomeui-gnome-app-helper.html#GNOMEUIINFO"
>GnomeUIInfo</A
> *menuinfo,
                                             <GTKDOCLINK
HREF="GPOINTER"
>gpointer</GTKDOCLINK
> user_data);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4693"
></A
><H2
>Description</H2
><P
>  This will add a popup-menu to a non <GTKDOCLINK
HREF="GTK-WIDGET-NO-WINDOW"
>GTK_WIDGET_NO_WINDOW</GTKDOCLINK
>() widget.  It
  also has the ability to add "cut", "copy" and "paste" to <GTKDOCLINK
HREF="GTKEDITABLE"
>GtkEditable</GTKDOCLINK
>
  widgets if needed.  It is important to not run this on a widget
  without a window, as doing so can lead to stuck pointer grabs.  This
  function should be used where possible everywhere else.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4698"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN4700"
></A
><H3
><A
NAME="GNOME-WIDGET-ADD-HELP"
></A
>gnome_widget_add_help()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define     gnome_widget_add_help(widget, help)</PRE
></TD
></TR
></TABLE
><P
>This is the same as <A
HREF="gnomeui-gnome-popup-help.html#GNOME-WIDGET-ADD-HELP-WITH-UIDATA"
>gnome_widget_add_help_with_uidata</A
>() but without the
options for the extra menu fields.</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
>widget</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>The widget to add the popup help to.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>help</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>The help message text.
&#13;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4719"
></A
><H3
><A
NAME="GNOME-WIDGET-ADD-HELP-WITH-UIDATA"
></A
>gnome_widget_add_help_with_uidata ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_widget_add_help_with_uidata
                                            (<GTKDOCLINK
HREF="GTKWIDGET"
>GtkWidget</GTKDOCLINK
> *widget,
                                             <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *help,
                                             <A
HREF="gnomeui-gnome-app-helper.html#GNOMEUIINFO"
>GnomeUIInfo</A
> *menuinfo,
                                             <GTKDOCLINK
HREF="GPOINTER"
>gpointer</GTKDOCLINK
> user_data);</PRE
></TD
></TR
></TABLE
><P
>This creates a popup menu on <TT
CLASS="PARAMETER"
><I
>widget</I
></TT
> with one entry.  The menu, invoked by
pressing button three on the widget, will have one entry entitled: "Help with
this."  Selecting this entry will bring up a tooltip with the help variable
as its text.  In addition, if the widget is a descendent of <GTKDOCLINK
HREF="GTKEDITABLE"
>GtkEditable</GTKDOCLINK
>, it
will add "cut", "copy", and "paste" to the menu.  If <TT
CLASS="PARAMETER"
><I
>help</I
></TT
> is NULL, then it
will &lt;emphasis&gt;just&lt;/emphasis&gt; add the "cut", "copy", and "paste".  Finally,
if <TT
CLASS="PARAMETER"
><I
>menuinfo</I
></TT
> is non-NULL, it will append the menu defined by it on the end of
the popup menu, with <TT
CLASS="PARAMETER"
><I
>user_data</I
></TT
> passed to the callbacks.  This function
currently only works on non <GTKDOCLINK
HREF="GTK-WIDGET-NO-WINDOW"
>GTK_WIDGET_NO_WINDOW</GTKDOCLINK
>() widgets (ie. it only
works on widgets with windows.)  If you would actually like a handle to the
popup menu, call <GTKDOCLINK
HREF="GNOME-POPUP-MENU-GET"
>gnome_popup_menu_get</GTKDOCLINK
>() as normal.</P
><P
>This creates a popup menu on <TT
CLASS="PARAMETER"
><I
>widget</I
></TT
> with one entry.  The menu,
invoked by pressing button three on the widget, will have one entry entitled:
"Help with this."  Selecting this entry will bring up a tooltip with the help
variable as its text.  In addition, if the widget is a descendent of
<GTKDOCLINK
HREF="GTKEDITABLE"
>GtkEditable</GTKDOCLINK
>, it will add "cut", "copy", and "paste" to the menu.  If <TT
CLASS="PARAMETER"
><I
>help</I
></TT
>
is NULL, then it will <I
CLASS="EMPHASIS"
>just</I
> add the "cut", "copy", and
"paste".  Finally, if <TT
CLASS="PARAMETER"
><I
>menuinfo</I
></TT
> is non-NULL, it will append the menu defined
by it on the end of the popup menu, with <TT
CLASS="PARAMETER"
><I
>user_data</I
></TT
> passed to the callbacks.
This function currently only works on non <GTKDOCLINK
HREF="GTK-WIDGET-NO-WINDOW"
>GTK_WIDGET_NO_WINDOW</GTKDOCLINK
>() widgets
(ie. it only works on widgets with windows.)  If you would actually like a
handle to the popup menu, call <GTKDOCLINK
HREF="GNOME-POPUP-MENU-GET"
>gnome_popup_menu_get</GTKDOCLINK
>() as normal.</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
>widget</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The widget to add the popup help to.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>help</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The help message text.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>menuinfo</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The template for possible additional menu items.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>user_data</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> The user data to be passed to menu callbacks.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4765"
></A
><H2
>See Also</H2
><P
>  <GTKDOCLINK
HREF="GNOMEPOPUPMENU"
>GnomePopupMenu</GTKDOCLINK
></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="gnomeui-gnome-mdi-session.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="libgnomeui.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnomeui-gnome-popup-menu.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
>gnome-mdi-session</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>gnome-popup-menu</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>