25 #ifndef GCHEMPAINT_ATOM_H
26 #define GCHEMPAINT_ATOM_H
67 #define POSITION_SW 16
79 #define POSITION_W 128
128 Atom (
int Z,
double x,
double y,
double z);
140 virtual void SetZ (
int Z);
212 virtual bool GetPosition (
double angle,
double& x,
double& y);
219 virtual xmlNodePtr
Save (xmlDocPtr xml)
const;
226 virtual bool Load (xmlNodePtr node);
232 virtual bool LoadNode (xmlNodePtr node);
268 virtual void Move (
double x,
double y,
double z = 0.);
327 void SetChargePosition (
unsigned char Pos,
bool def,
double angle = 0.,
double distance = 0.);
373 void GetSymbolGeometry (
double &width,
double &height,
double &angle,
bool up)
const;
420 bool SetProperty (
unsigned property,
char const *value);
423 void UpdateAvailablePositions ();
429 int m_ValenceOrbitals;
432 double m_width, m_height;
433 double m_length, m_text_height;
439 unsigned char m_AvailPos;
440 unsigned char m_OccupiedPos;
441 bool m_AvailPosCached;
442 unsigned char m_ChargePos;
443 bool m_ChargeAutoPos;
444 double m_ChargeAngle;
446 double m_ChargeWidth, m_ChargeTWidth, m_ChargeXOffset, m_ChargeYOffset;
447 std::list<double> m_AngleList;
448 std::map<double, double> m_InterBonds;
450 PangoLayout *m_Layout, *m_ChargeLayout, *m_HLayout;
451 double m_xHOffs, m_yHOffs;
453 std::string m_FontName;
454 double m_SWidth, m_SHeightH, m_SHeightL, m_SAngleH, m_SAngleL;
456 double m_xROffs, m_yROffs;
520 #endif // GCHEMPAINT_ATOM_H
the base class for objects associated with a canvas item.
void SetChargePosition(unsigned char Pos, bool def, double angle=0., double distance=0.)
GChemPaint specific C++ classes.
void RemoveElectron(Electron *electron)
bool HasAvailableElectrons(bool paired)
void AddBond(gcu::Bond *pBond)
virtual bool AcceptNewBonds(int nb=1)
virtual bool GetRelativePosition(double angle, double &x, double &y)
virtual bool GetPosition(double angle, double &x, double &y)
bool SetProperty(unsigned property, char const *value)
Bond * GetBondAtAngle(double angle)
virtual bool AcceptCharge(int charge)
GChemPaint molecule class.
bool HasImplicitElectronPairs()
Bond * GetNewmanBond() const
void SetSelected(int state)
Object(TypeId Id=OtherType)
virtual int GetAvailablePosition(double &x, double &y)
void NotifyPositionOccupation(unsigned char pos, bool occupied)
base class for a user interface manager
void AddElectron(Electron *electron)
virtual bool LoadNode(xmlNodePtr node)
Gnome Chemistry Canvas library namespace.
void GetSymbolGeometry(double &width, double &height, double &angle, bool up) const
The Gnome Chemistry Utils C++ classes.
bool MayHaveImplicitUnpairedElectrons()
#define GCU_POINTER_PROP(type, member)
void SetCharge(int charge)
void BuildSymbolGeometry(double width, double height, double ascent)
virtual void Move(double x, double y, double z=0.)
bool HasStereoBond() const
virtual double GetYAlign()
bool Match(gcu::Atom *atom, gcu::AtomMatchState &state)
virtual gccv::Anchor GetChargePosition(unsigned char &Pos, double Angle, double &x, double &y)
virtual void Transform2D(gcu::Matrix2D &m, double x, double y)
virtual xmlNodePtr Save(xmlDocPtr xml) const
int GetAttachedHydrogens() const
#define GCU_PROP(type, member)
void RemoveBond(gcu::Bond *pBond)
int GetTotalBondsNumber() const
virtual bool Load(xmlNodePtr node)
bool BuildContextualMenu(gcu::UIManager *UIManager, Object *object, double x, double y)
virtual void AddToMolecule(Molecule *Mol)