<HTML
><HEAD
><TITLE
>gnome-mdi-session</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-init"
HREF="gnomeui-gnome-init.html"><LINK
REL="NEXT"
TITLE="gnome-popup-help"
HREF="gnomeui-gnome-popup-help.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-init.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-help.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="GNOMEUI-GNOME-MDI-SESSION"
>gnome-mdi-session</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN4580"
></A
><H2
>Name</H2
>gnome-mdi-session&nbsp;--&nbsp;Routines providing <SPAN
CLASS="TYPE"
>GnomeMDI</SPAN
> state saving and restoration</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN4584"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;#include &lt;gnome.h&gt;


<A
HREF="gnomemdichild.html"
>GnomeMDIChild</A
>* (<A
HREF="gnomeui-gnome-mdi-session.html#GNOMEMDICHILDCREATOR"
>*GnomeMDIChildCreator</A
>)      (const <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
>*);
<GTKDOCLINK
HREF="GBOOLEAN"
>gboolean</GTKDOCLINK
>    <A
HREF="gnomeui-gnome-mdi-session.html#GNOME-MDI-RESTORE-STATE"
>gnome_mdi_restore_state</A
>         (<A
HREF="gnomemdi.html"
>GnomeMDI</A
> *mdi,
                                             const char *section,
                                             <A
HREF="gnomeui-gnome-mdi-session.html#GNOMEMDICHILDCREATOR"
>GnomeMDIChildCreator</A
> child_create_func);
void        <A
HREF="gnomeui-gnome-mdi-session.html#GNOME-MDI-SAVE-STATE"
>gnome_mdi_save_state</A
>            (<A
HREF="gnomemdi.html"
>GnomeMDI</A
> *mdi,
                                             const <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *section);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4597"
></A
><H2
>Description</H2
><P
>    In order to simplify saving the state of MDI and its children, the
    GnomeMDI interface provides a function that saves its layout and
    the state of its children (provided by each child through get_config_string
    virtual function defined in <SPAN
CLASS="TYPE"
>GnomeMDIChild</SPAN
> subclasses) and a
    function that restores a previously saved state, recreating the children
    from their configuration strings using a function provided by the programmer.
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN4601"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN4603"
></A
><H3
><A
NAME="GNOMEMDICHILDCREATOR"
></A
>GnomeMDIChildCreator ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="gnomemdichild.html"
>GnomeMDIChild</A
>* (*GnomeMDIChildCreator)      (const <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
>*);</PRE
></TD
></TR
></TABLE
><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
>Param1</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4623"
></A
><H3
><A
NAME="GNOME-MDI-RESTORE-STATE"
></A
>gnome_mdi_restore_state ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><GTKDOCLINK
HREF="GBOOLEAN"
>gboolean</GTKDOCLINK
>    gnome_mdi_restore_state         (<A
HREF="gnomemdi.html"
>GnomeMDI</A
> *mdi,
                                             const char *section,
                                             <A
HREF="gnomeui-gnome-mdi-session.html#GNOMEMDICHILDCREATOR"
>GnomeMDIChildCreator</A
> child_create_func);</PRE
></TD
></TR
></TABLE
><P
>Restores the MDI state. Children are recreated with <TT
CLASS="PARAMETER"
><I
>create_child_func</I
></TT
> that
restores information about a child from a config string that was provided
during saving state by the child.</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
>mdi</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> A pointer to a GnomeMDI object.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>section</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Name of the section to restore MDI state from.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>child_create_func</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>TRUE if state was successfully restored, FALSE otherwise.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN4654"
></A
><H3
><A
NAME="GNOME-MDI-SAVE-STATE"
></A
>gnome_mdi_save_state ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        gnome_mdi_save_state            (<A
HREF="gnomemdi.html"
>GnomeMDI</A
> *mdi,
                                             const <GTKDOCLINK
HREF="GCHAR"
>gchar</GTKDOCLINK
> *section);</PRE
></TD
></TR
></TABLE
><P
>Saves MDI state to the application's config file in section <TT
CLASS="PARAMETER"
><I
>section</I
></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
>mdi</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> A pointer to a GnomeMDI object.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>section</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> Name of the section that the MDI config should be saved to.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
></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-init.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-help.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-init</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>gnome-popup-help</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>