Devguide Tips

  • To learn more about Devguide, see the "Answerbook" on-line manual. (Type "answerbook" at the commandline or use the MOSAIC pull-down menu.) The Devguide manual is "The OpenWindows Developers Guide Users Guide" manual.

  • You may want to try building a new GUI from scratch, just to become familiar with devguide. You should be able to build a new GUI in 5 minutes, complete with a button and a slider.

  • Getting Started:

  • READ THE SECTION BELOW before doing any editing. ALWAYS BACK UP the directory BEFORE running Devguide.

  • To start Devguide, type "devguide" at the command line from within the directory containing your project. The main Devguide window shown at the top of the above figure should appear on your screen.

  • Pull down the "FILE" button, and select "PROJECT." The project window in the lower RIGHT should appear.

  • Pull down the "Project" button on the project window and select "Load". The Load project window should pop up.

  • Double click on "project1" in the load project window to load project1.

  • Double click on main.G in the project window to load the main GUI file, and edit the GUI.

  • Run devguide in the following sequence to avoid crashes.

  • Close all editors before running devguide

  • Back up the directory

  • Run devguide, make GUI changes

  • Save BOTH your project (project.P) AND your interface (main.G). Interfaces are saved by pulling down the fie menu on the main devguide window and selecting save (File->Save). Projects are saved by pulling down the fie menu on the main devguide window and selecting project (pops up project window); then selecting save in the project window. (File->Project->Save).

  • Save the file and project a second time.

  • Exit Devguide. (Unloading the project beforehand is a good idea.)

  • Run make in the directory to incorporate the new interface changes into the c++ files. DO THIS BEFORE EDITING ANY FILES.

  • Edit your stubs files.
  • Adding Connections:

    Connections are the mechanism for linking GUI buttons and actions to your source code that performs the action.

  • Below, we have project 1 loaded into Devguide, and we are editing the connections to the "File Name" textfield.

  • Double-clicking on th eFile Name field causes the pop-up window on the left. Here we see the Object Name is "filename1txt" and the Label is "File Name" (label is what is printed on the GUI).

  • Clicking on the "Connections" button at the bottom of the pop-up causes the connections pop-up menu at the right to appear.

  • In the connections pop-up, we see on event "notify" for the source "filename1txt" (whn something occurs in the filename field), the action taken is to call the function fnam1_con. This creates a function in the stubs file (main_stubs.cc) called fnam1_con that is called whenever something is entered in the filename textfield. (Generally for our purposes keep target field same as text field).

  • As a final note, we gould access the filename anywhere in the stubs file as using :
    	char * filename1[1000];
            strcpy(filename1,
    		(char *)xv_get(Main_window1.filename1txt,PANEL_VALUE));