* Allow Frame's to be located in both rows and columns. Improved min

height/width for windows.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@748 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-07-28 00:17:54 +00:00
parent fc76a11d71
commit 4c9fc671be
40 changed files with 363 additions and 193 deletions
+6 -6
View File
@@ -43,7 +43,7 @@
namespace display {
WindowStringList::WindowStringList() :
Window(new Canvas, true) {
Window(new Canvas, flag_width_dynamic | flag_height_dynamic, 0, 0) {
}
WindowStringList::~WindowStringList() {
@@ -61,22 +61,22 @@ WindowStringList::redraw() {
while (itr != m_last) {
if (ypos == (size_t)m_canvas->get_height()) {
if (ypos == (size_t)m_canvas->height()) {
ypos = 0;
xpos += width + 2;
if (xpos + 20 >= (size_t)m_canvas->get_width())
break;
if (xpos + 20 >= (size_t)m_canvas->width())
break;
width = 0;
}
width = std::max(itr->size(), width);
if (xpos + itr->size() <= (size_t)m_canvas->get_width())
if (xpos + itr->size() <= (size_t)m_canvas->width())
m_canvas->print(xpos, ypos++, "%s", itr->c_str());
else
m_canvas->print(xpos, ypos++, "%s", itr->substr(0, m_canvas->get_width() - xpos).c_str());
m_canvas->print(xpos, ypos++, "%s", itr->substr(0, m_canvas->width() - xpos).c_str());
++itr;
}