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);
156 virtual void Update ();
160 int GetTotalBondsNumber ()
const;
182 virtual gccv::Anchor GetChargePosition (
unsigned char& Pos,
double Angle,
double& x,
double& y);
192 virtual int GetAvailablePosition (
double& x,
double& y);
202 virtual bool GetRelativePosition (
double angle,
double& x,
double& y);
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);
244 void SetSelected (
int state);
250 virtual bool AcceptNewBonds (
int nb = 1);
256 virtual bool AcceptCharge (
int charge);
260 virtual double GetYAlign ();
268 virtual void Move (
double x,
double y,
double z = 0.);
276 virtual void Transform2D (
gcu::Matrix2D& m,
double x,
double y);
285 bool BuildContextualMenu (
gcu::UIManager *UIManager, Object *
object,
double x,
double y);
291 virtual void AddToMolecule (
Molecule* Mol);
295 bool HasImplicitElectronPairs ();
299 bool MayHaveImplicitUnpairedElectrons ();
305 void AddElectron (
Electron* electron);
311 void RemoveElectron (
Electron* electron);
318 void NotifyPositionOccupation (
unsigned char pos,
bool occupied);
327 void SetChargePosition (
unsigned char Pos,
bool def,
double angle = 0.,
double distance = 0.);
334 char GetChargePosition (
double *Angle,
double *Dist)
const;
340 void SetCharge (
int charge);
373 void GetSymbolGeometry (
double &width,
double &height,
double &angle,
bool up)
const;
379 bool HasAvailableElectrons (
bool paired);
386 Bond *GetBondAtAngle (
double angle);
392 bool UpdateStereoBonds ();
396 bool HasStereoBond ()
const;
401 Bond *GetNewmanBond ()
const;
411 void BuildSymbolGeometry (
double width,
double height,
double ascent);
420 bool SetProperty (
unsigned property,
char const *value);
427 std::string GetProperty (
unsigned property)
const;
430 void UpdateAvailablePositions ();
436 int m_ValenceOrbitals;
439 double m_width, m_height;
440 double m_length, m_text_height;
446 unsigned char m_AvailPos;
447 unsigned char m_OccupiedPos;
448 bool m_AvailPosCached;
449 unsigned char m_ChargePos;
450 bool m_ChargeAutoPos;
451 double m_ChargeAngle;
453 double m_ChargeWidth, m_ChargeTWidth, m_ChargeXOffset, m_ChargeYOffset;
454 std::list<double> m_AngleList;
455 std::map<double, double> m_InterBonds;
457 PangoLayout *m_Layout, *m_ChargeLayout, *m_HLayout;
458 double m_xHOffs, m_yHOffs;
460 std::string m_FontName;
461 double m_SWidth, m_SHeightH, m_SHeightL, m_SAngleH, m_SAngleL;
463 double m_xROffs, m_yROffs;
527 #endif // GCHEMPAINT_ATOM_H the base class for objects associated with a canvas item.
GChemPaint specific C++ classes.
GChemPaint molecule class.
base class for a user interface manager
Gnome Chemistry Canvas library namespace.
The Gnome Chemistry Utils C++ classes.
#define GCU_POINTER_PROP(type, member)
int GetAttachedHydrogens() const
#define GCU_PROP(type, member)