use streams instead of Window::WriteXY()

This commit is contained in:
Andrzej Rybczak
2009-02-16 19:32:43 +01:00
parent 43a8e2284e
commit 32f959d1ec
13 changed files with 42 additions and 37 deletions

View File

@@ -332,7 +332,7 @@ void Window::ReadKey() const
wgetch(itsWindow);
}
void Window::Write(bool cte, const char *format, ...) const
/*void Window::Write(bool cte, const char *format, ...) const
{
va_list list;
va_start(list, format);
@@ -351,7 +351,7 @@ void Window::WriteXY(int x, int y, bool cte, const char *format, ...) const
va_end(list);
if (cte)
wclrtoeol(itsWindow);
}
}*/
string Window::GetString(const string &base, size_t length, size_t width, bool encrypted) const
{
@@ -703,6 +703,12 @@ Window &Window::operator<<(const Format &format)
return *this;
}
Window &Window::operator<<(int (*f)(WINDOW *))
{
f(itsWindow);
return *this;
}
Window &Window::operator<<(const XY &coords)
{
GotoXY(coords.x, coords.y);