# Getting Familiar with Anjuta

## Starting Anjuta

To start Anjuta, open the GNOME Main Menu. Anjuta is found on the Development submenu. In RedHat 8.0 or later anjuta can be found in Extra submenu and then Programming submenu.

### Anjuta application icon

Anjuta application icon on the Development menu

Click on the Anjuta icon to start. The IDE (Integrated Development Environment) will open. Alternatively, anjuta can be started from a terminal by issuing the command `anjuta`. If anjuta us started for the first time, it will greet you with a welcome message.

## Menus

At the top of the Anjuta 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 File menu.

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.

### Menubar

Anjuta menubar

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.

### File menu (detached)

File menu (detached)

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.

## Useful Shortcuts

- Switch Editor page: 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.

- Context Help: 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 DevHelp installed. If you do not have DevHelp installed, the context help menu and toolbar button will be inactive. You can get it from DevHelp website. You will also have to install the related DevHelp books.

- Auto complete: 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.

- More shortcus: 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.

### Customize shortcuts

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.

## Toolbars

The operations which used most often are made available from the toolbars. There are five toolbars on the main window.

- Main Toolbar - file and editing functions

- Extended Toolbar - project and build functions

- Debug Toolbar - controls for the debugger

- Browser Toolbar - browse bookmarks and function tags

- Format Toolbar - text and code formatting functions

### Main toolbar (detached)

Main toolbar (detached)

Move the mouse pointer over any toolbar button. A tooltip describing the function of the button will appear.

There are some drop-down combination boxes on the toolbars. These are explained in later sections of the manual.

## Main Window

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 Anjuta). These are:

- Editor window

- Project window

- Message window

The frame on the left is the Project window, at the right is the Editor window and the one at the bottom is the Message window.

The Project window and the Message window can be detached into separate windows, instead of docking them into the main window. You can detach them by clicking on the detach 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 hide buttons (the small buttons with the red cross). You can make them visible at any time by choosing the menu items View Project Listing and View Messages, or by clicking on the corresponding toolbar buttons.

1. The Editor window 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 Editor window. The Editor window 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.

2. The Project window shows a tree of the project files if you have a project opened. Otherwise, the Project window is usually hidden. Double-clicking on any item in the Project window will open that file.

3. The Message window will list all the messages (both `stdout` and `stderr` outputs) when an external command is executed. The Message window 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. Anjuta also adds its own messages here when necessary.

   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 Hot Linked. Double-clicking on such a message will take you to the particular file and line number specified in the message.

   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.

### Detacting Frames

All three frames are resizable and detachable. Try adjusting them by dragging the edges (handles) which separate them. To detach, click on the detach button at the top corner of the windows.

### Session management

All of the settings, including the window sizes and window positions, are saved when you exit Anjuta. Session management is still under development, so you should not exit Anjuta with any unsaved documents. Anjuta will display a warning if you try to exit with unsaved documents still open.