CViewGraphic Class Reference
[GUI_PKG_SEQUENCE]

Search Toolkit Book for CViewGraphic

#include <view_graphic.hpp>

Inheritance diagram for CViewGraphic:

Inheritance graph
[legend]
Collaboration diagram for CViewGraphic:

Collaboration graph
[legend]
List of all members.

Detailed Description

CViewGraphic.

Definition at line 60 of file view_graphic.hpp.

Public Member Functions

 CViewGraphic ()
virtual void SetWorkbench (IWorkbench *workbench)
 IView implementation.
virtual CRef< objects::CSeq_loc > GetSearchLoc ()
virtual CRef< objects::CScope > GetSearchScope ()
IWMClient interface implementation
virtual wxWindow * GetWindow ()
 returns a pointer to the wxWindow representing the client
virtual const wxMenu * GetMenu ()
 returns menu that can be merged with main menu of an application
IView interface implementation
virtual const CViewTypeDescriptorGetTypeDescriptor () const
 return an object providing meta information about thei view type
virtual void CreateViewWindow (wxWindow *parent)
 create Window corresponding to the view
virtual void DestroyViewWindow ()
 destroy Window corresponding to the view
IProjectView implementation
virtual bool InitView (TConstScopedObjects &objects)
 initialize view with data, inside this function the view must call CProjectService::AttachView to connect to a project
virtual void OnProjectChanged ()
ISelectionClient Implementation
void GetSelection (CSelectionEvent &evt) const
 get selection for broadcasting
void GetSelection (TConstScopedObjects &objs) const
IVisibleRangeClient interface implementation
virtual void OnVisibleRangeChanged (const CVisibleRange &vrange, IVisibleRangeClient *source)
IDataMiningContext Implementation
virtual string GetDMContextName ()
 returns Name of the context to be used in UI
CProjectView overridables
virtual void GetVisibleRanges (CVisibleRangeEvent &evt) const
 populate a visible range event for broadcasting
CProjectViewBase overridables
virtual void OnViewReleased (IView &)
virtual void OnViewCreated (IView &)

Protected Member Functions

virtual void x_OnSetSelection (CSelectionEvent &evt)
 override in derived classes in order to handle selection broadcast
virtual const CObjectx_GetOrigObject () const
void x_UpdateVisRangeLayout (const IViewManagerService::TViews &views)
virtual bool x_MergeObjects (TConstScopedObjects &objects)

Private Attributes

CConstRef< objects::CSeq_id > m_SeqId
CSeqGraphicWidgetm_SeqWidget

Friends

class CViewGraphicFactory


Constructor & Destructor Documentation

CViewGraphic::CViewGraphic  ) 
 

Definition at line 78 of file view_graphic.cpp.


Member Function Documentation

void CViewGraphic::CreateViewWindow wxWindow *  parent  )  [virtual]
 

create Window corresponding to the view

Implements CProjectViewBase.

Definition at line 90 of file view_graphic.cpp.

References _ASSERT, CEventHandler::AddListener(), CGlWidgetBase::Create(), CEventHandler::ePool_Child, CEventHandler::ePool_Parent, and m_SeqWidget.

void CViewGraphic::DestroyViewWindow  )  [virtual]
 

destroy Window corresponding to the view

Implements CProjectViewBase.

Definition at line 102 of file view_graphic.cpp.

References m_SeqWidget.

string CViewGraphic::GetDMContextName  )  [virtual]
 

returns Name of the context to be used in UI

Implements IDataMiningContext.

Definition at line 221 of file view_graphic.cpp.

References CProjectViewBase::GetClientLabel().

const wxMenu * CViewGraphic::GetMenu  )  [virtual]
 

returns menu that can be merged with main menu of an application

Reimplemented from CProjectViewBase.

Definition at line 84 of file view_graphic.cpp.

CRef< CSeq_loc > CViewGraphic::GetSearchLoc  )  [virtual]
 

Implements ISeqLocSearchContext.

Definition at line 443 of file view_graphic.cpp.

References CSeqUtils::CreateSeq_loc(), CSeqGraphicWidget::GetRangeSelection(), m_SeqId, m_SeqWidget, and CRangeCollection< Position >::size().

CRef< CScope > CViewGraphic::GetSearchScope  )  [virtual]
 

Implements ISeqLocSearchContext.

Definition at line 464 of file view_graphic.cpp.

References CProjectViewBase::m_Scope.

void CViewGraphic::GetSelection TConstScopedObjects objs  )  const [virtual]
 

object selection

range selection

Reimplemented from CProjectView.

Definition at line 233 of file view_graphic.cpp.

References CSeqUtils::CreateSeq_loc(), CSeqGraphicWidget::GetObjectSelection(), CSeqGraphicWidget::GetRangeSelection(), ITERATE, m_SeqId, m_SeqWidget, CRangeCollection< Position >::size(), CProjectViewBase::x_GetScope(), and CProjectViewBase::x_HasProject().

void CViewGraphic::GetSelection CSelectionEvent evt  )  const [virtual]
 

get selection for broadcasting

Reimplemented from CProjectView.

Definition at line 257 of file view_graphic.cpp.

References CSelectionEvent::AddObjectSelection(), CSelectionEvent::AddRangeSelection(), CSeqGraphicWidget::GetObjectSelection(), CSeqGraphicWidget::GetRangeSelection(), m_SeqId, m_SeqWidget, and CProjectViewBase::x_HasProject().

const CViewTypeDescriptor & CViewGraphic::GetTypeDescriptor  )  const [virtual]
 

return an object providing meta information about thei view type

Implements CProjectViewBase.

Definition at line 227 of file view_graphic.cpp.

References s_ViewGraphicTypeDescr.

void CViewGraphic::GetVisibleRanges CVisibleRangeEvent evt  )  const [virtual]
 

populate a visible range event for broadcasting

Reimplemented from CProjectView.

Definition at line 375 of file view_graphic.cpp.

References CVisibleRangeEvent::AddLocation(), COpenRange< Position >::GetFrom(), COpenRange< Position >::GetTo(), CSeqGraphicWidget::GetVisibleSeqRange(), and m_SeqWidget.

wxWindow * CViewGraphic::GetWindow  )  [virtual]
 

returns a pointer to the wxWindow representing the client

Implements CProjectViewBase.

Definition at line 214 of file view_graphic.cpp.

References _ASSERT, and m_SeqWidget.

bool CViewGraphic::InitView TConstScopedObjects objects  )  [virtual]
 

initialize view with data, inside this function the view must call CProjectService::AttachView to connect to a project

Reimplemented from CProjectView.

Definition at line 114 of file view_graphic.cpp.

References _ASSERT, _T, CLabel::eContent, CScope::GetBioseqHandle(), GetId(), CLabel::GetLabel(), IServiceLocator::GetServiceByType(), CSeq_loc::GetTotalRange(), CSeq_loc_Base::IsWhole(), LOG_POST, m_SeqId, m_SeqWidget, CProjectViewBase::m_Workbench, CConstRef< C, Locker >::Reset(), CSeqGraphicWidget::SetInputObject(), ToWxString(), CSeqGraphicWidget::UpdateConfig(), CProjectViewBase::x_AttachToProject(), x_MergeObjects(), CProjectViewBase::x_ReportInvalidInputData(), CProjectViewBase::x_UpdateContentLabel(), and CSeqGraphicWidget::ZoomOnRange().

void CViewGraphic::OnProjectChanged  )  [virtual]
 

Reimplemented from CProjectViewBase.

Definition at line 207 of file view_graphic.cpp.

References m_SeqWidget, and CSeqGraphicWidget::OnDataChanged().

void CViewGraphic::OnViewCreated IView  )  [virtual]
 

Reimplemented from CProjectViewBase.

Definition at line 405 of file view_graphic.cpp.

References IWorkbench::GetViewManagerService(), IViewManagerService::GetViews(), CProjectViewBase::m_Workbench, and x_UpdateVisRangeLayout().

void CViewGraphic::OnViewReleased IView  )  [virtual]
 

Reimplemented from CProjectViewBase.

Definition at line 387 of file view_graphic.cpp.

References CProjectViewBase::GetId(), IWorkbench::GetViewManagerService(), IViewManagerService::GetViews(), CProjectViewBase::m_Workbench, and NON_CONST_ITERATE.

void CViewGraphic::OnVisibleRangeChanged const CVisibleRange vrange,
IVisibleRangeClient source
[virtual]
 

Implements IVisibleRangeClient.

Definition at line 329 of file view_graphic.cpp.

References CVisibleRange::Clamp(), IWorkbench::GetViewManagerService(), IViewManagerService::GetViews(), CSeqGraphicWidget::GetVisibleSeqRange(), m_SeqWidget, CProjectViewBase::m_Workbench, CVisibleRange::Match(), CProjectViewBase::x_GetScope(), x_UpdateVisRangeLayout(), and CSeqGraphicWidget::ZoomOnRange().

void CViewGraphic::SetWorkbench IWorkbench workbench  )  [virtual]
 

IView implementation.

Reimplemented from CProjectView.

Definition at line 412 of file view_graphic.cpp.

References IServiceLocator::GetServiceByType(), CProjectViewBase::m_Workbench, and CProjectView::SetWorkbench().

bool CViewGraphic::x_MergeObjects TConstScopedObjects objects  )  [protected, virtual]
 

Should be better incapsulation of m_OutputObjects

Definition at line 526 of file view_graphic.cpp.

Referenced by InitView().

void CViewGraphic::x_UpdateVisRangeLayout const IViewManagerService::TViews views  )  [protected]
 

ignore the error

Definition at line 349 of file view_graphic.cpp.

References color, CProjectViewBase::GetId(), CProjectView::GetReflectionInfo(), and ITERATE.

Referenced by OnViewCreated(), and OnVisibleRangeChanged().


Friends And Related Function Documentation

friend class CViewGraphicFactory [friend]
 

Definition at line 64 of file view_graphic.hpp.


Member Data Documentation

CConstRef<objects::CSeq_id> CViewGraphic::m_SeqId [private]
 

Definition at line 135 of file view_graphic.hpp.

Referenced by GetSearchLoc(), GetSelection(), InitView(), and x_OnSetSelection().

CSeqGraphicWidget* CViewGraphic::m_SeqWidget [private]
 

Definition at line 136 of file view_graphic.hpp.

Referenced by CreateViewWindow(), DestroyViewWindow(), GetSearchLoc(), GetSelection(), GetVisibleRanges(), GetWindow(), InitView(), OnProjectChanged(), OnVisibleRangeChanged(), and x_OnSetSelection().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 15:18:00 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:24:20 2009 by modify_doxy.py rev. 173732