 <chapter id="file-operations">
  <title>File Operations</title>
  
  <!-- ============= File operations: Creating a new file === -->
  <sect1 id="creating-files">
   <title>Creating a New File and inserting texts</title>
    <sect2 id="new-file">
    <title>Creating New File</title>
     <para>
     To create a new file, choose <menuchoice><guisubmenu>File</guisubmenu>
     <guimenuitem>New</guimenuitem></menuchoice> from the menubar, or click on the 
     <guibutton>New File</guibutton> button on the toolbar. A new page will 
     appear in the editor (or a new window if the parent document is windowed). 
     This new document will be named <filename>newfile#1</filename>, 
     <filename>newfile#2</filename>, <filename>newfile#3</filename> and 
     so on. 
     </para>
    </sect2>
    <sect2 id="file-wizard">
    <title>File Wizard</title>
     <para>
      A wizard can also be used to create a new file.To create a new file, choose
      <menuchoice><guisubmenu>File</guisubmenu><guisubmenu>New</guisubmenu> 
      <guimenuitem>File</guimenuitem></menuchoice> from the menubar.
      This will open the New File Wizard dialog. Select the file type. Enter the File name. 
      The suffix will be automatically added. 
      You can add a license information (according to your license choice) and a header.
      In case of C-C++ header file, you can also add an header template.
      Click <guibutton>OK</guibutton> to validate the creation.
      <figure id="new-file-wizard">
       <title>New File Wizard</title>
       <screenshot>
        <screeninfo>The Open File dialog</screeninfo>
        <graphic fileref="figures/new_file_wizard.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
      </figure>
     </para>
     <para>
       <application>Anjuta</application> occatinally also creates new files during some
        operations. For example, some CVS operations, such as diff, file log, file status
        etc, create new files and add the output there. These could be saved in real file
        just like normal new files.
     </para>
     </sect2>
     <sect2 id="inserting-macros">
      <title>Inserting Macros</title>
       <para>
         Macros can be used to quickly edit repetitive sequences of text.
       </para>
       <important>
       <para>
        Macro plugin must be activated.
       </para>
       </important>
      <sect3 id="inserting">
       <title>Inserting</title>
       <para>
        Two types of macros are available: Anjuta macros and User macros (My macros). Anjuta macros 
        are not modifiable by the user. On the other hand, User macros can be defined and modified by 
        the user.
       </para>
       <para>
        To insert macro, move the cursor at the desired place. Select  
        <menuchoice><guisubmenu>Edit</guisubmenu><guisubmenu>Macros</guisubmenu>
        <guimenuitem>Macros...</guimenuitem></menuchoice>. The dialog window appears. Select the 
        wanted macro in the list. The result of the macro expansion is displayed in the window and a
        summary is shown in the dialog window. Choose <guibutton>Insert</guibutton>. The expanded macro
        text is inserted at the cursor position.
       </para>
       <para>
        Another possibility to insert macro is to select <menuchoice><guisubmenu>Edit</guisubmenu>
        <guisubmenu>Macros</guisubmenu><guimenuitem>Insert Macro...</guimenuitem></menuchoice>, 
        then to press the wanted macro shortcut.
        <figure id="display-macro">
         <title>Macro</title>
          <screenshot>
           <screeninfo>The Macro dialog</screeninfo>
           <graphic fileref="figures/display_macro.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
        </figure>
       </para>
       </sect3>
       <sect3 id="defining-macro">
        <title>Defining Macros</title>
        <para>
          From the Insert-Macro window, choose <guibutton>Add</guibutton> or select <menuchoice>
          <guisubmenu>Edit</guisubmenu><guisubmenu>Macros</guisubmenu><guimenuitem>Add Macro...
          </guimenuitem></menuchoice>. The Add/Edit window appears. Enter the macro name, choose or 
          define a category and enter a shortcut. Then edit text relative to your macro. The character 
          ' | ' will indicate the cursor position after the macro insertion. Choose
          <guibutton>OK</guibutton>. The macro is added to the list.
        </para>
        <para>
          The user can also erase a macro by selecting it in the list (only My Macros) then by choosing
          <guibutton>Remove</guibutton>.
        </para>
        <para>
          Same manner, macro can be edited and modified by selecting it in the list then by choosing
         <guibutton>Edit</guibutton>.
         <figure id="add-edit-macro">
          <title>Add/Edit Macro</title>
          <screenshot>
           <screeninfo>Add Edit dialog</screeninfo>
           <graphic fileref="figures/add_edit_macro.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
         </figure>	
        </para>
       </sect3>
       <sect3 id="macro-keyword">
        <title>Macro Keywords</title>
        <para>
          Macros Keywords are available. They can be integrated in the macro definitions. The names of
          these macro Keywords start and finish by the character ' @ '.
        </para>
        <para>
         Available macro keywords are : @DATE_TIME@, @DATE_YMD@, @DATE_Y@, @USER_NAME@, @FILE_NAME@,
         @FILE_NAME_UP@, @FILE_NAME_UP_PREFIX@, @EMAIL@, @TABSIZE@, @INDENTSIZE@, @USETABS@.
         <figure id="keyword-macro">
         <title>Keyword Macro</title>
          <screenshot>
           <screeninfo>The Keyword macro</screeninfo>
           <graphic fileref="figures/keyword_macro.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
         </figure>	
        </para>
      </sect3>
     </sect2>

   <important>
   <title>Save file</title>
   <para>
    You should save new documents as soon as possible to avoid any data 
    loss in case of a crash.
   </para>
   </important>
  </sect1>

 <!-- ============= File operations: Opening and saving files === -->
  <sect1 id="open-save-files">
   <title>Opening and Saving Files</title>
   <para>
    <orderedlist>
     <listitem>
      <para>
       <emphasis>Opening a file:</emphasis> 
	   To open an existing file, choose <menuchoice><guisubmenu>File</guisubmenu>
	   <guimenuitem>Open</guimenuitem></menuchoice> from the menubar, click on 
	   the <guibutton>Open</guibutton> button on the toolbar, or press 
	   <keycombo><keycap>Ctrl</keycap><keycap>O</keycap></keycombo>. This will 
	   display the <interface>Open File</interface> dialog.
       <figure id="open-file">
        <title>Open File dialog</title>
        <screenshot>
		<screeninfo>The Open File dialog</screeninfo>
         <graphic fileref="figures/open_file.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
       </figure>
       Select or enter the file you want to open, then click 
	   <guibutton>Open</guibutton>. To open more than one file at once, select multiple files
	   to open by first pressing CTRL and clicking the files in the list and
	   press <guibutton>Open</guibutton>. If you change your mind, click 
	   <guibutton>Cancel</guibutton> to dismiss the dialog without opening 
	   the file.
      </para>
	  <para>
	   For selecting multiple files at once,
	   select a file in the dialog and press CTRL once. This will bring the file selection
	   dialog in multiple-select mode and multiple files could be selected from the list.
	   Multiple file select mode is simlar to single file select mode, except that the file
	   operation (for which the file selection was being done) will be performed for all
	   the selected files.
	   <figure id="open-file-multiple">
        <title>Open Multiple File dialog</title>
        <screenshot>
		<screeninfo>The Open File dialog in multiple-select mode</screeninfo>
         <graphic fileref="figures/open_file_multiple.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
       </figure>
	  </para>
	  <para>
	   The <bold>Show Hidden</bold>, if switched on (Click right), will make the hidden
	   files (files starting with "."; visible in the file list. Depress it to make
	   them hide. <application>Anjuta</application> fileselection dialog also has inbuild
	   file type filter. Select the appropiate file type filter in the dialog and the file
	   list will be limited to the files of the selected type only.
	  </para>
     </listitem>
     
     <listitem>
      <para>
       <emphasis>Saving a file:</emphasis> 
	   To save a file, choose <menuchoice><guisubmenu>File</guisubmenu>
	   <guimenuitem>Save</guimenuitem></menuchoice> from the menubar, click on 
	   the <guibutton>Save</guibutton> button on the toolbar, or press 
	   <keycombo><keycap>Ctrl</keycap><keycap>S</keycap></keycombo>. This will 
	   save the file. If the file is new, a <interface>Save As</interface> dialog will 
	   appear. Enter a filename and click <guibutton>Save</guibutton> to save the new file 
	   with the name supplied.
	   <screenshot>
	    <screeninfo>The Save As File</screeninfo>
            <graphic fileref="figures/save_as_file.png" format="PNG" srccredit="jnoel"></graphic>
           </screenshot>
      </para>
     </listitem>

     <listitem>
      <para>
      <emphasis>Saving a file with a different name:</emphasis> 
	  You can explicitly save a file with a new filename. To do this, choose 
	  <menuchoice><guisubmenu>File</guisubmenu><guimenuitem>Save As</guimenuitem></menuchoice> 
	  from the menubar. A <interface>Save As</interface> dialog will appear prompting you to 
	  enter the new filename. Enter the name and click <guibutton>Save</guibutton>.
      </para>
      <note>
       <title>File save as overwrite</title>
       <para>
        When you use <guimenuitem>Save As</guimenuitem> with an existing file, 
		the original is not deleted. It is left unchanged since the last save. 
		If a file with the new filename already exists, a confirmation dialog 
		will appear, to ensure that you want to overwrite it. Clicking 
		<guibutton>Yes</guibutton> will overwrite the file with the file you 
		are saving.
       </para>
      </note>
     </listitem>
     
     <listitem>
      <para>
      <emphasis>Closing a file:</emphasis> 
	  To close a file, choose <menuchoice><guisubmenu>File</guisubmenu>
	  <guimenuitem>Close</guimenuitem></menuchoice> from the menubar, or click on the 
	  <guibutton>Close</guibutton> button on the toolbar. The file could also be closed
	  by clicking the <guibutton>cross</guibutton> in the filename tab. This will close
	  the current file. If the file is not saved, or is a new file, then 
	  <application>Anjuta</application> will prompt you to save the file before 
	  closing it.
      </para>
     </listitem> 
    </orderedlist>
   </para>
   <note>
   <title>File auto save</title>
    <para>
	If you have enabled auto-save, it will not auto-save any new files. 
	You must first save them manually. The same applies to the 
	<guimenuitem>Save All</guimenuitem> option: it will not save new files, 
	if you haven't saved them first manually. <emphasis>You must save a file manually 
	before auto-save or <guimenuitem>Save All</guimenuitem> will work with it.</emphasis>    
	</para>
   </note>
  </sect1>
 
 <!-- ============= File operations: Editing files === -->
  <sect1 id="editing-files">
   <title>Editing Files</title>
   <para>
    <application>Anjuta</application> has a number of helpful features which aid in 
    editing and working with source files. The following sections describe how to use 
	some of the interesting features available.
   </para>
   <sect2 id="editor-margins-sec">
   <title>Editor Margins</title>
      <para><emphasis>Editor Margins:</emphasis> Editor margins are the small area on the
	   left of the editor for some special purposes. There are three editor margins available
	   and all of them may not be available when you first start <application>anjuta</application>.
       They are Line numbers margin, Markers margin and Code fold margin.
       By default (that is, when you run <application>anjuta</application> for the first time) only
       the code fold margin witll be visible. The rest could be made visible from
       <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu></menuchoice>.
       <figure id="editor-margins">
        <title>Editor Margins</title>
        <screenshot>
         <screeninfo>The Tags toolbar</screeninfo>
         <graphic fileref="figures/editor_margins.png" format="PNG" srccredit="naba"></graphic>
        </screenshot>
       </figure>
       </para>
       <para>
	   The <emphasis>Line Numbers Margin</emphasis> is largest of all the three margins (and slightly
	   darker then rest) and displays the document's line numbers.
	   <emphasis>Line Number Margin</emphasis> could be made visible
	   or invisible by toggling <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu>
	   <guimenuitem>Line Numbers Margin</guimenuitem></menuchoice>. Single left clicking on this margin
	   will select the whole line (including the last newline, if present). You can set the font
	   properties for line number margin in the preferences.
      </para>
	  <para><emphasis>Markers Margin</emphasis> is the next margin which can be made visible or
	   invisible by selecting <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu>
	   <guimenuitem>Markers Margin</guimenuitem></menuchoice>. This margin displays graphical icons
	   to mark the give line. The markers which will be displayed in this margin are Bookmark marker
	   (rectangular blue colored icon), Breakpoint marker (circular red colored) and Line indicator
	   (pointed arrow yellow colored). Bookmark marker is used to indicate bookmaked lines which could
	   be toggled from <menuchoice><guimenu>Goto</guimenu><guisubmenu>Bookmark</guisubmenu><guimenuitem>
	   Toggle Bookmark</guimenuitem></menuchoice>
	   with the cursor placed in that line. The breakpoint marker is used in debugger to mark the
	   line with debugging breakpoints (see debugging section for more details). The line indicator
	   marker is used to indicate a line when we do a jump from another part, for example when
	   navigating the bookmarks and during single stepping in debugger.
       </para>
       <para>
        <emphasis>Code folding margin</emphasis> is where the folding tree is visisble. Clicking 
        on these folding tree nodes will fold or unfold the code blocks. An underline will also
        be drawn below the folded line to make it more obvious that a block of code has been 
        folded below the line. For more details on code folding, see the section <emphasis>Code Folding</emphasis>
        below.
       </para>
       <note>
       <title>Invisible margin marker</title>
        <para>
         If the marker margin is not visible, the markers will be displayed by changing the
         background color of the line. For example, if there a breakpoint marker is set in 
         a line and the marker margin is not visible, that line will be displayed with red
         background. Similarly, for bookmark marker and line indicatior marker, the background
         color of the line will be sky blue and yellow, respectively. If you do not like this
         (perhaps due to some contrasting themes), enable the <emphasis>Markers Margins</emphasis>
         from <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu>
         <guimenuitem>Markers Margin</guimenuitem></menuchoice>.
         <figure id="editor-markers">
          <title>Editor markes when markers margin is invisible</title>
          <screenshot>
           <screeninfo>The Tags toolbar</screeninfo>
           <graphic fileref="figures/editor_markers.png" format="PNG" srccredit="naba"></graphic>
          </screenshot>
         </figure>
        </para>
       </note>
      </sect2>
      <sect2 id="editor-guides-sec">
      <title>Editor Guides</title>
      <para>The editor could be made to make certain document information, which otherwise are
      normally not visible. <emphasis>Indentation guides, white spaces and line end characters</emphasis>
      are such information which could be made visible for editing comfort. They could be make
      visible or invisible by toggling the menu items in <menuchoice><guimenu>View</guimenu>
      <guisubmenu>Editor</guisubmenu></menuchoice>. Indentation guides are the small dotted lines 
      drawn to connect the matching braces in the source code. When the cursor is over one such
      maching braces, the dotted indentation guide is highlighted to give a visual region of the
      indentation.
      </para>
       <figure id="editor-guides">
        <title>Editor with guides</title>
        <screenshot>
         <screeninfo>Editor with guides</screeninfo>
         <graphic fileref="figures/editor_guides.png" format="PNG" srccredit="naba"></graphic>
        </screenshot>
      </figure>
    </sect2>
   <sect2 id="highlighting">
   <title>Syntax highlighting</title>
   <para>
    <application>Anjuta</application> can highlight many different languages. 
	This is usually done automatically by determining the type of the file from the 
	file extension. If <application>Anjuta</application> cannot determine the type of 
	the file, there will be no syntax highlighting. You can explicitly force a particular 
	highlight style by selecting the style from the menu 
	<menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu><guisubmenu>
	Highlight Mode</guisubmenu></menuchoice>.
   </para>
   </sect2>
   <sect2 id="codefolding">
    <title>Code folding</title>
    <para>
     Source files which have block coding properties (such as C, C++, Pascal, Java etc.),
     have the advantage of working with <emphasis>code folds</emphasis>. All of
     the code blocks in the source file can be folded or unfolded by clicking on the
     fold points in the fold margin of the <interface>Editor window</interface> 
	 (usually a +/- symbol or up/down arrow). These fold points automatically appear for 
	 source files which use code blocks.
    </para>
    <para>
     Code folding is especially useful when editing big source files that run to
     thousands of lines. Once the folds are closed, the document appears to become 
	 smaller, facilitating easy browsing and editing of the file.
    </para>
   </sect2>
   <note>
   <para>
	Please note that code folding and editor guides are only avalible in the scintilla based editor.
	</para>
	</note>
   <sect2 id="autoformat">
    <title>Auto-formatting source code</title>
    <para>
      If the current file is a C or C++ source or header file, then it is possible to
      automatically indent (auto-format) the file. This gives a clean look to
      the source code, increases legibility, reduces the likelihood of syntax errors,
      and above all it saves time. This can be performed by choosing 
      <menuchoice><guimenu>View</guimenu><guisubmenu>Editor</guisubmenu><guimenuitem>Auto-format
      </guimenuitem></menuchoice> on the menubar. Change the style of formatting by customizing the 
      choices in the preferences.
    </para>
    <note>
	<title>indent</title>
     <para>
      You will need to have the <application>indent</application> utility installed 
	  in order to use this feature. Read the <ulink type="info" url="info:indent">info page 
	  for <application>indent</application></ulink> for further details.
     </para>
    </note>
   </sect2>
  </sect1>

 <!-- ============= File operations: Browsing with the tags browser ===   -->
  <sect1 id="browsing-files">
   <title>Symbol browser and Browsing Files</title>
   <para>
    All C and C++ source and header files can be browsed using the tags in the files. 
    All of the open C and C++ source and header files are scanned for available tags 
	(a "tag" refers to a function definition, structure, macro, etc.). Please note that
    Tag and Symbol is used synonymously in this manual, except when refering to Tags
    browser and Symbol browser, which two different interfaces.
   </para>
    <orderedlist>
     <listitem>
      <para><emphasis>Tags Browser:</emphasis> Tags browser is available on the 
      Browser toolbar. It shows a list of tags available in the currently active
      file (souce file). If there is no tags (or sysmbols) available in the file,
      the tags list will be invisible and a "No Tags" will be displayed instead. The tags
      in this list are shown along with the line numbers where they are found. If there are
      multiple symbols with the same name, they will be shown with different line numbers.
       <figure id="tags-toolbar">
        <title>Tags toolbar</title>
        <screenshot>
         <screeninfo>The Tags toolbar</screeninfo>
         <graphic fileref="figures/toolbar_browser.png" format="PNG" srccredit="jhs"></graphic>
        </screenshot>
       </figure>
      <tip><title>Function symbols</title>
       <para>Function prototype and definition, if present in the same file, can be usually
       distinguished from the corrosponding line numbers. Prototypes usually comes before the
       definition, so they are likely to have smaller line numbers.
       </para>
      </tip>
      </para>
     </listitem>
     <listitem>
      <para><emphasis>Symbol Browser:</emphasis> 
       If there is a project open, <application>Anjuta</application> will scan for tags 
	   in all of the source and header files of the project. This way it is possible 
	   to go to any function definition, structure definition, class definition etc. 
	   without manually opening the file. You don't even have to know which file that 
	   tag is found in (except in the case of function definitions). The symbol browser
       lists all the available symbols in the project.
       <figure id="symbol-browser">
        <title>Tags toolbar</title>
        <screenshot>
         <screeninfo>Symbol browser</screeninfo>
         <graphic fileref="figures/symbol_browser.png" format="PNG" srccredit="jhs"></graphic>
        </screenshot>
       </figure>
      </para>
     </listitem>
    </orderedlist>
   <tip>
    <title>Tags synchronization</title>
    <para>
     You don't have to worry about the synchronization and update of the tag 
     database. <application>Anjuta</application> will take care of everything. 
	 You just have to decide which tag you want to go to!
    </para>
   </tip>
   
  </sect1>

  <!-- ============= File operations: Searching and replacing in files === -->
  <sect1 id="search-replace-files">
   <title>Searching for and Replacing text in files</title>
    <sect2 id="searching">
    <title>Searching</title>
      <para>
       To search for a <emphasis>text</emphasis> or <emphasis>regular expression</emphasis>
       string in the current file, choose <menuchoice><guimenu>Edit</guimenu>
       <guisubmenu>Search</guisubmenu><guimenuitem>Find</guimenuitem></menuchoice>
       or press <keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>.
       This will open the <interface>Find</interface> dialog. 
      </para>
      <para>
       Use the text box to specify the string to search for, and select whether it is a normal 
       string or a regular expression (RegExp). It is also possible to specify the direction of 
       search, whether the search is case-sensitive or not, and the scope of the search. Click 
       <guibutton>Search</guibutton> to start searching.
      </para>
      <para>
       If the search is successful, the matched text in the document will be highlighted, marked...
       (according to the search action choice). If the search is not successful, 
       a <emphasis>match not found</emphasis> message will be displayed.
      </para>
      <para>
       If you want to search again, click on the <guibutton>Search</guibutton> button on the main 
       toolbar or press <keycombo><keycap>Ctrl</keycap><keycap>G</keycap></keycombo>. This will 
       find the next match (<keycombo><keycap>Shift</keycap><keycap>Ctrl</keycap>
       <keycap>G</keycap></keycombo> for the previous match). You can even 
       change the search text when you do this. Enter the new string in the 
       <guilabel>Search Expression</guilabel> text box in the main toolbar.
      </para>
      <figure id="search-expr">
      <title>Search Text dialog</title>
        <screenshot>
        <graphic fileref="figures/search_expr.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
      </figure>
	  <para>
	    To stop a long research, choose <guibutton>Stop</guibutton> button.
	  </para>
	  <para>
	    If the "Basic Search and Replace" option is selected in the Setting window,
		the search direction can be choosen from the Expression window.
	  </para>
      <figure id="search-expr-basic">
      <title>Basic Search Text dialog</title>
        <screenshot>
        <graphic fileref="figures/search_expr_basic.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
      </figure>
    </sect2>
    <sect2 id="search-range">
    <title>Specifying Search Range</title>
      <para>
        In the "Search Target dialog", define the search location and the action 
		to be done in case of search success.
      </para>
      <para>
        The maximum number actions can be defined by User.
      </para>
      <figure id="search-target">
      <title>Search Target dialog</title>
        <screenshot>
        <graphic fileref="figures/search_target.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
      </figure>
      <para>
        The user can select where the text will be searched.
      </para>
      <figure id="search-target-in">
      <title>Search Target In choice</title>
       <screenshot>
       <graphic fileref="figures/search_target_in.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
      </figure>
      <sect3 id="search-file">
      <title>Searching in Files</title>
       <para>
         To find text in your project, select "search in" <menuchoice><guimenu>
	     All Project Files</guimenu></menuchoice>.
       </para>
       <para>
         Enter the text you want to search and specify search options (case-sensitive,
	     complete words ...).
         Click <guibutton>Search</guibutton> to start searching.
       </para>
       <para>
         To find text in File list, select "search in" <menuchoice><guimenu>
	     Specifying File List</guimenu></menuchoice>. Define the Search variables.  
         Click <guibutton>Search</guibutton> to start searching.		 
       </para>	 

       <figure id="search-file-list">
       <title>Search File List</title>
        <screenshot>
        <graphic fileref="figures/search_file_list.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
       </figure>

      </sect3>	
      <sect3 id="search-pattern">
      <title>Specifying File Patterns</title>
       <para>
         To find in files and/or folders, select "search in" <menuchoice><guimenu>
	     Specify File Patterns</guimenu></menuchoice>, choose 
	     the file types and/or folders you want to search.
       </para>
       <para>
         Remember, directories are searched recursively. All of the files under 
         the directory, and the files under all the subdirectories, and the files under all 
	     of the sub-subdirectories (and so on) are all included in the search.
       </para>
       <para>
         Enter the text you want to search and specify search options (case-sensitive,
	     complete words ...).
         Click <guibutton>Search</guibutton> to start searching.
       </para>	 
         <figure id="search-file-pattern">
         <title>Search File Pattern</title>
          <screenshot>
          <graphic fileref="figures/search_file_pattern.png" format="PNG" srccredit="jnoel"></graphic>
          </screenshot>
       </figure>

      </sect3>		 

	</sect2>
    <sect2 id="search-action">
    <title>Specifying Search Action</title>
      <para>
        The user selects which action will be done in case of search success.
      </para>
      <para>
        According to the previous selections (Search in, Search direction ...),
		some actions coul be unavailable.
      </para>
      <figure id="search-target-action">
      <title>Search Target Action choice</title>
       <screenshot>
       <graphic fileref="figures/search_target_action.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
      </figure>
  
    </sect2>
    <sect2 id="replacing">
    <title>Replacing</title>
      <para>
       Search and replace is similar to just finding text, except that you 
       also specify the replace text in the <guilabel>Replace Text</guilabel> text box, 
       and whether or not you want to be prompted before the replace takes place
	   (Replace First Match or Replace All Matches).
      </para>
      <figure id="replace">
      <title>Replacing</title>
        <screenshot>
        <graphic fileref="figures/search_replace.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
      </figure>
	  <para>
	    Choose <guibutton>Replace</guibutton> to replace the matched text or 
		<guibutton>Forward</guibutton> to jump to the next matched text.
	  </para>

	</sect2>
    <sect2 id="search-setting">
    <title>Search Setting</title>
      <para>
        The user has the possibility of saving the setting of his search options.
      </para>
      <para>
        Item highlighted in red is the active item. Item by defaultt is the search
		setting which is loaded at Anjuta launching.
      </para>
      <figure id="search-setting">
      <title>Search Setting dialog</title>
        <screenshot>
        <graphic fileref="figures/search_setting.png" format="PNG" srccredit="jnoel"></graphic>
        </screenshot>
       </figure>
    </sect2>

  </sect1>

 <!-- ============= File operations: Printing Files === -->
   <sect1 id="printing">
    <title>Printing a file</title>
    <para>
     Print preview could be taken by selecting 
	 <menuchoice><guisubmenu>File</guisubmenu><guimenuitem>Print Preview</guimenuitem></menuchoice>.
	 It will render the current file and present a preview of the print. Source codes which
	 are hilighted in the editor are also highlighted similarly in the print (or preview). Addtional
	 options are available to print with the line numbers, wrapped lines and/or headers in the
	 Editor printing preferences from <menuchoice><guisubmenu>Settings</guisubmenu><guimenuitem>Preferences.
	 </guimenuitem></menuchoice>
	 <figure>
       <title>Print preview of a C file</title>
       <screenshot>
       <screeninfo>Print preview</screeninfo>
        <graphic fileref="figures/print_preview.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
     </figure>
	</para> 
    <para>
	 <figure>
       <title>Print Preferences</title>
       <screenshot>
	   <screeninfo>Print preferences</screeninfo>
        <graphic fileref="figures/prefs_print.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
     </figure>
	</para>
	<para>
	When you are ready to print and satisfied with the preview, select 
	<menuchoice><guisubmenu>File</guisubmenu><guimenuitem>Print</guimenuitem></menuchoice>
	or <guibutton>Print</guibutton> from the print preview window. This will bring up the
	actual print dialog as shown below. Select the appropriate print parameters and print
	the file with <guibutton>Print</guibutton> on it.
	</para>
	<para>
	Landscaped or portrait page layout, paper size, page orientation
	and paper type could also be set. Remember to set them up properly according to your printer,
	otherwise printing may not come up properly.
	  <figure>
       <title>Print Dialog</title>
       <screenshot>
	   <screeninfo>Print dialog</screeninfo>
        <graphic fileref="figures/print_dlg.png" format="PNG" srccredit="jnoel"></graphic>
       </screenshot>
      </figure>
	</para>
   </sect1>
 </chapter>
