NCBI C++ ToolKit
|
Search Toolkit Book for CLinkedFeatsGroup
CLinkedFeatsGroup is a container class contains related features. More...
#include <gui/widgets/seq_graphic/gene_model_group.hpp>
Public Types | |
enum | FLabelType { fLabel_ParentLabel = 1 << 0 , fLabel_FeatNum = 1 << 1 , fLabel_Both = fLabel_ParentLabel | fLabel_FeatNum } |
Public Types inherited from CSeqGlyph | |
enum | ENeighbours { eNghbrs_None = 0x0 , eNghbrs_Left = 0x1 , eNghbrs_Right = 0x2 , eNghbrs_Both = 0x3 } |
typedef vector< CHTMLActiveArea > | TAreaVector |
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< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Types inherited from IObjectBasedGlyph | |
typedef vector< TSeqRange > | TIntervals |
Public Member Functions | |
CLinkedFeatsGroup () | |
CLinkedFeatsGroup implementations. More... | |
virtual | ~CLinkedFeatsGroup (void) |
void | SetConfig (const CFeatureParams *conf) |
CLayoutGroup & | SetGroup () |
void | SetParentFeat (const CFeatGlyph *feat) |
CConstRef< CFeatGlyph > | GetParentFeat () const |
void | SetLabelType (FLabelType type) |
void | SetFirstIsParent () |
bool | isRmtBased () const |
void | SetShowLabel (bool show_label=true) |
CSeqGlyph interface implementation | |
virtual void | Update (bool layout_only) |
Update content and layout including the bounding box. More... | |
virtual CRef< CSeqGlyph > | HitTest (const TModelPoint &p) |
Hit testing. More... | |
virtual bool | Intersects (const TModelRect &rect, TConstObjects &objs) const |
Intersect testing. More... | |
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... | |
virtual void | GetHTMLActiveAreas (TAreaVector *p_areas) const |
Get html active areas. More... | |
virtual TSeqRange | GetRange (void) const |
get the total range of this object. More... | |
virtual bool | SetSelected (bool f) |
Select or deselect this glyph. More... | |
virtual bool | Accept (IGlyphVisitor *visitor) |
Interface for accepting an IGlyphVisitor. More... | |
virtual bool | IsClickable () const |
Query if this glyph is clickable. More... | |
IObjectBasedGlyph interface implement | |
virtual const objects::CSeq_loc & | GetLocation () const |
access the position of this object. More... | |
virtual CConstRef< CObject > | GetObject (TSeqPos pos) const |
access our core component - we wrap an object(s) of some sort. More... | |
virtual void | GetObjects (vector< CConstRef< CObject > > &objs) const |
retrieve CObjects corresponding to this CSeqGlyph. More... | |
virtual bool | HasObject (CConstRef< CObject > obj) const |
check if the wrapped object(s) is the one. More... | |
virtual string | GetSignature () const |
return signature for this glyph. More... | |
virtual const TIntervals & | GetIntervals () const |
access sub-intervals (if any). More... | |
delegate methods of CLayoutGroup | |
const ILayoutPolicy::TObjectList & | GetChildren () const |
CLinkedFeatsGroup inline methods. More... | |
ILayoutPolicy::TObjectList & | SetChildren () |
void | PushBack (CSeqGlyph *obj) |
void | SetLayoutPolicy (ILayoutPolicy *policy) |
Public Member Functions inherited from CSeqGlyph | |
CSeqGlyph () | |
virtual | ~CSeqGlyph () |
virtual bool | HitTestHor (TSeqPos x, const CObject *obj) |
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 | 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 CRenderingContext * | GetRenderingContext () 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 | OnLeftDown (const TModelPoint &) |
virtual bool | OnLeftUp (const TModelPoint &) |
virtual bool | OnLeftDblClick (const TModelPoint &) |
virtual bool | OnContextMenu (wxContextMenuEvent &event) |
bool | IsSelected () const |
bool | IsHighlighted () const |
CRgbaColor * | GetHighlightsColor () 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 TModelPoint & | GetPos () const |
void | GetPosInWorld (TModelPoint &pos) const |
Get top left position in world coordinate. More... | |
const CSeqGlyph * | GetParent (void) const |
CSeqGlyph * | GetParent (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) |
CSeqGlyph * | SetParent (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... | |
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 IObjectBasedGlyph | |
virtual | ~IObjectBasedGlyph () |
Protected Member Functions | |
CSeqGlyph virtual methods. | |
virtual void | x_Draw () const |
The default renderer for this layout object. More... | |
virtual void | x_UpdateBoundingBox () |
Update the bounding box assuming children's sizes are fixed if any. More... | |
virtual void | x_DrawHighlight () const |
override x_DrawHighlight() to do nothing. More... | |
Protected Member Functions inherited from CSeqGlyph | |
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... | |
virtual void | x_OnLayoutChanged () |
update the layout. 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... | |
Private Types | |
typedef vector< int > | TCounts |
Private Member Functions | |
bool | x_ShowLabel () const |
Check if need to show label. More... | |
bool | x_LabelFirst () const |
check to see if label needs to be drawn before (above) feature bar. More... | |
void | x_DrawLabels (TModelUnit &base, bool draw_left=true, bool draw_right=true) const |
draw the labels for merged features. More... | |
void | x_DrawChildrenOnParent (TModelUnit &base) const |
draw the merged feature bar with children on top of parent. More... | |
void | x_DrawFeatureBar (TModelUnit &base) const |
draw the merged feature bar. More... | |
void | x_CalcIntervals () |
calculate the merged feature bar intervals and overlapping counts. More... | |
void | x_GetUniqueLabel (string &label) const |
utility method for generating a unique label for the merged bar. More... | |
const CFeatGlyph * | x_GetFirstFeat () const |
get the first feature glyph in the group. More... | |
const CFeatGlyph * | x_GetLastFeat () const |
get the last feature glyph in the group. More... | |
TModelUnit | x_GetLabelHeight () const |
Returns the height of the label with margin included. More... | |
void | x_AddFeatHTMLActiveArea (TAreaVector *p_areas, const CFeatGlyph *feat, unsigned merged_feats_count=0) const |
bool | x_AreAllFeaturesOnSameStrand () const |
Private Attributes | |
CRef< objects::CSeq_loc > | m_Location |
just for satisfy IObjectBasedGlyph interface. More... | |
CLayoutGroup | m_Group |
CConstRef< CFeatGlyph > | m_ParentFeat |
FLabelType | m_LabelType |
CConstRef< CFeatureParams > | m_Config |
settings for rendering merged feature bar. More... | |
TIntervals | m_Intervals |
TCounts | m_IntCounts |
Shall have the same size as m_Intervals. More... | |
bool | m_FirstIsParent |
The first feature is the parent feature. More... | |
bool | m_ShowLabel = true |
Additional Inherited Members | |
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 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 Attributes inherited from CSeqGlyph | |
CSeqGlyph * | m_Parent |
parent/child relationships for this feature More... | |
CRenderingContext * | m_Context |
the rendering context More... | |
unique_ptr< CRgbaColor > | m_HighlightsColor |
Highlight color. More... | |
ENeighbours | m_Neighbours |
Indicates whether the glyph has neighbours. More... | |
CLinkedFeatsGroup is a container class contains related features.
CLinkedFeatsGroup can merge all the features it contains and show the merged features into on single bar consisting of a set of segments. Each segment may have a different intensity color to indicate the number of features overlaping within that region.
Definition at line 109 of file gene_model_group.hpp.
|
private |
Definition at line 213 of file gene_model_group.hpp.
Enumerator | |
---|---|
fLabel_ParentLabel | |
fLabel_FeatNum | |
fLabel_Both |
Definition at line 117 of file gene_model_group.hpp.
CLinkedFeatsGroup::CLinkedFeatsGroup | ( | ) |
CLinkedFeatsGroup implementations.
Definition at line 359 of file gene_model_group.cpp.
References m_Group, m_Location, CRef< C, Locker >::Reset(), and CSeqGlyph::SetParent().
|
inlinevirtual |
Definition at line 115 of file gene_model_group.hpp.
|
virtual |
Interface for accepting an IGlyphVisitor.
The visitor will be passed to its child glyphs for composite glyph.
Reimplemented from CSeqGlyph.
Definition at line 552 of file gene_model_group.cpp.
References IGlyphVisitor::Visit().
|
inline |
CLinkedFeatsGroup inline methods.
Definition at line 244 of file gene_model_group.hpp.
References CLayoutGroup::GetChildren(), and m_Group.
Referenced by GetHTMLActiveAreas(), GetObjects(), GetTooltip(), HasObject(), CGeneGroup::SetShowGene(), x_AreAllFeaturesOnSameStrand(), x_CalcIntervals(), x_Draw(), x_DrawChildrenOnParent(), x_DrawFeatureBar(), x_DrawLabels(), x_GetFirstFeat(), x_GetLastFeat(), and x_UpdateBoundingBox().
|
virtual |
Get html active areas.
This function is for CGI mode only. By default, it does nothing.
Reimplemented from CSeqGlyph.
Definition at line 475 of file gene_model_group.cpp.
References bound(), count_limit, GetChildren(), CLayoutGroup::GetHTMLActiveAreas(), if(), CSeqGlyph::IsHighlighted(), CSeqGlyph::IsSelected(), ITERATE, CFeatureParams::m_BarHeight, m_Config, m_FirstIsParent, m_Group, m_ParentFeat, ncbi::grid::netcache::search::fields::size, x_AddFeatHTMLActiveArea(), x_GetFirstFeat(), x_GetLabelHeight(), x_GetLastFeat(), and x_LabelFirst().
|
virtual |
access sub-intervals (if any).
Implements IObjectBasedGlyph.
Definition at line 614 of file gene_model_group.cpp.
References m_Intervals.
|
virtual |
access the position of this object.
Implements IObjectBasedGlyph.
Definition at line 565 of file gene_model_group.cpp.
References m_Location.
Referenced by x_DrawLabels(), x_LabelFirst(), and x_UpdateBoundingBox().
access our core component - we wrap an object(s) of some sort.
This returns the object at a given sequence position; this is useful if the layout object wraps more than one object
Implements IObjectBasedGlyph.
Definition at line 571 of file gene_model_group.cpp.
References CFeatGlyph::GetObject(), and x_GetFirstFeat().
retrieve CObjects corresponding to this CSeqGlyph.
Implements IObjectBasedGlyph.
Definition at line 579 of file gene_model_group.cpp.
References GetChildren(), CFeatGlyph::GetObjects(), ITERATE, and LOG_POST.
|
inline |
Definition at line 272 of file gene_model_group.hpp.
References m_ParentFeat.
|
virtual |
get the total range of this object.
CSeqGlyph inline methods.
Reimplemented from CSeqGlyph.
Definition at line 531 of file gene_model_group.cpp.
References ITERATE, m_Intervals, and compile_time_bits::range().
Referenced by x_Draw().
|
virtual |
return signature for this glyph.
Implements IObjectBasedGlyph.
Definition at line 607 of file gene_model_group.cpp.
References CFeatGlyph::GetSignature(), and x_GetLastFeat().
|
virtual |
Get the tooltip if available.
The x and y are in 'world' coord system which is the coord. system for the uppermost layout object.
Reimplemented from CSeqGlyph.
Definition at line 416 of file gene_model_group.cpp.
References CCreateParamsSeqFeatGroup::Add(), ITooltipFormatter::AddRow(), GetChildren(), CFeatGlyph::GetMappedFeature(), CMappedFeat::GetMappedFeature(), CFeatGlyph::GetMappingInfo(), CFeatGlyph::GetTooltip(), int, CSeqGlyph::IsSelected(), ITERATE, NStr::LongToString(), m_FirstIsParent, m_ParentFeat, rapidjson::value, CGlPoint< T >::X(), and x_GetFirstFeat().
Referenced by x_AddFeatHTMLActiveArea().
check if the wrapped object(s) is the one.
Implements IObjectBasedGlyph.
Definition at line 594 of file gene_model_group.cpp.
References GetChildren(), CFeatGlyph::HasObject(), and ITERATE.
|
virtual |
Hit testing.
Test whether a given point in PARENT's COORD. SYSTEM falls inside this layout object. Recursive hit testing may happen if this layout object is a container of other layout objects.
Reimplemented from CSeqGlyph.
Definition at line 380 of file gene_model_group.cpp.
References CLayoutGroup::HitTest(), CSeqGlyph::IsIn(), CSeqGlyph::IsSelected(), m_Group, CRef< C, Locker >::Reset(), and CSeqGlyph::x_Parent2Local().
|
virtual |
Intersect testing.
Test weather a given rectangular area intersects with this layout object. Recursive intersect testing is necessary if the layout object is a container of other containers. All the intersected leaf objects will be added into objs. The rect is in parent's coord system.
Reimplemented from CSeqGlyph.
Definition at line 399 of file gene_model_group.cpp.
References CSeqGlyph::GetModelRect(), and CGlRect< T >::Intersects().
|
virtual |
Query if this glyph is clickable.
Mainly for chaging mouse cursor for clickable glyph. By default, it returns false. If a glyph is clickable, but there is no need to change mouse cursor due to any other reason, such as there is already other visual hint, then don't need to override this function.
Reimplemented from CSeqGlyph.
Definition at line 559 of file gene_model_group.cpp.
bool CLinkedFeatsGroup::isRmtBased | ( | ) | const |
Definition at line 460 of file gene_model_group.cpp.
References _ASSERT, CFeatGlyph::isRmtBased(), m_FirstIsParent, m_ParentFeat, and x_GetFirstFeat().
Referenced by x_AddFeatHTMLActiveArea().
|
virtual |
Check if need to show tooltip.
If the tooltip retrieval is trivial, the derived glyph may decide to fill out the tooltip (info object) in this call.
Reimplemented from CSeqGlyph.
Definition at line 410 of file gene_model_group.cpp.
|
inline |
Definition at line 252 of file gene_model_group.hpp.
References m_Group, and CLayoutGroup::PushBack().
Referenced by CGeneModelFeatJob::x_CreateGeneModels(), and CFeatureTrack::x_ExtracGlyphs_Recursive().
|
inline |
Definition at line 248 of file gene_model_group.hpp.
References m_Group, and CLayoutGroup::SetChildren().
|
inline |
Definition at line 260 of file gene_model_group.hpp.
References m_Config, and CConstRef< C, Locker >::Reset().
|
inline |
Definition at line 280 of file gene_model_group.hpp.
References m_FirstIsParent.
|
inline |
Definition at line 264 of file gene_model_group.hpp.
References m_Group.
Referenced by CGeneModelFeatJob::x_CreateGeneModels().
|
inline |
Definition at line 276 of file gene_model_group.hpp.
References m_LabelType, and type.
|
inline |
Definition at line 256 of file gene_model_group.hpp.
References m_Group, and CLayoutGroup::SetLayoutPolicy().
|
inline |
Definition at line 268 of file gene_model_group.hpp.
References m_ParentFeat, and CConstRef< C, Locker >::Reset().
Select or deselect this glyph.
By default, it only set/unset m_Selected flag. Some concrete glyphs may need to override this method to change other glyph properties and layout when selected or deselected, e.g. show additional features. returns true if a layout update (ePUA_CallLayoutChanged) is required after all selections are processed
Reimplemented from CSeqGlyph.
Definition at line 541 of file gene_model_group.cpp.
References f, CSeqGlyph::IsSelected(), m_Group, CSeqGlyph::SetSelected(), CLayoutGroup::Update(), and CSeqGlyph::x_OnLayoutChanged().
Definition at line 284 of file gene_model_group.hpp.
References m_ShowLabel.
|
virtual |
Update content and layout including the bounding box.
layout_only | if true only update the layout not the content. May need to update the layout only under certain situation, e.g. selection. The update is recursive if this is a container layout. By default, it updates the bounding box only. |
Reimplemented from CSeqGlyph.
Definition at line 371 of file gene_model_group.cpp.
References CSeqGlyph::IsHighlighted(), CSeqGlyph::IsSelected(), m_Group, CLayoutGroup::Update(), and x_UpdateBoundingBox().
|
private |
Definition at line 1372 of file gene_model_group.cpp.
References ITooltipFormatter::CreateTooltipFormatter(), eNa_strand_minus, ITooltipFormatter::eTooltipFormatter_CSSTable, CHTMLActiveArea::fNoCaching, CFeatGlyph::GetLocation(), CFeatGlyph::GetMappingInfo(), CFeatGlyph::GetSignature(), GetStrand(), GetTooltip(), isRmtBased(), CHTMLActiveArea::m_DB_Name, CHTMLActiveArea::m_Descr, CHTMLActiveArea::m_Flags, CHTMLActiveArea::m_MergedFeatsCount, CHTMLActiveArea::m_PositiveStrand, CHTMLActiveArea::m_Signature, NStr::Replace(), text(), and CSeqGlyph::x_InitHTMLActiveArea().
Referenced by GetHTMLActiveAreas().
|
private |
Definition at line 1406 of file gene_model_group.cpp.
References _ASSERT, eNa_strand_minus, GetChildren(), CFeatGlyph::GetLocation(), and GetStrand().
Referenced by x_DrawChildrenOnParent().
|
private |
calculate the merged feature bar intervals and overlapping counts.
Definition at line 1214 of file gene_model_group.cpp.
References _ASSERT, cnt, f, GetChildren(), CFeatGlyph::GetIntervals(), ITERATE, m_IntCounts, m_Intervals, and t.
Referenced by x_UpdateBoundingBox().
|
protectedvirtual |
The default renderer for this layout object.
Implements CSeqGlyph.
Definition at line 620 of file gene_model_group.cpp.
References CSeqGlyph::Draw(), CRenderingContext::DrawSelection(), Empty(), CFeatureParams::ePos_Above, CFeatureParams::ePos_NoLabel, CFeatureParams::ePos_Side, CFeatureParams::GetBarHeight(), GetChildren(), CFeatGlyph::GetFeature(), CRange_Base::GetFrom(), GetGl(), CSeqGlyph::GetLeft(), CSeqGlyph::GetModelRect(), GetRange(), CRange_Base::GetTo(), CSeqGlyph::GetTop(), CRenderingContext::IntersectVisible(), CSeqUtils::IsException(), CSeqGlyph::IsHighlighted(), CSeqGlyph::IsSelected(), m_Config, CSeqGlyph::m_Context, m_FirstIsParent, m_Group, CFeatureParams::m_LabelPos, IRender::PopMatrix(), IRender::PushMatrix(), r(), IRender::Translatef(), x_DrawChildrenOnParent(), CSeqGlyph::x_DrawException(), x_DrawFeatureBar(), x_DrawLabels(), and x_LabelFirst().
|
private |
draw the merged feature bar with children on top of parent.
Definition at line 956 of file gene_model_group.cpp.
References _ASSERT, CRgbaColor::ContrastingColor(), CRenderingContext::Draw3DQuad(), CRenderingContext::DrawStrandIndicators(), eNa_strand_both, eNa_strand_both_rev, eNa_strand_minus, f, GetChildren(), CFeatGlyph::GetConfig(), CFeatGlyph::GetCustomColor(), CRange_Base::GetFrom(), COpenRange< Position >::GetLength(), CFeatGlyph::GetLocation(), CFeatGlyph::GetRange(), GetStrand(), CRange_Base::GetTo(), ITERATE, CFeatureParams::m_BarHeight, m_Config, CSeqGlyph::m_Context, CFeatureParams::m_fgColor, CFeatureParams::m_ShowStrandIndicator, CRenderingContext::ScreenToSeq(), CRgbaColor::SetAlpha(), CRgbaColor::SetBlue(), CRgbaColor::SetGreen(), t, x_AreAllFeaturesOnSameStrand(), and x_GetFirstFeat().
Referenced by x_Draw().
|
private |
draw the merged feature bar.
Definition at line 1020 of file gene_model_group.cpp.
References color, IRender::ColorC(), CRgbaColor::ContrastingColor(), IRender::Disable(), CRenderingContext::Draw3DQuad(), CRenderingContext::DrawLine(), CRenderingContext::DrawQuad(), CRenderingContext::DrawStrandIndicators(), CFeatureParams::eBox, CFeatureParams::eCantedLine, CFeatureParams::eFilledBox, CFeatureParams::eLine_DashDotted, CFeatureParams::eLine_Dashed, CFeatureParams::eLine_Dotted, CFeatureParams::eLine_ShortDashed, CFeatureParams::eLine_Solid, eNa_strand_both, eNa_strand_both_rev, eNa_strand_minus, IRender::Enable(), CFeatureParams::eStraightLine, f, fabs, GetChildren(), CFeatGlyph::GetConfig(), CFeatGlyph::GetCustomColor(), CFeatGlyph::GetCustomColorIdx(), CFeatGlyph::GetFeature(), CRange_Base::GetFrom(), GetGl(), CFeatGlyph::GetLocation(), GetStrand(), CRange_Base::GetTo(), i, CRgbaColor::Interpolate(), CRenderingContext::IntersectVisible(), CFeatGlyph::IsDbVar(), ITERATE, CRgbaColor::Lighten(), IRender::LineStipple(), IRender::LineWidth(), CFeatureParams::m_BarHeight, m_Config, CFeatureParams::m_Connections, CSeqGlyph::m_Context, CFeatureParams::m_fgColor, m_IntCounts, m_Intervals, CFeatureParams::m_LineStyle, CFeatureParams::m_LineWidth, CFeatureParams::m_ShowStrandIndicator, COpenRange< Position >::NotEmpty(), compile_time_bits::range(), CRenderingContext::ScreenToSeq(), CRenderingContext::SeqToScreen(), t, and x_GetFirstFeat().
Referenced by x_Draw().
|
inlineprotectedvirtual |
override x_DrawHighlight() to do nothing.
Reimplemented from CSeqGlyph.
Definition at line 174 of file gene_model_group.hpp.
|
private |
draw the labels for merged features.
Definition at line 795 of file gene_model_group.cpp.
References IRender::ColorC(), CRgbaColor::ContrastingColor(), CRenderingContext::DrawBackground(), CSeqFeatData_Base::e_Variation, CLabel::eContent, CLabel::eContentAndProduct, eNa_strand_minus, CFeatureParams::ePos_Above, CFeatureParams::ePos_Inside, CFeatureParams::ePos_Side, CSeqFeatData::eSubtype_cdregion, fLabel_FeatNum, CLayoutGroup::GetChild(), GetChildren(), CLayoutGroup::GetChildrenNum(), CFeatGlyph::GetFeature(), CRange_Base::GetFrom(), GetGl(), CFeatGlyph::GetLabel(), COpenRange< Position >::GetLength(), GetLocation(), CRenderingContext::GetMaxLabelWidth(), CSeqGlyph::GetRight(), CRenderingContext::GetSelLabelColor(), GetStrand(), COpenRange< Position >::GetToOpen(), CRenderingContext::IntersectVisible(), CSeqGlyph::IsHighlighted(), CSeqGlyph::IsSelected(), ITERATE, kEmptyStr, kLabelSpace, label, CGlRect< T >::Left(), CFeatureParams::m_BarHeight, CFeatureParams::m_bgColor, m_Config, CSeqGlyph::m_Context, CFeatureParams::m_fgColor, m_FirstIsParent, m_Group, m_Intervals, CFeatureParams::m_LabelColor, CFeatureParams::m_LabelFont, CFeatureParams::m_LabelPos, m_LabelType, m_ParentFeat, NStr::NumericToString(), CRenderingContext::ScreenToSeq(), CRenderingContext::SeqToScreen(), IRender::TextHeight(), CRenderingContext::TextOut(), IRender::TextWidth(), CGlTextureFont::Truncate(), CRenderingContext::WillLabelFit(), CSeqGlyph::x_DrawInnerLabels(), x_GetFirstFeat(), x_GetLabelHeight(), x_GetUniqueLabel(), x_LabelFirst(), and x_ShowLabel().
Referenced by x_Draw().
|
private |
get the first feature glyph in the group.
Definition at line 1341 of file gene_model_group.cpp.
References _ASSERT, GetChildren(), ITERATE, and NULL.
Referenced by GetHTMLActiveAreas(), GetObject(), GetTooltip(), isRmtBased(), x_DrawChildrenOnParent(), x_DrawFeatureBar(), x_DrawLabels(), x_GetUniqueLabel(), x_ShowLabel(), and x_UpdateBoundingBox().
|
private |
Returns the height of the label with margin included.
Definition at line 1366 of file gene_model_group.cpp.
References GetGl(), m_Config, CFeatureParams::m_LabelFont, and IRender::TextHeight().
Referenced by GetHTMLActiveAreas(), x_DrawLabels(), and x_UpdateBoundingBox().
|
private |
get the last feature glyph in the group.
Definition at line 1353 of file gene_model_group.cpp.
References _ASSERT, GetChildren(), and NULL.
Referenced by GetHTMLActiveAreas(), and GetSignature().
|
private |
utility method for generating a unique label for the merged bar.
Definition at line 1315 of file gene_model_group.cpp.
References CLabel::eContent, fLabel_FeatNum, fLabel_ParentLabel, CLayoutGroup::GetChildrenNum(), CFeatGlyph::GetLabel(), CSeqGlyph::IsHighlighted(), CSeqGlyph::IsSelected(), kEmptyStr, label, m_FirstIsParent, m_Group, m_LabelType, m_ParentFeat, NStr::NumericToString(), NStr::SizetToString(), and x_GetFirstFeat().
Referenced by x_DrawLabels(), and x_UpdateBoundingBox().
|
private |
check to see if label needs to be drawn before (above) feature bar.
Definition at line 774 of file gene_model_group.cpp.
References eNa_strand_minus, CFeatureParams::ePos_Above, CFeatureParams::ePos_Side, first(), CSeqGlyph::GetLeft(), GetLocation(), CSeqGlyph::GetRight(), CRenderingContext::GetSeqDS(), CSGSequenceDS::GetSequenceLength(), GetStrand(), m_Config, CSeqGlyph::m_Context, and CFeatureParams::m_LabelPos.
Referenced by GetHTMLActiveAreas(), x_Draw(), x_DrawLabels(), and x_UpdateBoundingBox().
|
private |
Check if need to show label.
Definition at line 768 of file gene_model_group.cpp.
References CFeatureParams::ePos_NoLabel, CFeatGlyph::IsLabelHided(), m_Config, CFeatureParams::m_LabelPos, m_ShowLabel, and x_GetFirstFeat().
Referenced by x_DrawLabels(), and x_UpdateBoundingBox().
|
protectedvirtual |
Update the bounding box assuming children's sizes are fixed if any.
Implements CSeqGlyph.
Definition at line 687 of file gene_model_group.cpp.
References CLabel::eContent, eNa_strand_minus, CFeatureParams::ePos_Side, fLabel_FeatNum, CLayoutGroup::GetChild(), GetChildren(), GetGl(), CSeqGlyph::GetHeight(), CFeatGlyph::GetLabel(), CSeqGlyph::GetLeft(), GetLocation(), CRenderingContext::GetMaxLabelWidth(), CRef< C, Locker >::GetPointer(), CSeqGlyph::GetRight(), GetStrand(), CSeqGlyph::GetWidth(), CRenderingContext::IntersectVisible(), CSeqGlyph::IsHighlighted(), CSeqGlyph::IsSelected(), kLabelSpace, kVertSpace, label, CFeatureParams::m_BarHeight, m_Config, CSeqGlyph::m_Context, m_Group, m_Intervals, CFeatureParams::m_LabelFont, CFeatureParams::m_LabelPos, m_LabelType, max(), min(), compile_time_bits::range(), CRenderingContext::ScreenToSeq(), CSeqGlyph::SetHeight(), CSeqGlyph::SetLeft(), CSeqGlyph::SetTop(), CSeqGlyph::SetWidth(), IRender::TextHeight(), IRender::TextWidth(), CRenderingContext::WillLabelFit(), x_CalcIntervals(), x_GetFirstFeat(), x_GetLabelHeight(), x_GetUniqueLabel(), x_LabelFirst(), and x_ShowLabel().
Referenced by Update().
|
private |
settings for rendering merged feature bar.
Definition at line 222 of file gene_model_group.hpp.
Referenced by GetHTMLActiveAreas(), SetConfig(), x_Draw(), x_DrawChildrenOnParent(), x_DrawFeatureBar(), x_DrawLabels(), x_GetLabelHeight(), x_LabelFirst(), x_ShowLabel(), and x_UpdateBoundingBox().
|
private |
The first feature is the parent feature.
Definition at line 225 of file gene_model_group.hpp.
Referenced by GetHTMLActiveAreas(), GetTooltip(), isRmtBased(), SetFirstIsParent(), x_Draw(), x_DrawLabels(), and x_GetUniqueLabel().
|
private |
Definition at line 217 of file gene_model_group.hpp.
Referenced by CLinkedFeatsGroup(), GetChildren(), GetHTMLActiveAreas(), HitTest(), PushBack(), SetChildren(), SetGroup(), SetLayoutPolicy(), SetSelected(), Update(), x_Draw(), x_DrawLabels(), x_GetUniqueLabel(), and x_UpdateBoundingBox().
|
private |
Shall have the same size as m_Intervals.
Definition at line 224 of file gene_model_group.hpp.
Referenced by x_CalcIntervals(), and x_DrawFeatureBar().
|
private |
Definition at line 223 of file gene_model_group.hpp.
Referenced by GetIntervals(), GetRange(), x_CalcIntervals(), x_DrawFeatureBar(), x_DrawLabels(), and x_UpdateBoundingBox().
|
private |
Definition at line 219 of file gene_model_group.hpp.
Referenced by SetLabelType(), x_DrawLabels(), x_GetUniqueLabel(), and x_UpdateBoundingBox().
|
private |
just for satisfy IObjectBasedGlyph interface.
Definition at line 216 of file gene_model_group.hpp.
Referenced by CLinkedFeatsGroup(), and GetLocation().
|
private |
Definition at line 218 of file gene_model_group.hpp.
Referenced by GetHTMLActiveAreas(), GetParentFeat(), GetTooltip(), isRmtBased(), SetParentFeat(), x_DrawLabels(), and x_GetUniqueLabel().
Definition at line 226 of file gene_model_group.hpp.
Referenced by SetShowLabel(), and x_ShowLabel().