The Gnome Chemistry Utils  0.13.6
chem3dapplication.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /*
00004  * Gnome Chemistry Utils
00005  * gcugtk/chem3dapplication.h
00006  *
00007  * Copyright (C) 2011-2012 Jean Bréfort <jean.brefort@normalesup.org>
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License as
00011  * published by the Free Software Foundation; either version 2 of the
00012  * License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00022  * USA
00023  */
00024 
00025 #ifndef GCU_GTK_CHEM3D_APPLICATION_H
00026 #define GCU_GTK_CHEM3D_APPLICATION_H
00027 
00028 #include "application.h"
00029 #include <gcu/chem3ddoc.h>
00030 
00032 namespace gcugtk {
00033 
00034 class Chem3dDoc;
00035 
00041 class Chem3dApplication: public Application
00042 {
00043 public:
00051         Chem3dApplication (gcu::Display3DMode display3d = gcu::BALL_AND_STICK, char const *bg = "black");
00052 
00056         virtual ~Chem3dApplication ();
00057 
00063         virtual Chem3dDoc *OnFileNew () = 0;
00064 
00071         void OnFileOpen (Chem3dDoc *doc);
00072 
00079         void OnSaveAsImage (Chem3dDoc *doc);
00080 
00093         bool FileProcess (const gchar* filename, const gchar* mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc = NULL);
00094 
00098         void OnQuit ();
00099 
00106 GCU_PROT_PROP (gcu::Display3DMode, Display3D)
00113 GCU_PROT_PROP (float, Red);
00120 GCU_PROT_PROP (float, Green);
00127 GCU_PROT_PROP (float, Blue);
00128 };
00129 
00130 }       // namespace gcugtk
00131 
00132 #endif  //      GCU_GTK_CHEM3D_APPLICATION_H