25 #ifndef GCHEMPAINT_DOCUMENT_H
26 #define GCHEMPAINT_DOCUMENT_H
37 #include <libxml/tree.h>
114 bool ImportOB (OpenBabel::OBMol& Mol);
129 virtual bool Load (xmlNodePtr node);
156 void SetFileName (std::string
const &filename,
const gchar *mime_type);
168 void DoPrint (GtkPrintOperation *print, GtkPrintContext *context,
int page)
const;
220 void Remove (Object*
object);
226 void Remove (
const char* Id);
270 void SetMail (
const gchar* mail);
318 void AddData (xmlNodePtr node);
322 bool CanUndo () {
return m_UndoList.size() > 0;}
328 void SetEditable (
bool editable) {m_bWriteable = editable; m_bUndoRedo =
true;}
346 void ExportImage (std::string
const &filename,
const char* type,
int resolution = -1);
393 void SetDirty (
bool isDirty =
true);
414 bool SetProperty (
unsigned property,
char const *value);
462 void BuildBondList (std::list<Bond*>& BondList,
gcu::Object const *obj)
const;
463 void BuildAtomTable (std::map<std::string, unsigned>& AtomTable,
gcu::Object const *obj,
unsigned& index)
const;
464 void RemoveAtom (
Atom* pAtom);
465 void RemoveBond (
Bond* pBond);
466 void RemoveFragment (
Fragment* pFragment);
474 gchar *m_comment, *m_author, *m_mail;
475 bool m_bIsLoading, m_bUndoRedo, m_bReadOnly;
476 std::string m_FileType;
478 GDate CreationDate, RevisionDate;
479 std::list<Operation*> m_UndoList, m_RedoList;
483 unsigned long m_OpID;
484 unsigned m_LastStackSize;
485 std::set<Residue const *> m_SavedResidues;
486 std::map<std::string, gcu::SymbolResidue> m_Residues;
634 #endif // GCHEMPAINT_DOCUMENT_H