Alot of UI work, resize fixed.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@253 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-04 19:50:59 +00:00
parent bd7849199c
commit e02974571a
15 changed files with 406 additions and 10 deletions
+2
View File
@@ -60,6 +60,8 @@ Manager::adjust_layout() {
(*itr)->resize(0, height, Canvas::get_screen_width(), h);
}
std::for_each(begin(), end(), std::mem_fun(&Window::mark_dirty));
}
void
+6
View File
@@ -1,6 +1,8 @@
#ifndef RTORRENT_WINDOW_BASE_H
#define RTORRENT_WINDOW_BASE_H
#include "timer.h"
namespace display {
class Canvas;
@@ -17,6 +19,8 @@ public:
void refresh();
void resize(int x, int y, int w, int h);
void mark_dirty() { m_lastDraw = 0; }
virtual void redraw() = 0;
protected:
@@ -27,6 +31,8 @@ protected:
bool m_dynamic;
int m_minHeight;
Timer m_lastDraw;
};
}
+7 -3
View File
@@ -15,10 +15,14 @@ WindowDownloadList::WindowDownloadList(DList* d) :
void
WindowDownloadList::redraw() {
m_canvas->erase();
m_canvas->print_border(' ', ' ', '-', '-', ' ', ' ', ' ', ' ');
if (Timer::cache() - m_lastDraw < 1000000)
return;
int pos = 1;
m_lastDraw = Timer::cache();
m_canvas->erase();
int pos = 0;
// Remember to check for end of screen too.
+1 -1
View File
@@ -15,7 +15,7 @@ public:
DList& get_list() { return *m_downloads; }
DList::iterator get_focus() { return m_focus; }
void set_focus(DList::iterator itr) { m_focus = itr; }
void set_focus(DList::iterator itr) { m_focus = itr; mark_dirty(); }
virtual void redraw();
+4
View File
@@ -15,6 +15,10 @@ WindowPeerList::WindowPeerList(PList* l) :
void
WindowPeerList::redraw() {
if (Timer::cache() - m_lastDraw < 1000000)
return;
m_lastDraw = Timer::cache();
m_canvas->erase();
int x = 2;
+1 -1
View File
@@ -19,7 +19,7 @@ public:
PList& get_list() { return *m_list; }
PList::iterator get_focus() { return m_focus; }
void set_focus(PList::iterator itr) { m_focus = itr; }
void set_focus(PList::iterator itr) { m_focus = itr; mark_dirty(); }
void slot_chunks_total(SlotChunksTotal s) { m_slotChunksTotal = s; }