mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 21:22:31 +00:00
fd0c10d962
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@320 e378c898-3ddf-0310-93e7-cc216c733640
23 lines
433 B
C++
23 lines
433 B
C++
#include "config.h"
|
|
|
|
#include "canvas.h"
|
|
#include "window_title.h"
|
|
|
|
namespace display {
|
|
|
|
WindowTitle::WindowTitle(const std::string& s) :
|
|
Window(new Canvas, false, 1),
|
|
m_title(s) {
|
|
}
|
|
|
|
void
|
|
WindowTitle::redraw() {
|
|
m_nextDraw = utils::Timer::cache().round_seconds() + 1000000;
|
|
m_canvas->erase();
|
|
|
|
m_canvas->print(std::max(0, (m_canvas->get_width() - (int)m_title.size()) / 2 - 4), 0,
|
|
"*** %s ***", m_title.c_str());
|
|
}
|
|
|
|
}
|