atomsdlg.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCR_ATOMSDLG_H
00026 #define GCR_ATOMSDLG_H
00027
00028 #include <gcu/dialog.h>
00029 #include <gcu/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 gcu::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 }
00082
00083 #endif //GCR_ATOMSDLG_H