From 94fff060ee9ec6c2a8da75568702d8e944963d46 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 16 Mar 2009 07:54:47 +0000 Subject: Added some experimental indenting code to the formatter, not sure I quite dig it yet, I'd recommend not using it much for now, the API could change drastically. --- src/formatter.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/formatter.h') diff --git a/src/formatter.h b/src/formatter.h index d9066cb..693c3ed 100644 --- a/src/formatter.h +++ b/src/formatter.h @@ -87,6 +87,14 @@ namespace Bu void writeAligned( const Bu::FString &sStr ); void writeAligned( const char *sStr, int iLen ); + void incIndent(); + void decIndent(); + void setIndent( uint8_t uLevel ); + void clearIndent(); + uint8_t getIndent() const { return uIndent; } + void setIndentChar( char cIndent ); + char getIndentChar() const { return cIndent; } + void setFormat( const Fmt &f ) { fLast = f; @@ -178,6 +186,8 @@ namespace Bu Stream &rOut; Fmt fLast; bool bTempFmt; + uint8_t uIndent; + char cIndent; }; typedef Formatter::Fmt Fmt; -- cgit v1.2.3