component_negative_strand,
67: m_IdHandle(component_id)
68, m_ComponentRange(range)
69, m_MappedIdHandle(mapped_id)
70, m_CompNegative(component_negative_strand)
72, m_HideLabel(
false)
87 if(component_negative_strand) {
88 swap(over_5p, over_3p);
91 if(int_start > over_5p) {
114 if(component_negative_strand) {
143 if(!gui_info)
return;
145 boolisTooltipGeneratedBySvc(
false);
146gui_info->GetToolTip(tt, t_title, (
TSeqPos)-1, &isTooltipGeneratedBySvc);
147 if(!isTooltipGeneratedBySvc) {
148gui_info->GetLinks(tt,
false);
161p_areas->push_back(area);
211objects::CSeq_loc comp_loc;
215comp_loc.SetInt().SetId().Assign(*
id);
217objects::CSeq_loc mapped_loc;
221mapped_loc.SetInt().SetId().Assign(*mapped_id);
290line_y2, color2,
true);
297 if(show_label || show_strand) {
303 stringstrand_sign = strnd ?
"<":
">";
311 if(max_label_w > 2.0) max_label_w -= 2.0;
325 label= strand_sign +
" "+
label+
" "+ strand_sign;
336 if(label_w > max_w) {
339 TModelUnitt_w = label_w > max_label_w ? max_label_w : label_w;
342xM = vis_r.
GetTo() - t_w;
346vis_r.
GetTo(), yM - label_h - 1), 0);
353xM + t_w, yM - label_h - 1), 0);
361 if(label_w > max_label_w) {
bool m_PositiveStrand
the default is true
static string GetComponentSignature(const objects::CSeq_loc &comp_loc, const objects::CSeq_loc &mapped_loc, objects::CScope *scope)
void TextOut(const CGlTextureFont *font, const char *text, TModelUnit x, TModelUnit y, bool center, bool adjust_flip=true) const
TModelRange IntersectVisible(const CSeqGlyph *obj) const
objects::CScope & GetScope()
void DrawSelection(const TModelRect &rc) const
TModelUnit SeqToScreen(const TModelUnit &size) const
convert from sequence positions to screen pixels
TModelUnit GetMaxLabelWidth(const CGlBitmapFont &font) const
In screen pixel..
TModelUnit ScreenToSeq(const TModelUnit &size) const
convert from screen pixels to sequence positions
bool IsFlippedStrand() const
bool WillLabelFit(const TModelRect &rc) const
void Draw3DQuad(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2, const CRgbaColor &color, bool border=false) const
void DrawBackground(const TModelRect &rcm, TModelUnit border) const
class CRgbaColor provides a simple abstraction for managing colors.
ELabelPosition m_LabelPos
CGlTextureFont m_LabelFont
@ ePos_Inside
inside the rendered bar
@ ePos_Above
above the rendered bar
@ ePos_Side
always on 5' side
virtual string GetSignature() const
return signature for this glyph.
virtual CConstRef< CObject > GetObject(TSeqPos pos) const
Access the data as a CObject.
virtual bool IsClickable() const
Query if this glyph is clickable.
CSegmentConfig::TSegMapQuality GetSeqQuality() const
virtual void x_Draw() const
The default renderer for this layout object.
bool m_HideLabel
Force to hide label.
const set< TSeqRange > & GetMappedRanges() const
void GetLabel(string &label, CLabel::ELabelType type) const
virtual void GetObjects(vector< CConstRef< CObject > > &objs) const
retrieve CObjects corresponding to this CSeqGlyph.
CConstRef< objects::CSeq_id > GetSeqID(void) const
CSegmentGlyph inline methods.
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
TSeqRange m_MappedRange
range on master (mapped) sequence
objects::CSeq_id_Handle m_MappedIdHandle
the seq-id we cover. this is the master seq-id
TSeqRange m_ComponentRange
range on component sequence
virtual bool HasSideLabel() const
Query if there is label and label is on the side.
objects::CSeq_id_Handle m_IdHandle
the seq-id we cover. this is the component seq-id
const objects::CSeq_loc & GetLocation(void) const
access the position of this object.
set< TSeqRange > m_MappedSeqRanges
the range on the main sequence we represent
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
set< TSeqRange > m_SeqRanges
the range on the component we represent
virtual TSeqRange GetRange(void) const
get the total range of this object.
CSegmentGlyph(const objects::CSeq_id_Handle &component_id, const TSeqRange &range, const objects::CSeq_id_Handle &mapped_id, const TSeqRange &mapped_range, bool component_negative_strand, TSeqPos length=0)
TIntervals m_Intervals
intervals (like for features or alignments).
virtual bool NeedTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Check if need to show tooltip.
CRef< objects::CSeq_loc > m_Location
our mapped location
virtual void GetTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Get the tooltip if available.
virtual const TIntervals & GetIntervals(void) const
access sub-intervals (if any).
virtual void SetHideLabel(bool b)
Force to hide label.
virtual bool HasObject(CConstRef< CObject > obj) const
check if the wrapped object(s) is the one.
TSeqPos m_Length
length of the component sequence, independent of the chunk we use
CConstRef< CSegmentConfig > m_Config
rendering configuration for a segment.
void x_InitHTMLActiveArea(CHTMLActiveArea &area) const
initialize the basic information for a given active area.
CRenderingContext * m_Context
the rendering context
virtual void SetHeight(TModelUnit h)
virtual TModelUnit GetRight() const
virtual void SetWidth(TModelUnit w)
virtual void SetLeft(TModelUnit l)
virtual TModelUnit GetTop() const
virtual TModelUnit GetHeight() const
virtual TModelUnit GetWidth() const
virtual TModelUnit GetLeft() const
TModelRect GetModelRect() const
get the bounding box.
vector< CHTMLActiveArea > TAreaVector
virtual TModelUnit GetBottom() const
vector< TSeqRange > TIntervals
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
IRender & GetGl()
convenience function for getting current render manager
virtual TModelUnit TextHeight(const CGlTextureFont *font) const =0
virtual TModelUnit TextWidth(const CGlTextureFont *font, const char *text) const =0
CGlRect< TModelUnit > TModelRect
virtual void ColorC(const CRgbaColor &c)=0
Set current color (glColor{3,4}{f,d}{v,})
string Truncate(const char *text, TModelUnit w, ETruncate trunc=eTruncate_Ellipsis) const
Truncate text to the secified width.
CRgbaColor ContrastingColor(bool onlyBW=true) const
Return a color guaranteed to contrast nicely with this color.
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
static CGuiObjectInfoComponent * CreateObject(SConstScopedObject &object, ICreateParams *params)
CConstRef< CSeq_id > GetSeqId(void) const
@ eContent
Untagged human-readable accession or the like.
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
position_type GetLength(void) const
position_type GetToOpen(void) const
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
static const int kSideLabelSpace
extra space for side labeling.
static const int kVertLabelSpace
vertical space between label and object.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4