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

Search Toolkit Book for CGraphContainer

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

#include <gui/widgets/gl/graph_container.hpp>

+ Inheritance diagram for CGraphContainer:
+ Collaboration diagram for CGraphContainer:

Public Types

enum  ELayoutPolicy { eHorzStack , eVertStack , eWhole }
 
typedef IRenderable TGraph
 
typedef CIRef< IRenderableTGraphRef
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 
- Public Types inherited from CEventHandler
enum  EDispatch { eDispatch_SelfOnly , eDispatch_AllHandlers , eDispatch_FirstHandler , eDispatch_Default = eDispatch_AllHandlers }
 enum controlling dispatching strategies More...
 
enum  EPoolName {
  ePool_Default = 0 , ePool_Parent , ePool_Child , ePool_Sibling ,
  ePool_NextAvailable
}
 Identifiers for standard pools. More...
 
typedef vector< CEventHandler * > TListeners
 
typedef map< int, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 

Public Member Functions

 CGraphContainer (ELayoutPolicy policy)
 CGraphContainer. More...
 
virtual ~CGraphContainer ()
 
virtual bool AddGraph (TGraph *graph, bool front=false)
 
virtual bool RemoveGraph (TGraph *graph)
 assumes ownership More...
 
virtual void RemoveAllGraphs ()
 
virtual size_t GetGraphsCount () const
 
virtual TGraphGetGraph (size_t index)
 
virtual const TGraphGetGraph (size_t index) const
 
virtual void Clear ()
 
virtual void Layout ()
 
void SetHost (IGraphContainerHost *host)
 
void OnMouseEvents (wxMouseEvent &event)
 
void SetGraphMaxSize (const TVPPoint &size)
 
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)
 
- Public Member Functions inherited from CObjectEx
 CObjectEx (void)
 
virtual ~CObjectEx (void)
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 
- Public Member Functions inherited from CWeakObject
 CWeakObject (void)
 
virtual ~CWeakObject (void)
 
CPtrToObjectProxyGetPtrProxy (void) const
 Get pointer to proxy object containing pointer to this object. More...
 
- Public Member Functions inherited from IGlEventHandler
virtual ~IGlEventHandler ()
 
- Public Member Functions inherited from CRenderableImpl
 CRenderableImpl ()
 CRenderableImpl. More...
 
virtual ~CRenderableImpl ()
 
virtual TVPRect GetVPRect () const
 
virtual TModelRect GetModelRect () const
 
virtual bool IsVisible ()
 
virtual void SetVisible (bool set)
 
virtual void SetOrder (int order)
 
virtual int GetOrder () const
 
- Public Member Functions inherited from IRenderable
virtual ~IRenderable (void)
 
- Public Member Functions inherited from CEventHandler
 CEventHandler ()
 CEventHandler. More...
 
virtual ~CEventHandler ()
 
virtual void AddListener (CEventHandler *listener, int pool_name=ePool_Default)
 Add a listener. More...
 
virtual void RemoveListener (CEventHandler *listener)
 Remove a listener. More...
 
virtual void RemoveAllListeners (void)
 
virtual bool HasListener (CEventHandler *listener, int pool_name=ePool_Default) const
 returns "true" if the given listener belongs to the specified pool More...
 
virtual const TListenersGetListeners (int pool_name=ePool_Default) const
 returns a set of listeners fro the specified pool More...
 
virtual bool OnEvent (CEvent *evt)
 Processes en event. Returns "true" if event has been processed. More...
 
virtual bool Dispatch (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Dispatches an event to the listeners (but does not handle it). More...
 
virtual bool Send (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Sends an event synchronously. More...
 
virtual bool Send (CEvent *evt, int pool_name)
 
void Post (CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Handles an event asynchronously (process and/or dispatch). More...
 

Protected Types

typedef vector< TGraphRefTGraphs
 

Protected Attributes

wxEvtHandler * m_Handler
 
IGraphContainerHostm_Host
 
ELayoutPolicy m_LayoutPolicy
 
TGraphs m_Graphs
 
TGraphm_TooltipGraph
 
CGlPanem_Pane
 
TVPPoint m_GraphMaxSize
 
- Protected Attributes inherited from CRenderableImpl
TVPRect m_VPRect
 
TModelRect m_ModelRect
 
bool m_Visible
 
int m_Order = 0
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Protected Member Functions inherited from CWeakObject
void CleanWeakRefs (void) const
 Method cleaning all CWeakRefs referencing at this moment to the object After calling to this method all existing CWeakRefs referencing to the object will return NULL, so it effectively will be equal to deleting the object. More...
 
- Protected Member Functions inherited from CEventHandler
virtual const SEvtMapGetEventMap () const
 
void x_DeclareDead ()
 Removes itself unavailable for async event delivery. More...
 
void x_AddListenerToPool (CEventHandler *listener, int pool_name)
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

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.

Member Typedef Documentation

◆ TGraph

Definition at line 69 of file graph_container.hpp.

◆ TGraphRef

Definition at line 70 of file graph_container.hpp.

◆ TGraphs

typedef vector<TGraphRef> CGraphContainer::TGraphs
protected

Definition at line 120 of file graph_container.hpp.

Member Enumeration Documentation

◆ ELayoutPolicy

Enumerator
eHorzStack 
eVertStack 
eWhole 

Definition at line 72 of file graph_container.hpp.

Constructor & Destructor Documentation

◆ CGraphContainer()

CGraphContainer::CGraphContainer ( ELayoutPolicy  policy)

CGraphContainer.

Definition at line 63 of file graph_container.cpp.

◆ ~CGraphContainer()

CGraphContainer::~CGraphContainer ( )
virtual

Definition at line 73 of file graph_container.cpp.

References m_Handler.

Member Function Documentation

◆ AddGraph()

bool CGraphContainer::AddGraph ( TGraph graph,
bool  front = false 
)
virtual

◆ Clear()

void CGraphContainer::Clear ( void  )
virtual

Definition at line 143 of file graph_container.cpp.

References m_Graphs.

◆ GetEvtHandler()

wxEvtHandler * CGraphContainer::GetEvtHandler ( )
inlinevirtual

Implements IGlEventHandler.

Definition at line 161 of file graph_container.hpp.

References m_Handler.

◆ GetGraph() [1/2]

CGraphContainer::TGraph * CGraphContainer::GetGraph ( size_t  index)
virtual

◆ GetGraph() [2/2]

const CGraphContainer::TGraph * CGraphContainer::GetGraph ( size_t  index) const
virtual

Definition at line 136 of file graph_container.cpp.

References _ASSERT, and m_Graphs.

◆ GetGraphsCount()

size_t CGraphContainer::GetGraphsCount ( ) const
virtual

◆ GetTooltip()

string CGraphContainer::GetTooltip ( void  )
virtual

Reimplemented from CRenderableImpl.

Definition at line 292 of file graph_container.cpp.

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

Referenced by CHitMatrixRenderer::GetTooltip().

◆ Layout()

void CGraphContainer::Layout ( )
virtual

◆ NeedTooltip()

bool CGraphContainer::NeedTooltip ( CGlPane pane,
int  vp_x,
int  vp_y 
)
virtual

◆ OnMouseEvents()

void CGraphContainer::OnMouseEvents ( wxMouseEvent &  event)

◆ PreferredSize()

TVPPoint CGraphContainer::PreferredSize ( )
virtual

◆ RemoveAllGraphs()

void CGraphContainer::RemoveAllGraphs ( )
virtual

◆ RemoveGraph()

bool CGraphContainer::RemoveGraph ( TGraph graph)
virtual

assumes ownership

Definition at line 102 of file graph_container.cpp.

References m_Graphs, and CEventHandler::RemoveListener().

◆ Render()

void CGraphContainer::Render ( CGlPane pane)
virtual

◆ SetGraphMaxSize()

void CGraphContainer::SetGraphMaxSize ( const TVPPoint size)
inline

◆ SetHost()

void CGraphContainer::SetHost ( IGraphContainerHost host)
inline

Definition at line 154 of file graph_container.hpp.

References m_Host.

◆ SetModelRect()

void CGraphContainer::SetModelRect ( const TModelRect rc)
virtual

Reimplemented from CRenderableImpl.

Definition at line 184 of file graph_container.cpp.

References Layout(), and CRenderableImpl::m_ModelRect.

Referenced by CHitMatrixRenderer::x_RenderContainers().

◆ SetPane()

void CGraphContainer::SetPane ( CGlPane pane)
inlinevirtual

Reimplemented from IGlEventHandler.

Definition at line 167 of file graph_container.hpp.

References m_Pane.

◆ SetVPRect()

void CGraphContainer::SetVPRect ( const TVPRect rect)
virtual

Reimplemented from CRenderableImpl.

Definition at line 177 of file graph_container.cpp.

References Layout(), and CRenderableImpl::m_VPRect.

Referenced by CHitMatrixRenderer::Layout().

Member Data Documentation

◆ m_GraphMaxSize

TVPPoint CGraphContainer::m_GraphMaxSize
protected

Definition at line 130 of file graph_container.hpp.

Referenced by Layout(), PreferredSize(), and SetGraphMaxSize().

◆ m_Graphs

TGraphs CGraphContainer::m_Graphs
protected

◆ m_Handler

wxEvtHandler* CGraphContainer::m_Handler
protected

Definition at line 122 of file graph_container.hpp.

Referenced by GetEvtHandler(), and ~CGraphContainer().

◆ m_Host

IGraphContainerHost* CGraphContainer::m_Host
protected

Definition at line 123 of file graph_container.hpp.

Referenced by OnMouseEvents(), and SetHost().

◆ m_LayoutPolicy

ELayoutPolicy CGraphContainer::m_LayoutPolicy
protected

◆ m_Pane

CGlPane* CGraphContainer::m_Pane
protected

Definition at line 128 of file graph_container.hpp.

Referenced by SetPane().

◆ m_TooltipGraph

TGraph* CGraphContainer::m_TooltipGraph
protected

Definition at line 127 of file graph_container.hpp.

Referenced by GetTooltip(), and NeedTooltip().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:06 2024 by modify_doxy.py rev. 669887