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

Search Toolkit Book for CSeqGraphicRenderer

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

+ Inheritance diagram for CSeqGraphicRenderer:
+ Collaboration diagram for CSeqGraphicRenderer:

Public Types

typedef CSeqGlyph::TAreaVector TAreaVector
 
typedef CSeqGraphicImageInfo TImageInfo
 
typedef vector< CSeqGraphicHairlineTHairlineVector
 
- 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 CAtomicCounter TCounter
 Counter type is CAtomiCounter. More...
 
typedef TCounter::TValue TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CSeqGraphicRenderer (bool cgi_mode)
 
 ~CSeqGraphicRenderer ()
 
void SetDSContext (ISGDataSourceContext *ds_ctx)
 CSeqGraphicRenderer inline methods. More...
 
void SetHost (ILayoutTrackHost *host)
 
void SetInputObject (SConstScopedObject &obj)
 
void SetViewWidth (TSeqPos view_width)
 
void ConfigureTracks ()
 
CRef< CSGSequenceDSGetDS ()
 
void UpdateConfig (CRef< CSeqGraphicConfig > config)
 
CRef< CSeqGraphicConfigGetConfig ()
 
void SetHorizontal (bool b_horz, bool b_flip, const TVPRect &rc, bool reset_model_limit=false)
 
void SetVertScroll (TModelUnit val)
 
void ZoomOnRange (const TModelRange &range, bool round_to_base=false)
 zoom to the given range. More...
 
void Resize (const TVPRect &rc)
 
void SetExternalGlyphs (const CSeqGlyph::TObjects &objs)
 
void OnDataChanged ()
 
void UpdateLayout ()
 
void UpdatePdfLayout ()
 
void SetUpdateContent ()
 
void UpdateData ()
 
bool AllJobsFinished () const
 
bool AllTracksCreated () const
 
void SaveTrackConfig ()
 
void SetLensZoom (int x, int y)
 zoom 10x at the given screen coordinates. More...
 
void CancelLensZoom ()
 
CGlPaneGetFeatGlPane ()
 Expose a few GlPanes. More...
 
CGlPaneGetRulerGlPane ()
 
CFeaturePanelGetFeaturePanel ()
 
TModelUnit GetLayoutHeight () const
 retrieve the expected height of this widget. More...
 
TModelUnit GetHeight ()
 
void Render (void)
 
void RenderPdf ()
 
void SetRulerSeqStart (TSeqPos pos)
 Ruler Mark. More...
 
CRef< CSeqGlyphHitTest (int x, int y)
 
void GetTooltip (int x, int y, string &tt, string &t_title)
 
void SelectObject (const CObject *obj, bool verified)
 
void SelectObjByRect (const TVPRect &rc)
 
void SelectObjectSig (const string &obj_sig)
 
void SetNeedUpdateSelection ()
 
void DeSelectObject (const CObject *obj)
 
void ResetObjectSelection (void)
 
bool IsObjectSelected (const CObject *obj)
 
bool HasSelectedObjects () const
 
void GetObjectSelection (ncbi::TConstObjects &objs) const
 
const CSeqGlyph::TConstObjectsGetSelectedLayoutObjects ()
 
TSeqPos Screen2Seq (TVPUnit x, TVPUnit y)
 pixels to sequence translation. More...
 
TSeqPos Screen2SeqWidth (TVPUnit vp)
 
void LoadDefaultTracks ()
 
void ExpandAllTracks (bool expand)
 
void ShowAllTracks (bool shown)
 
cgi mode-related delegate methods for feature panel
void Render (TImageInfo &image_info)
 
void Render (TImageInfo *image_info)
 
void SetTrackConfig (const CFeaturePanel::TTrackSettingsSet &settings_set)
 
void SkipGenuineCheck ()
 skip track existence verification. More...
 
TSeqRange GetVisibleRange () const
 
void ShowTrack (const string &track_key)
 turn on an existing track. More...
 
void HideRuler ()
 
- 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
 

Private Member Functions

void x_Draw (TImageInfo *p_areas)
 
void x_DrawPdf ()
 
void x_DimDisplay ()
 
void x_DoLensZoom ()
 
void x_SetupViewPorts ()
 
void x_SetupViewPorts (const TVPRect &rc)
 
void x_SetupModelLimits (bool reset_model_limit)
 
void x_AdjustToMinScale (bool round_to_base)
 

Private Attributes

CIRef< ISGDataSourceContextm_DSContext
 
CRef< CSGSequenceDSm_DS
 
CRef< CSeqGraphicConfigm_ConfigSettings
 
CRenderingContext m_RenderingCtx
 
CSelectionVisitor m_SelManager
 
CRef< CFeaturePanelm_FeatPanel
 
CGlPane m_RP
 
CGlPane m_FP
 
CRulerPanel m_RulerPanel
 
CGlShader m_MonochromeShader
 
TModelUnit m_MinZoomSeq
 
TModelUnit m_MaxZoomSeq
 X axis zoom limits. More...
 
TModelPoint m_LensZoom
 
bool m_NeedLensZoom
 
TModelUnit m_From
 
TModelUnit m_To
 
bool m_Horz
 
bool m_Flipped
 
bool m_NeedUpdateContent
 
bool m_NeedUpdateLayout
 
bool m_NeedUpdateSelection
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_NORETURN void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_NORETURN 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 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...
 

Detailed Description

Definition at line 59 of file seqgraphic_render.hpp.

Member Typedef Documentation

Definition at line 62 of file seqgraphic_render.hpp.

Definition at line 64 of file seqgraphic_render.hpp.

Definition at line 63 of file seqgraphic_render.hpp.

Constructor & Destructor Documentation

CSeqGraphicRenderer::CSeqGraphicRenderer ( bool  cgi_mode)
CSeqGraphicRenderer::~CSeqGraphicRenderer ( )

Definition at line 101 of file seqgraphic_render.cpp.

Member Function Documentation

bool CSeqGraphicRenderer::AllJobsFinished ( ) const
inline
bool CSeqGraphicRenderer::AllTracksCreated ( ) const
inline
void CSeqGraphicRenderer::CancelLensZoom ( )
inline

Definition at line 280 of file seqgraphic_render.hpp.

References m_NeedLensZoom.

void CSeqGraphicRenderer::ConfigureTracks ( )
inline
void CSeqGraphicRenderer::DeSelectObject ( const CObject obj)
inline
void CSeqGraphicRenderer::ExpandAllTracks ( bool  expand)
inline

Definition at line 439 of file seqgraphic_render.hpp.

References CTrackContainer::ExpandAll(), and m_FeatPanel.

Referenced by CSeqGraphicPane::ExpandAllTracks().

CRef<CSeqGraphicConfig> CSeqGraphicRenderer::GetConfig ( void  )
inline

Definition at line 77 of file seqgraphic_render.hpp.

References m_ConfigSettings.

CRef<CSGSequenceDS> CSeqGraphicRenderer::GetDS ( void  )
inline

Definition at line 74 of file seqgraphic_render.hpp.

References m_DS.

CGlPane & CSeqGraphicRenderer::GetFeatGlPane ( )
inline
CFeaturePanel * CSeqGraphicRenderer::GetFeaturePanel ( )
inline

Definition at line 298 of file seqgraphic_render.hpp.

References m_FeatPanel.

Referenced by CSeqGraphicPane::GetFeaturePanel().

TModelUnit CSeqGraphicRenderer::GetHeight ( void  )
TModelUnit CSeqGraphicRenderer::GetLayoutHeight ( ) const
inline

retrieve the expected height of this widget.

Definition at line 304 of file seqgraphic_render.hpp.

References CSeqGlyph::GetHeight(), CRulerPanel::GetSize(), m_FeatPanel, m_RulerPanel, and CGlPoint< T >::Y().

Referenced by CSeqGraphicPane::x_Render().

void CSeqGraphicRenderer::GetObjectSelection ( ncbi::TConstObjects objs) const
inline
CGlPane & CSeqGraphicRenderer::GetRulerGlPane ( )
inline
const CSeqGlyph::TConstObjects & CSeqGraphicRenderer::GetSelectedLayoutObjects ( )
inline
void CSeqGraphicRenderer::GetTooltip ( int  x,
int  y,
string tt,
string t_title 
)

Definition at line 262 of file seqgraphic_render.cpp.

References CSeqGlyph::GetTooltip(), HitTest(), m_FP, and CGlPane::UnProject().

TSeqRange CSeqGraphicRenderer::GetVisibleRange ( ) const
inline
bool CSeqGraphicRenderer::HasSelectedObjects ( ) const
inline
void CSeqGraphicRenderer::HideRuler ( )
inline

Definition at line 359 of file seqgraphic_render.hpp.

References m_RulerPanel, and CRulerPanel::SetShown().

CRef< CSeqGlyph > CSeqGraphicRenderer::HitTest ( int  x,
int  y 
)
bool CSeqGraphicRenderer::IsObjectSelected ( const CObject obj)
inline
void CSeqGraphicRenderer::LoadDefaultTracks ( )
inline
void CSeqGraphicRenderer::OnDataChanged ( )
inline
void CSeqGraphicRenderer::Render ( void  )
inline

Definition at line 310 of file seqgraphic_render.hpp.

References NULL, and x_Draw().

Referenced by CSeqGraphicPreview::draw(), and CSeqGraphicPane::x_Render().

void CSeqGraphicRenderer::Render ( TImageInfo image_info)
inline

Definition at line 316 of file seqgraphic_render.hpp.

References x_Draw().

void CSeqGraphicRenderer::Render ( TImageInfo image_info)
inline

Definition at line 328 of file seqgraphic_render.hpp.

References x_Draw().

void CSeqGraphicRenderer::RenderPdf ( )
inline

Definition at line 322 of file seqgraphic_render.hpp.

References x_DrawPdf().

Referenced by CSeqGraphicPane::RenderPdf().

void CSeqGraphicRenderer::ResetObjectSelection ( void  )
inline
void CSeqGraphicRenderer::Resize ( const TVPRect rc)
void CSeqGraphicRenderer::SaveTrackConfig ( )
inline
TSeqPos CSeqGraphicRenderer::Screen2Seq ( TVPUnit  x,
TVPUnit  y 
)
TSeqPos CSeqGraphicRenderer::Screen2SeqWidth ( TVPUnit  vp)
void CSeqGraphicRenderer::SelectObjByRect ( const TVPRect rc)
void CSeqGraphicRenderer::SelectObject ( const CObject obj,
bool  verified 
)
inline
void CSeqGraphicRenderer::SelectObjectSig ( const string obj_sig)
inline
void CSeqGraphicRenderer::SetDSContext ( ISGDataSourceContext ds_ctx)
inline
void CSeqGraphicRenderer::SetExternalGlyphs ( const CSeqGlyph::TObjects objs)
void CSeqGraphicRenderer::SetHorizontal ( bool  b_horz,
bool  b_flip,
const TVPRect rc,
bool  reset_model_limit = false 
)
void CSeqGraphicRenderer::SetHost ( ILayoutTrackHost host)
inline

Definition at line 208 of file seqgraphic_render.hpp.

References m_FeatPanel, and CLayoutTrack::SetHost().

Referenced by CSeqGraphicPane::CSeqGraphicPane().

void CSeqGraphicRenderer::SetInputObject ( SConstScopedObject obj)
void CSeqGraphicRenderer::SetLensZoom ( int  x,
int  y 
)

zoom 10x at the given screen coordinates.

Definition at line 222 of file seqgraphic_render.cpp.

References CGlPane::eOrtho, CGlPane::GetViewport(), m_FP, m_LensZoom, m_NeedLensZoom, CGlRect< T >::PtInRect(), and CGlPane::UnProject().

void CSeqGraphicRenderer::SetNeedUpdateSelection ( )
inline

Definition at line 386 of file seqgraphic_render.hpp.

References m_NeedUpdateSelection.

Referenced by CSeqGraphicPane::LTH_OnLayoutChanged().

void CSeqGraphicRenderer::SetRulerSeqStart ( TSeqPos  pos)
inline

Ruler Mark.

Definition at line 365 of file seqgraphic_render.hpp.

References m_RulerPanel, CRulerPanel::SetRulerSeqStart(), and x_SetupViewPorts().

Referenced by CSeqGraphicPane::SetSeqStart().

void CSeqGraphicRenderer::SetTrackConfig ( const CFeaturePanel::TTrackSettingsSet settings_set)
inline

Definition at line 334 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::SetTrackConfig().

void CSeqGraphicRenderer::SetUpdateContent ( )
inline

Definition at line 249 of file seqgraphic_render.hpp.

References m_NeedUpdateContent.

Referenced by CSeqGraphicPane::SetUpdateContent().

void CSeqGraphicRenderer::SetVertScroll ( TModelUnit  val)
inline
void CSeqGraphicRenderer::SetViewWidth ( TSeqPos  view_width)

Definition at line 704 of file seqgraphic_render.cpp.

References m_RenderingCtx, and CRenderingContext::SetViewWidth().

void CSeqGraphicRenderer::ShowAllTracks ( bool  shown)
inline

Definition at line 445 of file seqgraphic_render.hpp.

References m_FeatPanel, and CTrackContainer::ShowAll().

Referenced by CSeqGraphicPane::ShowAllTracks().

void CSeqGraphicRenderer::ShowTrack ( const string track_key)
inline

turn on an existing track.

If there is no such a track in the configuration, it does nothing.

Definition at line 353 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::ShowTrack().

void CSeqGraphicRenderer::SkipGenuineCheck ( )
inline

skip track existence verification.

Assume tracks exist.

Definition at line 341 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::SkipGenuineCheck().

void CSeqGraphicRenderer::UpdateConfig ( CRef< CSeqGraphicConfig config)
void CSeqGraphicRenderer::UpdateData ( )
inline
void CSeqGraphicRenderer::UpdateLayout ( )
inline

Definition at line 237 of file seqgraphic_render.hpp.

References m_NeedUpdateLayout.

void CSeqGraphicRenderer::UpdatePdfLayout ( )
inline

Definition at line 243 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::Update().

Referenced by CSeqGraphicPane::UpdatePdfLayout().

void CSeqGraphicRenderer::x_AdjustToMinScale ( bool  round_to_base)
private
void CSeqGraphicRenderer::x_DimDisplay ( )
private
void CSeqGraphicRenderer::x_DoLensZoom ( )
private
void CSeqGraphicRenderer::x_Draw ( TImageInfo p_areas)
private
void CSeqGraphicRenderer::x_DrawPdf ( )
private
void CSeqGraphicRenderer::x_SetupModelLimits ( bool  reset_model_limit)
private
void CSeqGraphicRenderer::x_SetupViewPorts ( )
private
void CSeqGraphicRenderer::x_SetupViewPorts ( const TVPRect rc)
private
void CSeqGraphicRenderer::ZoomOnRange ( const TModelRange range,
bool  round_to_base = false 
)

Member Data Documentation

CRef<CSeqGraphicConfig> CSeqGraphicRenderer::m_ConfigSettings
private

Definition at line 171 of file seqgraphic_render.hpp.

Referenced by GetConfig(), SetHorizontal(), UpdateConfig(), and x_Draw().

CRef<CSGSequenceDS> CSeqGraphicRenderer::m_DS
private
CIRef<ISGDataSourceContext> CSeqGraphicRenderer::m_DSContext
private

Definition at line 169 of file seqgraphic_render.hpp.

Referenced by SetDSContext(), and SetInputObject().

CRef<CFeaturePanel> CSeqGraphicRenderer::m_FeatPanel
private
bool CSeqGraphicRenderer::m_Flipped
private
CGlPane CSeqGraphicRenderer::m_FP
private
TModelUnit CSeqGraphicRenderer::m_From
private

Definition at line 186 of file seqgraphic_render.hpp.

Referenced by ZoomOnRange().

bool CSeqGraphicRenderer::m_Horz
private
TModelPoint CSeqGraphicRenderer::m_LensZoom
private

Definition at line 183 of file seqgraphic_render.hpp.

Referenced by SetLensZoom(), and x_DoLensZoom().

TModelUnit CSeqGraphicRenderer::m_MaxZoomSeq
private

X axis zoom limits.

Definition at line 182 of file seqgraphic_render.hpp.

TModelUnit CSeqGraphicRenderer::m_MinZoomSeq
private

Definition at line 181 of file seqgraphic_render.hpp.

CGlShader CSeqGraphicRenderer::m_MonochromeShader
private

Definition at line 179 of file seqgraphic_render.hpp.

Referenced by CSeqGraphicRenderer(), and x_Draw().

bool CSeqGraphicRenderer::m_NeedLensZoom
private

Definition at line 184 of file seqgraphic_render.hpp.

Referenced by CancelLensZoom(), SetLensZoom(), and x_Draw().

bool CSeqGraphicRenderer::m_NeedUpdateContent
private
bool CSeqGraphicRenderer::m_NeedUpdateLayout
private

Definition at line 193 of file seqgraphic_render.hpp.

Referenced by Resize(), SetHorizontal(), UpdateLayout(), x_Draw(), and x_DrawPdf().

bool CSeqGraphicRenderer::m_NeedUpdateSelection
private
CRenderingContext CSeqGraphicRenderer::m_RenderingCtx
private
CGlPane CSeqGraphicRenderer::m_RP
private
CRulerPanel CSeqGraphicRenderer::m_RulerPanel
private
CSelectionVisitor CSeqGraphicRenderer::m_SelManager
private
TModelUnit CSeqGraphicRenderer::m_To
private

Definition at line 187 of file seqgraphic_render.hpp.

Referenced by ZoomOnRange().


The documentation for this class was generated from the following files:
Modified on Mon Jun 27 17:17:22 2016 by modify_doxy.py rev. 426318