Document Source: Linux Eden
The Anjuta package is provided on the Redhat Linux, which provides a Glade application interface design tool. Linux uses Anjuta and Glade and the GlaDemM package to build a IDE environment developed under Linux under the C / C software, which can be developed for GTK / GNOME applications. It is difficult to write a good graphical user interface when developing Linux programs. After the GIMP toolkit (GTK) was born, this matter became easier. When DAMON Chaplin writes the Glade, it is easier after this tool for generating a graphical user interface in a GTK environment. But Glade is still unable to be an "integrated development environment" (such as Visual Basic, etc.), because the programmer cannot manually modify the code generated by the Glade in the GLADE environment. Now, all this has become the past: Anjuta is born! Anjuta uses Glade to generate the capabilities of the beautiful user interface, plus the ability to edit its own powerful source, is becoming an excellent application to rapidly developed an integrated environment (IDE). Previously, people use Glade to interface, edit the program with Emacs or VI, etc., and then edit the development project with some end simulator. Using Anjuta, all of these complicated zero-scattered tasks can be done in a unified, integrated, natural environment. I. Software Preparation: Download libzvt-2.0.1-0.ximian.6.6.i386.rpm http://tux.cm. Net/pub/ximian/xd2/redhat-9-i386/libzvt-2.0.1-0 .ximian.6.6.i386.rpm Download Anjuta-1.1.97-1.RH90.I386.rpm http://rpm.pbone.net/index.php3/stat/4/IDPL/772608/com/anjuta-1.1. 97-1.RH90.I386.rpm.html Download Anjuta-1.0.2-1.i386.rpm http://henet.dl.sourceForge.Net/SourceForge/anjuta/anjuta-1.0.2-1.i386.rpm Download gtkmm2-2.2.3-fr1.i386.rpm http://ftp.freshrpms.net/pub/freshrpms/redhat/9/gtkmm2/gtkmm2-2.2.3-fr1.i386.rpm Download GTKMM2-Devel-2.2. 3-fr1.i386.rpm http://ftp.freshrpms.net/pub/freshrpms/redhat/9/gtkmm2/gtkm2-devel-2.2.3-fr1.i386.rpm Download libsigc - 1.2.5-fr1.i386 . rpm http://ftp.freshrpms/red/pub/freshrpms/redhat/9/libsigc /libsigc -1.2.5-fr1.i386.rpm Download GlademM-1.1.3D-Snap.i586.rpm http: // loban .caltech.edu / gchch / glademm-1.1.3d-snap.i586.rpm Download libsigc - devel-1.2.5-fr1.i386.rpm http://ftp.freshrpms.net/pub/freeshrpms/redhat/9/9/ Libsigc / libsigc - devel-1.2.5-fr1.i386.rpm II. Installing the package installation Redhat Linux 9 Select Install the software development item so that you will install Glade, then Root users log in and install the following packages.
RPM-IVH libzvt-2.0.1-0.ximian.6.6.i386.rpm // Anjuta's dependency package RPM -IVH IBSIGC - 1.2.5-fr1.i386.rpm rpm -ivh gtkmm2-debk 2.2.3- Fr1.i386.rpm rpm -ivh bsigc - devel-1.2.5-fr1.i386.rpm rpm -ivh gtkmm2-2.2.3-fr1.i386.rpm rpm -ivh glademm-1.1.3d-snap.i586.rpm rpm -IVH Anjuta-1.0.2-1.i386.rpm rpm -UVH Anjuta-1.1.97-1.rh90.i386.rpm Note: Direct installation Anjuta-1.1.97 will find uncomprobiliated software, a few Question 1, to install the Ximian version of the libzvt package, you just have to install it to mention that 2, you have to install Anjuta 1.0.1, then update Via Rpm -UVH Anjuta 1.1.97 three, develop the first Anjuta1. 1.97 C / C procedures let us build a simple Hello World program with Anjuta. Create a new project first open Anjuta. Please select a menu item program -> More Programming Tools -> Anjuta IDE. GNOME Application Wizard "Gnome2.0 Application Wizard" will appear. Although people can click on "Next" button, do not have to go to the Passenger dialog box, here, you still want you to read each message on the dialog. Now, after you read the information on the dialog box in the first step of the Elf, press the Next button. The second step is very critical. Here you need to decide the type of application you want to build. Let's choose "Gnome 2.0 Project" and continue to go. Step 3 To determine the basic configuration of the application. Please fill in the configuration information of the application very carefully. In this tutorial, enter the following information. Project Name: HelloWorld (Program project name) Note that the project name without spaces Version: 0.1 (version) Author: (Your Name) program name: helloworld (program name) programming languages: There are C, C and C / C three options, hereby select C program type: There are three options to execute programs, dynamic link libraries, and static link libraries. The following fourth step is written in the project description information; the fifth step is the other options for the project, GNU copyright statement and procedures Localization support, if you don't want, you can remove them. You'd better select an icon for this application project, which will appear in the GNOME application menu. Here we choose Hello World Example as the project name, select Applications in the Group domain. Finally click on the Next button and the finish button. At this time, the application project is established. Because we are just establishing an example program, we can easily go. If we are building an application project to be used in real world, we must be extravagant when filling out the parameters of the application wizard, because they are very important for your application project. Design User Interface After the end of the application wizard, Anjuta began to establish a directory structure of your application project, run parameter configuration scripts and establish an application project itself. The entire creation process is displayed in the lower part of the Anjuta development environment. After the creation process is over, the left side of the screen shows the application project tree structure.
This tree structure contains your source file, documentation, and graphics files. Now is the time to start Glade and use its design graphical user interface. Please go to the menu item-> Edit the graphical interface to run the Glade. You will see three windows: 1) Glade main window, 2) Properties window, and 3) Drawing Tools window. [http://www.yesky.com/image20010518/79518.jpg] Take a simple GTK window. Please click on the first item listed on the GLADE main view, then press the DEL to delete the key. Now go to the Tool Window (Palette), click on the first icon. At this time, a blank gtkwindow built it. This will be the main window Window1 of our app. Go to the property window (Properties), type "Hello World!". Now come to the tool window to select a table (Table) 2 line 2 to the main window Window1. Thus, the main window is divided into four parts of the same size. Now remove two buttons from the tool window, add them in both boxes below the main window. Set the names and tag properties of these two buttons as follows: left button: BT_ok Tags: OK Right Button: Name: bt_exit Tag: EXIT in the upper half of the window, plus a tag control; in the upper half The right side plus an input box ENTRY control. The name of the input box is taken as Entry. Set the tag property of the above tag control to 'What's your name, sir?'. Now connect two buttons with Clicked events on the properties of the properties window (Signals Tab). Use the Glade preset reverse call function name. Please don't forget to click the Add button. This common error can result in a blank Callbacks.c file. On the source file callbacks.c, we will join the source code via the Anjuta interface. Now, the main window looks not so beautiful. You can try to change the width and height of the window, and try to change several properties of the horizontal and vertical enclosures, see if you can make the window look good. (Note: You can go to menu view, select the control tree, then select the control.) The following is the settings of some attributes: * Set the property homogeneous of the following horizontal envelope box to YES; * Attributes of the positioning file of the property window Fill is set to YES; * Take the property GROW of the primary window WINDOW1 to NO. After changing these attributes, my main window looks like this: [http://www.yesky.com/image20010518/79519.jpg ] After designing the interface, click the "Save" button on the Glade Main Sightseeing window, then click the "Watch" button. This will update your application project's SRC directory in your new design interface. . Now let's choose menu Project -> EXIT, go back to the Anjuta user interface. Start programming! Editor now returns to the Anjuta environment, you should be able to see Callbacks.c in the project source program list on the left side of the screen. Double click Open the program. So we can edit your on the left of the Anjuta integrated development environment The program is. Sometimes something is more likely to understand if there is a color, more interesting. Anjuta's "Syntax Highlights" function (on the "Format" menu) is this. Anjuta has a lot of useful features, you can play slowly. Maybe it is very good to spend some time, familiar with this integrated environment.