NCBI C++ ToolKit
|
Search Toolkit Book for StyleManager
#include "style_manager.hpp"
(Private to src/app/cn3d
.)
Classes | |
class | UserAnnotation |
Public Types | |
enum | eDisplayStyle { eSolidAtom , eTransparentAtom , eLineBond , eCylinderBond , eLineWormBond , eThickWormBond , eObjectWithArrow , eObjectWithoutArrow , eNotDisplayed } |
typedef std::map< const MoleculeIdentifier *, std::vector< bool > > | ResidueMap |
typedef std::list< ncbi::CRef< UserAnnotation > > | UserAnnotationList |
Private Types | |
typedef std::map< int, StyleSettings > | StyleMap |
Private Member Functions | |
bool | GetObjectStyle (const StructureObject *object, const Object3D &object3D, const StyleSettings::GeneralStyle &generalStyle, ObjectStyle *objectStyle) const |
Private Attributes | |
const StructureSet * | structureSet |
StyleSettings | globalStyle |
StyleMap | userStyles |
UserAnnotationList | userAnnotations |
Definition at line 247 of file style_manager.hpp.
typedef std::map< const MoleculeIdentifier * , std::vector < bool > > StyleManager::ResidueMap |
Definition at line 334 of file style_manager.hpp.
|
private |
Definition at line 367 of file style_manager.hpp.
typedef std::list< ncbi::CRef < UserAnnotation > > StyleManager::UserAnnotationList |
Definition at line 342 of file style_manager.hpp.
Enumerator | |
---|---|
eSolidAtom | |
eTransparentAtom | |
eLineBond | |
eCylinderBond | |
eLineWormBond | |
eThickWormBond | |
eObjectWithArrow | |
eObjectWithoutArrow | |
eNotDisplayed |
Definition at line 253 of file style_manager.hpp.
StyleManager::StyleManager | ( | const StructureSet * | set | ) |
Definition at line 488 of file style_manager.cpp.
StyleManager::UserAnnotation * StyleManager::AddUserAnnotation | ( | void | ) |
Definition at line 1423 of file style_manager.cpp.
References StructureSet::eStyleData, StructureSet::SetDataChanged(), structureSet, and userAnnotations.
Referenced by LoadFromASNUserAnnotations(), and AnnotateDialog::NewAnnotation().
bool StyleManager::AddUserStyle | ( | int * | id, |
StyleSettings ** | newStyle | ||
) |
Definition at line 1399 of file style_manager.cpp.
References StructureSet::eStyleData, i, max(), StructureSet::SetDataChanged(), structureSet, and userStyles.
Referenced by AnnotateDialog::NewAnnotation().
bool StyleManager::CheckGlobalStyleSettings | ( | void | ) |
Definition at line 492 of file style_manager.cpp.
References CheckStyleSettings(), and globalStyle.
Referenced by StructureSet::Draw(), StructureSet::Load(), StructureWindow::OnSetStyle(), and SetGlobalStyle().
bool StyleManager::CheckStyleSettings | ( | StyleSettings * | settings | ) |
Definition at line 498 of file style_manager.cpp.
References StyleSettings::eComplete, StyleSettings::ePartial, StyleSettings::eTrace, StyleSettings::eTubeWorm, StyleSettings::eWireWorm, StructureSet::isAlphaOnly, StyleSettings::nucleotideBackbone, StyleSettings::proteinBackbone, structureSet, StyleSettings::BackboneStyle::style, and StyleSettings::BackboneStyle::type.
Referenced by CheckGlobalStyleSettings(), and StyleDialog::OnChange().
CCn3d_style_dictionary * StyleManager::CreateASNStyleDictionary | ( | void | ) | const |
Definition at line 1346 of file style_manager.cpp.
References globalStyle, i, NULL, StyleSettings::SaveSettingsToASN(), and userStyles.
Referenced by StructureSet::SaveASNData().
bool StyleManager::DisplayUserAnnotation | ( | UserAnnotation * | annotation, |
bool | display | ||
) |
Definition at line 1462 of file style_manager.cpp.
References a, StructureSet::eStyleData, GlobalMessenger(), StyleManager::UserAnnotation::isDisplayed, Messenger::PostRedrawAllSequenceViewers(), Messenger::PostRedrawAllStructures(), StructureSet::SetDataChanged(), structureSet, and userAnnotations.
Referenced by AnnotateDialog::NewAnnotation().
bool StyleManager::EditGlobalStyle | ( | wxWindow * | parent | ) |
Definition at line 1340 of file style_manager.cpp.
References globalStyle, and structureSet.
Referenced by StructureWindow::OnSetStyle().
bool StyleManager::EditUserAnnotations | ( | wxWindow * | parent | ) |
Definition at line 1392 of file style_manager.cpp.
References structureSet.
Referenced by StructureWindow::OnSetStyle().
bool StyleManager::GetAtomStyle | ( | const Residue * | residue, |
const AtomPntr & | atom, | ||
const AtomCoord * | coord, | ||
AtomStyle * | atomStyle, | ||
const StyleSettings::BackboneStyle ** | saveBackboneStyle = NULL , |
||
const StyleSettings::GeneralStyle ** | saveGeneralStyle = NULL |
||
) | const |
Definition at line 580 of file style_manager.cpp.
References AtomPntr::aID, StructureSet::alignmentManager, AtomStyle::alpha, ATOM_NOT_DISPLAYED, AtomCoord::averageTemperature, StyleSettings::ballRadius, AtomStyle::centerLabel, Residue::code, Element::color, AtomStyle::color, color, StyleSettings::BackboneStyle::colorScheme, StyleSettings::GeneralStyle::colorScheme, StyleSettings::eAligned, Residue::eAlphaBackboneAtom, StyleSettings::eBallAndStick, StyleSettings::eBlockFit, StyleSettings::eBlockRowFit, StyleSettings::eBlockZFit, StyleSettings::eCharge, Colors::eCoil, StyleSettings::eComplete, Residue::eCompleteBackboneAtom, Colors::eCycle1, StyleSettings::eDomain, StyleSettings::eElement, StyleSettings::eFit, Colors::eHelix, StyleSettings::eHydrophobicity, Colors::eHydrophobicityMap, StyleSettings::eIdentity, StyleSettings::eInformationContent, BlockMultipleAlignment::eLeft, StyleSettings::eMolecule, Colors::eNegative, Colors::eNeutral, Colors::eNoDomain, Colors::eNoHydrophobicity, Colors::eNoTemperature, Colors::eNuc_A, Colors::eNuc_C, Colors::eNuc_G, Colors::eNuc_T_U, Colors::eNuc_X, StyleSettings::eObject, StyleSettings::eOff, StyleSettings::ePartial, Residue::ePartialBackboneAtom, Colors::ePositive, StyleSettings::eRainbow, Colors::eRainbowMap, StyleSettings::eResidue, ERRORMSG, StyleSettings::eSecondaryStructure, Residue::eSideChainAtom, eSolidAtom, StyleSettings::eSpaceFill, Colors::eStrand, StyleSettings::eTemperature, Colors::eTemperatureMap, StyleSettings::eTrace, eTransparentAtom, StyleSettings::eTubes, StyleSettings::eTubeWorm, Colors::eUnaligned, Residue::eUnknownAtom, StyleSettings::eUserSelect, StyleSettings::eVariety, StyleSettings::eWeightedVariety, StyleSettings::eWire, StyleSettings::eWireWorm, Colors::Get(), BlockMultipleAlignment::GetAlignmentIndex(), Residue::GetAtomInfo(), GetCharge(), AlignmentManager::GetCurrentMultipleAlignment(), PeriodicTableClass::GetElement(), GetHydrophobicity(), StructureBase::GetParentOfType(), BlockMultipleAlignment::GetRelativeAlignmentFraction(), BlockMultipleAlignment::GetRowForSequence(), GetStyleForResidue(), GlobalColors(), GlobalMessenger(), StyleSettings::heterogens, StyleSettings::hydrogensOn, Molecule::id, Residue::id, StructureObject::id, info, StyleSettings::ionLabelsOn, IsAligned(), AlignmentManager::IsAligned(), Residue::IsAminoAcid(), ShowHideManager::IsHidden(), Messenger::IsHighlighted(), AtomStyle::isHighlighted, IsMetal(), Residue::IsNucleotide(), StyleSettings::GeneralStyle::isOn, Molecule::IsResidueInHelix(), Molecule::IsResidueInStrand(), Molecule::IsSolvent(), AtomPntr::mID, StructureObject::minTemperature, AtomStyle::name, Residue::NAtomsInGraph(), Molecule::NO_DOMAIN_SET, AtomCoord::NO_TEMPERATURE, Molecule::NResidues(), StyleSettings::nucleotideBackbone, StyleSettings::nucleotideSidechains, NULL, AtomCoord::occupancy, StructureBase::parentSet, PeriodicTable, StyleSettings::proteinBackbone, StyleSettings::proteinSidechains, AtomStyle::radius, Molecule::residueDomains, AtomPntr::rID, Molecule::sequence, StructureSet::showHideManager, StyleSettings::solvents, StyleSettings::spaceFillProportion, StyleSettings::BackboneStyle::style, StyleSettings::GeneralStyle::style, AtomStyle::style, Element::symbol, toupper(), StyleSettings::tubeRadius, StyleSettings::BackboneStyle::type, UNKNOWN_HYDROPHOBICITY, StyleSettings::BackboneStyle::userColor, StyleSettings::GeneralStyle::userColor, and Element::vdWRadius.
Referenced by Residue::Draw(), GetBondStyle(), and Molecule::GetResidueColor().
Definition at line 265 of file style_manager.hpp.
References StyleSettings::backgroundColor, and globalStyle.
Referenced by OpenGLRenderer::Display().
bool StyleManager::GetBondStyle | ( | const Bond * | bond, |
const AtomPntr & | atom1, | ||
const AtomCoord * | coord1, | ||
const AtomPntr & | atom2, | ||
const AtomCoord * | coord2, | ||
double | bondLength, | ||
BondStyle * | bondStyle | ||
) | const |
Definition at line 923 of file style_manager.cpp.
References Bond::atom1, Bond::atom2, BondStyle::EndStyle::atomCap, BOND_NOT_DISPLAYED, Residue::AtomInfo::classification, Residue::AtomInfo::code, AtomStyle::color, BondStyle::EndStyle::color, StyleSettings::connections, Residue::eAlphaBackboneAtom, Residue::eCompleteBackboneAtom, eCylinderBond, Colors::eHighlight, eLineBond, eLineWormBond, BondStyle::end1, BondStyle::end2, eNotDisplayed, Residue::ePartialBackboneAtom, Bond::eRealDisulfide, ERRORMSG, Residue::eSideChainAtom, eThickWormBond, StyleSettings::eTrace, StyleSettings::eTubes, Bond::eVirtual, Bond::eVirtualDisulfide, StyleSettings::eWire, Colors::Get(), AtomSet::GetAtom(), ChemicalGraph::GetAtomInfo(), GetAtomStyle(), StructureBase::GetParentOfType(), GetStyleForResidue(), Residue::AtomInfo::glName, GlobalColors(), GlobalMessenger(), globalStyle, StructureObject::graph, Molecule::id, Residue::id, Residue::IsAminoAcid(), Messenger::IsHighlighted(), AtomStyle::isHighlighted, StyleSettings::GeneralStyle::isOn, AtomPntr::mID, BondStyle::midCap, BondStyle::EndStyle::name, Residue::nameGraph, Bond::nextVirtual, NULL, Bond::order, ShowHideManager::OverlayConfEnsembles(), StructureBase::parentSet, Bond::previousVirtual, AtomStyle::radius, BondStyle::EndStyle::radius, Residue::AtomInfo::residue, AtomPntr::rID, SetBondStyleFromResidueStyle(), StructureSet::showHideManager, StyleSettings::BackboneStyle::style, StyleSettings::GeneralStyle::style, AtomStyle::style, BondStyle::EndStyle::style, BondStyle::tension, StyleSettings::tubeRadius, StyleSettings::BackboneStyle::type, StyleSettings::GeneralStyle::userColor, StyleSettings::virtualDisulfideColor, and StyleSettings::virtualDisulfidesOn.
Referenced by Bond::Draw().
|
inline |
Definition at line 303 of file style_manager.hpp.
References globalStyle.
Referenced by Molecule::DrawAllWithTerminiLabels(), BlockMultipleAlignment::GetCharacterTraitsAt(), AnnotateDialog::NewAnnotation(), and StructureWindow::OnEditFavorite().
bool StyleManager::GetHelixStyle | ( | const StructureObject * | object, |
const Helix3D & | helix, | ||
HelixStyle * | helixStyle | ||
) | const |
Definition at line 1213 of file style_manager.cpp.
References ObjectStyle::arrowBaseWidthProportion, ObjectStyle::arrowLength, HelixStyle::arrowTipWidthProportion, ObjectStyle::color, StyleSettings::GeneralStyle::colorScheme, Colors::eHelix, eNotDisplayed, StyleSettings::eSecondaryStructure, StyleSettings::eWithArrows, Object3D::fromResidueID, Colors::Get(), GetObjectStyle(), GetStyleForResidue(), GlobalColors(), StyleSettings::helixObjects, StyleSettings::helixRadius, StyleSettings::GeneralStyle::isOn, Object3D::moleculeID, HelixStyle::radius, StyleSettings::GeneralStyle::style, and ObjectStyle::style.
Referenced by Helix3D::Draw().
Definition at line 1332 of file style_manager.cpp.
References Colors::eCycle1, Colors::Get(), StructureBase::GetParentOfType(), GlobalColors(), and StructureObject::id.
Referenced by SequenceDisplay::GetRowTitle().
|
private |
Definition at line 1155 of file style_manager.cpp.
References ObjectStyle::color, StyleSettings::GeneralStyle::colorScheme, Colors::eCycle1, StyleSettings::eDomain, StyleSettings::eMolecule, Colors::eNoDomain, eNotDisplayed, StyleSettings::eObject, eObjectWithArrow, eObjectWithoutArrow, ERRORMSG, StyleSettings::eSecondaryStructure, StyleSettings::eUserSelect, StyleSettings::eWithArrows, StyleSettings::eWithoutArrows, Object3D::fromResidueID, Colors::Get(), GlobalColors(), StructureObject::id, ShowHideManager::IsVisible(), Object3D::moleculeID, Molecule::NO_DOMAIN_SET, StructureBase::parentSet, r(), Molecule::residueDomains, Molecule::residues, StructureSet::showHideManager, StyleSettings::GeneralStyle::style, ObjectStyle::style, Object3D::toResidueID, StyleSettings::GeneralStyle::userColor, and WARNINGMSG.
Referenced by GetHelixStyle(), and GetStrandStyle().
bool StyleManager::GetStrandStyle | ( | const StructureObject * | object, |
const Strand3D & | strand, | ||
StrandStyle * | strandStyle | ||
) | const |
Definition at line 1241 of file style_manager.cpp.
References ObjectStyle::arrowBaseWidthProportion, ObjectStyle::arrowLength, ObjectStyle::color, StyleSettings::GeneralStyle::colorScheme, eNotDisplayed, StyleSettings::eSecondaryStructure, Colors::eStrand, StyleSettings::eWithArrows, Object3D::fromResidueID, Colors::Get(), GetObjectStyle(), GetStyleForResidue(), GlobalColors(), StyleSettings::GeneralStyle::isOn, Object3D::moleculeID, StyleSettings::strandObjects, StyleSettings::strandThickness, StyleSettings::strandWidth, StyleSettings::GeneralStyle::style, ObjectStyle::style, StrandStyle::thickness, and StrandStyle::width.
Referenced by Strand3D::Draw().
const StyleSettings & StyleManager::GetStyleForResidue | ( | const StructureObject * | object, |
int | moleculeID, | ||
int | residueID | ||
) | const |
Definition at line 1269 of file style_manager.cpp.
References ERRORMSG, globalStyle, Molecule::identifier, userAnnotations, and userStyles.
Referenced by Residue::Draw(), GetAtomStyle(), GetBondStyle(), GetHelixStyle(), and GetStrandStyle().
|
inline |
Definition at line 359 of file style_manager.hpp.
References userAnnotations.
Referenced by AnnotateDialog::ResetListBoxes().
|
inline |
Definition at line 360 of file style_manager.hpp.
References userAnnotations.
|
inline |
Definition at line 312 of file style_manager.hpp.
References NULL, and userStyles.
|
inline |
Definition at line 307 of file style_manager.hpp.
References NULL, and userStyles.
Referenced by AnnotateDialog::EditAnnotation().
bool StyleManager::LoadFromASNStyleDictionary | ( | const ncbi::objects::CCn3d_style_dictionary & | styleDictionary | ) |
Definition at line 1373 of file style_manager.cpp.
References ERRORMSG, CCn3d_style_dictionary_Base::GetGlobal_style(), CCn3d_style_dictionary_Base::GetStyle_table(), globalStyle, CCn3d_style_dictionary_Base::IsSetStyle_table(), StyleSettings::LoadSettingsFromASN(), t, and userStyles.
Referenced by StructureSet::Load().
bool StyleManager::LoadFromASNUserAnnotations | ( | const ncbi::objects::CCn3d_user_annotations & | annotations | ) |
Definition at line 1671 of file style_manager.cpp.
References a, AddUserAnnotation(), StyleManager::UserAnnotation::description, ExtractObjectLocation(), StyleManager::UserAnnotation::isDisplayed, StyleManager::UserAnnotation::name, StyleManager::UserAnnotation::residues, and StyleManager::UserAnnotation::styleID.
Referenced by StructureSet::Load().
bool StyleManager::MoleculeHasUserStyle | ( | const StructureObject * | object, |
int | moleculeID | ||
) | const |
Definition at line 1298 of file style_manager.cpp.
References Molecule::identifier, and userAnnotations.
bool StyleManager::MoveUserAnnotation | ( | UserAnnotation * | annotation, |
bool | moveUp | ||
) |
Definition at line 1486 of file style_manager.cpp.
References StructureSet::eStyleData, GlobalMessenger(), StyleManager::UserAnnotation::isDisplayed, Messenger::PostRedrawAllSequenceViewers(), Messenger::PostRedrawAllStructures(), StructureSet::SetDataChanged(), structureSet, swap(), tmp, and userAnnotations.
bool StyleManager::RemoveUserAnnotation | ( | UserAnnotation * | annotation | ) |
Definition at line 1433 of file style_manager.cpp.
References StructureSet::eStyleData, GlobalMessenger(), StyleManager::UserAnnotation::isDisplayed, Messenger::PostRedrawAllSequenceViewers(), Messenger::PostRedrawAllStructures(), RemoveUserStyle(), StructureSet::SetDataChanged(), structureSet, and userAnnotations.
Referenced by AnnotateDialog::DeleteAnnotation(), and AnnotateDialog::NewAnnotation().
Definition at line 1414 of file style_manager.cpp.
References StructureSet::eStyleData, StructureSet::SetDataChanged(), structureSet, and userStyles.
Referenced by RemoveUserAnnotation().
bool StyleManager::ResidueHasUserStyle | ( | const StructureObject * | object, |
int | moleculeID, | ||
int | residueID | ||
) | const |
Definition at line 1315 of file style_manager.cpp.
References Molecule::identifier, and userAnnotations.
bool StyleManager::SaveToASNUserAnnotations | ( | ncbi::objects::CCn3d_user_annotations * | annotations | ) | const |
Definition at line 1589 of file style_manager.cpp.
References a, CreateObjectLocation(), ERRORMSG, and userAnnotations.
Referenced by StructureSet::SaveASNData().
void StyleManager::SetGlobalColorScheme | ( | StyleSettings::ePredefinedColorScheme | scheme | ) |
Definition at line 1694 of file style_manager.cpp.
References globalStyle, and StyleSettings::SetColorScheme().
void StyleManager::SetGlobalRenderingStyle | ( | StyleSettings::ePredefinedRenderingStyle | style | ) |
Definition at line 1700 of file style_manager.cpp.
References globalStyle, and StyleSettings::SetRenderingStyle().
Definition at line 1706 of file style_manager.cpp.
References CheckGlobalStyleSettings(), GlobalMessenger(), globalStyle, StyleSettings::LoadSettingsFromASN(), Messenger::PostRedrawAllSequenceViewers(), and Messenger::PostRedrawAllStructures().
Referenced by StructureWindow::OnSelectFavorite().
|
private |
Definition at line 364 of file style_manager.hpp.
Referenced by CheckGlobalStyleSettings(), CreateASNStyleDictionary(), EditGlobalStyle(), GetBackgroundColor(), GetBondStyle(), GetGlobalStyle(), GetStyleForResidue(), LoadFromASNStyleDictionary(), SetGlobalColorScheme(), SetGlobalRenderingStyle(), and SetGlobalStyle().
|
private |
Definition at line 363 of file style_manager.hpp.
Referenced by AddUserAnnotation(), AddUserStyle(), CheckStyleSettings(), DisplayUserAnnotation(), EditGlobalStyle(), EditUserAnnotations(), MoveUserAnnotation(), RemoveUserAnnotation(), and RemoveUserStyle().
|
private |
Definition at line 373 of file style_manager.hpp.
Referenced by AddUserAnnotation(), DisplayUserAnnotation(), GetStyleForResidue(), GetUserAnnotations(), MoleculeHasUserStyle(), MoveUserAnnotation(), RemoveUserAnnotation(), ResidueHasUserStyle(), and SaveToASNUserAnnotations().
|
private |
Definition at line 368 of file style_manager.hpp.
Referenced by AddUserStyle(), CreateASNStyleDictionary(), GetStyleForResidue(), GetUserStyle(), LoadFromASNStyleDictionary(), and RemoveUserStyle().