xlnt
|
Describes the font style of a particular cell. More...
#include <font.hpp>
Public Types | |
enum | underline_style { none, double_, double_accounting, single, single_accounting } |
Text can be underlined in the enumerated ways More... | |
Public Member Functions | |
font () | |
Constructs a default font. Calibri, size 12 More... | |
font & | bold (bool bold) |
Sets the bold state of the font to bold and returns a reference to the font. More... | |
bool | bold () const |
Returns the bold state of the font. More... | |
font & | subscript (bool value) |
Sets the vertical alignment of the font to subscript and returns a reference to the font. More... | |
bool | subscript () const |
Returns true if this font has a vertical alignment of subscript. More... | |
font & | superscript (bool value) |
Sets the vertical alignment of the font to superscript and returns a reference to the font. More... | |
bool | superscript () const |
Returns true if this font has a vertical alignment of superscript. More... | |
font & | italic (bool italic) |
Sets the bold state of the font to bold and returns a reference to the font. More... | |
bool | italic () const |
Returns true if this font has italics applied. More... | |
font & | strikethrough (bool strikethrough) |
Sets the bold state of the font to bold and returns a reference to the font. More... | |
bool | strikethrough () const |
Returns true if this font has a strikethrough applied. More... | |
font & | outline (bool outline) |
Sets the bold state of the font to bold and returns a reference to the font. More... | |
bool | outline () const |
Returns true if this font has an outline applied. More... | |
font & | shadow (bool shadow) |
Sets the shadow state of the font to shadow and returns a reference to the font. More... | |
bool | shadow () const |
Returns true if this font has a shadow applied. More... | |
font & | underline (underline_style new_underline) |
Sets the underline state of the font to new_underline and returns a reference to the font. More... | |
bool | underlined () const |
Returns true if this font has any type of underline applied. More... | |
underline_style | underline () const |
Returns the particular style of underline this font has applied. More... | |
bool | has_size () const |
Returns true if this font has a defined size. More... | |
font & | size (double size) |
Sets the size of the font to size and returns a reference to the font. More... | |
double | size () const |
Returns the size of the font. More... | |
bool | has_name () const |
Returns true if this font has a particular face applied (e.g. "Comic Sans"). More... | |
font & | name (const std::string &name) |
Sets the font face to name and returns a reference to the font. More... | |
const std::string & | name () const |
Returns the name of the font face. More... | |
bool | has_color () const |
Returns true if this font has a color applied. More... | |
font & | color (const color &c) |
Sets the color of the font to c and returns a reference to the font. More... | |
xlnt::color | color () const |
Returns the color that this font is using. More... | |
bool | has_family () const |
Returns true if this font has a family defined. More... | |
font & | family (std::size_t family) |
Sets the family index of the font to family and returns a reference to the font. More... | |
std::size_t | family () const |
Returns the family index for the font. More... | |
bool | has_charset () const |
Returns true if this font has a charset defined. More... | |
font & | charset (std::size_t charset) |
Sets the charset of the font to charset and returns a reference to the font. More... | |
std::size_t | charset () const |
Returns the charset of the font. More... | |
bool | has_scheme () const |
Returns true if this font has a scheme. More... | |
font & | scheme (const std::string &scheme) |
Sets the scheme of the font to scheme and returns a reference to the font. More... | |
const std::string & | scheme () const |
Returns the scheme of this font. More... | |
bool | operator== (const font &other) const |
Returns true if left is exactly equal to right. More... | |
bool | operator!= (const font &other) const |
Returns true if left is not exactly equal to right. More... | |
Friends | |
class | style |
Describes the font style of a particular cell.
|
strong |
Text can be underlined in the enumerated ways
xlnt::font::font | ( | ) |
Constructs a default font. Calibri, size 12
font& xlnt::font::bold | ( | bool | bold | ) |
Sets the bold state of the font to bold and returns a reference to the font.
bool xlnt::font::bold | ( | ) | const |
Returns the bold state of the font.
font& xlnt::font::charset | ( | std::size_t | charset | ) |
Sets the charset of the font to charset and returns a reference to the font.
std::size_t xlnt::font::charset | ( | ) | const |
Returns the charset of the font.
Sets the color of the font to c and returns a reference to the font.
xlnt::color xlnt::font::color | ( | ) | const |
Returns the color that this font is using.
font& xlnt::font::family | ( | std::size_t | family | ) |
Sets the family index of the font to family and returns a reference to the font.
std::size_t xlnt::font::family | ( | ) | const |
Returns the family index for the font.
bool xlnt::font::has_charset | ( | ) | const |
Returns true if this font has a charset defined.
bool xlnt::font::has_color | ( | ) | const |
Returns true if this font has a color applied.
bool xlnt::font::has_family | ( | ) | const |
Returns true if this font has a family defined.
bool xlnt::font::has_name | ( | ) | const |
Returns true if this font has a particular face applied (e.g. "Comic Sans").
bool xlnt::font::has_scheme | ( | ) | const |
Returns true if this font has a scheme.
bool xlnt::font::has_size | ( | ) | const |
Returns true if this font has a defined size.
font& xlnt::font::italic | ( | bool | italic | ) |
Sets the bold state of the font to bold and returns a reference to the font.
bool xlnt::font::italic | ( | ) | const |
Returns true if this font has italics applied.
font& xlnt::font::name | ( | const std::string & | name | ) |
Sets the font face to name and returns a reference to the font.
const std::string& xlnt::font::name | ( | ) | const |
Returns the name of the font face.
|
inline |
Returns true if left is not exactly equal to right.
bool xlnt::font::operator== | ( | const font & | other | ) | const |
Returns true if left is exactly equal to right.
font& xlnt::font::outline | ( | bool | outline | ) |
Sets the bold state of the font to bold and returns a reference to the font.
bool xlnt::font::outline | ( | ) | const |
Returns true if this font has an outline applied.
font& xlnt::font::scheme | ( | const std::string & | scheme | ) |
Sets the scheme of the font to scheme and returns a reference to the font.
const std::string& xlnt::font::scheme | ( | ) | const |
Returns the scheme of this font.
font& xlnt::font::shadow | ( | bool | shadow | ) |
Sets the shadow state of the font to shadow and returns a reference to the font.
bool xlnt::font::shadow | ( | ) | const |
Returns true if this font has a shadow applied.
font& xlnt::font::size | ( | double | size | ) |
Sets the size of the font to size and returns a reference to the font.
double xlnt::font::size | ( | ) | const |
Returns the size of the font.
font& xlnt::font::strikethrough | ( | bool | strikethrough | ) |
Sets the bold state of the font to bold and returns a reference to the font.
bool xlnt::font::strikethrough | ( | ) | const |
Returns true if this font has a strikethrough applied.
font& xlnt::font::subscript | ( | bool | value | ) |
Sets the vertical alignment of the font to subscript and returns a reference to the font.
bool xlnt::font::subscript | ( | ) | const |
Returns true if this font has a vertical alignment of subscript.
font& xlnt::font::superscript | ( | bool | value | ) |
Sets the vertical alignment of the font to superscript and returns a reference to the font.
bool xlnt::font::superscript | ( | ) | const |
Returns true if this font has a vertical alignment of superscript.
font& xlnt::font::underline | ( | underline_style | new_underline | ) |
Sets the underline state of the font to new_underline and returns a reference to the font.
underline_style xlnt::font::underline | ( | ) | const |
Returns the particular style of underline this font has applied.
bool xlnt::font::underlined | ( | ) | const |
Returns true if this font has any type of underline applied.