<!--
  <!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" >
-->

<chapter id="configuration">
  <title>
    Configuring &kexi;
  </title>

  <para>
    This chapter describes how you can configure &kexi; to suit your
    own needs and preferences.
  </para>

  <sect1 id="configuring-window-layout">
    <title>
      Window Layout
    </title>
    <para>
      &kexi; provides a <firstterm>Mutiple Document
      Interface</firstterm> (MDI).  This means that you can have
      several database objects (such as tables, queries, forms and
      scripts) open at the same time and in the same &kexi; main
      window.  Each database object is shown in a <firstterm>child
      window</firstterm> within the main window.
    </para>
    <para>
      There is a choice of two MDI modes available, allowing a choice
      of how child windows are managed and displayed.  The two modes
      are:
      <itemizedlist>
	<listitem><para><guisubmenu>IDEAl Mode</guisubmenu>; and</para></listitem>
	<listitem><para><guisubmenu>Childframe Mode</guisubmenu>.</para></listitem>
      </itemizedlist>
      These modes are described in the following two sections.  You
      can change the MDI mode from the <guisubmenu>MDI
      Mode</guisubmenu> sub-menu under the <guimenu>Window</guimenu>
      menu.  Note that changing the MDI mode requires &kexi; to be
      restarted before the new mode takes effect.
    </para>
    <sect2 id="window-layout-ideal">
      <title>
	IDEAl mode
      </title>
<!-- TODO: Screenshot of IDEAl mode -->
      <para>
	IDEAl mode is the default MDI mode, and may be familiar from
	other &kde; applications.  In this mode, a single child window
	is shown maximized within the &kexi; main window at once.
	A tab bar, containing one tab for each child window, allows
	other child windows to be viewed by simply clicking on the
	relevant tab.
      </para>
    </sect2>
    <sect2 id="window-layout-childframe">
      <title>
	Childframe mode
      </title>
<!-- TODO: Screenshot of Childframe mode -->
      <para>
	In Childframe mode, child windows are displayed in the
	main &kexi; window, but need not be maximized within it.
	In order to use Childframe mode, you need to select
	<action>
	  <guimenu>Window</guimenu>,
	  <guisubmenu>MDI Mode</guisubmenu>,
	  <guimenuitem>Childframe Mode</guimenuitem>
	</action> from the menu.
      </para>
      <para>
	Each child window has a titlebar with buttons for maximizing,
	minimizing and closing it.  They can also be moved and resized
	within the main window in the normal way (for example, they
	can be moved by clicking and dragging the title bar).
      </para>
      <para>
        The buttons behave as follows:  the right-most button closes
	the child window.  The button on its left maximizes the child
	window - note this causes the buttons to move to the top right
	of the main window, above the <guilabel>Properties
	editor</guilabel> if it is open.  The next button to the left
	toggles the child window between minimized and restored.
      </para>
      <para>
	The left-most button detaches, or
	<firstterm>undocks</firstterm>, the child window, allowing it
	to be moved out of the main window.  For more information on
	docking and undocking windows, see the next section.
      </para>
    </sect2>
  </sect1>

  <sect1 id="docking-windows">
    <title>
      Docking and Undocking Windows
    </title>
    <para>
      By default, the <guilabel>Project Navigator</guilabel> and
      <guilabel>Properties Editor</guilabel> panels are displayed as
      part of the main &kexi; window.  It is possible to
      <firstterm>undock</firstterm> each panel, so that it is
      displayed in a separate window.  Once undocked, it is possible
      to <firstterm>dock</firstterm> the panel so it appears back in
      the main window again.
    </para>
    <para>
      In <link linkend="window-layout-childframe">Childframe
      mode</link>, it is also possible to undock child windows.  For
      example, a child window showing a database table could be
      undocked, allowing the child window showing the table to be
      maximized on the screen.
    </para>
    <para>
      It can be useful to undock a window when using:
      <itemizedlist>
	<listitem>
	  <para>
	  a small screen;
	  </para>
	</listitem>
	<listitem>
	  <para>
	  large tables, queries or forms; and/or
	  </para>
	</listitem>
	<listitem>
	  <para>
	    more than one montitor.
	  </para>
	</listitem>
      </itemizedlist>
    </para>
    <sect2>
      <title>
	Docking and undocking side panels
      </title>
      <para>
	The <guilabel>Project Navigator</guilabel> and
	<guilabel>Properties Editor</guilabel> side panels may be
	undocked by either:
	<itemizedlist>
	  <listitem>
	    <para>
	      double-clicking on the 'grip' bar at the top of the
	      panel; or
	    </para>
	  </listitem>
	  <listitem>
	    <para> 
	      clicking once on the arrow at the top of the panel, next
	      to the cross.
	    </para>
	  </listitem>
	</itemizedlist>
<!-- TODO: Screenshot -->
      </para>
      <para>
	Once undocked, panel windows may be docked into the main
	window again similarly to undocking:
	<itemizedlist>
	  <listitem>
	    <para>
	    double-clicking on the 'grip' bar at the top of the window; or
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	      clicking once on the arrow at the top of the panel, next
	      to the cross.
	    </para>
	  </listitem>
<!-- TODO: Screenshot -->
	</itemizedlist>
      </para>
    </sect2>
    <sect2>
      <title>
	Docking and undocking child windows
      </title>
      <para>
	Child windows may be docked and undocked in <link
	linkend="window-layout-childframe">Childframe mode</link>
	only.
      </para>
      <para>
	In Childframe mode, child windows may be undocked by:
	<itemizedlist>
	  <listitem>
	    <para>
	      right-clicking in the tab bar, on the tab corresponding
	      to the window to be undocked, and selecting
	      <guilabel>Undock</guilabel>; or
	    </para>
<!-- TODO: Screenshot -->
	  </listitem>
	  <listitem>
	    <para>
	      right-clicking on the title bar of the child window, and
	      selecting <guilabel>Undock</guilabel>; or
	    </para>
<!-- TODO: Screenshot -->
	  </listitem>
	  <listitem>
	    <para>
	      if the child window is <emphasis>not</emphasis>
	      maximized, clicking the arrow in the top right corner of
	      the child window (next to the minimize, maximize and
	      close buttons for that child window);
	    </para>
<!-- TODO: Screenshot -->
	  </listitem>
	  <listitem>
	    <para>
	      if the child window is maximized, clicking the arrow to
	      the right of the menu bar (next to the minimize, restore
	      and close buttons for that child window).
	    </para>
<!-- TODO: Screenshot -->
	  </listitem>
	</itemizedlist>
      </para>
      <para>
	To dock a child window, right-clicking in the tab bar, on the
	tab corresponding to the window to be docked, and select
	<guilabel>Dock</guilabel>.  
      </para>
<!-- TODO: Screenshot -->
    </sect2>
  </sect1>
</chapter>
