<chapter id="familiar">
  <title>Getting Familiar with Anjuta</title>
 <!-- ============= Getting Familiar: Menus  ============-->
  <sect1 id="launch">
   <title>Starting Anjuta</title>
   <para>To start <application>Anjuta</application>, open the 
   GNOME <guimenu>Main Menu</guimenu>. <application>Anjuta</application> is 
   found on the <guisubmenu>Development</guisubmenu> submenu. In RedHat 8.0 or later
   anjuta can be found in <guisubmenu>Extra</guisubmenu> submenu and then
   <guisubmenu>Programming</guisubmenu> submenu.
   </para>
    <figure id="anjutaicon">
      <title>Anjuta application icon</title>
	  <screenshot>
      <screeninfo>Anjuta application icon on the Development menu</screeninfo>
       <graphic fileref="figures/devt_menu.png" format="PNG" srccredit="andyp"></graphic>
      </screenshot>
    </figure>
   <para>
   Click on the <application>Anjuta</application> icon to start. The IDE (<emphasis>Integrated 
   Development Environment</emphasis>) will open. Alternatively, <application>anjuta</application>
   can be started from a terminal by issuing the command <command>anjuta</command>.
   If <application>anjuta</application> us started for the first time, it will greet you with
	a welcome message.
   </para>
  </sect1>
  <sect1 id="menu">
   <title>Menus</title>
   <para>
   At the top of the <application>Anjuta</application> main window is the menubar. 
   Almost all of the functions are available by activating the appropriate 
   menu item. The functions have been grouped according to their type. For 
   example, the file operations have been grouped into 
   the <guisubmenu>File</guisubmenu> menu.
   </para>
    
    <para>
     The menubar can be detached. Drag it from the main window using the handle 
	 at the left. Once detached, it will become a floating window.
    </para>
	
    <figure id="menubar">
      <title>Menubar</title>
	  <screenshot>
      <screeninfo>Anjuta menubar</screeninfo>
       <graphic fileref="figures/menu_main.png" format="PNG" srccredit="andyp"></graphic>
      </screenshot>
    </figure>
    
    <para>
     Most of the menus and submenus can be detached. Click on the detach bar 
	 (the dashed line just above the first menu item). Once the menu is 
	 detached, it will become an independent window.
    </para>
        
    <figure id="file-menu-detach">
      <title>File menu (detached)</title>
      <screenshot>
      <screeninfo>File menu (detached)</screeninfo>
       <graphic fileref="figures/menu_detached.png" format="PNG" srccredit="andyp"></graphic>
      </screenshot>
    </figure>
	
   <para>
    Shortcut keys are available for	many of the menu options. All of the shortcut 
	keys are shown alongside the corresponding menu items. A useful reference to 
	the shortcut keys which are not directly attachted with the menu is also available
	in the next section. 
   </para>
	
  </sect1>
<!-- ============= Getting Familiar: Shortcuts  ============-->
  <sect1 id="shortcuts">
   <title>Useful Shortcuts</title>
   <para>
    <itemizedlist>
     <listitem>
      <para>
       <emphasis>Switch Editor page:</emphasis> CTRL-TAB (forward) and CTRL-SHIFT-TAB (backward) -- The pages could
	   also be switched by right clicking on the notebook tabs and selecting an editor tab
	   (useful when all the tabs in the editor are not visible at once). Some desktop configuration
	   may already have these shortcut keys assigned. In that case, you will need to reconfigure them
	   (not in anjuta, because they are fixed) if you want to avail these shortcuts.
      </para>
     </listitem>
     <listitem>
      <para>
	   <emphasis>Context Help:</emphasis> CTRL-H -- Keep the cursor on the word (for example, the
	   function name) for which you want to get the API help and press the shortcut. Context help
	   only works if you have <application>DevHelp</application> installed. If you do not have
	   <application>DevHelp</application> installed, the context help menu and toolbar button
	   will be inactive. You can get it from <application>DevHelp</application>
	   website. You will also have to install the related <application>DevHelp</application> books.
      </para>
     </listitem>
     <listitem>
      <para>
	  <emphasis>Auto complete:</emphasis> CTRL-ENTER -- Press the shortcut with the cursor placed
	  at the end of incomplete word and a list of words matching the remaining part will appear.
	  Scroll and select the right word from the list if you find one.
      </para>
     </listitem>
     <listitem>
      <para>
	  <emphasis>More shortcus:</emphasis> Look for the shortcut keys displayed on right side
	  of the menu item labels. They could also be changed as explained in the tip below.
      </para>
     </listitem>
    </itemizedlist>
   <tip>
   <title>Customize shortcuts</title>
   <para>
   You can change the default shortcuts by hovering the mouse over the menu item
   and pressing the new key combination. Those shortcuts which do not have corrosponding
   menu items can not be changed.
   </para>
   </tip>
   </para>
  </sect1>
<!-- ============= Getting Familiar: Toolbars  ============-->
  <sect1 id="toolbars">
   <title>Toolbars</title>
   <para>
    The operations which used most often are made available from the toolbars. 
	There are five toolbars on the main window.
   </para>
   
   <para>
    <itemizedlist>
     <listitem><para><interface>Main Toolbar</interface> - file and editing functions</para></listitem>
     <listitem><para><interface>Extended Toolbar</interface> - project and build functions</para></listitem>
     <listitem><para><interface>Debug Toolbar</interface> - controls for the debugger</para></listitem>
     <listitem><para><interface>Browser Toolbar</interface> - browse bookmarks and function tags</para></listitem>
     <listitem><para><interface>Format Toolbar</interface> - text and code formatting functions</para></listitem>
    </itemizedlist>
   </para>
 
    <figure id="toolbar-detach">
	<title>Main toolbar (detached)</title>
     <screenshot>
     <screeninfo>Main toolbar (detached)</screeninfo>
	  <graphic fileref="figures/toolbar_main.png" format="PNG" srccredit="andyp"></graphic>
     </screenshot>
    </figure>
 
   <para>
    Move the mouse pointer over any toolbar button.	A tooltip describing the function of the button will appear.
   </para>
   
   <para>
    There are some drop-down combination boxes on the toolbars. These are 
	explained in later sections of the manual.
   </para>
 
  </sect1>

<!-- ============= Getting Familiar: Main window  ============-->
  <sect1 id="main-win">
   <title>Main Window</title>
   <para>
    In the main window, there are three frames that you ought to be familiar 
	with before you start doing anything (although some of them may not be 
	visible when you start <application>Anjuta</application>). These are:
   </para>
   
   <para>
    <itemizedlist>
     <listitem>
      <para>
       <interface>Editor window</interface>
      </para>
     </listitem>
     <listitem>
      <para>
       <interface>Project window</interface>
      </para>
     </listitem>
     <listitem>
      <para>
       <interface>Message window</interface>
      </para>
     </listitem>
    </itemizedlist>
   </para>
   
   <para>
     The frame on the left is the <interface>Project window</interface>, at the 
	 right is the <interface>Editor window</interface> and the one at the bottom 
	 is the <interface>Message window</interface>.
   </para>
   <para> 
     The <interface>Project window</interface> and the 
	 <interface>Message window</interface> can be detached into separate windows, 
	 instead of docking them into the main window. You can detach them by clicking 
	 on the <guibutton>detach</guibutton> button (you will find them along with the 
	 frames: the small buttons with the un-docking icon). Similarly, you can hide 
	 them by clicking on the <guibutton>hide</guibutton> buttons (the small buttons 
	 with the red cross). You can make them visible at any time by choosing the 
	 menu items <menuchoice><guisubmenu>View</guisubmenu>
	 <guimenuitem>Project Listing</guimenuitem></menuchoice> 
	 and <menuchoice><guisubmenu>View</guisubmenu>
	 <guimenuitem>Messages</guimenuitem></menuchoice>, or by clicking on the 
	 corresponding toolbar buttons.
   </para>
   
   <para>
    <orderedlist>
     <listitem>
      <para>
       The <interface>Editor window</interface> is part of the main window, so 
	   it cannot be detached or hidden. However, you can always detach the 
	   individual documents, which are shown as pages in the 
	   <interface>Editor window</interface>. The <interface>Editor window</interface> 
	   will have one document active at a time (if there are any files opened). All 
	   of the file commands will apply to this active document. You can switch to 
	   any page by clicking on the page tab. You can do the same by right-clicking 
	   on the page tabs and choosing the document from the pop-up menu that will 
	   appear. This is especially useful when you have a lot of files opened, but not 
	   all of them are visible in the page tab area.
	   </para>
	 </listitem>
     <listitem>
      <para>
       The <interface>Project window</interface> shows a tree of the project files if 
	   you have a project opened. Otherwise, the <interface>Project window</interface> 
	   is usually hidden. Double-clicking on any item in the 
	   <interface>Project window</interface> will open that file.
      </para>
     </listitem>
     <listitem>
      <para>
      The <interface>Message window</interface> will list all the messages (both 
	  <filename>stdout</filename> and <filename>stderr</filename> outputs) when an external 
	  command is executed. The <interface>Message window</interface> is usually hidden, but 
	  appears as soon as an external command is executed, such as during file or project 
	  compilation, debugging sessions, searches, and many other operations. 
	  <application>Anjuta</application> also adds its own messages here when necessary.
      </para>
      <para>
	  The colors used to display the messages are important. Messages 
	  displayed in the standard foreground color (usually Black) are normal 
	  messages. Those displayed in Blue are important messages such as errors or 
	  other information. Messages shown in Red are <emphasis>Hot Linked</emphasis>. 
	  Double-clicking on such a message will take you to the particular file and 
	  line number specified in the message.
      </para>
      <para>
      For example, when you compile a file which contains bugs, some red 
	  messages will appear showing what the problems are, and where they occur. 
	  Double-clicking on such messages will open the file and highlight the 
	  line containing the error.
	  </para>
     </listitem>
    </orderedlist>
   </para>
   <tip>
   <title>Detacting Frames</title>
   <para>
    All three frames are resizable and detachable. Try adjusting them by 
	dragging the edges (handles) which separate them. To detach, click on the 
	<guibutton>detach</guibutton> button at the top corner of the windows.
   </para>
   </tip>
   <note>
   <title>Session management</title>
   <para>
   All of the settings, including the window sizes and window positions, are 
   saved when you exit <application>Anjuta</application>. Session management is still 
   under development, so you should not exit <application>Anjuta</application> with 
   any unsaved documents. <application>Anjuta</application> will display a warning 
   if you try to exit with unsaved documents still open.
   </para>
   </note>
  </sect1>
 </chapter>
