The Gnome Chemistry Utils  0.13.7
Public Member Functions | Static Public Member Functions
gcp::Brackets Class Reference

Brackets class. More...

#include <gcp/brackets.h>

Inheritance diagram for gcp::Brackets:
gcu::Object gccv::ItemClient

List of all members.

Public Member Functions

 Brackets (gccv::BracketsTypes type=gccv::BracketsTypeNormal)
virtual ~Brackets ()
void AddItem ()
bool Load (xmlNodePtr node)
xmlNodePtr Save (xmlDocPtr xml) const
void SetSelected (int state)
void OnLoaded ()
void OnUnlink (Object *object)
bool BuildContextualMenu (gcu::UIManager *UIManager, Object *object, double x, double y)
void SetEmbeddedObjects (std::set< gcu::Object * > objects)
std::set< gcu::Object * > const & GetEmbeddedObjects ()
void SetType (gccv::BracketsTypes val)
gccv::BracketsTypes GetType (void) const
gccv::BracketsTypesGetRefType (void)
void SetUsed (gccv::BracketsUses val)
gccv::BracketsUses GetUsed (void) const
gccv::BracketsUsesGetRefUsed (void)
unsigned GetDecorations (void) const
void SetFontDesc (std::string val)
std::string GetFontDesc (void) const
std::string & GetRefFontDesc (void)

Static Public Member Functions

static bool ConnectedAtoms (std::set< gcu::Object * > const &objects)

Detailed Description

Brackets class.

Represents brackets of various types that might be used in different situations as to enclose part of a molecule or a whole object or several objects.

Definition at line 90 of file gcp/brackets.h.


Constructor & Destructor Documentation

Parameters:
typewhether to create a brackets pair or a single bracket.

Used to create a brackets pair or a single, closing, or opening bracket.

virtual gcp::Brackets::~Brackets ( ) [virtual]

The destructor.


Member Function Documentation

void gcp::Brackets::AddItem ( ) [virtual]

Used to add a representation of the brackets in the view.

Reimplemented from gccv::ItemClient.

bool gcp::Brackets::BuildContextualMenu ( gcu::UIManager UIManager,
Object object,
double  x,
double  y 
)
Parameters:
UIManager,:the gcu::UIManager to populate.
objectthe atom on which occured the mouse click.
xx coordinate of the mouse click.
yy coordinate of the mouse click.

This method is called to build a contextual menu for the brackets.

static bool gcp::Brackets::ConnectedAtoms ( std::set< gcu::Object * > const &  objects) [static]

Tests if a collection of atoms can be enclosed inside brackets. Enclosing non connected atoms is not allowed.

Returns:
true if all atoms in the set are connected.
gcp::Brackets::GetDecorations ( void  ) const [inline]
Returns:
the allowed additions to the brackets as a bit field composed of BracketsDecorations values.

Definition at line 208 of file gcp/brackets.h.

std::set< gcu::Object * > const& gcp::Brackets::GetEmbeddedObjects ( ) [inline]
Returns:
the collection of objects that should be enclosed inside the brackets.

Definition at line 164 of file gcp/brackets.h.

gcp::Brackets::GetFontDesc ( void  ) const [inline]
Returns:
the font used to display the brackets.

Definition at line 221 of file gcp/brackets.h.

gcp::Brackets::GetRefFontDesc ( void  ) [inline]
Returns:
the font used to display the brackets as a reference.

Definition at line 221 of file gcp/brackets.h.

gcp::Brackets::GetRefType ( void  ) [inline]
Returns:
the brackets type as a reference.

Definition at line 189 of file gcp/brackets.h.

gcp::Brackets::GetRefUsed ( void  ) [inline]
Returns:
the used brackets as a reference.

Definition at line 202 of file gcp/brackets.h.

gcp::Brackets::GetType ( void  ) const [inline]
Returns:
the brackets type.

Reimplemented from gcu::Object.

Definition at line 189 of file gcp/brackets.h.

gcp::Brackets::GetUsed ( void  ) const [inline]
Returns:
the used brackets.

Definition at line 202 of file gcp/brackets.h.

bool gcp::Brackets::Load ( xmlNodePtr  node) [virtual]
Parameters:
node,:a pointer to the xmlNode containing the serialized brackets.

Used to load a Brackets instance in memory.

Returns:
true on succes, false otherwise.

Reimplemented from gcu::Object.

void gcp::Brackets::OnLoaded ( ) [virtual]

For brackets, OnLoaded() is called each time an embedded object is added.

Reimplemented from gcu::Object.

void gcp::Brackets::OnUnlink ( Object object)
Parameters:
objectthe object just unlinked by Object::Unlink.

Called when an object has been unlinked. Programs should not call it directly, but should call Object::OnUnlink instead.

xmlNodePtr gcp::Brackets::Save ( xmlDocPtr  xml) const [virtual]
Parameters:
xmlthe xmlDoc used to save the document.

Used to save the Brackects to the xmlDoc.

Reimplemented from gcu::Object.

void gcp::Brackets::SetEmbeddedObjects ( std::set< gcu::Object * >  objects)
Parameters:
objects,:the objects to enclose.

Sets the collection of objects that should be enclosed inside the brackets.

gcp::Brackets::SetFontDesc ( std::string  val) [inline]
Parameters:
valthe font to use as a string.

Sets the font to use when displaying the brackets.

Definition at line 221 of file gcp/brackets.h.

void gcp::Brackets::SetSelected ( int  state) [virtual]
Parameters:
state,:the selection state of the brackets.

Used to set the selection state of the brackets. The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, gcp::SelStateUpdating, or gcp::SelStateErasing.

Reimplemented from gccv::ItemClient.

Parameters:
valthe new type for the brackets.

Sets the new default bond length for the document.

Definition at line 189 of file gcp/brackets.h.

Parameters:
valthe brackets to use.

Sets the brackets used for this instance, opening, closing, or both.

Definition at line 202 of file gcp/brackets.h.


The documentation for this class was generated from the following file: