fragment-atom.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 GCHEMPAINT_FRAGMENT_ATOM_H
00026 #define GCHEMPAINT_FRAGMENT_ATOM_H
00027
00028 #include "atom.h"
00029 #include <gcu/macros.h>
00030
00031 namespace gcp {
00032
00033 class Fragment;
00034
00035 class FragmentAtom: public Atom
00036 {
00037 public:
00038 FragmentAtom ();
00039 FragmentAtom (Fragment *fragment, int Z);
00040 virtual ~FragmentAtom ();
00041
00042 void SetZ (int Z);
00043 bool AcceptNewBonds (int nb);
00044 void Add (GtkWidget* w) const;
00045 void Update ();
00046 void Update (GtkWidget* w) const;
00047 void SetSelected (GtkWidget* w, int state);
00048 xmlNodePtr Save (xmlDocPtr xml) const;
00049 bool Load (xmlNodePtr node);
00050 int GetChargePosition (unsigned char& Pos, double Angle, double& x, double& y);
00051 int GetAvailablePosition (double& x, double& y);
00052 bool GetPosition (double angle, double& x, double& y);
00053 bool AcceptCharge (int charge);
00054
00060 void AddToMolecule (Molecule* Mol);
00061 bool Match (gcu::Atom *atom, gcu::AtomMatchState &state);
00062
00063 void DoBuildSymbolGeometry (View *pView);
00064
00065 GCU_RO_POINTER_PROP (Fragment, Fragment)
00066 };
00067
00068 }
00069
00070 #endif // GCHEMPAINT_FRAGMENT_ATOM_H