rtorrent: Layout dynamically resizes vertically.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@240 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-01-28 23:45:57 +00:00
parent b994517819
commit 27109b542c
6 changed files with 86 additions and 69 deletions
+8
View File
@@ -1,5 +1,7 @@
#include "config.h"
#include <stdexcept>
#include "canvas.h"
#include "window.h"
@@ -12,6 +14,12 @@ Window::refresh() {
void
Window::resize(int x, int y, int w, int h) {
if (x < 0 || y < 0)
throw std::logic_error("Window::resize(...) bad x or y position");
if (w <= 0 || h <= 0)
throw std::logic_error("Window::resize(...) bad size");
m_canvas->resize(x, y, w, h);
}