window: adjust indentation

This commit is contained in:
Andrzej Rybczak
2012-09-02 15:48:11 +02:00
parent d47cad1d50
commit 337a27c366

View File

@@ -123,69 +123,68 @@
/// ///
namespace NC namespace NC
{ {
/// Colors used by NCurses /// Colors used by NCurses
/// ///
enum Color { clDefault, clBlack, clRed, clGreen, clYellow, clBlue, clMagenta, clCyan, clWhite, clEnd }; enum Color { clDefault, clBlack, clRed, clGreen, clYellow, clBlue, clMagenta, clCyan, clWhite, clEnd };
/// Format flags used by NCurses /// Format flags used by NCurses
/// ///
enum Format { enum Format {
fmtNone = clEnd+1, fmtNone = clEnd+1,
fmtBold, fmtBoldEnd, fmtBold, fmtBoldEnd,
fmtUnderline, fmtUnderlineEnd, fmtUnderline, fmtUnderlineEnd,
fmtReverse, fmtReverseEnd, fmtReverse, fmtReverseEnd,
fmtAltCharset, fmtAltCharsetEnd fmtAltCharset, fmtAltCharsetEnd
}; };
/// Available border colors for window /// Available border colors for window
/// ///
enum Border { brNone, brBlack, brRed, brGreen, brYellow, brBlue, brMagenta, brCyan, brWhite }; enum Border { brNone, brBlack, brRed, brGreen, brYellow, brBlue, brMagenta, brCyan, brWhite };
/// This indicates how much the window has to be scrolled /// This indicates how much the window has to be scrolled
/// ///
enum Where { wUp, wDown, wPageUp, wPageDown, wHome, wEnd }; enum Where { wUp, wDown, wPageUp, wPageDown, wHome, wEnd };
/// Helper function that is invoked each time one will want /// Helper function that is invoked each time one will want
/// to obtain string from Window::GetString() function /// to obtain string from Window::GetString() function
/// @see Window::GetString() /// @see Window::GetString()
/// ///
typedef std::function<void(const std::wstring &)> GetStringHelper; typedef std::function<void(const std::wstring &)> GetStringHelper;
/// Initializes curses screen and sets some additional attributes /// Initializes curses screen and sets some additional attributes
/// @param window_title title of the window (has an effect only if pdcurses lib is used) /// @param window_title title of the window (has an effect only if pdcurses lib is used)
/// @param enable_colors enables colors /// @param enable_colors enables colors
/// ///
void InitScreen(const char *window_title, bool enable_colors); void InitScreen(const char *window_title, bool enable_colors);
/// Destroys the screen /// Destroys the screen
/// ///
void DestroyScreen(); void DestroyScreen();
/// Struct used to set color of both foreground and background of window /// Struct used to set color of both foreground and background of window
/// @see Window::operator<<() /// @see Window::operator<<()
/// ///
struct Colors struct Colors
{ {
Colors(Color one, Color two = clDefault) : fg(one), bg(two) { } Colors(Color one, Color two = clDefault) : fg(one), bg(two) { }
Color fg; Color fg;
Color bg; Color bg;
}; };
/// Struct used for going to given coordinates /// Struct used for going to given coordinates
/// @see Window::operator<<() /// @see Window::operator<<()
/// ///
struct XY struct XY
{ {
XY(int xx, int yy) : x(xx), y(yy) { } XY(int xx, int yy) : x(xx), y(yy) { }
int x; int x;
int y; int y;
}; };
/// Main class of NCurses namespace, used as base for other specialized windows /// Main class of NCurses namespace, used as base for other specialized windows
/// ///
class Window struct Window
{ {
public:
/// Constructs an empty window with given parameters /// Constructs an empty window with given parameters
/// @param startx X position of left upper corner of constructed window /// @param startx X position of left upper corner of constructed window
/// @param starty Y position of left upper corner of constructed window /// @param starty Y position of left upper corner of constructed window
@@ -510,7 +509,7 @@ namespace NC
/// @param max_len maximal length of string /// @param max_len maximal length of string
static void Cut(std::wstring &ws, size_t max_len); static void Cut(std::wstring &ws, size_t max_len);
protected: protected:
/// Sets colors of window (interal use only) /// Sets colors of window (interal use only)
/// @param fg foregound color /// @param fg foregound color
/// @param bg background color /// @param bg background color
@@ -562,7 +561,7 @@ namespace NC
/// current border /// current border
Border itsBorder; Border itsBorder;
private: private:
/// Sets state of bold attribute (internal use only) /// Sets state of bold attribute (internal use only)
/// @param bold_state state of bold attribute /// @param bold_state state of bold attribute
/// ///
@@ -613,7 +612,8 @@ namespace NC
int itsUnderlineCounter; int itsUnderlineCounter;
int itsReverseCounter; int itsReverseCounter;
int itsAltCharsetCounter; int itsAltCharsetCounter;
}; };
} }
#endif #endif