| 3660 | #endif |
| 3661 | |
| 3662 | struct TextAttributes { |
| 3663 | TextAttributes() |
| 3664 | : initialIndent( std::string::npos ), |
| 3665 | indent( 0 ), |
| 3666 | width( consoleWidth-1 ), |
| 3667 | tabChar( '\t' ) |
| 3668 | {} |
| 3669 | |
| 3670 | TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; } |
| 3671 | TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; } |
| 3672 | TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; } |
| 3673 | TextAttributes& setTabChar( char _value ) { tabChar = _value; return *this; } |
| 3674 | |
| 3675 | std::size_t initialIndent; // indent of first line, or npos |
| 3676 | std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos |
| 3677 | std::size_t width; // maximum width of text, including indent. Longer text will wrap |
| 3678 | char tabChar; // If this char is seen the indent is changed to current pos |
| 3679 | }; |
| 3680 | |
| 3681 | class Text { |
| 3682 | public: |
no outgoing calls
no test coverage detected