NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CSelectionVisitor Class Reference

Search Toolkit Book for CSelectionVisitor

class CSelectionVisitor is a concrete glyph visitor for selection traversal and deselection traversal on a layout tree. More...

#include <gui/widgets/seq_graphic/selection_manager.hpp>

+ Inheritance diagram for CSelectionVisitor:
+ Collaboration diagram for CSelectionVisitor:

Public Types

enum  EActionMode { eAct_Select , eAct_Deselect , eAct_CollectSel }
 
enum  EPostUpdateAction { ePUA_None , ePUA_CallLayoutChanged }
 action that needs to be executed on selected glyphs after the visitor finishes visiting _all_ glyphs More...
 
typedef EActionMode TActionMode
 
typedef list< CWeakRef< CSeqGlyph > > TSelectedGlyphs
 

Public Member Functions

 CSelectionVisitor ()
 
virtual ~CSelectionVisitor ()
 
void SetScope (objects::CScope *scope)
 
objects::CScope * GetScope ()
 
void SetActionMode (TActionMode mode)
 CSelectionVisitor inline methods. More...
 
void SetSelectedObjectSig (const string &obj_sig)
 
void Clear ()
 
bool HasSelectedObjects () const
 
bool IsObjectSelected (const CObject *obj)
 
const CSeqGlyph::TConstObjectsGetSelectedLayoutObjects (CSeqGlyph *top_glyph)
 
void GetObjectSelection (TConstObjects &objs) const
 
void ResetObjectSelection (CSeqGlyph *glyph)
 
void DeSelectObject (const CObject *obj)
 
void SelectObject (const CObject *obj, bool verified)
 
void SelectSelection (const CSeqGlyph::TConstObjects &glyphs)
 
void UpdateSelection (CSeqGlyph *glyph)
 
const TSelectedGlyphsGetSelectedFeats () const
 
const TSelectedGlyphsGetSelectedCDSFeats () const
 
void ClearSelectedFeats ()
 
IGlyphVisitor interface implementation
virtual bool Visit (CSeqGlyph *glyph)
 
- Public Member Functions inherited from IGlyphVisitor
virtual ~IGlyphVisitor ()
 

Private Types

typedef set< CConstRef< CObject > > TSelectedObjects
 

Private Member Functions

bool x_DoSelection (CSeqGlyph *glyph)
 
bool x_NeedUpdate () const
 

Private Attributes

CObjectIndex m_SelectedIndexes
 
TSelectedObjects m_SelectedObjects
 
CObjectIndex m_UnknownSelectedIndexes
 
list< stringm_SelectedSignatures
 
CSeqGlyph::TConstObjects m_SelGlyphs
 
TSelectedGlyphs m_SelFeatures
 
TSelectedGlyphs m_SelCDSFeatures
 
TModelRect m_SelRect
 
CRef< objects::CScope > m_Scope
 
TActionMode m_ActionMode
 
size_t m_TraversedObjs
 
size_t m_TraversedSigs
 
size_t m_DeselectedObjs
 
EPostUpdateAction m_PostUpdateAction
 

Detailed Description

class CSelectionVisitor is a concrete glyph visitor for selection traversal and deselection traversal on a layout tree.

The selected objects can be objects broadcasted from other views, signatures from cgi, or user-selected objects in current view.

Definition at line 50 of file selection_manager.hpp.

Member Typedef Documentation

◆ TActionMode

Definition at line 67 of file selection_manager.hpp.

◆ TSelectedGlyphs

Definition at line 68 of file selection_manager.hpp.

◆ TSelectedObjects

Definition at line 121 of file selection_manager.hpp.

Member Enumeration Documentation

◆ EActionMode

Enumerator
eAct_Select 
eAct_Deselect 
eAct_CollectSel 

Definition at line 53 of file selection_manager.hpp.

◆ EPostUpdateAction

action that needs to be executed on selected glyphs after the visitor finishes visiting _all_ glyphs

Enumerator
ePUA_None 
ePUA_CallLayoutChanged 

call LayoutChanged for all glyphs that are CFeatGlyph

Definition at line 61 of file selection_manager.hpp.

Constructor & Destructor Documentation

◆ CSelectionVisitor()

CSelectionVisitor::CSelectionVisitor ( )
inline

Definition at line 70 of file selection_manager.hpp.

◆ ~CSelectionVisitor()

virtual CSelectionVisitor::~CSelectionVisitor ( )
inlinevirtual

Definition at line 78 of file selection_manager.hpp.

Member Function Documentation

◆ Clear()

void CSelectionVisitor::Clear ( void  )

◆ ClearSelectedFeats()

void CSelectionVisitor::ClearSelectedFeats ( )
inline

◆ DeSelectObject()

void CSelectionVisitor::DeSelectObject ( const CObject obj)

◆ GetObjectSelection()

void CSelectionVisitor::GetObjectSelection ( TConstObjects objs) const

◆ GetScope()

objects::CScope * CSelectionVisitor::GetScope ( void  )

Definition at line 47 of file selection_manager.cpp.

References CRef< C, Locker >::GetPointer(), and m_Scope.

Referenced by CAlnMultiPane::TTHH_ProcessURL().

◆ GetSelectedCDSFeats()

const CSelectionVisitor::TSelectedGlyphs & CSelectionVisitor::GetSelectedCDSFeats ( ) const
inline

Definition at line 166 of file selection_manager.hpp.

References m_SelCDSFeatures.

Referenced by CSeqGraphicRenderer::CSeqGraphicRenderer().

◆ GetSelectedFeats()

const CSelectionVisitor::TSelectedGlyphs & CSelectionVisitor::GetSelectedFeats ( ) const
inline

Definition at line 161 of file selection_manager.hpp.

References m_SelFeatures.

Referenced by CSeqGraphicRenderer::CSeqGraphicRenderer().

◆ GetSelectedLayoutObjects()

const CSeqGlyph::TConstObjects & CSelectionVisitor::GetSelectedLayoutObjects ( CSeqGlyph top_glyph)

◆ HasSelectedObjects()

bool CSelectionVisitor::HasSelectedObjects ( ) const
inline

◆ IsObjectSelected()

bool CSelectionVisitor::IsObjectSelected ( const CObject obj)

◆ ResetObjectSelection()

void CSelectionVisitor::ResetObjectSelection ( CSeqGlyph glyph)

◆ SelectObject()

void CSelectionVisitor::SelectObject ( const CObject obj,
bool  verified 
)

◆ SelectSelection()

void CSelectionVisitor::SelectSelection ( const CSeqGlyph::TConstObjects glyphs)

◆ SetActionMode()

void CSelectionVisitor::SetActionMode ( TActionMode  mode)
inline

CSelectionVisitor inline methods.

Definition at line 152 of file selection_manager.hpp.

References m_ActionMode.

Referenced by GetSelectedLayoutObjects(), ResetObjectSelection(), and UpdateSelection().

◆ SetScope()

void CSelectionVisitor::SetScope ( objects::CScope *  scope)

◆ SetSelectedObjectSig()

void CSelectionVisitor::SetSelectedObjectSig ( const string obj_sig)

◆ UpdateSelection()

void CSelectionVisitor::UpdateSelection ( CSeqGlyph glyph)

◆ Visit()

bool CSelectionVisitor::Visit ( CSeqGlyph glyph)
virtual
Returns
true if continue to next visiting.

Implements IGlyphVisitor.

Definition at line 52 of file selection_manager.cpp.

References _ASSERT, eAct_CollectSel, eAct_Deselect, eAct_Select, CSeqGlyph::IsSelected(), m_ActionMode, m_SelGlyphs, CSeqGlyph::SetSelected(), and x_DoSelection().

◆ x_DoSelection()

bool CSelectionVisitor::x_DoSelection ( CSeqGlyph glyph)
private

◆ x_NeedUpdate()

bool CSelectionVisitor::x_NeedUpdate ( ) const
inlineprivate

Member Data Documentation

◆ m_ActionMode

TActionMode CSelectionVisitor::m_ActionMode
private

Definition at line 138 of file selection_manager.hpp.

Referenced by SetActionMode(), and Visit().

◆ m_DeselectedObjs

size_t CSelectionVisitor::m_DeselectedObjs
private

Definition at line 142 of file selection_manager.hpp.

Referenced by DeSelectObject(), x_DoSelection(), and x_NeedUpdate().

◆ m_PostUpdateAction

EPostUpdateAction CSelectionVisitor::m_PostUpdateAction
private

Definition at line 144 of file selection_manager.hpp.

Referenced by Clear(), ClearSelectedFeats(), UpdateSelection(), and x_DoSelection().

◆ m_Scope

CRef<objects::CScope> CSelectionVisitor::m_Scope
private

◆ m_SelCDSFeatures

TSelectedGlyphs CSelectionVisitor::m_SelCDSFeatures
private

◆ m_SelectedIndexes

CObjectIndex CSelectionVisitor::m_SelectedIndexes
private

◆ m_SelectedObjects

TSelectedObjects CSelectionVisitor::m_SelectedObjects
private

◆ m_SelectedSignatures

list<string> CSelectionVisitor::m_SelectedSignatures
private

Definition at line 129 of file selection_manager.hpp.

Referenced by SetSelectedObjectSig(), x_DoSelection(), and x_NeedUpdate().

◆ m_SelFeatures

TSelectedGlyphs CSelectionVisitor::m_SelFeatures
private

◆ m_SelGlyphs

CSeqGlyph::TConstObjects CSelectionVisitor::m_SelGlyphs
private

Definition at line 130 of file selection_manager.hpp.

Referenced by GetSelectedLayoutObjects(), and Visit().

◆ m_SelRect

TModelRect CSelectionVisitor::m_SelRect
private

Definition at line 135 of file selection_manager.hpp.

◆ m_TraversedObjs

size_t CSelectionVisitor::m_TraversedObjs
private

Definition at line 140 of file selection_manager.hpp.

Referenced by UpdateSelection(), and x_DoSelection().

◆ m_TraversedSigs

size_t CSelectionVisitor::m_TraversedSigs
private

Definition at line 141 of file selection_manager.hpp.

Referenced by UpdateSelection(), and x_DoSelection().

◆ m_UnknownSelectedIndexes

CObjectIndex CSelectionVisitor::m_UnknownSelectedIndexes
private

The documentation for this class was generated from the following files:
Modified on Sun Jun 23 05:18:18 2024 by modify_doxy.py rev. 669887