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 SetHighlightsColor (const CRgbaColor &color)
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 102 of file seqgraphic_render.cpp.

Member Function Documentation

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

Definition at line 286 of file seqgraphic_render.hpp.

References m_NeedLensZoom.

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

Definition at line 445 of file seqgraphic_render.hpp.

References CTrackContainer::ExpandAll(), and m_FeatPanel.

Referenced by CSeqGraphicPane::ExpandAllTracks().

CRef<CSeqGraphicConfig> CSeqGraphicRenderer::GetConfig ( void  )

Definition at line 78 of file seqgraphic_render.hpp.

References m_ConfigSettings.

CRef<CSGSequenceDS> CSeqGraphicRenderer::GetDS ( void  )

Definition at line 75 of file seqgraphic_render.hpp.

References m_DS.

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

Definition at line 304 of file seqgraphic_render.hpp.

References m_FeatPanel.

Referenced by CSeqGraphicPane::GetFeaturePanel().

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

retrieve the expected height of this widget.

Definition at line 310 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
CGlPane & CSeqGraphicRenderer::GetRulerGlPane ( )
const CSeqGlyph::TConstObjects & CSeqGraphicRenderer::GetSelectedLayoutObjects ( )
void CSeqGraphicRenderer::GetTooltip ( int  x,
int  y,
string tt,
string t_title 
TSeqRange CSeqGraphicRenderer::GetVisibleRange ( ) const
bool CSeqGraphicRenderer::HasSelectedObjects ( ) const
void CSeqGraphicRenderer::HideRuler ( )

Definition at line 365 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)
void CSeqGraphicRenderer::LoadDefaultTracks ( )
void CSeqGraphicRenderer::OnDataChanged ( )
void CSeqGraphicRenderer::Render ( void  )

Definition at line 316 of file seqgraphic_render.hpp.

References NULL, and x_Draw().

Referenced by CSeqGraphicPane::x_Render().

void CSeqGraphicRenderer::Render ( TImageInfo image_info)

Definition at line 322 of file seqgraphic_render.hpp.

References x_Draw().

void CSeqGraphicRenderer::Render ( TImageInfo image_info)

Definition at line 334 of file seqgraphic_render.hpp.

References x_Draw().

void CSeqGraphicRenderer::RenderPdf ( )

Definition at line 328 of file seqgraphic_render.hpp.

References x_DrawPdf().

Referenced by CSeqGraphicPane::RenderPdf().

void CSeqGraphicRenderer::ResetObjectSelection ( void  )
void CSeqGraphicRenderer::Resize ( const TVPRect rc)
void CSeqGraphicRenderer::SaveTrackConfig ( )
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 
void CSeqGraphicRenderer::SelectObjectSig ( const string obj_sig)
void CSeqGraphicRenderer::SetDSContext ( ISGDataSourceContext ds_ctx)
void CSeqGraphicRenderer::SetExternalGlyphs ( const CSeqGlyph::TObjects objs)
void CSeqGraphicRenderer::SetHighlightsColor ( const CRgbaColor color)
void CSeqGraphicRenderer::SetHorizontal ( bool  b_horz,
bool  b_flip,
const TVPRect rc,
bool  reset_model_limit = false 
void CSeqGraphicRenderer::SetHost ( ILayoutTrackHost host)

Definition at line 209 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 223 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 ( )

Definition at line 392 of file seqgraphic_render.hpp.

References m_NeedUpdateSelection.

Referenced by CSeqGraphicPane::LTH_OnLayoutChanged().

void CSeqGraphicRenderer::SetRulerSeqStart ( TSeqPos  pos)

Ruler Mark.

Definition at line 371 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)

Definition at line 340 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::SetTrackConfig().

void CSeqGraphicRenderer::SetUpdateContent ( )

Definition at line 255 of file seqgraphic_render.hpp.

References m_NeedUpdateContent.

Referenced by CSeqGraphicPane::SetUpdateContent().

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

Definition at line 717 of file seqgraphic_render.cpp.

References m_RenderingCtx, and CRenderingContext::SetViewWidth().

void CSeqGraphicRenderer::ShowAllTracks ( bool  shown)

Definition at line 155 of file seqgraphic_render.hpp.

References m_FeatPanel, and CTrackContainer::ShowAll().

Referenced by CSeqGraphicPane::ShowAllTracks().

void CSeqGraphicRenderer::ShowTrack ( const string track_key)

turn on an existing track.

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

Definition at line 359 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::ShowTrack().

void CSeqGraphicRenderer::SkipGenuineCheck ( )

skip track existence verification.

Assume tracks exist.

Definition at line 347 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::SkipGenuineCheck().

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

Definition at line 243 of file seqgraphic_render.hpp.

References m_NeedUpdateLayout.

void CSeqGraphicRenderer::UpdatePdfLayout ( )

Definition at line 249 of file seqgraphic_render.hpp.

References m_FeatPanel, and CFeaturePanel::Update().

Referenced by CSeqGraphicPane::UpdatePdfLayout().

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

Member Data Documentation

CRef<CSeqGraphicConfig> CSeqGraphicRenderer::m_ConfigSettings

Definition at line 172 of file seqgraphic_render.hpp.

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

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

Definition at line 170 of file seqgraphic_render.hpp.

Referenced by SetDSContext(), and SetInputObject().

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

Definition at line 187 of file seqgraphic_render.hpp.

Referenced by ZoomOnRange().

bool CSeqGraphicRenderer::m_Horz
TModelPoint CSeqGraphicRenderer::m_LensZoom

Definition at line 184 of file seqgraphic_render.hpp.

Referenced by SetLensZoom(), and x_DoLensZoom().

TModelUnit CSeqGraphicRenderer::m_MaxZoomSeq

X axis zoom limits.

Definition at line 183 of file seqgraphic_render.hpp.

TModelUnit CSeqGraphicRenderer::m_MinZoomSeq

Definition at line 182 of file seqgraphic_render.hpp.

CGlShader CSeqGraphicRenderer::m_MonochromeShader

Definition at line 180 of file seqgraphic_render.hpp.

Referenced by CSeqGraphicRenderer(), and x_Draw().

bool CSeqGraphicRenderer::m_NeedLensZoom

Definition at line 185 of file seqgraphic_render.hpp.

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

bool CSeqGraphicRenderer::m_NeedUpdateContent
bool CSeqGraphicRenderer::m_NeedUpdateLayout

Definition at line 194 of file seqgraphic_render.hpp.

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

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

Definition at line 188 of file seqgraphic_render.hpp.

Referenced by ZoomOnRange().

The documentation for this class was generated from the following files:
Modified on Wed Jun 20 12:08:28 2018 by rev. 546573