<!--
  - Author:
  -   Leif Kornstaedt <kornstae@uni-sb.de>
  -
  - Copyright:
  -   Leif Kornstaedt, 1998
  -
  - Last change:
  -   $Date: 2003/01/28 21:45:23 $ by $Author: duchier $
  -   $Revision: 1.7.8.1 $
  -
  - This file is part of Mozart, an implementation of Oz 3:
  -   http://www.mozart-oz.org
  -
  - See the file "LICENSE" or
  -   http://www.mozart-oz.org/LICENSE.html
  - for information on usage and redistribution
  - of this file, and for a DISCLAIMER OF ALL
  - WARRANTIES.
  -
  -->

<Chapter id="chapter.dict-client">
  <Title/A Client for the DICT Protocol/
  <Author.Extern to="author.db" key="Leif.Kornstaedt">
  <P>
    <List class=linkmenu>
      <Item>
	<Ref.extern to="applets/DictClient.oza"/Start Applet/
      <Item>
	<Ref.extern to="ozdoc:install" key="appendix.applets"/How to enable Applets/
    </List>
  <Para class=apropos><Title/The Protocol/
    The Dictionary Server Protocol (DICT) is a TCP transaction based
    query&slash;response protocol that allows a client to access dictionary
    definitions from a set of natural language dictionary databases.
    For further information see <Ref.Extern to="http://www.dict.org/"
    /The DICT Development Group/.
  <Para class=apropos><Title/The Application/
    This application implements an interactive graphical client for
    the DICT protocol.  Enter a word in the top text field and click on
    <Q/Lookup/ to retrieve definitions for it, displayed in a separate
    window.  Words highlighted in blue are links to other definitions.
    Activate <Q/Match/ and you are presented a list of close matches
    in a new window; clicking on a line in this window retrieves the
    corresponding definition.
  <Para class=apropos><Title/Selecting Databases/
    The left list box allows to select the databases in which to look
    for definitions and&slash;or matches:  you always have the choice of
    <Q/all/ to look through all databases or <Q/first with matches/ to
    stop after the first in which lookup was successful.  The <Q/update list/
    button queries a complete list of the databases present on the server.
    You can then select a set of these for lookup:  A simple click selects
    a single database; clicking while the <Key/shift/ key is pressed selects
    a range; clicking while the <Key/control/ key is pressed toggles an entry.
  <Para class=apropos><Title/Selecting a Strategy/
    The right list box allows to select the strategy used by the <Q/Match/
    operation.  As for the databases, the <Q/update list/ presents you with
    a complete list of all strategies supported by the server.
  <Para class=apropos><Title/Logging the Actions/
    The text window at the bottom displays a log of all actions, both those
    already performed and those still to be performed.  The text line below
    it describes the currently performed action.
  <Section class=unnumbered>
    <Title/The <Q/Server/ Menu/
    <P>
      <List>
	<Entry><Menu key="C-o"/Open &ellipsis;/
	<Item>
	  Choose another server and&slash;or port instead of the default.
	  The default is port 2628 on server <File/dict.org/.
	<Entry><Menu key="C-s"/Status/
	<Item>
	  Retrieve short status information from the server currently
	  connected to and display it in the text line at the bottom of
	  the window.
	<Entry><Menu/Information &ellipsis;/
	<Item>
	  Display server information written by the server's administrator.
	  This could include information about databases or strategies, or
	  administrative information.
	<Entry><Menu key="C-x"/Close/
	<Item>
	  Close any currently open connection and exit the client.
      </List>
  <Section class=unnumbered>
    <Title/The <Q/Database/ Menu/
    <P>
      <List>
	<Entry><Menu/Information &ellipsis;/
	<Item>
	  Display the source, copyright, and licensing information about
	  the currently selected databases.
      </List>
  <Section class=unnumbered>
    <Title/Implementation/
    <P>
      Each of the files in this section is an individual functor.
      They are presented in a bottom-up fashion, starting with the
      component handling a network connection, building the display and
      control window on top of that, and ending with the application
      actually parsing the command line and instantiating the client.
    <SubSection class=unnumbered id="code.dict-client.netdictionary">
      <Title/Network Connection: <File/NetDictionary.oz//
      <Para class=apropos><Title><Ref.Extern to="DictClient/NetDictionary.oz"
	>Source File</Ref.Extern></Title>
	<Code.Extern display to="DictClient/NetDictionary.oz" proglang=oz>
    </SubSection>
    <SubSection class=unnumbered id="code.dict-client.tkdictionary">
      <Title/Graphical Front-End: <File/TkDictionary.oz//
      <Para class=apropos><Title><Ref.Extern to="DictClient/TkDictionary.oz"
	>Source File</Ref.Extern></Title>
	<Code.Extern display to="DictClient/TkDictionary.oz" proglang=oz>
    </SubSection>
    <SubSection class=unnumbered id="code.dict-client.main">
      <Title/Command-Line Application: <File/Main.oz//
      <Para class=apropos><Title><Ref.Extern to="DictClient/Main.oz"
	>Source File</Ref.Extern></Title>
	<Code.Extern display to="DictClient/Main.oz" proglang=oz>
    </SubSection>
</Chapter>
