NCBI C++ ToolKit
|
Search Toolkit Book for CGlyphContainer
File Description: More...
#include <gui/widgets/seq_graphic/glyph_container_track.hpp>
Public Types | |
typedef vector< CRef< CCommentGlyph > > | TComments |
typedef set< string > | THighlights |
typedef map< string, THighlights > | TKeyHighlights |
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, string > | TKeyValuePairs |
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 Member Functions | |
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 THighlights & | GetHighlights () const |
const TKeyHighlights & | GetHighlightsByKey () const |
CLayoutGroup & | SetGroup () |
const CLayoutGroup & | GetGroup () const |
CLayoutGroup::TObjectList & | SetChildren () |
const CLayoutGroup::TObjectList & | GetChildren () const |
bool | Empty () const |
void | SetLayoutPolicy (ILayoutPolicy *policy) |
Set policy on how to deploy the layout of its children. More... | |
CSeqGlyph interface implementation | |
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 void | Update (bool layout_only) |
Update content and layout including the bounding box. More... | |
virtual bool | Accept (IGlyphVisitor *visitor) |
Interface for accepting an IGlyphVisitor. More... | |
CLayoutTrack public methods. | |
virtual const CTrackTypeInfo & | GetTypeInfo () const |
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 string & | GetProfile () const |
virtual string | GetFullTitle () const |
get a more meaningful title. More... | |
string | GetTitle () const |
get the track title. More... | |
const TTrackErrorStatus & | GetErrorStatus () const |
void | SetErrorStatus (const TTrackErrorStatus &ErrorStatus) |
bool | isInErrorStatus () const |
bool | isRmtBased () const |
bool | isRemotePath () const |
virtual CHTMLActiveArea * | InitHTMLActiveArea (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) |
CLayoutTrack * | GetParentTrack () |
const CLayoutTrack * | GetParentTrack () 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 string & | GetId () 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 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 | OnLeftUp (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... | |
Protected Member Functions | |
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... | |
CLayoutTrack pure virtual method implementation. | |
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 void | x_Expand (bool expand) |
Collapse or expand the track. 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< CSeqGraphicConfig > | x_GetGlobalConfig () const |
Method for getting global configuration from rendering context. More... | |
void | x_OnLayoutChanged () |
update the layout. More... | |
virtual void | x_LoadSettings (const string &preset_style, const TKeyValuePairs &settings) |
load the track settings. More... | |
virtual void | x_SaveSettings (const string &preset_style) |
save the track settings to a profile string. 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 void | x_OnIconClicked (TIconID id) |
Mouse left-click event handler on an icon. 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 Attributes | |
CLayoutGroup | m_Group |
CRef< CSimpleLayout > | m_Simple |
CRef< CInlineLayout > | m_Inline |
CRef< CLayeredLayout > | m_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... | |
ILayoutTrackHost * | m_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< CSeqGraphicConfig > | m_gConfig |
global configuration. More... | |
string | m_Profile = "Default" |
track setting profile 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... | |
Private Member Functions | |
CGlyphContainer (const CGlyphContainer &) | |
prohibited copy constructor and assignment operator. More... | |
CGlyphContainer & | operator= (const CGlyphContainer &) |
void | x_UpdateComments (TComments &comments) |
void | x_UpdateCommentTargetPos (TComments &comments) |
Private Attributes | |
TComments | m_Comments |
TComments | m_Labels |
object labels shown at any arbitrary position. More... | |
THighlights | m_Highlights |
TKeyHighlights | m_KeyHighlights |
Static Private Attributes | |
static CTrackTypeInfo | m_TypeInfo |
Additional Inherited Members | |
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 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< SIconInfo > | TIcons |
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... | |
File Description:
CGlyphContainer - a glyph container in the form of layout track. An object of CGlyphContainer, itself, is a layout track. It contains a set of CSeqGlyphs. The track container is not resposible of creating any contained glyphs. The purpose of CGlyphContainer to form a group of glyphs to make them behave like a single track: movable, collapsible, and closible.
Definition at line 54 of file glyph_container_track.hpp.
typedef vector< CRef<CCommentGlyph> > CGlyphContainer::TComments |
Definition at line 57 of file glyph_container_track.hpp.
typedef set<string> CGlyphContainer::THighlights |
Definition at line 58 of file glyph_container_track.hpp.
typedef map<string, THighlights> CGlyphContainer::TKeyHighlights |
Definition at line 59 of file glyph_container_track.hpp.
CGlyphContainer::CGlyphContainer | ( | CRenderingContext * | r_cntx | ) |
Definition at line 48 of file glyph_container_track.cpp.
References m_Group, m_Inline, m_Layered, m_Simple, CRef< C, Locker >::Reset(), SetLayoutPolicy(), CSeqGlyph::SetParent(), CSeqGlyph::SetRenderingContext(), and CSimpleLayout::SetVertSpace().
Referenced by CGeneModelTrack::x_AddLandMarkFeaturesLayout().
|
virtual |
Definition at line 62 of file glyph_container_track.cpp.
|
private |
prohibited copy constructor and assignment operator.
|
virtual |
Interface for accepting an IGlyphVisitor.
The visitor will be passed to its child glyphs for composite glyph.
Reimplemented from CSeqGlyph.
Definition at line 135 of file glyph_container_track.cpp.
References CLayoutGroup::Accept(), CLayoutTrack::m_Expanded, m_Group, and IGlyphVisitor::Visit().
|
inline |
Append a layout object to the end.
Definition at line 164 of file glyph_container_track.hpp.
References m_Group, and CLayoutGroup::PushBack().
Referenced by CTrackContainer::AddTrackProxy(), CTrackContainer::SetTrack(), CFeatureTrack::x_AddHistogram(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CSnpTrack::x_AddSnpsLayout(), CSixFramesTransTrack::x_AddTranslations(), CLDBlockTrack::x_CreateLayout(), CHapmapTrack::x_CreateLayout(), CTrackContainer::x_MakeTopLevelTracks(), CGraphTrack::x_OnJobCompleted(), CBinsTrack::x_ProcessBinsJobResult(), CTrackContainer::x_ShowTrack(), and CSixFramesTransTrack::x_UpdateData().
|
inline |
Definition at line 198 of file glyph_container_track.hpp.
References x_Empty().
|
inline |
Definition at line 194 of file glyph_container_track.hpp.
References CLayoutGroup::GetChildren(), and m_Group.
Referenced by CBinsTrack::GetHTMLActiveAreas(), CGraphOverlay::GetHTMLActiveAreas(), CTrackContainer::HasSubtracks(), CGraphTrack::InitHTMLActiveArea(), CVarTrack::InitHTMLActiveArea(), CVcfTrack::InitHTMLActiveArea(), CGraphOverlay::MoveTrackOut(), CAllOtherFeaturesTrack::NoSubtrackEver(), CTrackContainer::NoSubtrackEver(), CLayoutTrackHandler::OnLeftDown(), CAlignmentTrack::x_AddAlignStatLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CFeatureTrack::x_AdjustFeatureLayout(), CGraphTrack::x_CollectAllGraphs(), CFeaturePanel::x_Empty(), CDataTrack::x_OnAllJobsFinished(), CGeneModelTrack::x_OnAllJobsFinished(), CSegmentMapTrack::x_OnJobCompleted(), CGraphOverlay::x_OnLayoutChanged(), CGraphTrack::x_OnLayoutChanged(), CGraphTrack::x_OnSettingsIconClicked(), and CTrackContainer::x_UpdateMsg().
|
inline |
Definition at line 186 of file glyph_container_track.hpp.
References m_Group.
Referenced by GetHTMLActiveAreas(), CGraphOverlay::GetHTMLActiveAreas(), CTrackContainer::GetHTMLActiveAreas(), CAlnVecRow::GetTrackCount(), CGraphTrack::SetLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CFeatureTrack::x_AddFeaturesLayout(), CGraphTrack::x_CollectAllGraphs(), CFeaturePanel::x_Draw(), x_GetHistMsg(), CGraphOverlay::x_OnLayoutChanged(), and CGraphTrack::x_OnLayoutChanged().
|
inline |
Definition at line 172 of file glyph_container_track.hpp.
References m_Highlights.
Referenced by CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CSegmentMapTrack::x_AddSegmentMapLayout(), CGeneModelTrack::x_InitFeature_Recursive(), CFeatureTrack::x_InitGlyphs_Recursive(), CGeneModelTrack::x_NeedHighlight(), CSegmentMapTrack::x_NeedHighlight(), CFeatureTrack::x_NeedHighlight(), and CGeneModelTrack::x_UpdateData().
|
inline |
Definition at line 176 of file glyph_container_track.hpp.
References m_KeyHighlights.
Referenced by CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CGeneModelTrack::x_InitFeature_Recursive(), CGeneModelTrack::x_NeedHighlight(), and CGeneModelTrack::x_UpdateData().
|
virtual |
Get html active areas.
This function is for CGI mode only. By default, it does nothing.
Reimplemented from CSeqGlyph.
Reimplemented in CGeneModelTrack, CAlignmentTrack, CTrackContainer, CTraceGraphTrack, CIntronTrack, CGraphTrack, CGraphOverlay, and CBinsTrack.
Definition at line 98 of file glyph_container_track.cpp.
References copy(), ctll::empty(), GetGroup(), CLayoutGroup::GetHTMLActiveAreas(), CLayoutTrack::GetId(), and NON_CONST_ITERATE.
Referenced by CBinsTrack::GetHTMLActiveAreas(), CGraphTrack::GetHTMLActiveAreas(), CIntronTrack::GetHTMLActiveAreas(), CTraceGraphTrack::GetHTMLActiveAreas(), CAlignmentTrack::GetHTMLActiveAreas(), and CGeneModelTrack::GetHTMLActiveAreas().
|
virtual |
Implements CLayoutTrack.
Reimplemented in CVcfTrack, CSixFramesTransTrack, CGeneModelTrack, CVarTrack, CAlignmentTrack, CTrackContainer, CTraceGraphTrack, CSequenceTrack, CSeqTableGraphTrack, CSegmentMapTrack, CScaffoldTrack, CGraphTrack, CGraphOverlay, CFeatureTrack, CFeaturePanel, CExternalLayoutTrack, CEpigenomicsTrack, CComponentTrack, CAllOtherFeaturesTrack, CAggregateFeatureTrack, CSnpTrack, CLDBlockTrack, CHapmapTrack, and CBinsTrack.
Definition at line 388 of file glyph_container_track.cpp.
References m_TypeInfo.
|
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.
Reimplemented in CSequenceTrack, CGraphOverlay, and CFeaturePanel.
Definition at line 66 of file glyph_container_track.cpp.
References CLayoutGroup::HitTest(), CSeqGlyph::IsIn(), m_Group, CRef< C, Locker >::Reset(), CLayoutTrack::x_HitTitleBar(), and CSeqGlyph::x_Parent2Local().
Referenced by CFeaturePanel::HitTest().
Reimplemented from CSeqGlyph.
Reimplemented in CFeaturePanel.
Definition at line 81 of file glyph_container_track.cpp.
References CLayoutGroup::HitTestHor(), CSeqGlyph::IsInHor(), and m_Group.
Referenced by CFeaturePanel::HitTestHor().
|
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 86 of file glyph_container_track.cpp.
References CSeqGlyph::GetModelRect(), CGlRect< T >::Intersects(), CLayoutGroup::Intersects(), m_Group, and CSeqGlyph::x_Parent2Local().
Referenced by CSeqGraphicRenderer::SelectObjByRect().
|
private |
|
inline |
Definition at line 98 of file glyph_container_track.hpp.
References m_Comments.
|
inline |
Definition at line 101 of file glyph_container_track.hpp.
References m_Labels.
Referenced by CGeneModelTrack::x_AddMainFeaturesLayout().
|
inline |
Definition at line 190 of file glyph_container_track.hpp.
References m_Group, and CLayoutGroup::SetChildren().
Referenced by CTrackContainer::MoveDown(), CTrackContainer::MoveUp(), CGraphTrack::SetLayout(), CTrackContainer::SortChildTracksByOrder(), CFeaturePanel::Update(), CAlignmentTrack::x_AddGraphLayout(), CEpigenomicsTrack::x_AddGraphs(), CGeneModelTrack::x_AddMainFeaturesLayout(), CSegmentMapTrack::x_AddSegmentMapLayout(), CFeatureTrack::x_AdjustFeatureLayout(), CGraphOverlay::x_OnLayoutChanged(), CGraphTrack::x_OnLayoutChanged(), CGraphTrack::x_UpdateBoundingBox(), and CGraphOverlay::x_UpdateTrackSettings().
void CGlyphContainer::SetCommentGlyphs | ( | const CSeqGlyph::TObjects & | objs, |
CRef< CCommentConfig > | config | ||
) |
Definition at line 215 of file glyph_container_track.cpp.
References m_Comments, CSeqGlyph::m_Context, NON_CONST_ITERATE, CCommentGlyph::SetConfig(), CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Referenced by CVarTrack::x_UpdateData(), and CVcfTrack::x_UpdateData().
set comments.
comment_str | is a string consisting of one or more comments in the form of: comment1|pos1|comment2|pos2... Each comment has to come with a position, and the comment and position alternate in the comment_str separated by '|'. |
Reimplemented from CLayoutTrack.
Definition at line 160 of file glyph_container_track.cpp.
References CSeqGraphicConfig::GetCommentConfig(), label, m_Comments, CSeqGlyph::m_Context, NStr::StringToDouble(), CTrackUtils::TokenizeWithEscape(), and CLayoutTrack::x_GetGlobalConfig().
|
inline |
Definition at line 182 of file glyph_container_track.hpp.
References m_Group.
Referenced by CDummyTrack::CDummyTrack(), CTrackContainer::ClearTracks(), CTrackContainer::CloseTrack(), CTrackContainer::RemoveEmptyTracks(), CTrackContainer::RemoveTrack(), CFeaturePanel::SetExternalGlyphs(), CGraphTrack::SetLayout(), CTrackContainer::SetTrack(), CAlignmentTrack::x_AddAlignmentLayout(), CAlignmentTrack::x_AddAlignStatLayout(), CFeatureTrack::x_AddFeaturesLayout(), CAlignmentTrack::x_AddGraphLayout(), CEpigenomicsTrack::x_AddGraphs(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CSegmentMapTrack::x_AddSegmentMapLayout(), CSixFramesTransTrack::x_AddTranslations(), CFeatureTrack::x_AdjustFeatureLayout(), CLayoutTrackHandler::x_MoveTrackDownRecursive(), CLayoutTrackHandler::x_MoveTrackUpRecursive(), CGraphTrack::x_OnJobCompleted(), CGraphOverlay::x_OnLayoutChanged(), CGraphTrack::x_OnLayoutChanged(), CAlignmentTrack::x_OnLayoutPolicyChanged(), CLayoutTrackHandler::x_StartMoving(), CGraphTrack::x_UpdateBoundingBox(), CDummyTrack::x_UpdateBoundingBox(), CTraceGraphTrack::x_UpdateData(), CAlignmentTrack::x_UpdateData(), CSixFramesTransTrack::x_UpdateData(), CGraphOverlay::x_UpdateTrackSettings(), and CAlignmentTrack::~CAlignmentTrack().
set a list of 'object' need to be highlighted.
hl_str | is a string consisting of one or more labels (track-specific) representing objects |
Reimplemented from CLayoutTrack.
Definition at line 189 of file glyph_container_track.cpp.
References set< Key, Compare >::clear(), map_checker< Container >::insert(), set< Key, Compare >::insert(), ncbi::grid::netcache::search::fields::key, m_Highlights, m_KeyHighlights, NON_CONST_ITERATE, CTrackUtils::TokenizeWithEscape(), NStr::ToLower(), and NStr::TruncateSpacesInPlace().
void CGlyphContainer::SetLabelGlyphs | ( | const CSeqGlyph::TObjects & | objs, |
CRef< CCommentConfig > | config | ||
) |
Definition at line 233 of file glyph_container_track.cpp.
References CSeqGlyph::m_Context, m_Labels, NON_CONST_ITERATE, CCommentGlyph::SetConfig(), CSeqGlyph::SetParent(), and CSeqGlyph::SetRenderingContext().
Referenced by CGeneModelTrack::x_AddLandMarkFeaturesLayout().
|
inline |
Set policy on how to deploy the layout of its children.
Definition at line 202 of file glyph_container_track.hpp.
References m_Group, and CLayoutGroup::SetLayoutPolicy().
Referenced by CAlignmentTrack::CAlignmentTrack(), CEpigenomicsTrack::CEpigenomicsTrack(), CExternalLayoutTrack::CExternalLayoutTrack(), CFeaturePanel::CFeaturePanel(), CGlyphContainer(), CGraphTrack::CGraphTrack(), CSegmentMapTrack::CSegmentMapTrack(), CSequenceTrack::CSequenceTrack(), CSixFramesTransTrack::CSixFramesTransTrack(), CSnpTrack::CSnpTrack(), CTraceGraphTrack::CTraceGraphTrack(), CVcfTrack::CVcfTrack(), CGraphTrack::SetLayout(), CFeatureTrack::x_AddHistogram(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CFeatureTrack::x_AdjustFeatureLayout(), CLDBlockTrack::x_CreateLayout(), CGraphTrack::x_OnJobCompleted(), CAlignmentTrack::x_OnLayoutPolicyChanged(), and CGraphOverlay::x_UpdateBoundingBox().
|
inline |
Definition at line 168 of file glyph_container_track.hpp.
References m_Group, and CLayoutGroup::Set().
Referenced by CFeaturePanel::SetExternalGlyphs(), CFeatureTrack::x_AddFeaturesLayout(), CEpigenomicsTrack::x_AddGraphs(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CSegmentMapTrack::x_AddSegmentMapLayout(), CSixFramesTransTrack::x_AddTranslations(), CLDBlockJob::x_LoadFtable(), CGraphTrack::x_OnJobCompleted(), and CVcfTrack::x_OnJobCompleted().
|
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 CDummyTrack, CSixFramesTransTrack, CFeaturePanel, and CDataTrack.
Definition at line 118 of file glyph_container_track.cpp.
References CSeqGlyph::m_Context, CLayoutTrack::m_Expanded, m_Group, m_Layered, CLayoutTrack::m_On, max(), CRenderingContext::ScreenToSeq(), CLayeredLayout::SetMinDist(), CLayoutGroup::Update(), and x_UpdateBoundingBox().
Referenced by CFeaturePanel::SetExternalGlyphs(), CDataTrack::Update(), CTrackContainer::x_ReinitTrack(), CTrackContainer::x_UpdateData(), and CDataTrack::x_UpdateLayout().
|
protectedvirtual |
Reimplemented from CLayoutTrack.
Definition at line 329 of file glyph_container_track.cpp.
References CLayoutGroup::Clear(), and m_Group.
|
protectedvirtual |
Implements CLayoutTrack.
Reimplemented in CTrackContainer, CSequenceTrack, and CFeaturePanel.
Definition at line 323 of file glyph_container_track.cpp.
References CLayoutGroup::GetChildren(), and m_Group.
Referenced by Empty().
|
protectedvirtual |
Histogram configuration (linear, log, etc) is also on the title bar but multiple track types can have histograms, so we use virtual functinons.
Reimplemented from CLayoutTrack.
Definition at line 282 of file glyph_container_track.cpp.
References CHistParams::eLinear, CHistParams::eLog10, CHistParams::eLog2, CHistParams::eLoge, CLayoutGroup::GetChild(), GetGroup(), CHistogramGlyph::GetHistParams(), CConstRef< C, Locker >::GetPointer(), CRef< C, Locker >::IsNull(), CHistParams::m_Scale, and msg().
|
protectedvirtual |
The content rendering must be implemented in the derived layout tracks.
Implements CLayoutTrack.
Reimplemented in CTraceGraphTrack, CSequenceTrack, CGraphTrack, CGraphOverlay, and CLDBlockLine.
Definition at line 311 of file glyph_container_track.cpp.
References CSeqGlyph::Draw(), ITERATE, m_Comments, m_Group, and m_Labels.
Referenced by CLDBlockLine::x_RenderContent(), CGraphTrack::x_RenderContent(), and CTraceGraphTrack::x_RenderContent().
|
protectedvirtual |
Update the bounding box assuming children's sizes are fixed if any.
Reimplemented from CLayoutTrack.
Reimplemented in CGeneModelTrack, CAlignmentTrack, CDummyTrack, CTraceGraphTrack, CSequenceTrack, CIntronTrack, CGraphTrack, and CGraphOverlay.
Definition at line 251 of file glyph_container_track.cpp.
References CSeqGlyph::GetHeight(), CSeqGlyph::GetLeft(), CLayoutTrack::GetShowTitle(), CSeqGlyph::GetWidth(), kMinTrackHeight, m_Comments, CLayoutTrack::m_Expanded, m_Group, m_Labels, CLayoutTrack::m_On, CSeqGlyph::SetHeight(), CSeqGlyph::SetLeft(), CSeqGlyph::SetTop(), CSeqGlyph::SetWidth(), CLayoutTrack::x_UpdateBoundingBox(), x_UpdateComments(), and x_UpdateCommentTargetPos().
Referenced by CFeaturePanel::OnTrackInitFinished(), Update(), CGraphOverlay::x_UpdateBoundingBox(), CGraphTrack::x_UpdateBoundingBox(), CIntronTrack::x_UpdateBoundingBox(), CTraceGraphTrack::x_UpdateBoundingBox(), CAlignmentTrack::x_UpdateBoundingBox(), and CGeneModelTrack::x_UpdateBoundingBox().
|
private |
Definition at line 335 of file glyph_container_track.cpp.
References CSeqGlyph::GetHeight(), CSeqGlyph::GetLeft(), CSeqGlyph::GetRight(), CCommentGlyph::GetTargetPos(), CRenderingContext::IsInVisibleRange(), CSeqGlyph::m_Context, NON_CONST_ITERATE, r(), s_CompareCRefs(), s_CompareCRefsByV(), CRenderingContext::ScreenToSeq(), CSeqGlyph::SetHeight(), CSeqGlyph::SetTop(), ct::sort(), and CGlPoint< T >::X().
Referenced by x_UpdateBoundingBox().
|
private |
Definition at line 375 of file glyph_container_track.cpp.
References CSeqGlyph::GetTop(), m_Group, CGlPoint< T >::m_Y, and NON_CONST_ITERATE.
Referenced by x_UpdateBoundingBox().
|
private |
Definition at line 151 of file glyph_container_track.hpp.
Referenced by ResetCommentGlyph(), SetCommentGlyphs(), SetComments(), x_RenderContent(), and x_UpdateBoundingBox().
|
protected |
Definition at line 145 of file glyph_container_track.hpp.
Referenced by Accept(), Add(), CGlyphContainer(), GetChildren(), GetGroup(), HitTest(), CGraphOverlay::HitTest(), HitTestHor(), Intersects(), SetChildren(), SetGroup(), SetLayoutPolicy(), SetObjects(), Update(), CSnpTrack::x_AddSnpsLayout(), x_ClearContent(), CLDBlockTrack::x_CreateLayout(), CHapmapTrack::x_CreateLayout(), CLDBlockLine::x_DrawLabel(), x_Empty(), CSequenceTrack::x_OnJobCompleted(), CBinsTrack::x_ProcessBinsJobResult(), CFeatureTrack::x_RegroupFeats(), x_RenderContent(), CGraphOverlay::x_RenderContent(), CSequenceTrack::x_RenderContent(), x_UpdateBoundingBox(), CGraphOverlay::x_UpdateBoundingBox(), CGraphTrack::x_UpdateBoundingBox(), CIntronTrack::x_UpdateBoundingBox(), CSequenceTrack::x_UpdateBoundingBox(), CAlignmentTrack::x_UpdateBoundingBox(), CGeneModelTrack::x_UpdateBoundingBox(), and x_UpdateCommentTargetPos().
|
private |
Definition at line 155 of file glyph_container_track.hpp.
Referenced by GetHighlights(), and SetHighlights().
|
protected |
Definition at line 147 of file glyph_container_track.hpp.
Referenced by CGlyphContainer(), CSnpTrack::CSnpTrack(), CAlignmentTrack::x_AddAlignFeat_Recursive(), CLDBlockTrack::x_CreateLayout(), CGeneModelTrack::x_InitFeature_Recursive(), CFeatureTrack::x_InitLayoutPolicy(), and CIntronTrack::x_OnLayoutPolicyChanged().
|
private |
Definition at line 156 of file glyph_container_track.hpp.
Referenced by GetHighlightsByKey(), and SetHighlights().
|
private |
object labels shown at any arbitrary position.
Currently only used in Gene Model track.
Definition at line 154 of file glyph_container_track.hpp.
Referenced by ResetLabelGlyph(), SetLabelGlyphs(), x_RenderContent(), and x_UpdateBoundingBox().
|
protected |
Definition at line 148 of file glyph_container_track.hpp.
Referenced by CExternalLayoutTrack::CExternalLayoutTrack(), CGlyphContainer(), CSegmentMapTrack::CSegmentMapTrack(), CSnpTrack::CSnpTrack(), CVcfTrack::CVcfTrack(), CGraphTrack::SetLayout(), Update(), CAlignmentTrack::x_AddAlignmentLayout(), CGeneModelTrack::x_AddCDSProduct_FeatsLayout(), CGeneModelTrack::x_AddFeatProductLayout(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CGeneModelTrack::x_AddMainFeaturesLayout(), CSegmentMapTrack::x_AddSegmentMapLayout(), CFeatureTrack::x_AdjustFeatureLayout(), CGeneModelTrack::x_InitFeature_Recursive(), CFeatureTrack::x_InitLayoutPolicy(), CFeatureTrack::x_LoadSettings(), CBinsTrack::x_LoadSettings(), CHapmapTrack::x_LoadSettings(), CSnpTrack::x_LoadSettings(), CSegmentMapTrack::x_LoadSettings(), CAlignmentTrack::x_LoadSettings(), CGeneModelTrack::x_LoadSettings(), CSixFramesTransTrack::x_LoadSettings(), CGraphTrack::x_OnJobCompleted(), CIntronTrack::x_OnLayoutPolicyChanged(), and CSnpTrack::x_UpdateLayout().
|
protected |
Definition at line 146 of file glyph_container_track.hpp.
Referenced by CAlignmentTrack::CAlignmentTrack(), CEpigenomicsTrack::CEpigenomicsTrack(), CFeaturePanel::CFeaturePanel(), CGlyphContainer(), CGraphTrack::CGraphTrack(), CLDBlockTrack::CLDBlockTrack(), CSequenceTrack::CSequenceTrack(), CSixFramesTransTrack::CSixFramesTransTrack(), CTraceGraphTrack::CTraceGraphTrack(), CGraphTrack::SetLayout(), CFeatureTrack::x_AddHistogram(), CGeneModelTrack::x_AddLandMarkFeaturesLayout(), CSixFramesTransTrack::x_AddTranslations(), CGeneModelTrack::x_InitFeature_Recursive(), CFeatureTrack::x_InitLayoutPolicy(), CSixFramesTransTrack::x_LoadSettings(), CGraphTrack::x_OnJobCompleted(), CAlignmentTrack::x_OnLayoutPolicyChanged(), CFeatureTrack::x_OnLayoutPolicyChanged(), and CIntronTrack::x_OnLayoutPolicyChanged().
|
staticprivate |
Definition at line 157 of file glyph_container_track.hpp.
Referenced by GetTypeInfo().