display: rewrite Display::Columns and Display::SongsInColumns

This commit is contained in:
Andrzej Rybczak
2012-08-26 20:45:54 +02:00
parent b299806a90
commit 9e071b074c
5 changed files with 190 additions and 127 deletions

View File

@@ -298,21 +298,15 @@ namespace NCurses
///
void GotoXY(int x, int y);
/// @return last X position that was set with GetXY(). Note that it most
/// likely won't report correct position unless called after GetXY() and
/// before any function that can print anything to window.
/// @return x window coordinate
/// @see GetXY()
///
int X() const;
int X();
/// @return last Y position that was set with GetXY(). Since Y position
/// doesn't change so frequently as X does, it can be called (with some
/// caution) after something was printed to window and still may report
/// correct position, but if you're not sure, obtain Y pos with GetXY()
/// instead.
/// @return y windows coordinate
/// @see GetXY()
///
int Y() const;
int Y();
/// Used to indicate whether given coordinates of main screen lies within
/// window area or not and if they do, transform them into in-window coords.
@@ -526,6 +520,13 @@ namespace NCurses
///
static size_t Length(const std::wstring &ws);
/// Cuts string so it fits desired length on the screen. Note that it uses
/// wcwidth to check real width of all characters it contains. If string
/// fits requested length it's not modified at all.
/// @param ws wide string to be cut
/// @param max_len maximal length of string
static void Cut(std::wstring &ws, size_t max_len);
protected:
/// Sets colors of window (interal use only)
/// @param fg foregound color