* Use varargs in Canvas::print.

* Added min/max size to display::Window. Added flags for windows that
should be on located at the left/bottom side of a Frame.

* Reversed print order in WindowLog*.

* Added display::TextElement and subclasses for flexible printing to a
char buffer with associated attributes. Added display::Attributes and
display::Canvas::print_attributes.

* Added display::WindowText for use with display::TextElement's.

* Added ui::ElementMenu for generic menus, and started work adding
this to ui::Download.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@751 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-08-06 18:20:56 +00:00
parent 62beb9d9ed
commit 0b45062eb3
66 changed files with 1350 additions and 256 deletions
+4 -4
View File
@@ -83,7 +83,7 @@ ranges<Type>::insert(value_type r) {
if (r.first >= r.second)
return;
iterator first = std::find_if(begin(), end(), rak::less_equal(r.first, rak::mem_ptr_ref(&value_type::second)));
iterator first = std::find_if(begin(), end(), rak::less_equal(r.first, rak::const_mem_ref(&value_type::second)));
if (first == end() || r.second < first->first) {
// The new range is before the first, after the last or between
@@ -107,13 +107,13 @@ ranges<Type>::insert(value_type r) {
template <typename Type>
inline typename ranges<Type>::iterator
ranges<Type>::find(Type index) {
return std::find_if(begin(), end(), rak::less(index, rak::mem_ptr_ref(&value_type::second)));
return std::find_if(begin(), end(), rak::less(index, rak::const_mem_ref(&value_type::second)));
}
template <typename Type>
inline typename ranges<Type>::const_iterator
ranges<Type>::find(Type index) const {
return std::find_if(begin(), end(), rak::less(index, rak::mem_ptr_ref(&value_type::second)));
return std::find_if(begin(), end(), rak::less(index, rak::const_mem_ref(&value_type::second)));
}
// Use find with no closest match.
@@ -128,7 +128,7 @@ ranges<Type>::has(Type index) const {
template <typename Type>
inline void
ranges<Type>::unify(iterator first) {
iterator last = std::find_if((first + 1), end(), rak::less(first->second, rak::mem_ptr_ref(&value_type::first)));
iterator last = std::find_if((first + 1), end(), rak::less(first->second, rak::const_mem_ref(&value_type::first)));
first->second = std::max(first->second, (last - 1)->second);
Base::erase((first + 1), last);