49 return i1.second < i2.second;
64 while ( !objs_temp.empty() ) {
65 TObjectList::iterator iter = objs_temp.begin();
66 while (iter != objs_temp.end()) {
70 if (
range.GetFrom() < 0.0) {
76 if (f_iter == height.
end()) {
77 h = height.rbegin()->second;
78 }
else if ((upper = f_iter->first) >=
range.GetTo()) {
79 h = (--f_iter)->second;
86 if (upper >
range.GetTo()) {
87 height[
range.GetTo()] = h;
89 iter = objs_temp.
erase(iter);
99 while (i_next != height.
end()) {
100 while (i_next != height.
end() &&
101 (i_curr->second > i_pre->second ||
102 i_curr->second > i_next->second)) {
107 if (i_next == height.
end()) {
108 if (i_curr->second < i_pre->second) {
109 i_curr->second = i_pre->second;
113 TModelUnit max = std::max<TModelUnit>(i_pre->second, i_next->second);
114 TModelUnit min = std::min<TModelUnit>(i_pre->second, i_next->second);
115 i_curr->second = i_curr->second ==
min ?
max :
min;
116 while (i_next != height.
end() &&
117 i_curr->second <= i_next->second) {
123 i_next = i_curr = height.
begin();
125 while (i_next != height.
end()) {
126 while (i_next != height.
end() && i_curr->second != i_next->second) {
130 if (i_next != height.
end()) {
131 height.
erase(i_next);
141 bound.m_Width = right - left;
TSeqPos m_MinDist
The minimum distance we permit two items to be within, horizontally.
virtual void BuildLayout(CLayoutGroup &group, SBoundingBox &bound) const
Build layout for a list of layout objects.
CLayoutGroup is a container of CSeqGlyphs (layout objects).
const TObjectList & GetChildren() const
CLayoutGroup inline methods.
ILayoutPolicy::TObjectList TObjectList
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
virtual TModelUnit GetRight() const
virtual TModelUnit GetHeight() const
virtual void SetTop(TModelUnit b)
virtual TModelUnit GetLeft() const
list< CRef< CSeqGlyph > > TObjectList
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
const_iterator upper_bound(const key_type &key) const
container_type::value_type value_type
static bool Height_Comparer(THeight::value_type &i1, THeight::value_type &i2)
map< TModelUnit, TModelUnit > THeight
CCompactLayout.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
range(_Ty, _Ty) -> range< _Ty >
Useful/utility classes and methods.
T bound(T x_, T xlo_, T xhi_)
static bool s_CompareCRefs(const CRef< CSeqGlyph > &ref_obj1, const CRef< CSeqGlyph > &ref_obj2)