cwidget
0.5.17
|
A string class which stores attributes along with characters. More...
#include <curses++.h>
Public Member Functions | |
chstring (const std::basic_string< chtype > &s) | |
chstring (const std::string &s) | |
chstring (const std::string &s, const style &st) | |
chstring (const chstring &s) | |
chstring (const chstring &s, const style &st) | |
Apply the given style to the given chstring, and set ourselves to the result. | |
chstring (const chstring &s, size_t loc, size_t n=npos) | |
chstring (size_t n, chtype c) | |
chstring & | operator= (const std::string &s) |
Assign the characters of s to this, setting all attributes to A_NORMAL. More... | |
void | apply_style (const style &st) |
Change the attributes of this string by using the given style. More... | |
A string class which stores attributes along with characters.
This has to derive from basic_string in order to implement operator= (which can't be a global function – it has to be a nonstatic member)
void cwidget::chstring::apply_style | ( | const style & | st | ) |
Change the attributes of this string by using the given style.
References cwidget::style::apply_to(), and cwidget::style::get_attrs().
Referenced by chstring().
chstring & cwidget::chstring::operator= | ( | const std::string & | s | ) |
Assign the characters of s to this, setting all attributes to A_NORMAL.
References cwidget::style::get_attrs(), cwidget::get_style(), cwidget::config::init_colors(), and cwidget::wchstring::width().