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

Search Toolkit Book for CFeatureTrack

CFeatureTrack –. More...

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

+ Inheritance diagram for CFeatureTrack:
+ Collaboration diagram for CFeatureTrack:

Public Types

enum  ELayout {
  eLayout_None , eLayout_Packed , eLayout_OneLine , eLayout_AdaptiveLayered ,
  eLayout_AdaptiveInline , eLayout_ExpandedLayered , eLayout_ExpandedColumn , eLayout_ExpandedByPos ,
  eLayout_ExpandedBySize , eLayout_Default = eLayout_AdaptiveLayered
}
 
enum  EAlignIconID { eIcon_Score = eIcon_MaxTrackIconID + 1 }
 
- Public Types inherited from CGlyphContainer
typedef vector< CRef< CCommentGlyph > > TComments
 
typedef set< stringTHighlights
 
typedef map< string, THighlightsTKeyHighlights
 
- Public Types inherited from CLayoutTrack
enum  FTrackAttr {
  fMovable = 1 << 0 , fCollapsible = 1 << 1 , fFrameVisible = 1 << 2 , fShowTitle = 1 << 3 ,
  fShowAlways = 1 << 4 , fFullTrack = 1 << 5 , fNavigable = 1 << 6 , fShowIcons = 1 << 7 ,
  fDefaultAttr
}
 
typedef vector< CConstRef< CSeqGlyph > > TLayObjVector
 
typedef unsigned TTrackAttrFlags
 
typedef list< CRef< CLayoutTrack > > TLayoutTracks
 
typedef map< string, stringTKeyValuePairs
 
- Public Types inherited from CSeqGlyph
enum  ENeighbours { eNghbrs_None = 0x0 , eNghbrs_Left = 0x1 , eNghbrs_Right = 0x2 , eNghbrs_Both = 0x3 }
 
typedef vector< CHTMLActiveAreaTAreaVector
 
typedef list< CRef< CSeqGlyph > > TObjects
 
typedef list< CConstRef< CSeqGlyph > > TConstObjects
 
- 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 Types inherited from IAsn1Generator
enum  EDataType { eDataType_Asn1 , eDataType_Snp , eDataType_Vcf }
 

Public Member Functions

 CFeatureTrack (CSGFeatureDS *ds, CRenderingContext *r_cntx)
 
virtual ~CFeatureTrack ()
 
virtual CRef< CSGGenBankDSGetDataSource ()
 CFeatureTrack inline methods. More...
 
virtual CConstRef< CSGGenBankDSGetDataSource () const
 
void SetAnnot (const string &annot)
 
void ExcludeAnnotName (const string &annot)
 
void SetFeatSubtype (int subtype)
 
void SetLayout (ELayout layout)
 
int GetFeatSubtype () const
 
virtual void GetFeatSubtypes (set< objects::CSeqFeatData::ESubtype > &subtypes) const
 
virtual string GetAnnot () const
 
CLayoutTrack public methods.
virtual const CTrackTypeInfoGetTypeInfo () const
 
virtual string GetFullTitle () const
 get a more meaningful title. More...
 
IAsn1Generator interface implementation
void GenerateAsn1 (objects::CSeq_entry &seq_entry, TSeqRange range)
 
virtual bool BypassStage1 ()
 
virtual bool CheckRange (TSeqRange range, string &, size_t &)
 
- Public Member Functions inherited from CDataTrack
 CDataTrack (CRenderingContext *r_cntx)
 
virtual ~CDataTrack ()
 
virtual void DeleteAllJobs ()
 
virtual bool AllJobsFinished () const
 
void OnAJNotification (CEvent *evt)
 event handlers for job notification event. More...
 
void OnAJProgress (CEvent *evt)
 
void SetVisRange (const TSeqRange &range)
 
virtual void Update (bool layout_only)
 Update content and layout including the bounding box. More...
 
- Public Member Functions inherited from CGlyphContainer
 CGlyphContainer (CRenderingContext *r_cntx)
 
virtual ~CGlyphContainer ()
 
void Add (CSeqGlyph *obj)
 Append a layout object to the end. More...
 
void SetObjects (const CLayoutGroup::TObjectList &objs)
 
virtual void SetComments (const string &comment_str)
 set comments. More...
 
virtual void SetHighlights (const string &hl_str)
 set a list of 'object' need to be highlighted. More...
 
void SetCommentGlyphs (const CSeqGlyph::TObjects &objs, CRef< CCommentConfig > config)
 
void ResetCommentGlyph ()
 
void SetLabelGlyphs (const CSeqGlyph::TObjects &objs, CRef< CCommentConfig > config)
 
void ResetLabelGlyph ()
 
const THighlightsGetHighlights () const
 
const TKeyHighlightsGetHighlightsByKey () const
 
CLayoutGroupSetGroup ()
 
const CLayoutGroupGetGroup () const
 
CLayoutGroup::TObjectListSetChildren ()
 
const CLayoutGroup::TObjectListGetChildren () const
 
bool Empty () const
 
void SetLayoutPolicy (ILayoutPolicy *policy)
 Set policy on how to deploy the layout of its children. More...
 
virtual CRef< CSeqGlyphHitTest (const TModelPoint &p)
 Hit testing. More...
 
virtual bool HitTestHor (TSeqPos x, const CObject *obj)
 
virtual bool Intersects (const TModelRect &rect, TConstObjects &objs) const
 Intersect testing. More...
 
virtual void GetHTMLActiveAreas (TAreaVector *p_areas) const
 Get html active areas. More...
 
virtual bool Accept (IGlyphVisitor *visitor)
 Interface for accepting an IGlyphVisitor. More...
 
- Public Member Functions inherited from CLayoutTrack
 CLayoutTrack (CRenderingContext *r_cntx)
 
virtual ~CLayoutTrack ()
 
void LoadProfile (const string &profile_str)
 set track profile and load settings. More...
 
void SaveProfile ()
 
void SetProfile (const string &preset_style)
 CLayoutTrack inline method implmentation. More...
 
const stringGetProfile () const
 
string GetTitle () const
 get the track title. More...
 
const TTrackErrorStatusGetErrorStatus () const
 
void SetErrorStatus (const TTrackErrorStatus &ErrorStatus)
 
bool isInErrorStatus () const
 
bool isRmtBased () const
 
bool isRemotePath () const
 
virtual CHTMLActiveAreaInitHTMLActiveArea (TAreaVector *p_areas) const
 Initialize the HTML active area for a track. More...
 
void MouseOut ()
 
bool OnMotion (const TModelPoint &pt)
 
bool GetShowTitle () const
 
void SetShowTitle (bool flag)
 
void SetConfig (CRef< CSeqGraphicConfig > conf)
 
int GetIndent () const
 
void SetIndent (int indent)
 
void SetMsg (const string &msg)
 
void SetParentTrack (CLayoutTrack *parent)
 
CLayoutTrackGetParentTrack ()
 
const CLayoutTrackGetParentTrack () const
 
bool IsOn () const
 
bool IsExpanded () const
 
bool IsMovable () const
 
bool IsCollapsible () const
 
void SetShow (bool shown)
 set the flag only. More...
 
void SetExpanded (bool f)
 
void SetShowFrame (bool show)
 
void MoveTo (TModelUnit y)
 
void SetTrackAttr (TTrackAttrFlags flags)
 
void SetTitle (const string &label, const string &default_title=NcbiEmptyString)
 
void SetIsBlast (bool isBlast)
 
void SetHost (ILayoutTrackHost *host)
 
void SetOrder (int order)
 
int GetOrder () const
 
void SetId (const string &id)
 
const stringGetId () const
 
void CloseMe ()
 close this track. More...
 
void ShowMe ()
 
void Expand (bool expand)
 Collapse or expand the track. More...
 
virtual bool OnLeftDown (const TModelPoint &p)
 
virtual bool OnLeftDblClick (const TModelPoint &p)
 
virtual bool NeedTooltip (const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
 Check if need to show tooltip. More...
 
virtual void GetTooltip (const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
 Get the tooltip if available. More...
 
- Public Member Functions inherited from CSeqGlyph
 CSeqGlyph ()
 
virtual ~CSeqGlyph ()
 
virtual TSeqRange GetRange (void) const
 get the total range of this object. More...
 
virtual bool SetSelected (bool flag)
 Select or deselect this glyph. More...
 
virtual void SetHideLabel (bool)
 Force to hide label. More...
 
virtual bool HasSideLabel () const
 Query if there is label and label is on the side. More...
 
virtual bool IsClickable () const
 Query if this glyph is clickable. More...
 
virtual bool LessBySeqPos (const CSeqGlyph &obj) const
 compare this object to another based on glyph sequence position. More...
 
bool LessByPos (const CSeqGlyph &obj) const
 compare this object to another, based on glyph geometry position. More...
 
bool LessBySeqSize (const CSeqGlyph &obj) const
 compare this object to another, based on sequence size. More...
 
bool LessBySize (const CSeqGlyph &obj) const
 compare this object to another, based on geometry size. More...
 
void Draw () const
 render the layout. More...
 
TModelRect GetModelRect () const
 get the bounding box. More...
 
bool IsIn (const TModelPoint &p) const
 Hit test for points in PARENT COORD. More...
 
bool IsIn (TModelUnit x, TModelUnit y) const
 
bool IsInHor (TModelUnit x) const
 
void SetRender (IGlyphRenderer *renderer)
 set customized renderer for this layout objects. More...
 
void SetRenderingContext (CRenderingContext *context)
 Set the rendering context. More...
 
const CRenderingContextGetRenderingContext () const
 Get the rendering context. More...
 
void SetTearline (size_t Tearline)
 tearline factor – used to limit a list of glyphs More...
 
size_t GetTearline () const
 
void SetTearlineText (const string &sTearlineText)
 tearline text – if set, is appended to the glyph name (does not naffect processing otherwise) More...
 
string GetTearlineText () const
 
void SetRowNum (size_t cur_row)
 
size_t GetRowNum () const
 
void SetVisible (size_t v)
 
size_t GetVisible () const
 
int GetLevel () const
 
void SetLevel (int Level)
 
virtual string GetPName () const
 persistent name of the glyph should not depend on the instance of the glyph, but should uniquely reflect its contents so two glyphs having the same contents will have the same name currently used to track isDrawn() status for expandable glyphs default implementation returns an empty string implementations exist for CFeatGlyph (name of the contained feature) and CLayoutGroup (concatenation of all sorted children names) More...
 
float GetFadeFactor () const
 
virtual bool OnLeftUp (const TModelPoint &)
 
virtual bool OnContextMenu (wxContextMenuEvent &event)
 
bool IsSelected () const
 
bool IsHighlighted () const
 
CRgbaColorGetHighlightsColor () const
 
virtual TModelUnit GetHeight () const
 
virtual TModelUnit GetWidth () const
 
virtual TModelUnit GetLeft () const
 
virtual TModelUnit GetTop () const
 
virtual TModelUnit GetRight () const
 
virtual TModelUnit GetBottom () const
 
const TModelPointGetPos () const
 
void GetPosInWorld (TModelPoint &pos) const
 Get top left position in world coordinate. More...
 
const CSeqGlyphGetParent (void) const
 
CSeqGlyphGetParent (void)
 
ENeighbours GetNeighbours () const
 
void SetHighlighted (bool flag)
 
void SetHighlightsColor (const CRgbaColor &hl_color)
 
void SetHighlightsColor (const string &hl_color_str)
 
virtual void SetWidth (TModelUnit w)
 
virtual void SetHeight (TModelUnit h)
 
virtual void SetLeft (TModelUnit l)
 
virtual void SetTop (TModelUnit b)
 
virtual void SetPos (const TModelPoint &upper_left)
 
void SetParent (CSeqGlyph *p)
 
CSeqGlyphSetParent (void)
 
void SetNeighbours (ENeighbours neighbours)
 
- 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 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...
 
- Public Member Functions inherited from IAsn1Generator
virtual ~IAsn1Generator ()
 
virtual EDataType GetDataType () const
 
- Public Member Functions inherited from IFeatureTrackBase
virtual ~IFeatureTrackBase ()
 
virtual bool IsVarTrack () const
 
virtual bool IsSnpTrack () const
 

Static Public Member Functions

static ELayout LayoutStrToValue (const string &layout)
 
static const stringLayoutValueToStr (ELayout layout)
 
static ELinkedFeatDisplay LinkedFeatDisplayStrToValue (const string &linked_feat)
 
static const stringLinkedFeatDisplayValueToStr (ELinkedFeatDisplay linked_feat)
 
- Static Public Member Functions inherited from CLayoutTrack
static void RegisterIconImage (const TIconAlias &key, const string &img_file)
 register the image for an icon. More...
 
- Static Public Member Functions inherited from CSeqGlyph
static bool PointInRect (const TModelPoint &p, const TModelRect &rc)
 
static bool PointInRect (TModelUnit x, TModelUnit y, const TModelRect &rc)
 
- 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 Member Functions inherited from IAsn1Generator
static string DataTypeToString (EDataType data_type)
 

Protected Member Functions

virtual void x_LoadFeatures (const TSeqRange &range, int feat_limit)
 
void x_AddFeaturesLayout (const CSGJobResult &result)
 
bool x_NeedHighlight (const CSeqGlyph::TObjects &objs) const
 
bool x_NeedHighlight (const CSeqGlyph *glyph) const
 
void x_RegroupFeats (CSeqGlyph::TObjects &objs, ELinkedFeatDisplay link_mode)
 rearrange the child features if necessary. More...
 
bool x_InitGlyphs_Recursive (CSeqGlyph::TObjects &objs, int curr_level, bool compact_mode)
 initialize all children. More...
 
void x_ExtracGlyphs_Recursive (CSeqGlyph::TObjects &objs, CLinkedFeatsGroup *feat_group)
 
void x_CountFeats_recursive (const CSeqGlyph::TObjects &objs, int &count, bool is_overview)
 
void x_OnContentIconClicked ()
 
void x_OnLayoutIconClicked ()
 
void x_InitLayoutPolicy (CLayoutGroup &group, ELinkedFeatDisplay link_mode)
 
virtual void x_OnLayoutPolicyChanged ()
 
void x_AdjustFeatureLayout ()
 
bool x_HasLinkedFeats () const
 
void x_SortFeaturesByWeight (CSeqGlyph::TObjects &objs) const
 
void x_AddHistogram (CHistogramGlyph *hist, int layout=-1)
 
CLayoutTrack virtual methods overloading.
virtual void x_LoadSettings (const string &, const TKeyValuePairs &settings)
 load the track settings. More...
 
virtual void x_SaveSettings (const string &)
 save part of settings to a profile string. More...
 
virtual void x_ParseSettings (const TKeyValuePairs &settings)
 
virtual void x_OnIconClicked (TIconID id)
 Mouse left-click event handler on an icon. More...
 
CDataTrack pure virtual interfaces
virtual void x_UpdateData ()
 update track content. More...
 
virtual void x_OnJobCompleted (CAppJobNotification &notify)
 
- Protected Member Functions inherited from CDataTrack
 DECLARE_EVENT_MAP ()
 
virtual void x_Expand (bool expand)
 Collapse or expand the track. More...
 
void x_UpdateLayout ()
 
const TSeqRangex_GetVisRange () const
 
virtual bool x_IsJobNeeded (CAppJobDispatcher::TJobID id) const
 
virtual void x_OnJobFailed (CAppJobNotification &notify)
 
virtual void x_OnAllJobsFinished ()
 
- Protected Member Functions inherited from CGlyphContainer
virtual void x_UpdateBoundingBox ()
 Update the bounding box assuming children's sizes are fixed if any. More...
 
virtual string x_GetHistMsg () const
 Histogram configuration (linear, log, etc) is also on the title bar but multiple track types can have histograms, so we use virtual functinons. More...
 
virtual void x_RenderContent () const
 The content rendering must be implemented in the derived layout tracks. More...
 
virtual bool x_Empty () const
 
virtual void x_ClearContent ()
 
- Protected Member Functions inherited from CLayoutTrack
virtual void x_Draw () const
 The default renderer for this layout object. More...
 
virtual bool x_ShowTitle () const
 Need to preserve title space and show the title. More...
 
TModelUnit x_GetTBHeight () const
 Get title bar height including margin. More...
 
CConstRef< CSeqGraphicConfigx_GetGlobalConfig () const
 Method for getting global configuration from rendering context. More...
 
void x_OnLayoutChanged ()
 update the layout. More...
 
virtual void x_GetTBRect (TModelRect &rc) const
 Get title bar rectange exclude top margin. More...
 
virtual void x_RenderProgressBar () const
 Method for rendering the job loading or layout generating progress. More...
 
virtual void x_RenderTitleBar () const
 Method for rendering the track title bar. More...
 
virtual void x_RenderIcon (TIconID id, bool highlighted, bool lite_version=false) const
 Render track icons. More...
 
virtual int x_GetIconState (TIconID id) const
 Get current status for a given button. More...
 
void x_RegisterIcon (const SIconInfo &icon)
 register track icons. More...
 
void x_DeregisterIcon (TIconID id)
 deregister an icon if already registered. More...
 
void x_EnableIcon (TIconID id, bool enabled)
 Enable/disable an existing icon. More...
 
void x_ShowIcon (TIconID id, bool shown)
 Show/hide an existing icon. More...
 
int x_HitIconTest (const TModelPoint &p) const
 hit any icon?. More...
 
bool x_HitTitleBar (const TModelPoint &p) const
 hit the title bar?. More...
 
void x_SetStatus (const string &msg, int progress)
 
void x_SetStartStatus ()
 
void x_SetFinishStatus ()
 
bool x_IsNCBITrack () const
 Indicates whether the track is NCBI track. More...
 
- Protected Member Functions inherited from CSeqGlyph
virtual void x_DrawHighlight () const
 
void x_DrawInnerLabelColumns (TModelUnit base, const string &label, const CRgbaColor &color, const CGlTextureFont &font, bool side_label_visible) const
 
void x_DrawInnerLabels (TModelUnit base, const string &label, const CRgbaColor &color, const CGlTextureFont &font, bool side_label_visible, bool inside_only, vector< TModelRange > *labels_ranges=nullptr, TSeqRange *interval=nullptr, bool XOR_mode=false) const
 
void x_DrawTruncatedLabel (const string &label, const CGlTextureFont &font, TModelUnit width, TModelUnit x, TModelUnit y, vector< TModelRange > *labels_ranges=nullptr) const
 
void x_DrawException () const
 Draw a shading background to indicate exception. More...
 
void x_Parent2Local (TModelPoint &pnt) const
 Transform the coordiante from parent coord. to local coord. More...
 
void x_Parent2Local (TModelUnit &, TModelUnit &y) const
 Transform the coordiante from parent coord. to local coord. More...
 
void x_Parent2Local (TModelRect &rect) const
 Transform the coordiante from parent coord. to local coord. More...
 
void x_World2Local (TModelPoint &p) const
 Transform the coordiante from world coord. to local coord. More...
 
void x_World2Local (TModelUnit &x, TModelUnit &y) const
 
void x_Local2World (TModelPoint &p) const
 Transform the coordiantes from local coord. to world coord. More...
 
void x_Local2World (TModelUnit &x, TModelUnit &y) const
 
void x_InitHTMLActiveArea (CHTMLActiveArea &area) const
 initialize the basic information for a given active area. More...
 
bool x_Visible_V () const
 is this glyph visible in vertical direction? More...
 
template<class T >
bool x_IntersectVisible (const CRange< T > &SeqRange, T &from, T &to) const
 
- 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)
 

Protected Attributes

string m_AnnotName
 
string m_Annot
 
string m_Subtitle
 
CRef< CSGFeatureDSm_DS
 
objects::SAnnotSelector m_FeatSel
 
CSeqGraphicConfig::TFeatSubtype m_Subtype
 
int m_FeatLimits
 maximal number of features shown in on track. More...
 
int m_CompactThreshold
 Feature number threshold between compact mode and non-compact mode. More...
 
int m_MaxRow
 Maximal number of feature rows in one feature track. More...
 
int m_MaxAdaptiveHeight = 400
 Maximal feature group pixel height in adaptive mode. More...
 
ELayout m_Layout
 
ELinkedFeatDisplay m_LinkedFeat
 
size_t m_HistThreshold
 An independent histogram threshold used by SViewer. More...
 
CRef< CColumnLayoutm_Column
 
CRef< CSimpleLayoutm_GroupSimple
 
CRef< CLayeredLayoutm_GroupLayered
 
CRef< CLayeredLayoutm_LinkedGroup
 
CRef< CCompactLayoutm_Compact
 
CRef< CBoundaryParamsm_GroupConfig
 
bool m_HasLinkedFeats
 
- Protected Attributes inherited from CGlyphContainer
CLayoutGroup m_Group
 
CRef< CSimpleLayoutm_Simple
 
CRef< CInlineLayoutm_Inline
 
CRef< CLayeredLayoutm_Layered
 
- Protected Attributes inherited from CLayoutTrack
int m_Order
 track order number More...
 
string m_Id
 track identifier More...
 
bool m_On
 is this track shown More...
 
bool m_ShowFrame
 need to draw frame, not title More...
 
bool m_Expanded
 is this track in expanded state More...
 
TIcons m_Icons
 registered icon info More...
 
int m_HighlightedIcon
 the highlighted icon index More...
 
TTrackAttrFlags m_Attrs
 various track attributes More...
 
ILayoutTrackHostm_LTHost
 Top level host owning the tracks. More...
 
string m_Title
 track title More...
 
bool m_isBlast {false}
 true if the track is known to be generated and uploaded by BLAST More...
 
string m_DefaultTitle
 Default track title. More...
 
string m_Msg
 special message need to show on title bar More...
 
int m_Progress
 any job progress index (0 - 100) More...
 
int m_IndentLevel
 track hierachy indentation level. More...
 
TTrackErrorStatus m_ErrorStatus
 
CRef< CSeqGraphicConfigm_gConfig
 global configuration. More...
 
string m_Profile = "Default"
 track setting profile More...
 
- Protected Attributes inherited from CSeqGlyph
CSeqGlyphm_Parent
 parent/child relationships for this feature More...
 
CRenderingContextm_Context
 the rendering context More...
 
unique_ptr< CRgbaColorm_HighlightsColor
 Highlight color. More...
 
ENeighbours m_Neighbours
 Indicates whether the glyph has neighbours. More...
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

Static Protected Attributes

static CTrackTypeInfo m_TypeInfo
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Private Member Functions

prohibited copy constructor and assignment operator.
 CFeatureTrack (const CFeatureTrack &)
 
CFeatureTrackoperator= (const CFeatureTrack &)
 

Friends

class CFeatureTrackFactory
 

Additional Inherited Members

- 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 Types inherited from CLayoutTrack
enum  EIconID {
  eIcon_Close = 0 , eIcon_Expand , eIcon_Content , eIcon_Layout ,
  eIcon_Settings , eIcon_Help , eIcon_MaxTrackIconID = 100
}
 Icon id used in layout track. More...
 
typedef int TIconID
 use int as TIconID instead of EIconID. More...
 
typedef string TIconAlias
 the icon alias used as a key More...
 
typedef vector< SIconInfoTIcons
 
- Static Protected Member Functions inherited from CLayoutTrack
static void RegisterCommonIconImages ()
 register images for the common icons. More...
 
static bool InitIconTextures ()
 initialize OpenGL ttexture objects for icons. More...
 

Detailed Description

CFeatureTrack –.

Definition at line 61 of file feature_track.hpp.

Member Enumeration Documentation

◆ EAlignIconID

Enumerator
eIcon_Score 

Definition at line 80 of file feature_track.hpp.

◆ ELayout

Enumerator
eLayout_None 

unassigned layout

eLayout_Packed 

pack all feature into a histogram

eLayout_OneLine 

pack all feature into one line

eLayout_AdaptiveLayered 

adaptively switch between packed and layered

eLayout_AdaptiveInline 

adaptively switch between packed and inline

eLayout_ExpandedLayered 

show all features with layered layout

eLayout_ExpandedColumn 

show all features with column layout

eLayout_ExpandedByPos 

show all features, one per row sorted by pos

eLayout_ExpandedBySize 

one feature per row sorted by size

eLayout_Default 

Definition at line 67 of file feature_track.hpp.

Constructor & Destructor Documentation

◆ CFeatureTrack() [1/2]

CFeatureTrack::CFeatureTrack ( CSGFeatureDS ds,
CRenderingContext r_cntx 
)

◆ ~CFeatureTrack()

CFeatureTrack::~CFeatureTrack ( )
virtual

◆ CFeatureTrack() [2/2]

CFeatureTrack::CFeatureTrack ( const CFeatureTrack )
private

Member Function Documentation

◆ BypassStage1()

virtual bool CFeatureTrack::BypassStage1 ( )
inlinevirtual

Implements IAsn1Generator.

Reimplemented in CVcfTrack.

Definition at line 107 of file feature_track.hpp.

◆ CheckRange()

virtual bool CFeatureTrack::CheckRange ( TSeqRange  range,
string ,
size_t &   
)
inlinevirtual

Implements IAsn1Generator.

Reimplemented in CVcfTrack.

Definition at line 112 of file feature_track.hpp.

◆ ExcludeAnnotName()

void CFeatureTrack::ExcludeAnnotName ( const string annot)

Definition at line 226 of file feature_track.cpp.

References m_FeatSel.

◆ GenerateAsn1()

void CFeatureTrack::GenerateAsn1 ( objects::CSeq_entry &  seq_entry,
TSeqRange  range 
)
virtual

◆ GetAnnot()

virtual string CFeatureTrack::GetAnnot ( void  ) const
inlinevirtual

Implements IFeatureTrackBase.

Definition at line 122 of file feature_track.hpp.

References m_Annot.

◆ GetDataSource() [1/2]

CRef< CSGGenBankDS > CFeatureTrack::GetDataSource ( void  )
inlinevirtual

CFeatureTrack inline methods.

Implements CDataTrack.

Definition at line 330 of file feature_track.hpp.

References CRef< C, Locker >::GetPointer(), and m_DS.

◆ GetDataSource() [2/2]

CConstRef< CSGGenBankDS > CFeatureTrack::GetDataSource ( void  ) const
inlinevirtual

Implements CDataTrack.

Definition at line 336 of file feature_track.hpp.

References CRef< C, Locker >::GetPointer(), and m_DS.

◆ GetFeatSubtype()

int CFeatureTrack::GetFeatSubtype ( ) const
inline

◆ GetFeatSubtypes()

virtual void CFeatureTrack::GetFeatSubtypes ( set< objects::CSeqFeatData::ESubtype > &  subtypes) const
inlinevirtual

Implements IFeatureTrackBase.

Reimplemented in CAggregateFeatureTrack.

Definition at line 121 of file feature_track.hpp.

References set< Key, Compare >::insert(), and m_Subtype.

◆ GetFullTitle()

string CFeatureTrack::GetFullTitle ( ) const
virtual

get a more meaningful title.

This allows a concrete track to compose a more meaningful title in a more complex way.

Reimplemented from CLayoutTrack.

Reimplemented in CAggregateFeatureTrack.

Definition at line 190 of file feature_track.cpp.

References CLayoutTrack::GetTitle(), CSeqUtils::IsUnnamed(), and m_AnnotName.

◆ GetTypeInfo()

const CTrackTypeInfo & CFeatureTrack::GetTypeInfo ( void  ) const
virtual

Reimplemented from CGlyphContainer.

Reimplemented in CVcfTrack, CVarTrack, and CAggregateFeatureTrack.

Definition at line 184 of file feature_track.cpp.

References m_TypeInfo.

◆ LayoutStrToValue()

CFeatureTrack::ELayout CFeatureTrack::LayoutStrToValue ( const string layout)
static

Definition at line 88 of file feature_track.cpp.

References NCBI_THROW, and sm_LayoutMap.

Referenced by CFeatureTrackFactory::x_GetSettings(), and x_ParseSettings().

◆ LayoutValueToStr()

const string & CFeatureTrack::LayoutValueToStr ( CFeatureTrack::ELayout  layout)
static

Definition at line 98 of file feature_track.cpp.

References kEmptyStr, and sm_LayoutMap.

Referenced by CFeatureTrackFactory::x_GetSettings(), and x_SaveSettings().

◆ LinkedFeatDisplayStrToValue()

ELinkedFeatDisplay CFeatureTrack::LinkedFeatDisplayStrToValue ( const string linked_feat)
static

Definition at line 123 of file feature_track.cpp.

References NCBI_THROW.

Referenced by CFeatureTrackFactory::x_GetSettings(), and x_ParseSettings().

◆ LinkedFeatDisplayValueToStr()

const string & CFeatureTrack::LinkedFeatDisplayValueToStr ( ELinkedFeatDisplay  linked_feat)
static

◆ operator=()

CFeatureTrack& CFeatureTrack::operator= ( const CFeatureTrack )
private

◆ SetAnnot()

void CFeatureTrack::SetAnnot ( const string annot)

◆ SetFeatSubtype()

void CFeatureTrack::SetFeatSubtype ( int  subtype)

◆ SetLayout()

void CFeatureTrack::SetLayout ( ELayout  layout)
inline

Definition at line 342 of file feature_track.hpp.

References m_Layout.

◆ x_AddFeaturesLayout()

void CFeatureTrack::x_AddFeaturesLayout ( const CSGJobResult result)
protected

◆ x_AddHistogram()

void CFeatureTrack::x_AddHistogram ( CHistogramGlyph hist,
int  layout = -1 
)
protected

◆ x_AdjustFeatureLayout()

void CFeatureTrack::x_AdjustFeatureLayout ( )
protected

Definition at line 505 of file feature_track.cpp.

References _ASSERT, eLFD_Hidden, eLFD_Invalid, CSeqGraphicConfig::GetBGCommentColor(), CGlyphContainer::GetChildren(), CLayoutGroup::GetChildren(), CSeqGraphicConfig::GetCommentFont(), CSeqGraphicConfig::GetCommentRepeatDist(), CSeqGraphicConfig::GetFGCommentColor(), CLayoutTrack::GetIndent(), CSeqGraphicConfig::GetObjectSpace(), CRef< C, Locker >::GetPointer(), CSeqGraphicConfig::GetRepeatComment(), CSeqGraphicConfig::GetShowComments(), CRenderingContext::IsOverviewMode(), ITERATE, m_Column, m_Compact, m_CompactThreshold, CSeqGlyph::m_Context, CLayoutTrack::m_gConfig, m_GroupLayered, m_GroupSimple, m_HasLinkedFeats, CGlyphContainer::m_Layered, m_LinkedFeat, m_LinkedGroup, m_MaxRow, NON_CONST_ITERATE, s_IsSetWeight(), CNamedGroup::SetBackgroundColor(), CGlyphContainer::SetChildren(), CLayoutGroup::SetChildren(), CGlyphContainer::SetGroup(), CNamedGroup::SetIndent(), CGlyphContainer::SetLayoutPolicy(), CLayoutGroup::SetLinkedFeat(), CLayeredLayout::SetMaxRow(), CNamedGroup::SetRepeatDist(), CNamedGroup::SetRepeatTitle(), CNamedGroup::SetShowTitle(), CLayeredLayout::SetSorted(), CNamedGroup::SetTitleColor(), CNamedGroup::SetTitleFont(), CColumnLayout::SetVertSpace(), CCompactLayout::SetVertSpace(), CLayeredLayout::SetVertSpace(), CSimpleLayout::SetVertSpace(), x_CountFeats_recursive(), x_InitGlyphs_Recursive(), x_InitLayoutPolicy(), x_RegroupFeats(), and x_SortFeaturesByWeight().

Referenced by x_AddFeaturesLayout(), and CVcfTrack::x_OnJobCompleted().

◆ x_CountFeats_recursive()

void CFeatureTrack::x_CountFeats_recursive ( const CSeqGlyph::TObjects objs,
int count,
bool  is_overview 
)
protected

Definition at line 891 of file feature_track.cpp.

References count, CLayoutGroup::GetChildren(), ITERATE, and m_HasLinkedFeats.

Referenced by x_AdjustFeatureLayout().

◆ x_ExtracGlyphs_Recursive()

void CFeatureTrack::x_ExtracGlyphs_Recursive ( CSeqGlyph::TObjects objs,
CLinkedFeatsGroup feat_group 
)
protected

◆ x_HasLinkedFeats()

bool CFeatureTrack::x_HasLinkedFeats ( ) const
inlineprotected

Definition at line 354 of file feature_track.hpp.

References m_HasLinkedFeats.

Referenced by x_AddFeaturesLayout().

◆ x_InitGlyphs_Recursive()

bool CFeatureTrack::x_InitGlyphs_Recursive ( CSeqGlyph::TObjects objs,
int  curr_level,
bool  compact_mode 
)
protected

◆ x_InitLayoutPolicy()

void CFeatureTrack::x_InitLayoutPolicy ( CLayoutGroup group,
ELinkedFeatDisplay  link_mode 
)
protected

◆ x_LoadFeatures()

void CFeatureTrack::x_LoadFeatures ( const TSeqRange range,
int  feat_limit 
)
protectedvirtual

◆ x_LoadSettings()

void CFeatureTrack::x_LoadSettings ( const string preset_style,
const TKeyValuePairs settings 
)
protectedvirtual

◆ x_NeedHighlight() [1/2]

bool CFeatureTrack::x_NeedHighlight ( const CSeqGlyph glyph) const
protected

◆ x_NeedHighlight() [2/2]

bool CFeatureTrack::x_NeedHighlight ( const CSeqGlyph::TObjects objs) const
protected

◆ x_OnContentIconClicked()

void CFeatureTrack::x_OnContentIconClicked ( )
protected

◆ x_OnIconClicked()

void CFeatureTrack::x_OnIconClicked ( TIconID  id)
protectedvirtual

Mouse left-click event handler on an icon.

In this class, only clicks on close and expand icons are handled. Any other icons are very likely track-specific, so they need to be handled in the derived tracks.

Reimplemented from CLayoutTrack.

Reimplemented in CIntronTrack.

Definition at line 395 of file feature_track.cpp.

References CLayoutTrack::eIcon_Content, CLayoutTrack::eIcon_Layout, x_OnContentIconClicked(), CLayoutTrack::x_OnIconClicked(), and x_OnLayoutIconClicked().

Referenced by CIntronTrack::x_OnIconClicked().

◆ x_OnJobCompleted()

void CFeatureTrack::x_OnJobCompleted ( CAppJobNotification notify)
protectedvirtual

◆ x_OnLayoutIconClicked()

void CFeatureTrack::x_OnLayoutIconClicked ( )
protected

◆ x_OnLayoutPolicyChanged()

void CFeatureTrack::x_OnLayoutPolicyChanged ( )
protectedvirtual

◆ x_ParseSettings()

void CFeatureTrack::x_ParseSettings ( const TKeyValuePairs settings)
protectedvirtual

◆ x_RegroupFeats()

void CFeatureTrack::x_RegroupFeats ( CSeqGlyph::TObjects objs,
ELinkedFeatDisplay  link_mode 
)
protected

◆ x_SaveSettings()

void CFeatureTrack::x_SaveSettings ( const string )
protectedvirtual

save part of settings to a profile string.

Only the potential settings changed by users will be saved.

Reimplemented from CLayoutTrack.

Definition at line 386 of file feature_track.cpp.

References CSGConfigUtils::ComposeProfileString(), LayoutValueToStr(), LinkedFeatDisplayValueToStr(), m_Layout, m_LinkedFeat, and CLayoutTrack::SetProfile().

Referenced by x_OnContentIconClicked(), and x_OnLayoutIconClicked().

◆ x_SortFeaturesByWeight()

void CFeatureTrack::x_SortFeaturesByWeight ( CSeqGlyph::TObjects objs) const
protected

Definition at line 1098 of file feature_track.cpp.

References s_FeatByWeight().

Referenced by x_AdjustFeatureLayout().

◆ x_UpdateData()

void CFeatureTrack::x_UpdateData ( )
protectedvirtual

Friends And Related Function Documentation

◆ CFeatureTrackFactory

friend class CFeatureTrackFactory
friend

Definition at line 64 of file feature_track.hpp.

Member Data Documentation

◆ m_Annot

string CFeatureTrack::m_Annot
protected

◆ m_AnnotName

string CFeatureTrack::m_AnnotName
protected

◆ m_Column

CRef<CColumnLayout> CFeatureTrack::m_Column
protected

◆ m_Compact

CRef<CCompactLayout> CFeatureTrack::m_Compact
protected

◆ m_CompactThreshold

int CFeatureTrack::m_CompactThreshold
protected

Feature number threshold between compact mode and non-compact mode.

Maximal number of features shown in the non-compact mode

Definition at line 209 of file feature_track.hpp.

Referenced by x_AdjustFeatureLayout(), x_LoadSettings(), and CVcfTrack::x_OnJobCompleted().

◆ m_DS

CRef<CSGFeatureDS> CFeatureTrack::m_DS
protected

◆ m_FeatLimits

int CFeatureTrack::m_FeatLimits
protected

maximal number of features shown in on track.

-1 means no limitation

Definition at line 206 of file feature_track.hpp.

Referenced by x_AddFeaturesLayout(), x_OnLayoutPolicyChanged(), and x_UpdateData().

◆ m_FeatSel

objects::SAnnotSelector CFeatureTrack::m_FeatSel
protected

◆ m_GroupConfig

CRef<CBoundaryParams> CFeatureTrack::m_GroupConfig
protected

Definition at line 228 of file feature_track.hpp.

Referenced by x_InitGlyphs_Recursive().

◆ m_GroupLayered

CRef<CLayeredLayout> CFeatureTrack::m_GroupLayered
protected

◆ m_GroupSimple

CRef<CSimpleLayout> CFeatureTrack::m_GroupSimple
protected

◆ m_HasLinkedFeats

bool CFeatureTrack::m_HasLinkedFeats
protected

◆ m_HistThreshold

size_t CFeatureTrack::m_HistThreshold
protected

An independent histogram threshold used by SViewer.

It differs from m_FeatLimits which tries to capture all possible rendering layouts. 0 means this value has no any effect.

Definition at line 222 of file feature_track.hpp.

Referenced by x_OnLayoutPolicyChanged(), and x_ParseSettings().

◆ m_Layout

ELayout CFeatureTrack::m_Layout
protected

◆ m_LinkedFeat

ELinkedFeatDisplay CFeatureTrack::m_LinkedFeat
protected

◆ m_LinkedGroup

CRef<CLayeredLayout> CFeatureTrack::m_LinkedGroup
protected

◆ m_MaxAdaptiveHeight

int CFeatureTrack::m_MaxAdaptiveHeight = 400
protected

Maximal feature group pixel height in adaptive mode.

Definition at line 213 of file feature_track.hpp.

Referenced by x_AddFeaturesLayout(), and x_LoadSettings().

◆ m_MaxRow

int CFeatureTrack::m_MaxRow
protected

Maximal number of feature rows in one feature track.

Definition at line 211 of file feature_track.hpp.

Referenced by x_AdjustFeatureLayout(), and x_LoadSettings().

◆ m_Subtitle

string CFeatureTrack::m_Subtitle
protected

Definition at line 199 of file feature_track.hpp.

Referenced by SetFeatSubtype().

◆ m_Subtype

CSeqGraphicConfig::TFeatSubtype CFeatureTrack::m_Subtype
protected

◆ m_TypeInfo

CTrackTypeInfo CFeatureTrack::m_TypeInfo
staticprotected

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