The Gnome Chemistry Utils
0.13.7
|
#include <gcp/brackets.h>
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::BracketsTypes & | GetRefType (void) |
void | SetUsed (gccv::BracketsUses val) |
gccv::BracketsUses | GetUsed (void) const |
gccv::BracketsUses & | GetRefUsed (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) |
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.
type | whether 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.
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 | ||
) |
UIManager,: | the gcu::UIManager to populate. |
object | the atom on which occured the mouse click. |
x | x coordinate of the mouse click. |
y | y 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.
gcp::Brackets::GetDecorations | ( | void | ) | const [inline] |
Definition at line 208 of file gcp/brackets.h.
std::set< gcu::Object * > const& gcp::Brackets::GetEmbeddedObjects | ( | ) | [inline] |
Definition at line 164 of file gcp/brackets.h.
gcp::Brackets::GetFontDesc | ( | void | ) | const [inline] |
Definition at line 221 of file gcp/brackets.h.
gcp::Brackets::GetRefFontDesc | ( | void | ) | [inline] |
Definition at line 221 of file gcp/brackets.h.
gcp::Brackets::GetRefType | ( | void | ) | [inline] |
Definition at line 189 of file gcp/brackets.h.
gcp::Brackets::GetRefUsed | ( | void | ) | [inline] |
Definition at line 202 of file gcp/brackets.h.
gcp::Brackets::GetType | ( | void | ) | const [inline] |
Reimplemented from gcu::Object.
Definition at line 189 of file gcp/brackets.h.
gcp::Brackets::GetUsed | ( | void | ) | const [inline] |
Definition at line 202 of file gcp/brackets.h.
bool gcp::Brackets::Load | ( | xmlNodePtr | node | ) | [virtual] |
node,: | a pointer to the xmlNode containing the serialized brackets. |
Used to load a Brackets instance in memory.
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 | ) |
object | the 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] |
xml | the 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 | ) |
objects,: | the objects to enclose. |
Sets the collection of objects that should be enclosed inside the brackets.
gcp::Brackets::SetFontDesc | ( | std::string | val | ) | [inline] |
val | the 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] |
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.
gcp::Brackets::SetType | ( | gccv::BracketsTypes | val | ) | [inline] |
val | the new type for the brackets. |
Sets the new default bond length for the document.
Definition at line 189 of file gcp/brackets.h.
gcp::Brackets::SetUsed | ( | gccv::BracketsUses | val | ) | [inline] |
val | the brackets to use. |
Sets the brackets used for this instance, opening, closing, or both.
Definition at line 202 of file gcp/brackets.h.