The Gnome Chemistry Utils 0.13.4
atomsdlg.h
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 "grid.h"
00031 #include <vector>
00032 
00033 using namespace std;
00034 
00035 namespace gcr {
00036 class Document;
00037 class Application;
00038 
00039 class AtomsDlg: public gcugtk::Dialog
00040 {
00041 friend class AtomsDlgPrivate;
00042 public:
00043         AtomsDlg (Application *App, Document* pDoc);
00044         virtual ~AtomsDlg ();
00045 
00046         void Closed ();
00047         void ReloadData ();
00048 
00049 private:
00050         void PopulateRadiiMenu ();
00051 
00052 private:
00053         Document *m_pDoc;
00054         GcrGrid *m_Grid;
00055         GcuPeriodic* periodic;
00056         GtkToggleButton* CustomColor;
00057         GtkColorButton *AtomColor;
00058         GtkEntry *AtomR;
00059         unsigned short m_nElt;
00060         std::vector < Atom * > m_Atoms;
00061         int m_AtomSelected;
00062         GtkWidget *DeleteBtn, *DeleteAllBtn;
00063         GtkComboBoxText *RadiusTypeMenu, *RadiusMenu, *ApplyBtn;
00064         GtkSpinButton *ChargeBtn, *ScaleBtn;
00065         const GcuAtomicRadius **m_Radii;
00066         GcuAtomicRadius m_Radius;
00067         int m_RadiusType, m_Charge;
00068         vector<int> m_RadiiIndex;
00069         unsigned long m_RadiiSignalID, m_EntryFocusOutSignalID, m_ColorSignalID,
00070                                   m_RadiusTypeSignalID, m_ChargeSignalID, m_ScaleSignalID;
00071         bool m_Closing;
00072 };
00073 
00074 }       //      namespace gcr
00075 
00076 #endif //GCR_ATOMSDLG_H