<!-- new chapter -->
 <chapter id="tools">
  <title>User-defined Tools</title>

  <sect1 id="tools-intro">
  <title>Introduction</title>
  <para>
  Often, you'll find the inbuilt functionality provided by Anjuta to be
  insufficient. In these cases, you might be tempted to either add the
  feature yourself to the Anjuta codebase or submit a feature request to
  implement the feature. However, both approaches are likely to be slow
  and problematic, especially if your tool is a specialized one. In these
  circumstances, it is advisable to use the Anjuta tools framework instead.
  </para>

  <para>
  Anjuta provides a powerful framework for defining user-defined tools for
  extending it's functionality. Tools have access to almost all features of
  the IDE through the use of variables. You can add tools under any menu item,
  specify input, output and error redirection within the GUI framework and
  supply command line parameters to the tool.
  </para>
  </sect1>

  <sect1 id="tools-example">
  <title>Tools Examples</title>
  <para>
  Simply put, a tool is any external command that you want to use from within
  the GUI framework of Anjuta. As a simply example, say, you want to use
  Doxygen to build your project documentation. But you don't want to resort
  to the command line every time you want to fire the command 'doxygen' to
  update your project documentation. Further, you want single-click access
  to the files and lines specified in the warning and error messages of
  Doxygen, just as you do with the C compiler.
  </para>

  <figure id="doxygen-tool">
    <title>Defining Doxygen as an user-defined tool</title>
    <screenshot>
	<screeninfo>Adding support for Doxygen</screeninfo>
     <graphic fileref="figures/doxygen.png" format="PNG" srccredit="biswapesh"></graphic>
    </screenshot>
   </figure>

  <para>
  The above figure shows how you can use the tool editor to specify Doxygen
  as a project level tool. Here is another example which shows how you can
  use the excellent A2PS tool as an alternative to Anjuta's inbuilt printing
  support.
  </para>

  <figure id="a2ps-tool">
    <title>Using A2PS for Printing</title>
    <screenshot>
	<screeninfo>Using A2PS for Printing</screeninfo>
     <graphic fileref="figures/a2ps.png" format="PNG" srccredit="biswapesh"></graphic>
    </screenshot>
   </figure>

  <para>
  The above screenshot also shows the use of variables. You can use numerous
  variables to define command-line parameters as well as standard input to the
  tool. A complete list of variables is available for your reference with the
  tool editor. To see this list, press the 'Help' button while in the tool
  editor.
  </para>

  <para>
  The tool editor shown in the above screenshots can be accessed from the 'Settings'
  menu of the IDE. When invoked, it shows a list of currently defined user
  tools. Initially, the tool list will be empty, but this will change as you
  add new tools using the tool editor. The tool editor supports adding, removing
  and editing tools.
  </para>

  <figure id="tool-list">
    <title>The tool editor</title>
    <screenshot>
	<screeninfo>The tool editor</screeninfo>
     <graphic fileref="figures/tool-editor.png" format="PNG" srccredit="biswapesh"></graphic>
    </screenshot>
   </figure>

  </sect1>

</chapter>
