NCBI C++ ToolKit
|
Search Toolkit Book for CFeatureGraph
#include <gui/widgets/aln_multiple/feature_graph.hpp>
Public Member Functions | |
CFeatureGraph (const IAlignRowHandle &row_handle, bool isDataReadSync) | |
void | OnAJNotification (CEvent *evt) |
IRenderable implementation | |
virtual TVPPoint | PreferredSize () |
virtual void | Layout () |
IAlnVecRowGraph implementaion | |
virtual | ~CFeatureGraph () |
virtual bool | IsCreated () const |
Graph is not considered fully functional until it has been "created" by the call to create function. More... | |
virtual bool | Create () |
virtual void | Destroy () |
virtual void | Update (double start, double stop) |
Update data according to the input range. More... | |
virtual const IAlnRowGraphProperties * | GetProperties () const |
virtual void | SetProperties (IAlnRowGraphProperties *props) |
virtual void | Render (CGlPane &pane, IAlnSegmentIterator &it) |
Public Member Functions inherited from CGraphContainer | |
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 TGraph * | GetGraph (size_t index) |
virtual const TGraph * | GetGraph (size_t index) const |
virtual void | Clear () |
void | SetHost (IGraphContainerHost *host) |
void | OnMouseEvents (wxMouseEvent &event) |
void | SetGraphMaxSize (const TVPPoint &size) |
virtual void | Render (CGlPane &pane) |
virtual void | SetVPRect (const TVPRect &rect) |
virtual void | SetModelRect (const TModelRect &rc) |
virtual bool | NeedTooltip (CGlPane &pane, int vp_x, int vp_y) |
virtual string | GetTooltip () |
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... | |
CObject & | operator= (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) |
CPtrToObjectProxy * | GetPtrProxy (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 TListeners * | GetListeners (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... | |
Public Member Functions inherited from IAlnVecRowGraph | |
virtual | ~IAlnVecRowGraph () |
Protected Types | |
typedef set< objects::CSeqFeatData::ESubtype > | TSubtypeSet |
typedef map< TJobID, CRef< CFeatureLoadingJob > > | TJobMap |
Protected Types inherited from CGraphContainer | |
typedef vector< TGraphRef > | TGraphs |
Protected Member Functions | |
DECLARE_EVENT_MAP () | |
void | x_RenderStatusText (CGlPane &pane) |
CRef< TMapRanges > | x_CreateMapRanges () |
void | x_StartJob (const TFeatTypeItemSet &feat_set, const TSubtypeSet &filter, bool positive, CRange< TSeqPos > &total_range, TMapRanges &map_ranges, const string &descr, bool separate_types, bool link_genes, int order) |
bool | x_StartJob (objects::SAnnotSelector &sel, CRange< TSeqPos > &total_range, TMapRanges &map_ranges, const string &descr, bool separate_types, bool link_genes, int order) |
bool | x_CancelJob (TJobID job_id) |
void | x_CancelJobs () |
Cancel all active jobs. More... | |
void | x_OnJobCompleted (CAppJobNotification ¬ify) |
void | x_OnJobFailed (CAppJobNotification ¬ify) |
void | x_Create (double start, double stop) |
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 SEvtMap * | GetEventMap () const |
void | x_DeclareDead () |
Removes itself unavailable for async event delivery. More... | |
void | x_AddListenerToPool (CEventHandler *listener, int pool_name) |
Protected Attributes | |
const IAlignRowHandle & | m_RowHandle |
bool | m_Created |
TJobMap | m_Jobs |
string | m_StatusText |
CGlTextureFont | m_Font |
CFeatureGraphProperties | m_Properties |
Protected Attributes inherited from CGraphContainer | |
wxEvtHandler * | m_Handler |
IGraphContainerHost * | m_Host |
ELayoutPolicy | m_LayoutPolicy |
TGraphs | m_Graphs |
TGraph * | m_TooltipGraph |
CGlPane * | m_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 |
Private Attributes | |
bool | m_isDataReadSync |
bool | m_Updated |
TGraphs | m_PendingGraphs |
Candidate graphs waiting for replacing the current ones. More... | |
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... | |
Static Protected Attributes inherited from CEventHandler | |
static const SEvtMap | sm_EvtMap |
Definition at line 174 of file feature_graph.hpp.
Definition at line 179 of file feature_graph.hpp.
Definition at line 180 of file feature_graph.hpp.
Definition at line 183 of file feature_graph.hpp.
|
protected |
Definition at line 246 of file feature_graph.hpp.
typedef vector<SMappedFeatLoc> CFeatureGraph::TMappedFeatLocs |
Definition at line 182 of file feature_graph.hpp.
typedef objects::CMappingRanges CFeatureGraph::TMapRanges |
Definition at line 181 of file feature_graph.hpp.
|
protected |
Definition at line 213 of file feature_graph.hpp.
CFeatureGraph::CFeatureGraph | ( | const IAlignRowHandle & | row_handle, |
bool | isDataReadSync | ||
) |
Definition at line 233 of file feature_graph.cpp.
References CSeqFeatData::GetFeatList(), set< Key, Compare >::insert(), ITERATE, CFeatureGraphProperties::m_FeatureTypes, and m_Properties.
|
virtual |
Definition at line 252 of file feature_graph.cpp.
References Destroy().
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 265 of file feature_graph.cpp.
References CGlRect< T >::Left(), m_Created, CRenderableImpl::m_ModelRect, CGlRect< T >::Right(), CGlRect< T >::Width(), and x_Create().
|
protected |
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 325 of file feature_graph.cpp.
References m_Created, CGraphContainer::RemoveAllGraphs(), and x_CancelJobs().
Referenced by ~CFeatureGraph().
|
virtual |
|
virtual |
Graph is not considered fully functional until it has been "created" by the call to create function.
Only "Created" graph can be rendered. Creating may include loading data and building internal data structures.
Implements IAlnVecRowGraph.
Definition at line 258 of file feature_graph.cpp.
References m_Created.
|
virtual |
Reimplemented from CGraphContainer.
Definition at line 443 of file feature_graph.cpp.
References _ASSERT, CGlRect< T >::Bottom(), CGraphContainer::eHorzStack, CGraphContainer::eVertStack, CGraphContainer::Layout(), CGraphContainer::m_Graphs, CGraphContainer::m_LayoutPolicy, CRenderableImpl::m_ModelRect, CRenderableImpl::m_VPRect, NON_CONST_ITERATE, IRenderable::PreferredSize(), IRenderable::SetModelRect(), CGlRect< T >::SetVert(), IRenderable::SetVPRect(), ncbi::grid::netcache::search::fields::size, and CGlPoint< T >::Y().
void CFeatureGraph::OnAJNotification | ( | CEvent * | evt | ) |
Definition at line 628 of file feature_graph.cpp.
References _ASSERT, CGraphContainer::AddGraph(), IAppJob::eCanceled, IAppJob::eCompleted, CGraphNotification::eContentChanged, IAppJob::eFailed, map_checker< Container >::empty(), map_checker< Container >::end(), CEventHandler::ePool_Parent, map_checker< Container >::erase(), IAppJob::eRunning, map_checker< Container >::find(), CGraphContainer::GetGraphsCount(), CAppJobNotification::GetJobID(), CAppJobNotification::GetState(), i, m_Jobs, m_PendingGraphs, m_StatusText, n, CGraphContainer::RemoveAllGraphs(), CEventHandler::Send(), x_OnJobCompleted(), and x_OnJobFailed().
|
virtual |
Reimplemented from CGraphContainer.
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 366 of file feature_graph.cpp.
References CGraphContainer::Render(), and x_RenderStatusText().
|
virtual |
Implements IAlnVecRowGraph.
Definition at line 355 of file feature_graph.cpp.
References _ASSERT, and m_Properties.
|
virtual |
Update data according to the input range.
range | the current visible range |
Implements IAlnVecRowGraph.
Definition at line 334 of file feature_graph.cpp.
References CGlRect< T >::Left(), m_isDataReadSync, CRenderableImpl::m_ModelRect, m_Updated, CGlRect< T >::Right(), x_CancelJobs(), and x_Create().
Definition at line 597 of file feature_graph.cpp.
References _ASSERT, CAppJobDispatcher::DeleteJob(), CAppJobException::eEngine_UnknownJob, map_checker< Container >::end(), map_checker< Container >::erase(), ERR_POST, CAppJobException::eUnknownJob, map_checker< Container >::find(), CAppJobDispatcher::GetInstance(), LOG_POST, and m_Jobs.
|
protected |
Cancel all active jobs.
Definition at line 583 of file feature_graph.cpp.
References map_checker< Container >::clear(), CAppJobDispatcher::DeleteJob(), CAppJobDispatcher::GetInstance(), m_Jobs, m_PendingGraphs, and NON_CONST_ITERATE.
|
protected |
Definition at line 719 of file feature_graph.cpp.
References CGraphContainer::AddGraph(), CGraphNotification::eContentChanged, IAlnExplorer::eLeft, CEventHandler::ePool_Parent, IAlnExplorer::eRight, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CSeqFeatData::eSubtype_STS, CSeqFeatData::eSubtype_variation, f(), IAlignRowHandle::GetSeqPosFromAlnPos(), set< Key, Compare >::insert(), CFeatureGraphProperties::m_FeatureTypes, m_isDataReadSync, m_PendingGraphs, m_Properties, m_RowHandle, m_StatusText, n, CEventHandler::Send(), swap(), t, x_CreateMapRanges(), and x_StartJob().
|
protected |
Definition at line 485 of file feature_graph.cpp.
References CMappingRanges::AddConversion(), IAlignRowHandle::CreateSegmentIterator(), eGetId_Canonical, eNa_strand_minus, eNa_strand_plus, IAlnSegmentIterator::eSkipInserts, IAlnSegment::GetAlnRange(), IAlignRowHandle::GetBioseqHandle(), GetId(), IAlnSegment::GetRange(), CSynonymsSet::GetSeq_id_Handle(), IAlignRowHandle::GetSeqAlnStart(), IAlignRowHandle::GetSeqAlnStop(), CBioseq_Handle::GetSeqId(), CScope::GetSynonyms(), IAlnSegment::IsAligned(), IAlnSegment::IsReversed(), ITERATE, m_RowHandle, compile_time_bits::range(), and CRange_Base::SetFrom().
Referenced by x_Create().
|
protected |
Definition at line 686 of file feature_graph.cpp.
References copy(), ERR_POST, CAppJobNotification::GetJobID(), CRef< C, Locker >::GetPointer(), CAppJobNotification::GetResult(), m_PendingGraphs, n, and result.
Referenced by OnAJNotification().
|
protected |
Definition at line 707 of file feature_graph.cpp.
References ERR_POST, CAppJobNotification::GetError(), and CAppJobNotification::GetJobID().
Referenced by OnAJNotification().
|
protected |
Definition at line 383 of file feature_graph.cpp.
References IRender::BlendFunc(), CGlRect< T >::Bottom(), CGlPane::Close(), IRender::Color4d(), IGlFont::eAlign_Left, IRender::Enable(), GetGl(), CGlRect< T >::Inflate(), kTextOff, CGlRect< T >::Left(), m_Font, m_StatusText, CRenderableImpl::m_VPRect, CGlPane::OpenPixels(), IRender::PolygonMode(), IRender::RectC(), CGlRect< T >::Right(), CGlRect< T >::SetBottom(), CGlTextureFont::TextHeight(), CGlTextureFont::TextOut(), and CGlRect< T >::Top().
Referenced by Render().
|
protected |
Definition at line 276 of file feature_graph.cpp.
References SAnnotSelector::AddNamedAnnots(), set< Key, Compare >::empty(), set< Key, Compare >::end(), CSeqFeatData::eSubtype_any, CSeqFeatData::eSubtype_variation, SAnnotSelector::ExcludeNamedAnnots(), set< Key, Compare >::find(), CSeqUtils::GetAnnotSelector(), SAnnotSelector::IncludeFeatSubtype(), set< Key, Compare >::insert(), ITERATE, and positive().
Referenced by x_Create().
|
protected |
|
protected |
Definition at line 249 of file feature_graph.hpp.
Referenced by Create(), Destroy(), and IsCreated().
|
protected |
Definition at line 253 of file feature_graph.hpp.
Referenced by x_RenderStatusText().
|
private |
Definition at line 258 of file feature_graph.hpp.
Referenced by Update(), and x_Create().
|
protected |
Definition at line 250 of file feature_graph.hpp.
Referenced by OnAJNotification(), x_CancelJob(), and x_CancelJobs().
|
private |
Candidate graphs waiting for replacing the current ones.
Definition at line 262 of file feature_graph.hpp.
Referenced by OnAJNotification(), x_CancelJobs(), x_Create(), and x_OnJobCompleted().
|
protected |
Definition at line 255 of file feature_graph.hpp.
Referenced by CFeatureGraph(), SetProperties(), and x_Create().
|
protected |
Definition at line 248 of file feature_graph.hpp.
Referenced by x_Create(), and x_CreateMapRanges().
|
protected |
Definition at line 252 of file feature_graph.hpp.
Referenced by OnAJNotification(), x_Create(), and x_RenderStatusText().
|
private |
Definition at line 259 of file feature_graph.hpp.
Referenced by Update().