Good Morning.
I can't draw atoms in the gtk window. I read the documentation but I can't
understand how to do this. Also I can't find any tutorial in the web.
My Program is this:
*using namespace std;*
*#include <iostream>*
*#include <fstream>*
*// graphic libraries:*
*#include <gcu/gtkcrystalviewer.h>*
*#include <gcu/chemistry.h>*
*#include <gcu/atom.h>*
*#include <gcu/crystalatom.h>*
*#include <gcu/object.h>*
*#include <glib.h>*
*#include <gtk/gtk.h>*
*#include <stdio.h>*
*#include <libxml/parser.h>*
*int main( int argc, char* argv[] ) {*
*GtkWidget *window;*
*GtkWidget *viewer;*
*gtk_init (&argc, &argv);*
*window = gtk_window_new (GTK_WINDOW_TOPLEVEL);*
*gtk_window_set_title (GTK_WINDOW (window), "Structure viewer");*
*g_signal_connect (G_OBJECT (window), "destroy",*
* G_CALLBACK (gtk_main_quit),*
* NULL);*
*// Create oxy pointer.*
*gcu::CrystalAtom::CrystalAtom* oxy[6];*
*// create and store oxy object*
*oxy[0] = new gcu::CrystalAtom::CrystalAtom(8,0.87,0,0);*
*oxy[1] = new gcu::CrystalAtom::CrystalAtom(8,1.73,0.5,0);*
*oxy[2] = new gcu::CrystalAtom::CrystalAtom(8,1.73,1.5,0);*
*oxy[3] = new gcu::CrystalAtom::CrystalAtom(8,0.87,2,0);*
*oxy[4] = new gcu::CrystalAtom::CrystalAtom(8,0,1.5,0);*
*oxy[5] = new gcu::CrystalAtom::CrystalAtom(8,0.87,0,0);*
*gtk_widget_show_all (window);*
*gtk_main ();*
*}*
1. How can I implement this program to draw the atoms I defined?
2. How can I save this atom structure in a .xml file?
3. If you have any programs that could be used as tutorial, can you send
me them?
Thank you!!
_______________________________________________
Gchemutils-main mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/gchemutils-main