GGOBI(main)();routine to create a ggobi instance and optionally pass it command line arguments to initialize it with the appropriate state. Next, compile the code, make certain to add the directory containing GGobiAPI.h to the list of directories the pre-processor searches (ie. via the -I flag). Finally, link against the ggobi library (add
-L<wherever
libggobi.so is located> -lggobi
to the link command).
Now, to get ggobi to respond to use actions, etc., make certain
to call gtk_main()
at some suitable point
in your application. Integrating this with your event loop (if
you have one) can be complex.
Some examples of embedding ggobi in different programming environments are provided in the R, Perl and Python interfaces.
menu = GTK_MENU(gtk_item_factory_get_widget(gg->main_menu_factory, "/File")); suspend = gtk_menu_item_new_with_label ("Suspend"); gtk_menu_append( GTK_MENU(menu), suspend);You can use this to get a reference to the different widgets in the menu (i.e. menu items, menus and sub-menus, etc.) and add, remove and change their characteristics.