#include <gcp/document.h>
Public Member Functions | |
Document (Application *App, bool StandAlone, Window *window=NULL) | |
virtual | ~Document () |
void | Clear () |
GtkWidget * | GetWidget () |
View * | GetView () |
void | BuildBondList (std::list< Bond * > &BondList, gcu::Object const *obj) const |
void | BuildAtomTable (std::map< std::string, unsigned > &AtomTable, gcu::Object const *obj, unsigned &index) const |
void | Save () const |
virtual bool | Load (xmlNodePtr) |
void | DoPrint (GtkPrintOperation *print, GtkPrintContext *context) const |
virtual double | GetYAlign () |
GtkWindow * | GetGtkWindow () |
bool | OnSignal (gcu::SignalId Signal, gcu::Object *Child) |
void | SetDirty (bool isDirty=true) |
bool | SetProperty (unsigned property, char const *value) |
gcu::Residue const * | GetResidue (char const *symbol, bool *ambiguous=NULL) |
gcu::Residue * | CreateResidue (char const *name, char const *symbol, gcu::Molecule *molecule) |
Theme * | GetTheme (void) |
void | SetBondLength (double val) |
double | GetBondLength (void) const |
double & | GetRefBondLength (void) |
void | SetBondAngle (double val) |
double | GetBondAngle (void) const |
double & | GetRefBondAngle (void) |
void | SetArrowLength (double val) |
double | GetArrowLength (void) const |
double & | GetRefArrowLength (void) |
void | SetTextFontFamily (gchar *val) |
gchar * | GetTextFontFamily (void) const |
gchar *& | GetRefTextFontFamily (void) |
void | SetTextFontStyle (PangoStyle val) |
PangoStyle | GetTextFontStyle (void) const |
PangoStyle & | GetRefTextFontStyle (void) |
void | SetTextFontWeight (PangoWeight val) |
PangoWeight | GetTextFontWeight (void) const |
PangoWeight & | GetRefTextFontWeight (void) |
void | SetTextFontVariant (PangoVariant val) |
PangoVariant | GetTextFontVariant (void) const |
PangoVariant & | GetRefTextFontVariant (void) |
void | SetTextFontStretch (PangoStretch val) |
PangoStretch | GetTextFontStretch (void) const |
PangoStretch & | GetRefTextFontStretch (void) |
void | SetTextFontSize (gint val) |
gint | GetTextFontSize (void) const |
gint & | GetRefTextFontSize (void) |
PangoAttrList * | GetPangoAttrList (void) |
void | SetAllowClipboard (bool val) |
bool | GetAllowClipboard (void) const |
bool & | GetRefAllowClipboard (void) |
Definition at line 77 of file gcp/document.h.
gcp::Document::Document | ( | Application * | App, | |
bool | StandAlone, | |||
Window * | window = NULL | |||
) |
App | the application. | |
StandAlone | whether the document is opened in its own window or embedded in something else. | |
window | the document window if it has already been created or NULL. |
virtual gcp::Document::~Document | ( | ) | [virtual] |
The destructor.
Reimplemented from gcu::Document.
void gcp::Document::Clear | ( | ) |
Empties a document and reinitialize it.
GtkWidget* gcp::Document::GetWidget | ( | ) |
View* gcp::Document::GetView | ( | void | ) | [inline] |
void gcp::Document::BuildBondList | ( | std::list< Bond * > & | BondList, | |
gcu::Object const * | obj | |||
) | const |
@param |
void gcp::Document::BuildAtomTable | ( | std::map< std::string, unsigned > & | AtomTable, | |
gcu::Object const * | obj, | |||
unsigned & | index | |||
) | const |
void gcp::Document::Save | ( | ) | const [virtual] |
Saves the document. Need to be overloaded by derived class if meaningful. Default implementation doesn't do anything.
Reimplemented from gcu::Document.
virtual bool gcp::Document::Load | ( | xmlNodePtr | node | ) | [virtual] |
node | a pointer to the xmlNode containing the serialized object. |
Example:
std::string str = (const char*)node->name; Object* pObject = Object::CreateObject(str, this); if (pObject) { if (!pObject->Load(node)) delete Object; } else cerr << "Warning: unknown object: " << str << endl;
Reimplemented from gcu::Object.
void gcp::Document::DoPrint | ( | GtkPrintOperation * | print, | |
GtkPrintContext * | context | |||
) | const [virtual] |
a GtkPrintOperation*. | ||
context | a GtkPrintContext*. |
Implements gcu::Printable.
virtual double gcp::Document::GetYAlign | ( | ) | [virtual] |
Used to retrieve the y coordinate for alignment. The default implementation returns 0.0 and every derived class for which alignment has a meaning should implement this method.
Reimplemented from gcu::Object.
GtkWindow* gcp::Document::GetGtkWindow | ( | ) | [virtual] |
Derived classes need to overload this pure virtual method.
Implements gcu::Printable.
bool gcp::Document::OnSignal | ( | gcu::SignalId | Signal, | |
gcu::Object * | Child | |||
) | [virtual] |
Signal | the appropriate SignalId | |
Child | the child which emitted the signal or NULL |
Reimplemented from gcu::Object.
void gcp::Document::SetDirty | ( | bool | dirty = true |
) |
dirty | should be true if the object needs some update, false otherwise. For a document, it means that the document has been changed. |
Reimplemented from gcu::Object.
bool gcp::Document::SetProperty | ( | unsigned | property, | |
char const * | value | |||
) | [virtual] |
property | the property id as defined in objprops.h | |
value | the property value as a string |
Reimplemented from gcu::Object.
gcu::Residue const* gcp::Document::GetResidue | ( | char const * | symbol, | |
bool * | ambiguous = NULL | |||
) | [virtual] |
symbol | the symbol for which a Residue* is searched. | |
ambiguous | where to store the boolean telling if the symbol is ambiguous or NULL. |
Reimplemented from gcu::Document.
gcu::Residue* gcp::Document::CreateResidue | ( | char const * | name, | |
char const * | symbol, | |||
gcu::Molecule * | molecule | |||
) | [virtual] |
name | the name of the new residue. | |
symbol | the symbol of the new residue. | |
molecule | a molecule with a pseudo atom which describes the structure of the residue. |
Reimplemented from gcu::Document.
gcp::Document::GetTheme | ( | void | ) | [inline] |
gcp::Document::SetBondLength | ( | double | val | ) | [inline] |
val | the new default bond length. |
Definition at line 244 of file gcp/document.h.
gcp::Document::GetBondLength | ( | void | ) | const [inline] |
gcp::Document::GetRefBondLength | ( | void | ) | [inline] |
Definition at line 244 of file gcp/document.h.
gcp::Document::SetBondAngle | ( | double | val | ) | [inline] |
val | the new default bond angle between two consecutive bonds in a chain. |
Definition at line 259 of file gcp/document.h.
gcp::Document::GetBondAngle | ( | void | ) | const [inline] |
Definition at line 259 of file gcp/document.h.
gcp::Document::GetRefBondAngle | ( | void | ) | [inline] |
Definition at line 259 of file gcp/document.h.
gcp::Document::SetArrowLength | ( | double | val | ) | [inline] |
val | the new default arrow length. |
Definition at line 271 of file gcp/document.h.
gcp::Document::GetArrowLength | ( | void | ) | const [inline] |
gcp::Document::GetRefArrowLength | ( | void | ) | [inline] |
Definition at line 271 of file gcp/document.h.
gcp::Document::SetTextFontFamily | ( | gchar * | val | ) | [inline] |
val | the new text font family. |
Definition at line 283 of file gcp/document.h.
gcp::Document::GetTextFontFamily | ( | void | ) | const [inline] |
gcp::Document::GetRefTextFontFamily | ( | void | ) | [inline] |
gcp::Document::SetTextFontStyle | ( | PangoStyle | val | ) | [inline] |
val | the new text font style. |
Definition at line 295 of file gcp/document.h.
gcp::Document::GetTextFontStyle | ( | void | ) | const [inline] |
gcp::Document::GetRefTextFontStyle | ( | void | ) | [inline] |
gcp::Document::SetTextFontWeight | ( | PangoWeight | val | ) | [inline] |
val | the new text font weight. |
Definition at line 307 of file gcp/document.h.
gcp::Document::GetTextFontWeight | ( | void | ) | const [inline] |
gcp::Document::GetRefTextFontWeight | ( | void | ) | [inline] |
gcp::Document::SetTextFontVariant | ( | PangoVariant | val | ) | [inline] |
val | the new text font variant. |
Definition at line 319 of file gcp/document.h.
gcp::Document::GetTextFontVariant | ( | void | ) | const [inline] |
gcp::Document::GetRefTextFontVariant | ( | void | ) | [inline] |
Definition at line 319 of file gcp/document.h.
gcp::Document::SetTextFontStretch | ( | PangoStretch | val | ) | [inline] |
val | the new text font stretch. |
Definition at line 331 of file gcp/document.h.
gcp::Document::GetTextFontStretch | ( | void | ) | const [inline] |
gcp::Document::GetRefTextFontStretch | ( | void | ) | [inline] |
Definition at line 331 of file gcp/document.h.
gcp::Document::SetTextFontSize | ( | gint | val | ) | [inline] |
val | the new text font size. |
Definition at line 343 of file gcp/document.h.
gcp::Document::GetTextFontSize | ( | void | ) | const [inline] |
gcp::Document::GetRefTextFontSize | ( | void | ) | [inline] |
gcp::Document::GetPangoAttrList | ( | void | ) | [inline] |
Definition at line 347 of file gcp/document.h.
gcp::Document::SetAllowClipboard | ( | bool | val | ) | [inline] |
val | whether the document may use the clipboard or no. |
Definition at line 359 of file gcp/document.h.
gcp::Document::GetAllowClipboard | ( | void | ) | const [inline] |
Definition at line 359 of file gcp/document.h.
gcp::Document::GetRefAllowClipboard | ( | void | ) | [inline] |
Definition at line 359 of file gcp/document.h.