CGraphContainer Class Reference

Search Toolkit Book for CGraphContainer

#include <graph_container.hpp>

Inheritance diagram for CGraphContainer:

Inheritance graph
[legend]
Collaboration diagram for CGraphContainer:

Collaboration graph
[legend]
List of all members.

Detailed Description

CGraphContainer CGraphContainer a composite IRenderable that manages several child IRenderable graphs.

All graphs are rendered using transformation defined by CGraphContainer model space and viewport.

Definition at line 62 of file graph_container.hpp.

Public Types

typedef IRenderable TGraph
typedef CIRef< IRenderableTGraphRef
enum  ELayoutPolicy { eHorzStack, eVertStack, eWhole }

Public Member Functions

 CGraphContainer (ELayoutPolicy policy)
 CGraphContainer.
virtual ~CGraphContainer ()
virtual bool AddGraph (TGraph *graph, bool front=false)
virtual bool RemoveGraph (TGraph *graph)
 assumes ownership
virtual void RemoveAllGraphs ()
virtual int GetGraphsCount () const
virtual TGraphGetGraph (int index)
virtual const TGraphGetGraph (int index) const
virtual void Clear ()
virtual void Layout ()
void SetHost (IGraphContainerHost *host)
void OnMouseEvents (wxMouseEvent &event)
IRenderable implementation
virtual void Render (CGlPane &pane)
virtual void SetVPRect (const TVPRect &rect)
virtual void SetModelRect (const TModelRect &rc)
virtual TVPPoint PreferredSize ()
virtual bool NeedTooltip (CGlPane &pane, int vp_x, int vp_y)
virtual string GetTooltip ()
IGlEventHandler implementation
virtual wxEvtHandler * GetEvtHandler ()
virtual void SetPane (CGlPane *pane)

Protected Types

typedef vector< TGraphRefTGraphs

Protected Attributes

IGraphContainerHostm_Host
ELayoutPolicy m_LayoutPolicy
TGraphs m_Graphs
TGraphm_TooltipGraph
CGlPanem_Pane


Member Typedef Documentation

typedef IRenderable CGraphContainer::TGraph
 

Definition at line 72 of file graph_container.hpp.

typedef CIRef<IRenderable> CGraphContainer::TGraphRef
 

Definition at line 73 of file graph_container.hpp.

typedef vector<TGraphRef> CGraphContainer::TGraphs [protected]
 

Definition at line 120 of file graph_container.hpp.


Member Enumeration Documentation

enum CGraphContainer::ELayoutPolicy
 

Enumerator:
eHorzStack 
eVertStack 
eWhole 

Definition at line 75 of file graph_container.hpp.


Constructor & Destructor Documentation

CGraphContainer::CGraphContainer ELayoutPolicy  policy  ) 
 

CGraphContainer.

Definition at line 46 of file graph_container.cpp.

CGraphContainer::~CGraphContainer  )  [virtual]
 

Definition at line 54 of file graph_container.cpp.


Member Function Documentation

bool CGraphContainer::AddGraph TGraph graph,
bool  front = false
[virtual]
 

Definition at line 59 of file graph_container.cpp.

References _ASSERT, CEventHandler::AddListener(), CEventHandler::ePool_Child, CEventHandler::ePool_Parent, handler(), and m_Graphs.

Referenced by CFeatureGraph::x_OnJobCompleted().

void CGraphContainer::Clear  )  [virtual]
 

Definition at line 119 of file graph_container.cpp.

References m_Graphs.

wxEvtHandler * CGraphContainer::GetEvtHandler  )  [inline, virtual]
 

Implements IGlEventHandler.

Definition at line 158 of file graph_container.hpp.

const CGraphContainer::TGraph * CGraphContainer::GetGraph int  index  )  const [virtual]
 

Definition at line 112 of file graph_container.cpp.

References _ASSERT, and m_Graphs.

CGraphContainer::TGraph * CGraphContainer::GetGraph int  index  )  [virtual]
 

Definition at line 105 of file graph_container.cpp.

References _ASSERT, and m_Graphs.

Referenced by CHitMatrixRenderer::GetGraphs(), CHitMatrixRenderer::x_DestroyGraphs(), and CHitMatrixRenderer::x_SetGraphs().

int CGraphContainer::GetGraphsCount  )  const [virtual]
 

Definition at line 100 of file graph_container.cpp.

References m_Graphs.

Referenced by CHitMatrixRenderer::GetGraphs(), CFeatureGraph::OnAJNotification(), CHitMatrixRenderer::x_DestroyGraphs(), and CHitMatrixRenderer::x_SetGraphs().

string CGraphContainer::GetTooltip  )  [virtual]
 

Reimplemented from CRenderableImpl.

Definition at line 252 of file graph_container.cpp.

References _ASSERT, IRenderable::GetTooltip(), and m_TooltipGraph.

Referenced by CHitMatrixRenderer::GetTooltip(), and CAlnMultiRenderer::GetTooltip().

void CGraphContainer::Layout  )  [virtual]
 

Reimplemented in CAlignRowGraphCont, and CFeatureGraph.

Definition at line 167 of file graph_container.cpp.

References CGlRect< T >::Bottom(), eHorzStack, eVertStack, CGlRect< T >::Left(), m_Graphs, m_LayoutPolicy, CRenderableImpl::m_ModelRect, CRenderableImpl::m_VPRect, NON_CONST_ITERATE, CGlRect< T >::Offset(), IRenderable::PreferredSize(), CGlRect< T >::Right(), IRenderable::SetModelRect(), CGlRect< T >::SetRight(), CGlRect< T >::SetTop(), IRenderable::SetVPRect(), size, and CGlPoint< T >::X().

Referenced by CFeatureGraph::Layout(), CAlignRowGraphCont::Layout(), SetModelRect(), and SetVPRect().

bool CGraphContainer::NeedTooltip CGlPane pane,
int  vp_x,
int  vp_y
[virtual]
 

Reimplemented from CRenderableImpl.

Definition at line 239 of file graph_container.cpp.

References IRenderable::GetVPRect(), m_Graphs, m_TooltipGraph, IRenderable::NeedTooltip(), NON_CONST_ITERATE, and CGlRect< T >::PtInRect().

Referenced by CHitMatrixRenderer::NeedTooltip(), and CAlnMultiRenderer::NeedTooltip().

void CGraphContainer::OnMouseEvents wxMouseEvent &  event  ) 
 

Definition at line 258 of file graph_container.cpp.

References IGraphContainerHost::GCH_GetVPPosByWindowPos(), IRenderable::GetVPRect(), handler(), m_Graphs, m_Host, NON_CONST_ITERATE, CGlRect< T >::PtInRect(), CGlPoint< T >::X(), and CGlPoint< T >::Y().

TVPPoint CGraphContainer::PreferredSize  )  [virtual]
 

Reimplemented from CRenderableImpl.

Reimplemented in CFeatureGraph.

Definition at line 214 of file graph_container.cpp.

References eHorzStack, eVertStack, eWhole, m_Graphs, m_LayoutPolicy, size, CGlPoint< T >::X(), and CGlPoint< T >::Y().

Referenced by CHitMatrixRenderer::Layout(), ON_MESSAGE(), CAlnMultiPane::x_GetAreaByVPPos(), and CAlnMultiRenderer::x_Layout().

void CGraphContainer::RemoveAllGraphs  )  [virtual]
 

Definition at line 94 of file graph_container.cpp.

References m_Graphs.

Referenced by CFeatureGraph::Destroy().

bool CGraphContainer::RemoveGraph TGraph graph  )  [virtual]
 

assumes ownership

Definition at line 78 of file graph_container.cpp.

References handler(), m_Graphs, and CEventHandler::RemoveListener().

void CGraphContainer::Render CGlPane pane  )  [virtual]
 

Implements IRenderable.

Definition at line 125 of file graph_container.cpp.

References CGlPane::GetClipRect(), CGlPane::GetViewport(), IRenderable::GetVPRect(), CGlRect< T >::IntersectWith(), IRenderable::IsVisible(), m_Graphs, NON_CONST_ITERATE, IRenderable::Render(), and CGlPane::SetClipRect().

Referenced by CFeatureGraph::Render(), CHitMatrixRenderer::x_RenderContainers(), and CAlnMultiRenderer::x_RenderGraphs().

void CGraphContainer::SetHost IGraphContainerHost host  )  [inline]
 

Definition at line 151 of file graph_container.hpp.

References m_Host.

void CGraphContainer::SetModelRect const TModelRect rc  )  [virtual]
 

Reimplemented from CRenderableImpl.

Definition at line 160 of file graph_container.cpp.

References Layout(), and CRenderableImpl::m_ModelRect.

Referenced by CAlnMultiRenderer::x_Layout(), and CHitMatrixRenderer::x_RenderContainers().

void CGraphContainer::SetPane CGlPane pane  )  [inline, virtual]
 

Reimplemented from IGlEventHandler.

Definition at line 164 of file graph_container.hpp.

References m_Pane.

void CGraphContainer::SetVPRect const TVPRect rect  )  [virtual]
 

Reimplemented from CRenderableImpl.

Definition at line 153 of file graph_container.cpp.

References Layout(), and CRenderableImpl::m_VPRect.

Referenced by CAlnMultiRenderer::x_Layout().


Member Data Documentation

TGraphs CGraphContainer::m_Graphs [protected]
 

Definition at line 125 of file graph_container.hpp.

Referenced by AddGraph(), Clear(), CAlignRowGraphCont::Create(), CAlignRowGraphCont::Destroy(), GetGraph(), GetGraphsCount(), Layout(), CFeatureGraph::Layout(), CAlignRowGraphCont::Layout(), NeedTooltip(), OnMouseEvents(), PreferredSize(), RemoveAllGraphs(), RemoveGraph(), Render(), and CAlignRowGraphCont::Render().

IGraphContainerHost* CGraphContainer::m_Host [protected]
 

Definition at line 122 of file graph_container.hpp.

Referenced by OnMouseEvents(), and SetHost().

ELayoutPolicy CGraphContainer::m_LayoutPolicy [protected]
 

Definition at line 123 of file graph_container.hpp.

Referenced by Layout(), CFeatureGraph::Layout(), CAlignRowGraphCont::Layout(), and PreferredSize().

CGlPane* CGraphContainer::m_Pane [protected]
 

Definition at line 127 of file graph_container.hpp.

Referenced by SetPane().

TGraph* CGraphContainer::m_TooltipGraph [protected]
 

Definition at line 126 of file graph_container.hpp.

Referenced by GetTooltip(), and NeedTooltip().


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