(p.
X() >=
f&& p.
X() <=
t) {
107area.
m_Descr=
"Sequence translation<br>";
117p_areas->push_back(area);
138 intstrand_factor =
negative? -1 : 1;
148 TSeqPosorf_start = iter->GetFrom();
149 TSeqPosorf_stop = iter->GetTo();
152 if( (
negative&& orf_start < vis_from) ||
153(!
negative&& orf_start > vis_to) ) {
167 intorf_len = (orf_stop - orf_start) * strand_factor + 1 + 2;
173x_IntersectVisible<TModelUnit>(
TModelRange(x1, x2), x1, x2);
175x_IntersectVisible<TModelUnit>(
TModelRange(x2, x1), x2, x1);
183 charstrandLabel[2] = {
'>',
'\0'};
185strandLabel[0] =
negative?
'>':
'<';
187strandLabel[0] =
negative?
'<':
'>';
189gl.
Color4f(0.0f, 0.0f, 0.0f, 1.0f);
212 if( (
negative&& *iter < vis_from) ||
218 if(*iter < vis_from || *iter > vis_to) {
226x_IntersectVisible<TModelUnit>(
TModelRange(x1, x2), x1, x2);
228x_IntersectVisible<TModelUnit>(
TModelRange(x2, x1), x2, x1);
235 if( (
negative&& *iter < vis_from) ||
241 if(*iter < vis_from || *iter > vis_to) {
249x_IntersectVisible<TModelUnit>(
TModelRange(x1, x2), x1, x2);
251x_IntersectVisible<TModelUnit>(
TModelRange(x2, x1), x2, x1);
260 TSeqPosorf_start = iter->GetFrom();
261 TSeqPosorf_stop = iter->GetTo();
264 if( (
negative&& orf_start < vis_from) ||
265(!
negative&& orf_start > vis_to) ) {
281pre_stop = orf_stop + strand_factor * 3;
284 intorf_len = (orf_stop - orf_start) * strand_factor + 1 + 2;
310 label.c_str(), left + end_len * 1.5, y,
true);
331 if(start > stop)
swap(start, stop);
332start =
max(start, vis_from);
333stop =
min(stop + 1, vis_to);
339 i= (
i< (
int)shift ? 0 :
i- shift) / 3;
340stop_i = (stop_i < (
int)shift ? 0 : stop_i - shift) / 3;
342stop_i =
min(stop_i,
len- 1);
351 autopos = start_x + (
negative? -3.0 : 3.0) *
i+ 0.5;
352 if((pos >= vis_from) && (pos <= vis_to))
362 if(f1 > t1)
swap(f1, t1);
363 if(f2 > t2)
swap(f2, t2);
374 else label[0] =
'+';
string m_Descr
description that can be used as label or tooltip
@ fNoHighlight
no highlighting on mouse over
@ fDrawBackground
highlight background for this area
@ fComment
render a label/comment on client side
@ fNoSelection
the object can't be selected
@ fTooltipEmbedded
tooltip embedded
string m_ID
area identifier
int m_Flags
area flags, will need to replace m_Type
bool m_PositiveStrand
the default is true
void TextOut(const CGlTextureFont *font, const char *text, TModelUnit x, TModelUnit y, bool center, bool adjust_flip=true) const
TModelUnit GetVisibleFrom() const
CRef< CSGSequenceDS > GetSeqDS() const
TSeqPos GetVisSeqTo() const
bool WillTransLettersFit() const
will translation letters fit.
void DrawQuad(const TModelRect &rc, bool border=false) const
TModelUnit ScreenToSeq(const TModelUnit &size) const
convert from screen pixels to sequence positions
bool IsFlippedStrand() const
TSeqPos GetVisSeqFrom() const
TSeqPos GetSequenceLength() const
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 GetLeft() const
vector< CHTMLActiveArea > TAreaVector
virtual TModelUnit GetBottom() const
CRgbaColor & GetStopCodonColor()
CGlTextureFont & GetSeqFont()
bool GetHighlightCodons() const
CRgbaColor & GetLabelBgColor()
CGlTextureFont & GetStrandFont()
int GetOrfThreshold() const
CRgbaColor & GetOrfSeqColor()
CRgbaColor & GetStartCodonColor()
CRgbaColor & GetOrfHighlightColor()
CRgbaColor & GetSeqColor()
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
virtual bool IsClickable() const
Query if this glyph is clickable.
virtual void GetTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Get the tooltip if available.
virtual bool NeedTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Check if need to show tooltip.
string x_GetFrameLabel() const
void x_DrawSequence(TSeqPos start, TSeqPos stop, TSeqPos vis_from, TSeqPos vis_to, TModelUnit center_y, bool negative) const
vector< TSeqRange > TORFs
bool x_Intersecting(TSeqPos f1, TSeqPos t1, TSeqPos f2, TSeqPos t2) const
CTranslationGlyph(EFrame frame)
virtual void x_Draw() const
The default renderer for this layout object.
TORFs m_Orfs
Open reading frame list.
TTransSeq m_TransSeq
translation sequence
EFrame m_Frame
which frame
CRef< CTranslationConfig > m_Config
configuration for rendering
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
vector< TSeqPos > TCodons
bool NegativeStrand() const
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
CRange< TModelUnit > TModelRange
void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
virtual void ColorC(const CRgbaColor &c)=0
Set current color (glColor{3,4}{f,d}{v,})
virtual void AddRow(const string &sContents="", unsigned colspan=2)=0
add a row with a cell, spanning across all columns
virtual void AddSectionRow(const string &sContents)=0
add a section row
virtual bool IsEmpty() const =0
Indicates if the tooltip is empty.
bool IntersectingWith(const TThisType &r) 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 string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt to string.
@ fWithCommas
Use commas as thousands separator.
static const char label[]
void SetFrom(TFrom value)
Assign a value to From data member.
void SetTo(TTo value)
Assign a value to To data member.
unsigned int
A callback function used to compare two keys in a database.
const GenericPointer< typename T::ValueType > T2 value
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