1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___VCF_GLYPH__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___VCF_GLYPH__HPP
71 const string& ref_allele,
72 const string& alt_alleles);
92 virtual const objects::CSeq_loc&
GetLocation(
void)
const;
122 void LayoutChanged();
127 void GetAdditionalInfo(
string& sAdditionalInfo)
const;
131 virtual void x_Draw()
const;
136 void x_MaybeDrawLabelAbove(
TModelUnit& base)
const;
137 void x_DrawVariationBar(
TModelUnit base)
const;
138 void x_DrawAdditionalInfo(
TModelUnit base)
const;
139 void x_MaybeDrawLabelOthers(
TModelUnit base)
const;
141 bool x_RedundantLabelCheck(
const string&
label)
const;
142 void x_DrawInsertion(
TModelUnit SeqPosTriangleMidPointX,
146 void x_DrawDeletion(
TModelUnit SeqPosTriangleMidPointX,
149 void x_DrawLabelWithXPinned(
TModelUnit& base)
const;
150 void x_DrawLabelWithYPinned(
TModelUnit base)
const;
155 bool x_isDrawn()
const;
162 bool x_ShowLabel()
const;
169 bool x_LabelOnLeft()
const;
173 bool m_HideLabel{
false};
181 mutable bool m_CustomColorIsSet{
false};
210 }
else if (idx <
colors.size()) {
User-defined methods of the data storage class.
vector< CRgbaColor > TColorCode
const TColorCode & GetColorCode() const
CRef< CCustomFeatureColor > m_CustomColors
custom color code for features with a special attribute.
class CRgbaColor provides a simple abstraction for managing colors.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
virtual bool HitTestHor(TSeqPos x, const CObject *obj)
virtual void SetHideLabel(bool)
Force to hide label.
virtual bool IsClickable() const
Query if this glyph is clickable.
virtual void x_Draw() const =0
The default renderer for this layout object.
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
virtual void GetTooltip(const TModelPoint &, ITooltipFormatter &tt, string &t_title) const
Get the tooltip if available.
virtual bool NeedTooltip(const TModelPoint &, ITooltipFormatter &, string &) const
Check if need to show tooltip.
virtual TSeqRange GetRange(void) const
get the total range of this object.
virtual bool LessBySeqPos(const CSeqGlyph &obj) const
compare this object to another based on glyph sequence position.
virtual bool HasSideLabel() const
Query if there is label and label is on the side.
virtual bool SetSelected(bool flag)
Select or deselect this glyph.
virtual void x_DrawHighlight() const
virtual void GetHTMLActiveAreas(TAreaVector *) const
Get html active areas.
virtual void x_UpdateBoundingBox()=0
Update the bounding box assuming children's sizes are fixed if any.
vector< CHTMLActiveArea > TAreaVector
CConstRef< objects::CVcfVariant > m_Object
CVcfGlyph(const objects::CVcfVariant *object)
bool x_LabelFirst() const
check to see if label needs to be drawn before feature bar.
bool isDrawn() const
determines whether the glyph should be drawn or not at all (currently children of unselected parents ...
void SetConfig(CConstRef< CFeatureParams > conf)
bool GetCustomColor(CRgbaColor &color) const
Get the customized color for a given feature.
bool x_HasOuterOnly() const
CVcfGlyph(objects::CSeq_id &seq_id, const string &sID, size_t pos, const string &ref_allele, const string &alt_alleles)
alternative alleles separated by /
CConstRef< CFeatureParams > m_Config
unique_ptr< CRgbaColor > m_CustomColorPtr
CConstRef< CFeatureParams > GetConfig() const
CVcfGlyph inline implementations.
virtual const TIntervals & GetIntervals(void) const =0
access sub-intervals (if any).
virtual CConstRef< CObject > GetObject(TSeqPos pos) const =0
access our core component - we wrap an object(s) of some sort.
virtual const objects::CSeq_loc & GetLocation(void) const =0
access the position of this object.
virtual string GetSignature() const =0
return signature for this glyph.
virtual bool HasObject(CConstRef< CObject > obj) const =0
check if the wrapped object(s) is the one.
vector< TSeqRange > TIntervals
static const Colors colors
vector< CConstRef< CObject > > GetObjects(CSeq_entry_Handle seh, const string &field, CFieldNamePanel::EFieldType field_type, int subtype, const string &ncRNA_class, CConstRef< objects::CSeq_submit > submit, CRef< CEditingActionConstraint > constraint, vector< CSeq_entry_Handle > *descr_context=nullptr)
unsigned int TSeqPos
Type for sequence locations and lengths.
string GetLabel(const CSeq_id &id)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
static const char label[]
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
double f(double x_, const double &y_)