25 #ifndef GCHEMPAINT_ATOM_H
26 #define GCHEMPAINT_ATOM_H
68 #define POSITION_SW 16
80 #define POSITION_W 128
129 Atom (
int Z,
double x,
double y,
double z);
141 virtual void SetZ (
int Z);
213 virtual bool GetPosition (
double angle,
double& x,
double& y);
220 virtual xmlNodePtr
Save (xmlDocPtr xml)
const;
227 virtual bool Load (xmlNodePtr node);
233 virtual bool LoadNode (xmlNodePtr node);
269 virtual void Move (
double x,
double y,
double z = 0.);
328 void SetChargePosition (
unsigned char Pos,
bool def,
double angle = 0.,
double distance = 0.);
374 void GetSymbolGeometry (
double &width,
double &height,
double &angle,
bool up)
const;
421 bool SetProperty (
unsigned property,
char const *value);
424 void UpdateAvailablePositions ();
430 int m_ValenceOrbitals;
433 double m_width, m_height;
434 double m_length, m_text_height;
440 unsigned char m_AvailPos;
441 unsigned char m_OccupiedPos;
442 bool m_AvailPosCached;
443 unsigned char m_ChargePos;
444 bool m_ChargeAutoPos;
445 double m_ChargeAngle;
447 double m_ChargeWidth, m_ChargeTWidth, m_ChargeXOffset, m_ChargeYOffset;
448 std::list<double> m_AngleList;
449 std::map<double, double> m_InterBonds;
451 PangoLayout *m_Layout, *m_ChargeLayout, *m_HLayout;
452 double m_xHOffs, m_yHOffs;
454 std::string m_FontName;
455 double m_SWidth, m_SHeightH, m_SHeightL, m_SAngleH, m_SAngleL;
457 double m_xROffs, m_yROffs;
522 #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.)
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)
void GetSymbolGeometry(double &width, double &height, double &angle, bool up) const
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)