NCBI C++ ToolKit
|
Search Toolkit Book for CLayoutGroup
CLayoutGroup is a container of CSeqGlyphs (layout objects). More...
#include <gui/widgets/seq_graphic/layout_group.hpp>
Public Types | |
typedef ILayoutPolicy::TObjectList | TObjectList |
![]() | |
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 |
![]() | |
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 Member Functions | |
CLayoutGroup (ELinkedFeatDisplay LinkedFeat=ELinkedFeatDisplay::eLFD_Default) | |
virtual | ~CLayoutGroup (void) |
void | SetConfig (const CBoundaryParams *conf) |
Set composition boundary parameters. More... | |
void | SetLayoutPolicy (ILayoutPolicy *policy) |
Set policy on how to deploy the layout of its children. More... | |
void | UpdateBoundingBox () |
update group's bounding box only. More... | |
void | UpdateLayout () |
update group's bounding box only, and its parent layout. More... | |
bool | AllChildrenSameType () const |
Return true if there are 0 or 1 children, or all children are features of the same type (e.g. More... | |
void | SetAsMaster (CRef< CSeqGlyph > master) |
master glyph has some special meaning (e.g. More... | |
bool | IsMaster (const CSeqGlyph *glyph) const |
void | HideMaster (bool hidden=true) |
bool | IsMasterHidden () const |
void | SetLinkedFeat (ELinkedFeatDisplay LinkedFeat) |
ELinkedFeatDisplay | GetLinkedFeat () const |
ICompostion interface implementation. | |
Return the object list. | |
const TObjectList & | GetChildren () const |
CLayoutGroup inline methods. More... | |
TObjectList & | GetChildren () |
size_t | GetChildrenNum () const |
Get total number of children. More... | |
CConstRef< CSeqGlyph > | GetChild (int idx) const |
Get the layout object at index 'idx'. More... | |
CRef< CSeqGlyph > | GetChild (int idx) |
Get the layout object at index 'idx'. More... | |
int | GetIndex (const CSeqGlyph *obj) const |
Get the child index. More... | |
bool | Remove (CSeqGlyph *obj) |
Remove a layout object. More... | |
bool | Replace (CSeqGlyph *obj, int idx) |
Replace a child at index 'idx'. More... | |
void | Insert (int at, CSeqGlyph *obj) |
Insert a layout object before the given index. More... | |
void | Insert (const CSeqGlyph *at_obj, CSeqGlyph *obj) |
Insert a layout object before the given layout object. More... | |
void | InsertAft (const CSeqGlyph *at_obj, CSeqGlyph *obj) |
Insert a layout object after the given layout object. More... | |
void | PushBack (CSeqGlyph *obj) |
Append a layout object to the end. More... | |
void | PushFront (CSeqGlyph *obj) |
void | Set (const TObjectList &objs) |
void | Append (TObjectList &objs) |
TObjectList & | SetChildren () |
void | Clear () |
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 | 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... | |
![]() | |
CSeqGlyph () | |
virtual | ~CSeqGlyph () |
virtual bool | NeedTooltip (const TModelPoint &, ITooltipFormatter &, string &) const |
Check if need to show tooltip. More... | |
virtual void | GetTooltip (const TModelPoint &, ITooltipFormatter &tt, string &t_title) const |
Get the tooltip if available. More... | |
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 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) |
![]() | |
CObjectEx (void) | |
virtual | ~CObjectEx (void) |
![]() | |
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... | |
![]() | |
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 |
![]() | |
CWeakObject (void) | |
virtual | ~CWeakObject (void) |
CPtrToObjectProxy * | GetPtrProxy (void) const |
Get pointer to proxy object containing pointer to this object. More... | |
Static Public Member Functions | |
static void | PropagateRelatedSelection (bool isSelected, CSeqGlyph *pGlyph, CSeqGlyph *pGlyphFrom=NULL) |
set "RelatedGlyphSelected" in CLayoutGroup-based glyph hierarchies everywhere in the hierarchy containing the given glyph More... | |
![]() | |
static bool | PointInRect (const TModelPoint &p, const TModelRect &rc) |
static bool | PointInRect (TModelUnit x, TModelUnit y, const TModelRect &rc) |
![]() | |
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 void | EnableDebugDump (bool on) |
Protected Member Functions | |
void | x_DrawBoundary () const |
bool | x_isDrawn () const |
determines whether the glyph should be drawn or not at all (currently children of unselected parents when m_LinkedFeat is set to "Expandable") More... | |
bool | x_HasExpandedChildren () const |
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... | |
![]() | |
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 |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
![]() | |
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 Attributes | |
CIRef< ILayoutPolicy > | m_Policy |
TObjectList | m_Children |
CConstRef< CBoundaryParams > | m_Config |
boundary settings More... | |
CRef< CSeqGlyph > | m_MasterGlyph |
bool | m_HideMaster |
ELinkedFeatDisplay | m_LinkedFeat |
linkage mode for the track where this glyph is residing More... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
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... | |
CLayoutGroup is a container of CSeqGlyphs (layout objects).
Itself is one type of many layout objects. It simply takes a set of layout objects, and generates layout based on the given layout policy.
Definition at line 53 of file layout_group.hpp.
Definition at line 56 of file layout_group.hpp.
CLayoutGroup::CLayoutGroup | ( | ELinkedFeatDisplay | LinkedFeat = ELinkedFeatDisplay::eLFD_Default | ) |
Definition at line 49 of file layout_group.cpp.
References m_LinkedFeat.
Referenced by x_UpdateBoundingBox().
|
inlinevirtual |
Definition at line 59 of file layout_group.hpp.
|
virtual |
Interface for accepting an IGlyphVisitor.
The visitor will be passed to its child glyphs for composite glyph.
Reimplemented from CSeqGlyph.
Reimplemented in CGeneGroup.
Definition at line 257 of file layout_group.cpp.
References m_Children, and IGlyphVisitor::Visit().
Referenced by CGlyphContainer::Accept().
bool CLayoutGroup::AllChildrenSameType | ( | ) | const |
Return true if there are 0 or 1 children, or all children are features of the same type (e.g.
all introns)
Definition at line 395 of file layout_group.cpp.
References CFeatGlyph::GetFeature(), ITERATE, m_Children, NULL, and t.
|
inline |
Definition at line 308 of file layout_group.hpp.
References m_Children, CSeqGlyph::m_Context, and NON_CONST_ITERATE.
Referenced by CAlignmentTrack::x_AddAlignFeatLayout(), CGeneModelFeatJob::x_CreateGeneModels(), and CSGAlignmentJob::x_CreateGeneModels().
|
inline |
Definition at line 324 of file layout_group.hpp.
References m_Children.
Referenced by CTrackContainer::ClearTracks(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CFeatureTrack::x_AddFeaturesLayout(), CAlignmentTrack::x_AddGraphLayout(), CEpigenomicsTrack::x_AddGraphs(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CSegmentMapTrack::x_AddSegmentMapLayout(), CSnpTrack::x_AddSnpsLayout(), CSixFramesTransTrack::x_AddTranslations(), CGlyphContainer::x_ClearContent(), CLDBlockTrack::x_CreateLayout(), CHapmapTrack::x_CreateLayout(), CGraphTrack::x_OnJobCompleted(), CSequenceTrack::x_OnJobCompleted(), CBinsTrack::x_ProcessBinsJobResult(), CGraphOverlay::x_UpdateBoundingBox(), x_UpdateBoundingBox(), CAlignmentTrack::x_UpdateData(), CSixFramesTransTrack::x_UpdateData(), CHistogramGlyph::x_UpdateLegend(), and CAlignmentTrack::~CAlignmentTrack().
Get the layout object at index 'idx'.
Definition at line 93 of file layout_group.cpp.
References i, m_Children, and CRef< C, Locker >::Reset().
Get the layout object at index 'idx'.
Definition at line 75 of file layout_group.cpp.
References i, m_Children, and CConstRef< C, Locker >::Reset().
Referenced by CGeneGroup::GetHTMLActiveAreas(), CGeneGroup::SetShowGene(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CLinkedFeatsGroup::x_DrawLabels(), CGlyphContainer::x_GetHistMsg(), CFeatGlyph::x_isCollapsible(), CFeatGlyph::x_isExpandable(), CLayoutTrackHandler::x_MoveTrackDownRecursive(), CLayoutTrackHandler::x_MoveTrackUpRecursive(), CAlignmentTrack::x_OnLayoutPolicyChanged(), CFeatureTrack::x_RegroupFeats(), CLinkedFeatsGroup::x_UpdateBoundingBox(), and CAlignmentTrack::x_UpdateData().
|
inline |
Definition at line 258 of file layout_group.hpp.
References m_Children.
|
inline |
CLayoutGroup inline methods.
Definition at line 253 of file layout_group.hpp.
References m_Children.
Referenced by CColumnLayout::BuildLayout(), CCompactLayout::BuildLayout(), CLayeredLayout::BuildLayout(), CSimpleLayout::BuildLayout(), CInlineLayout::BuildLayout(), COverlayLayout::BuildLayout(), CLinkedFeatsGroup::GetChildren(), CGlyphContainer::GetChildren(), CGeneGroup::GetHTMLActiveAreas(), PropagateRelatedSelection(), CGraphTrack::SetLayout(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CFeatureTrack::x_AdjustFeatureLayout(), CSGCalcFeatHistJob::x_CalcFeatHistRecursive(), CFeatureTrack::x_CountFeats_recursive(), CGeneModelFeatJob::x_CreateGeneModels(), CSGAlignmentJob::x_CreateGeneModels(), CGeneGroup::x_Draw(), CGlyphContainer::x_Empty(), CGeneGroup::x_GetFirstFeat(), CGeneGroup::x_GetLabelHeight(), x_HasExpandedChildren(), CLayeredLayout::x_LayerByPos(), CLayeredLayout::x_LayerBySize(), CFeatureTrack::x_NeedHighlight(), CAlignmentTrack::x_OnLayoutPolicyChanged(), CFeatureTrack::x_RegroupFeats(), CGraphOverlay::x_RenderContent(), ILayoutPolicy::x_SeparateObjects(), CGeneGroup::x_ShowGeneLabel(), CGraphOverlay::x_UpdateBoundingBox(), CGraphTrack::x_UpdateBoundingBox(), and x_UpdateBoundingBox().
|
inline |
Get total number of children.
Definition at line 264 of file layout_group.hpp.
References m_Children.
Referenced by CAlnVecRow::GetTrackCount(), CGeneGroup::SetShowGene(), CGeneGroup::x_Draw(), x_Draw(), CLinkedFeatsGroup::x_DrawLabels(), CLinkedFeatsGroup::x_GetUniqueLabel(), CFeatGlyph::x_isCollapsible(), CFeatGlyph::x_isExpandable(), CSGFeatureJob::x_LinkFeatures(), CLayoutTrackHandler::x_MoveTrackDownRecursive(), and CFeatureTrack::x_RegroupFeats().
|
virtual |
Get html active areas.
This function is for CGI mode only. By default, it does nothing.
Reimplemented from CSeqGlyph.
Reimplemented in CNamedGroup, and CGeneGroup.
Definition at line 239 of file layout_group.cpp.
References Error(), CException::GetMsg(), IsMaster(), ITERATE, LOG_POST, m_Children, m_HideMaster, and x_isDrawn().
Referenced by CGeneGroup::GetHTMLActiveAreas(), CLinkedFeatsGroup::GetHTMLActiveAreas(), CGlyphContainer::GetHTMLActiveAreas(), CGraphOverlay::GetHTMLActiveAreas(), CHistogramGlyph::GetHTMLActiveAreas(), CNamedGroup::GetHTMLActiveAreas(), and CTrackContainer::GetHTMLActiveAreas().
Get the child index.
Definition at line 55 of file layout_group.cpp.
References i, and m_Children.
Referenced by CLayoutTrackHandler::x_MoveTrackDownRecursive(), and CLayoutTrackHandler::x_MoveTrackUpRecursive().
|
inline |
Definition at line 165 of file layout_group.hpp.
References m_LinkedFeat.
Referenced by ILayoutPolicy::x_SeparateObjects(), and x_UpdateBoundingBox().
Definition at line 149 of file layout_group.hpp.
References m_HideMaster.
Referenced by CGeneGroup::SetShowGene().
|
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 197 of file layout_group.cpp.
References CSeqGlyph::HitTest(), CSeqGlyph::IsIn(), m_Children, NON_CONST_ITERATE, and CSeqGlyph::x_Parent2Local().
Referenced by CLinkedFeatsGroup::HitTest(), CGlyphContainer::HitTest(), and CGraphOverlay::HitTest().
Reimplemented from CSeqGlyph.
Definition at line 213 of file layout_group.cpp.
References CSeqGlyph::IsInHor(), m_Children, and NON_CONST_ITERATE.
Referenced by CGlyphContainer::HitTestHor().
Insert a layout object before the given layout object.
If no matched at_obj found, the object will be added to the end.
Definition at line 161 of file layout_group.cpp.
References m_Children, CSeqGlyph::m_Context, CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Insert a layout object before the given index.
If index is out of bound, the object is added to the end.
Definition at line 145 of file layout_group.cpp.
References i, m_Children, CSeqGlyph::m_Context, CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Referenced by CAlignmentTrack::x_AddAlignFeatLayout().
Insert a layout object after the given layout object.
If no matched at_obj found, the object will be added to the end.
Definition at line 174 of file layout_group.cpp.
References m_Children, CSeqGlyph::m_Context, NON_CONST_ITERATE, PushBack(), CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Referenced by CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), and CGeneModelTrack::x_AddFeatProductLayout().
|
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 224 of file layout_group.cpp.
References CSeqGlyph::GetModelRect(), CGlRect< T >::Intersects(), ITERATE, m_Children, and CSeqGlyph::x_Parent2Local().
Referenced by CGlyphContainer::Intersects().
Definition at line 148 of file layout_group.hpp.
References CRef< C, Locker >::GetPointerOrNull(), and m_MasterGlyph.
Referenced by GetHTMLActiveAreas(), x_Draw(), CFeatGlyph::x_isCollapsible(), CFeatGlyph::x_isExpandable(), and x_UpdateBoundingBox().
|
inline |
Definition at line 150 of file layout_group.hpp.
References m_HideMaster.
|
static |
set "RelatedGlyphSelected" in CLayoutGroup-based glyph hierarchies everywhere in the hierarchy containing the given glyph
Definition at line 456 of file layout_group.cpp.
References GetChildren(), CSeqGlyph::GetLevel(), CSeqGlyph::GetParent(), NON_CONST_ITERATE, and CFeatGlyph::SetRelatedGlyphSelected().
Referenced by CFeatGlyph::SetSelected().
|
inline |
Append a layout object to the end.
Definition at line 282 of file layout_group.hpp.
References m_Children, CSeqGlyph::m_Context, CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Referenced by CGlyphContainer::Add(), InsertAft(), CLinkedFeatsGroup::PushBack(), CGraphTrack::SetLayout(), CAlignmentTrack::x_AddAlignFeatLayout(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CSixFramesTransTrack::x_AddTranslations(), CSGFeatureJob::x_CreateFeature_Recursive(), CGeneModelFeatJob::x_CreateGeneModels(), CSGAlignmentJob::x_CreateGeneModels(), CGraphTrack::x_OnJobCompleted(), CSequenceTrack::x_OnJobCompleted(), CFeatureTrack::x_RegroupFeats(), ILayoutPolicy::x_SeparateObjects(), x_UpdateBoundingBox(), CTraceGraphTrack::x_UpdateData(), CGraphOverlay::x_UpdateLegend(), and CHistogramGlyph::x_UpdateLegend().
|
inline |
Definition at line 290 of file layout_group.hpp.
References m_Children, CSeqGlyph::m_Context, CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Remove a layout object.
Definition at line 113 of file layout_group.cpp.
References m_Children, and NON_CONST_ITERATE.
Referenced by CTrackContainer::CloseTrack(), CTrackContainer::RemoveEmptyTracks(), CTrackContainer::RemoveTrack(), CTrackContainer::SetTrack(), CAlignmentTrack::x_AddAlignFeatLayout(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_OnLayoutPolicyChanged(), CFeatureTrack::x_RegroupFeats(), and CAlignmentTrack::x_UpdateData().
Replace a child at index 'idx'.
Definition at line 125 of file layout_group.cpp.
References i, m_Children, CSeqGlyph::m_Context, CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
|
inline |
Definition at line 298 of file layout_group.hpp.
References m_Children, CSeqGlyph::m_Context, and NON_CONST_ITERATE.
Referenced by CGlyphContainer::SetObjects(), CAlignmentTrack::x_AddAlignFeatLayout(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), CGeneModelTrack::x_AddFeatProductLayout(), CAlignmentTrack::x_AddGraphLayout(), and x_UpdateBoundingBox().
master glyph has some special meaning (e.g.
represents feature that is a parent of all other features represented by glyphs of the layout) there is no requirement for a layout to have a master object but if there is one then it is supposed to be among children (calling SetAsMaster() does _not_ insert it to the child list)
Definition at line 147 of file layout_group.hpp.
References m_MasterGlyph.
Referenced by CGeneGroup::SetShowGene(), and CSGFeatureJob::x_CreateFeature_Recursive().
|
inline |
Definition at line 318 of file layout_group.hpp.
References m_Children.
Referenced by CGeneGroup::Accept(), CLinkedFeatsGroup::SetChildren(), CGlyphContainer::SetChildren(), CGraphTrack::SetLayout(), CGeneGroup::Update(), CAlignmentTrack::x_AddAlignmentLayout(), CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), CGeneModelTrack::x_AddFeatProductLayout(), CFeatureTrack::x_AdjustFeatureLayout(), CGeneModelFeatJob::x_CreateGeneModels(), CSGAlignmentJob::x_CreateGeneModels(), CFeatureTrack::x_ExtracGlyphs_Recursive(), CSGAlignmentJob::x_GetAlignments(), CFeatureTrack::x_InitGlyphs_Recursive(), CSGFeatureJob::x_LinkFeatures(), CAlignmentTrack::x_OnLayoutPolicyChanged(), CFeatureTrack::x_RegroupFeats(), CNamedGroup::x_UpdateBoundingBox(), and CSequenceTrack::x_UpdateBoundingBox().
|
inline |
Set composition boundary parameters.
The settings is not required. It will only be used when there is a need to show the bounding box for this composition.
Definition at line 270 of file layout_group.hpp.
References m_Config, and CConstRef< C, Locker >::Reset().
Referenced by CDummyTrack::CDummyTrack(), CAlignmentTrack::x_AddAlignFeatLayout(), CSixFramesTransTrack::x_AddTranslations(), CFeatureTrack::x_InitGlyphs_Recursive(), and ILayoutPolicy::x_SeparateObjects().
|
inline |
Set policy on how to deploy the layout of its children.
Definition at line 276 of file layout_group.hpp.
References m_Policy, and CRef< C, Locker >::Reset().
Referenced by CGraphTrack::SetLayout(), CLinkedFeatsGroup::SetLayoutPolicy(), CGlyphContainer::SetLayoutPolicy(), CAlignmentTrack::x_AddAlignFeatLayout(), CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), CGeneModelTrack::x_AddFeatProductLayout(), CSixFramesTransTrack::x_AddTranslations(), CFeatureTrack::x_InitGlyphs_Recursive(), CFeatureTrack::x_InitLayoutPolicy(), CGraphTrack::x_OnJobCompleted(), CAlignmentTrack::x_OnLayoutPolicyChanged(), ILayoutPolicy::x_SeparateObjects(), x_UpdateBoundingBox(), and CHistogramGlyph::x_UpdateLegend().
|
inline |
Definition at line 164 of file layout_group.hpp.
References m_LinkedFeat.
Referenced by CFeatureTrack::x_AdjustFeatureLayout().
|
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.
Reimplemented in CGeneGroup.
Definition at line 188 of file layout_group.cpp.
References m_Children, NON_CONST_ITERATE, and x_UpdateBoundingBox().
Referenced by CLinkedFeatsGroup::SetSelected(), CGeneGroup::Update(), CLinkedFeatsGroup::Update(), CGlyphContainer::Update(), CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), and CGeneModelTrack::x_AddFeatProductLayout().
|
inline |
update group's bounding box only.
Definition at line 330 of file layout_group.hpp.
References x_UpdateBoundingBox().
Referenced by CTrackContainer::RemoveEmptyTracks().
|
inline |
update group's bounding box only, and its parent layout.
Definition at line 336 of file layout_group.hpp.
References CSeqGlyph::x_OnLayoutChanged().
Referenced by CTrackContainer::CloseTrack(), CFeaturePanel::SetExternalGlyphs(), CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), CLayoutTrackHandler::x_MoveTrackDownRecursive(), CLayoutTrackHandler::x_MoveTrackUpRecursive(), and CLayoutTrackHandler::x_StartMoving().
|
protectedvirtual |
The default renderer for this layout object.
Implements CSeqGlyph.
Reimplemented in CNamedGroup, and CGeneGroup.
Definition at line 305 of file layout_group.cpp.
References Empty(), CGlTextureFont::FaceFromString(), GetChildrenNum(), GetGl(), CSeqGlyph::GetLeft(), CSeqGlyph::GetLevel(), CSeqGlyph::GetRange(), CSeqGlyph::GetTop(), CRenderingContext::IntersectVisible(), NStr::IntToString(), IsMaster(), ITERATE, m_Children, CSeqGlyph::m_Context, m_HideMaster, NStr::NumericToString(), IRender::PopMatrix(), IRender::PushMatrix(), CGlTextureFont::SetFontFace(), CGlTextureFont::SetFontSize(), CRenderingContext::TextOut(), IRender::Translated(), x_DrawBoundary(), x_isDrawn(), and CSeqGlyph::x_Visible_V().
Referenced by CNamedGroup::x_Draw().
|
protected |
Definition at line 427 of file layout_group.cpp.
References IRender::ColorC(), CRenderingContext::DrawQuad(), CRenderingContext::DrawRect(), CRenderingContext::DrawSelection(), CBoundaryParams::GetBgColor(), CBoundaryParams::GetFgColor(), CRange_Base::GetFrom(), GetGl(), CSeqGlyph::GetHeight(), CSeqGlyph::GetLeft(), CBoundaryParams::GetLineWidth(), CSeqGlyph::GetRight(), CRange_Base::GetTo(), CRenderingContext::IntersectVisible(), CSeqGlyph::IsSelected(), IRender::LineWidth(), m_Config, CSeqGlyph::m_Context, CBoundaryParams::ShowBackground(), and CBoundaryParams::ShowBoundary().
Referenced by CGeneGroup::x_Draw(), and x_Draw().
|
inlineprotectedvirtual |
override x_DrawHighlight() to do nothing.
Reimplemented from CSeqGlyph.
Definition at line 174 of file layout_group.hpp.
|
protected |
Definition at line 268 of file layout_group.cpp.
References GetChildren(), CFeatGlyph::isDrawn(), ITERATE, and x_isDrawn().
Referenced by x_isDrawn(), and x_UpdateBoundingBox().
|
protected |
determines whether the glyph should be drawn or not at all (currently children of unselected parents when m_LinkedFeat is set to "Expandable")
Definition at line 292 of file layout_group.cpp.
References eLFD_Expandable, m_LinkedFeat, and x_HasExpandedChildren().
Referenced by CGeneGroup::GetHTMLActiveAreas(), GetHTMLActiveAreas(), CGeneGroup::x_Draw(), x_Draw(), x_HasExpandedChildren(), and x_UpdateBoundingBox().
|
protectedvirtual |
Update the bounding box assuming children's sizes are fixed if any.
Implements CSeqGlyph.
Reimplemented in CNamedGroup.
Definition at line 334 of file layout_group.cpp.
References bound(), CSimpleLayout::BuildLayout(), CLayoutGroup(), Clear(), eLFD_Expandable, GetChildren(), CSeqGlyph::GetHeight(), CSeqGlyph::GetLeft(), CSeqGlyph::GetLevel(), GetLinkedFeat(), CBoundaryParams::GetPadding(), CSeqGlyph::GetWidth(), IsMaster(), kPadding, m_Children, m_Config, CSeqGlyph::m_Context, m_HideMaster, m_LinkedFeat, m_Policy, NON_CONST_ITERATE, PushBack(), CRenderingContext::ScreenToSeq(), Set(), CSeqGlyph::SetHeight(), SetLayoutPolicy(), CSeqGlyph::SetLeft(), CSeqGlyph::SetLevel(), CSeqGlyph::SetTop(), CSimpleLayout::SetTopMargin(), CSimpleLayout::SetVertSpace(), CSeqGlyph::SetWidth(), ncbi::grid::netcache::search::fields::size, x_HasExpandedChildren(), and x_isDrawn().
Referenced by CGeneGroup::Update(), Update(), UpdateBoundingBox(), and CNamedGroup::x_UpdateBoundingBox().
|
private |
Definition at line 185 of file layout_group.hpp.
Referenced by Accept(), AllChildrenSameType(), Append(), Clear(), GetChild(), GetChildren(), GetChildrenNum(), GetHTMLActiveAreas(), GetIndex(), HitTest(), HitTestHor(), Insert(), InsertAft(), Intersects(), PushBack(), PushFront(), Remove(), Replace(), Set(), SetChildren(), Update(), x_Draw(), and x_UpdateBoundingBox().
|
private |
boundary settings
Definition at line 186 of file layout_group.hpp.
Referenced by SetConfig(), x_DrawBoundary(), and x_UpdateBoundingBox().
|
private |
Definition at line 188 of file layout_group.hpp.
Referenced by GetHTMLActiveAreas(), HideMaster(), IsMasterHidden(), x_Draw(), and x_UpdateBoundingBox().
|
private |
linkage mode for the track where this glyph is residing
Definition at line 191 of file layout_group.hpp.
Referenced by CLayoutGroup(), GetLinkedFeat(), SetLinkedFeat(), x_isDrawn(), and x_UpdateBoundingBox().
Definition at line 187 of file layout_group.hpp.
Referenced by IsMaster(), and SetAsMaster().
|
private |
Definition at line 184 of file layout_group.hpp.
Referenced by SetLayoutPolicy(), and x_UpdateBoundingBox().