2019-12-19 03:24:12 +00:00
|
|
|
#ifndef cwTextBuf_H
|
|
|
|
#define cwTextBuf_H
|
|
|
|
|
|
|
|
|
|
|
|
namespace cw
|
|
|
|
{
|
2019-12-24 15:05:24 +00:00
|
|
|
namespace textBuf
|
|
|
|
{
|
|
|
|
typedef handle<struct textBuf_str> handle_t;
|
2019-12-19 03:24:12 +00:00
|
|
|
|
2019-12-24 15:05:24 +00:00
|
|
|
rc_t create( handle_t& hRef, unsigned initCharN=1024, unsigned expandCharN=1024 );
|
|
|
|
handle_t create(unsigned initCharN=1024, unsigned expandCharN=1024 );
|
|
|
|
|
|
|
|
rc_t destroy(handle_t& hRef );
|
2019-12-19 03:24:12 +00:00
|
|
|
|
2019-12-24 15:05:24 +00:00
|
|
|
void clear( handle_t h );
|
|
|
|
const char* text( handle_t h);
|
2019-12-19 03:24:12 +00:00
|
|
|
|
2019-12-24 15:05:24 +00:00
|
|
|
rc_t print( handle_t h, const char* fmt, va_list vl );
|
|
|
|
rc_t print( handle_t h, const char* fmt, ... );
|
2019-12-19 03:24:12 +00:00
|
|
|
|
2019-12-24 15:05:24 +00:00
|
|
|
rc_t printBool( handle_t h, bool v );
|
|
|
|
rc_t printInt( handle_t h, int v );
|
|
|
|
rc_t printUInt( handle_t h, unsigned v );
|
|
|
|
rc_t printFloat( handle_t h, double v );
|
2019-12-19 03:24:12 +00:00
|
|
|
|
2019-12-24 15:05:24 +00:00
|
|
|
rc_t setBoolFormat( handle_t h, bool v, const char* s);
|
|
|
|
rc_t setIntFormat( handle_t h, unsigned width, unsigned flags );
|
|
|
|
rc_t setFloatFormat( handle_t h, unsigned width, unsigned decPlN );
|
2019-12-19 03:24:12 +00:00
|
|
|
|
2019-12-24 15:05:24 +00:00
|
|
|
rc_t test();
|
|
|
|
}
|
2019-12-19 03:24:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|