glyph.
Reset(
this);
109 if(iter->m_ParentId.empty()) {
110iter->m_ParentId =
GetId();
113 std::copy(areas.begin(), areas.end(), back_inserter(*p_areas));
137 if( !visitor->
Visit(
this) ) {
150 returnc1->GetTargetPos().X() < c2->GetTargetPos().X();
157 returnc1->GetTop() < c2->GetTop();
163 if(comment_str.empty())
return;
166 typedefvector<string> TCommentPos;
170TCommentPos::const_iterator iter = cmt_pos.begin();
171 while(iter != cmt_pos.end()) {
172 const string&
label= *iter;
173 if(++iter != cmt_pos.end()) {
176comment->SetConfig(
config);
177comment->SetRenderingContext(
m_Context);
178comment->SetParent(
this);
192 if(hl_str.empty())
return;
194 typedefvector<string> THLVec;
203 size_tvalue_pos = iter->find(
':');
204 if((string::npos == value_pos) || (value_pos == (iter->length()-1))) {
208 string key= iter->substr(0, value_pos);
218 if(objs.empty())
return;
236 if(objs.empty())
return;
295 msg=
" - log 10 scaled";
298 msg=
" - log 2 scaled";
301 msg=
" - log e scaled";
304 msg=
" - linear scaled";;
341(*iter)->Update(
true);
345vector<TModelUnit> curr_x;
347 TModelUnitrow_h = comments.front()->GetHeight() + 2.0;
354 while(
r< curr_x.size() && curr_x[
r] > cmt.
GetLeft()) {
357 if(
r== curr_x.size()) {
358curr_x.push_back(0.0);
361curr_x[
r] = cmt.
GetRight() + space_x;
369(*iter)->SetTargetPos(pos);
382(*iter)->SetTargetPos(pos);
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
void x_UpdateCommentTargetPos(TComments &comments)
virtual CRef< CSeqGlyph > HitTest(const TModelPoint &p)
Hit testing.
virtual void x_RenderContent() const
The content rendering must be implemented in the derived layout tracks.
virtual bool HitTestHor(TSeqPos x, const CObject *obj)
virtual bool x_Empty() const
virtual string x_GetHistMsg() const
Histogram configuration (linear, log, etc) is also on the title bar but multiple track types can have...
virtual void SetHighlights(const string &hl_str)
set a list of 'object' need to be highlighted.
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
virtual bool Accept(IGlyphVisitor *visitor)
Interface for accepting an IGlyphVisitor.
virtual bool Intersects(const TModelRect &rect, TConstObjects &objs) const
Intersect testing.
void SetLabelGlyphs(const CSeqGlyph::TObjects &objs, CRef< CCommentConfig > config)
virtual ~CGlyphContainer()
CGlyphContainer(CRenderingContext *r_cntx)
TKeyHighlights m_KeyHighlights
CRef< CInlineLayout > m_Inline
virtual void SetComments(const string &comment_str)
set comments.
TComments m_Labels
object labels shown at any arbitrary position.
vector< CRef< CCommentGlyph > > TComments
virtual void x_ClearContent()
virtual const CTrackTypeInfo & GetTypeInfo() const
virtual void Update(bool layout_only)
Update content and layout including the bounding box.
const CLayoutGroup & GetGroup() const
static CTrackTypeInfo m_TypeInfo
void x_UpdateComments(TComments &comments)
CRef< CLayeredLayout > m_Layered
CRef< CSimpleLayout > m_Simple
void SetLayoutPolicy(ILayoutPolicy *policy)
Set policy on how to deploy the layout of its children.
void SetCommentGlyphs(const CSeqGlyph::TObjects &objs, CRef< CCommentConfig > config)
EScale m_Scale
requested scale
CRef< CHistParams > GetHistParams() const
CInlineLayout is the anther simple layout policy that put a list of glyphs in a single line horizonta...
CLayeredLayout is a standard 2D layout policy.
void SetMinDist(TSeqPos dist)
virtual bool HitTestHor(TSeqPos x, const CObject *obj)
const TObjectList & GetChildren() const
CLayoutGroup inline methods.
virtual bool Accept(IGlyphVisitor *visitor)
Interface for accepting an IGlyphVisitor.
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
CConstRef< CSeqGlyph > GetChild(int idx) const
Get the layout object at index 'idx'.
virtual void Update(bool layout_only)
Update content and layout including the bounding box.
virtual bool Intersects(const TModelRect &rect, TConstObjects &objs) const
Intersect testing.
virtual CRef< CSeqGlyph > HitTest(const TModelPoint &p)
Hit testing.
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
bool m_Expanded
is this track in expanded state
bool GetShowTitle() const
bool m_On
is this track shown
const string & GetId() const
bool x_HitTitleBar(const TModelPoint &p) const
hit the title bar?.
CConstRef< CSeqGraphicConfig > x_GetGlobalConfig() const
Method for getting global configuration from rendering context.
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
bool IsInVisibleRange(TSeqPos pos) const
TModelUnit ScreenToSeq(const TModelUnit &size) const
convert from screen pixels to sequence positions
CRenderingContext * m_Context
the rendering context
void x_Parent2Local(TModelPoint &pnt) const
Transform the coordiante from parent coord. to local coord.
virtual void SetHeight(TModelUnit h)
virtual TModelUnit GetRight() const
bool IsInHor(TModelUnit x) const
void SetParent(CSeqGlyph *p)
bool IsIn(const TModelPoint &p) const
Hit test for points in PARENT COORD.
virtual void SetWidth(TModelUnit w)
virtual void SetLeft(TModelUnit l)
virtual TModelUnit GetTop() const
virtual TModelUnit GetHeight() const
virtual void SetTop(TModelUnit b)
void Draw() const
render the layout.
virtual TModelUnit GetWidth() const
virtual TModelUnit GetLeft() const
TModelRect GetModelRect() const
get the bounding box.
vector< CHTMLActiveArea > TAreaVector
list< CRef< CSeqGlyph > > TObjects
list< CConstRef< CSeqGlyph > > TConstObjects
void SetRenderingContext(CRenderingContext *context)
Set the rendering context.
CConstRef< CCommentConfig > GetCommentConfig() const
CSimpleLayout is the simpliest layout policy that simply stack a set of glyphs one on top of the othe...
CTrackTypeInfo - holds description of a layout track type.
Visitor interface for applying any potential actions or algorithms.
virtual bool Visit(CSeqGlyph *glyph)=0
iterator_bool insert(const value_type &val)
iterator_bool insert(const value_type &val)
static bool s_CompareCRefsByV(const CRef< CCommentGlyph > &c1, const CRef< CCommentGlyph > &c2)
static bool s_CompareCRefs(const CRef< CCommentGlyph > &c1, const CRef< CCommentGlyph > &c2)
static const double kMinTrackHeight
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
CGlPoint< TModelUnit > TModelPoint
bool Intersects(const CGlRect &R) const
static void TokenizeWithEscape(const string &str, const string &delim, vector< string > &tokens, bool remove_escape=false)
Tokenize a string using the delim.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static string & ToLower(string &str)
Convert string to lower case â string& version.
static const char label[]
constexpr auto sort(_Init &&init)
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::KEY key
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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