<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [
  <!ENTITY kmessage '<application>KMessage</application>'>
  <!ENTITY kapp "&kmessage;"><!-- replace kmessage here -->
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % English "INCLUDE"><!-- change language only here -->
  
  
  <!-- Do not define any other entities; instead, use the entities
       from kde-genent.entities and $LANG/user.entities. -->
]>
<!-- kdoctemplate v0.8 October 1 1999 
     Minor update to "Credits and Licenses" section on August 24, 2000
     Removed "Revision history" section on 22 January 2001   -->

<!--
This template was designed by: David Rugge davidrugge@mindspring.com
with lots of help from: Eric Bischoff ebisch@cybercable.tm.fr
and Frederik Fouvry fouvry@sfs.nphil.uni-tuebingen.de
of the KDE DocBook team.

You may freely use this template for writing any sort of KDE documentation.
If you have any changes or improvements, please let us know.

In the future, we may want to change from SGML-based DocBook to XML-based
DocBook. To make this change easier, please be careful :
- in XML, the case of the <tags> and attributes is relevant ;
- also, quote all attributes.

Please don't forget to remove all these comments in your final documentation,
thanks ;-).
-->

<!-- ................................................................ -->

<!-- The language must NOT be changed here. -->

<book lang="&language;">

<!-- This header contains all of the meta-information for the document such
as Authors, publish date, the abstract, and Keywords -->

<bookinfo>
<title>The KMessage Handbook</title>

<authorgroup>
<author>
<firstname>Jeroen</firstname>
<othername>S.</othername>
<surname>Wijnhout</surname>
<affiliation>
<address><email>wijnhout@science.uva.nl</email></address>
</affiliation>
</author>
</authorgroup>

<!-- TRANS:ROLES_OF_TRANSLATORS -->

<copyright>
<year>2003</year>
<holder>Jeroen S. Wijnhout</holder>
</copyright>
<!-- Translators: put here the copyright notice of the translation -->
<!-- Put here the FDL notice.  Read the explanation in fdl-notice.docbook
     and in the FDL itself on how to use it. -->
<legalnotice>&FDLNotice;</legalnotice>

<!-- Date and version information of the documentation
Don't forget to include this last date and this last revision number, we
need them for translation coordination !
Please respect the format of the date (DD/MM/YYYY) and of the version
(V.MM.LL), it could be used by automation scripts.
Do NOT change these in the translation. -->

<date>22/03/2003</date>
<releaseinfo>0.01.00</releaseinfo>

<!-- Abstract about this handbook -->

<abstract>
<para>
&kmessage; is a little program that is able to display a message window with configurable buttons. &kmessage; is the
KDE equivalent of xmessage. It is intended to be used within a KDE environment and to invoked from the command line
or from scripts.
</para>
</abstract>

<!-- This is a set of Keywords for indexing by search engines.
Please at least include KDE, the KDE package it is in, the name
 of your application, and a few relevant keywords. -->

<keywordset>
<keyword>KDE</keyword>
<keyword>kdeutils</keyword>
<keyword>Kapp</keyword>
<keyword>message</keyword>
</keywordset>

</bookinfo>

<!-- The contents of the documentation begin here.  Label
each chapter so with the id attribute. This is necessary for two reasons: it
allows you to easily reference the chapter from other chapters of your
document, and if there is no ID, the name of the generated HTML files will vary
from time to time making it hard to manage for maintainers and for the CVS
system. Any chapter labelled (OPTIONAL) may be left out at the author's
discretion. Other chapters should not be left out in order to maintain a
consistent documentation style across all KDE apps. -->

<chapter id="introduction">
<title>Introduction</title>

<!-- The introduction chapter contains a brief introduction for the
application that explains what it does and where to report
problems. Basically a long version of the abstract.  Don't include a
revision history. (see installation appendix comment) -->

<para>
This program reads a message (which is specified as a parameter or is read from a file or standard input) and displays
this message in a window. Beneath the message a row of numbers, as specified by the command line argument -buttons, 
is displayed. The program exits when a buttons is clicked, which button is pressed can be derived from the return value
of &kmessage;, optionally the name of the button is printed to standard output.
</para>
</chapter>

<chapter id="using-kapp">
<title>Using KMessage</title>

<!-- This chapter should tell the user how to use your app. You should use as
many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
your application. -->
<sect1 id="commandlinearguments">
<title>Command line arguments</title>
<para>
&kmessage; handles various command line arguments (including all the KDE and Qt command line arguments). The general
syntax is:
</para>

<para>
<userinput><command>kmessage [ <option>-center</option> ] [ <option>-nearmouse</option> ] [ <option>-print</option> ] [ <option>-buttons</option> <replaceable>buttons</replaceable> ]
[ <option>-default</option> <replaceable>default</replaceable> ][ <option>-file</option> <filename><replaceable>file</replaceable></filename> ]
[ <option>-timeout</option> <replaceable>timeout</replaceable> ] <replaceable>message</replaceable></command></userinput>
</para>

<para>
<variablelist>
<varlistentry>
<term><option>-center</option></term>
<listitem>Forces &kmessage; to position the window in the center of the screen.</listitem>
</varlistentry>

<varlistentry>
<term><option>-nearmouse</option></term>
<listitem>Forces &kmessage; to position the upper-left corner of the window near the mouse pointer.</listitem>
</varlistentry>

<varlistentry>
<term><option>-print</option></term>
<listitem>The name of the button that is clicked is written to standard output.</listitem>
</varlistentry>

<varlistentry>
<term><option>-buttons</option> <replaceable>buttons</replaceable></term>
<listitem>Displays a row of buttons as specified in <replaceable>buttons</replaceable>. <replaceable>buttons</replaceable>
should be a comma-separated list (without spaces!) of the names of the buttons. <replaceable>buttons</replaceable> defaults
to okay. </listitem>
</varlistentry>

<varlistentry>
<term><option>-default</option></term>
<listitem>Not implemented yet...</listitem>
</varlistentry>

<varlistentry>
<term><option>-file</option> <filename><replaceable>file</replaceable></filename> </term>
<listitem>Displays the contents of the file <filename><replaceable>file</replaceable></filename>. 
If <filename><replaceable>file</replaceable></filename> is equal
to - then input is read from standard input until a EOF is encountered.</listitem>
</varlistentry>

<varlistentry>
<term><option>-timeout</option> <replaceable>timeout</replaceable></term>
<listitem>
Displays the window only for <replaceable>timeout</replaceable> seconds.</listitem>
</varlistentry>

</variablelist>

</para>

<para>
To get all the available Qt and KDE command line options (such as setting the caption of the window) just type in:
</para>

<para><userinput><command>kmessage --help-all</command></userinput></para>
</sect1>

<sect1 id="Examples">
<title>Examples</title>
<para>
<!-- Note that all graphics should be in .png format. Use no gifs because of
patent issues. -->
The command

<userinput><command>echo 'hi!' | kmessage -title "Just a message" -center -file - -buttons 'great!','so what?' -print
</command></userinput>

produces the following output:
<screenshot>
<screeninfo>Here's a screenshot of &kapp;</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="screen1.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>Screenshot</phrase>
	  </textobject>
	</mediaobject>
</screenshot>
</para>
</sect1>

</chapter>


<chapter id="faq">
<title>Questions and Answers</title>

<!-- (OPTIONAL but recommended) This chapter should include all of the silly
(and not-so-silly) newbie questions that fill up your mailbox. This chapter
should be reserved for BRIEF questions and answers! If one question uses more
than a page or so then it should probably be part of the
"Using this Application" chapter instead. You should use links to
cross-reference questions to the parts of your documentation that answer them.
This is also a great place to provide pointers to other FAQ's if your users
must do some complicated configuration on other programs in order for your
application work. -->

&reporting.bugs;
&updating.documentation;

<qandaset id="faqlist">
<qandaentry>
<question>
<para>q1</para>
</question>
<answer>
<para>a1</para>
</answer>
</qandaentry>
</qandaset>
</chapter>

<chapter id="credits">

<!-- Include credits for the programmers, documentation writers, and
contributors here. The license for your software should then be included below
the credits with a reference to the appropriate license file included in the KDE
distribution. -->

<title>Credits and License</title>

<para>
&kapp;
</para>
<para>
Program copyright 2003 Jeroen Wijnhout <email>wijnhout@science.uva.nl</email>
</para>

<para>
Documentation copyright 2003 Jeroen Wijnhout <email>wijnhout@science.uva.nl</email>
</para>

<!-- TRANS:CREDIT_FOR_TRANSLATORS -->

&underFDL;               <!-- FDL: do not remove. Commercial development should -->
<!-- replace this with their copyright and either remove it or re-set this.-->

<!-- Determine which license your application is licensed under, 
     and delete all the remaining licenses below:

     (NOTE:  All documentation are licensed under the FDL, 
     regardless of what license the application uses) -->

&underGPL;        	 <!-- GPL License -->

</chapter>

<appendix id="installation">
<title>Installation</title>

<sect1 id="getting-kmessage">
<title>How to obtain KMessage</title>

<para>
&kmessage; is part of the KDE project
<ulink url="http://www.kde.org">http://www.kde.org</ulink>.
&kmessage; can be found in the kdeutils package on
<ulink url="ftp://ftp.kde.org/pub/kde/">ftp://ftp.kde.org/pub/kde/</ulink>, the
main ftp site of the KDE project. </para>
</sect1>

<sect1 id="requirements">
<title>Requirements</title>

<!--
List any special requirements for your application here. This should include:
.Libraries or other software that is not included in kdesupport,
kdelibs, or kdebase.
.Hardware requirements like amount of RAM, disk space, graphics card
capabilities, screen resolution, special expansion cards, etc.
.Operating systems the app will run on. If your app is designed only for a
specific OS, (you wrote a graphical LILO configurator for example) put this
information here.
-->

<para>
In order to successfully use &kmessage;, you need KDE 3.1.
</para>

<para>
All required libraries as well as &kmessage; itself can be found
on <ulink url="ftp://ftp.kapp.org">The &kmessage; home page</ulink>.
</para>

<!-- For a list of updates, you may refer to the application web site
or the ChangeLog file, or ... -->
<para>
You can find a list of changes at <ulink
url="http://apps.kde.org/kmessage">http://apps.kde.org/kmessage</ulink>.
</para>
</sect1>

<sect1 id="compilation">
<title>Compilation and Installation</title>

<para>
In order to compile and install KApp on your system, type the following in the base
directory of the Icon Editor distribution:
<screen width="40">
<prompt>%</prompt> <userinput>./configure</userinput>
<prompt>%</prompt> <userinput>make</userinput>
<prompt>%</prompt> <userinput>make install</userinput>
</screen>
</para>

<para>Since KApp uses autoconf and automake you should have not trouble compiling it.
Should you run into problems please report them to the KDE mailing lists.</para>

</sect1>

</appendix>

&documentation.index;
</book>
<!--
Local Variables:
mode: sgml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:
-->













