The Gnome Chemistry Utils 0.13.3
|
00001 // -*- C++ -*- 00002 00003 /* 00004 * Gnome Crystal 00005 * atomsdlg.h 00006 * 00007 * Copyright (C) 2002-2011 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 GCR_ATOMSDLG_H 00026 #define GCR_ATOMSDLG_H 00027 00028 #include <gcugtk/dialog.h> 00029 #include <gcugtk/gcuperiodic.h> 00030 #include <vector> 00031 00032 using namespace std; 00033 00034 namespace gcr { 00035 class Document; 00036 class Application; 00037 00038 struct AtomsStruct; 00039 00040 class AtomsDlg: public gcugtk::Dialog 00041 { 00042 public: 00043 AtomsDlg (Application *App, Document* pDoc); 00044 virtual ~AtomsDlg (); 00045 00046 virtual bool Apply (); 00047 void AtomAdd (); 00048 void AtomDelete (); 00049 void AtomDeleteAll (); 00050 void AtomSelect (GtkTreeSelection *Selection); 00051 void OnElement (guint Z); 00052 void OnEdited (GtkCellRendererText *cell, const gchar *path_string, const gchar *new_text); 00053 void SetCustomColor (bool custom); 00054 void SetRadiusType (int type); 00055 void SetRadiusIndex (int index); 00056 void SetCharge (int charge); 00057 void PopulateRadiiMenu (); 00058 00059 private: 00060 Document *m_pDoc; 00061 GtkListStore *AtomList; 00062 GtkTreeSelection *Selection; 00063 GcuPeriodic* periodic; 00064 GtkToggleButton* CustomColor; 00065 GtkColorButton *AtomColor; 00066 GtkEntry *AtomR; 00067 unsigned short m_nElt; 00068 GArray *m_Atoms; 00069 gint m_AtomSelected; 00070 GtkTreeIter m_Iter; 00071 GtkWidget *DeleteBtn, *DeleteAllBtn; 00072 GtkComboBox *RadiusTypeMenu, *RadiusMenu, *ApplyBtn; 00073 GtkSpinButton *ChargeBtn, *ScaleBtn; 00074 const GcuAtomicRadius **m_Radii; 00075 GcuAtomicRadius m_Radius; 00076 gint m_RadiusType, m_Charge; 00077 vector<int> m_RadiiIndex; 00078 unsigned long m_RadiiSignalID; 00079 }; 00080 00081 } // namespace gcr 00082 00083 #endif //GCR_ATOMSDLG_H