xlnt
Public Member Functions | List of all members
xlnt::alignment Class Reference

Alignment options that determine how text should be displayed within a cell. More...

#include <alignment.hpp>

Public Member Functions

bool shrink () const
 Returns true if shrink-to-fit has been enabled. More...
 
alignmentshrink (bool shrink_to_fit)
 Sets whether the font size should be reduced until all of the text fits in a cell without wrapping. More...
 
bool wrap () const
 Returns true if text-wrapping has been enabled. More...
 
alignmentwrap (bool wrap_text)
 Sets whether text in a cell should continue to multiple lines if it doesn't fit in one line. More...
 
optional< int > indent () const
 Returns the optional value of indentation width in number of spaces. More...
 
alignmentindent (int indent_size)
 Sets the indent size in number of spaces from the side of the cell. This will only take effect when left or right horizontal alignment has also been set. More...
 
optional< int > rotation () const
 Returns the optional value of rotation for text in the cell in degrees. More...
 
alignmentrotation (int text_rotation)
 Sets the rotation for text in the cell in degrees. More...
 
optional< horizontal_alignmenthorizontal () const
 Returns the optional horizontal alignment. More...
 
alignmenthorizontal (horizontal_alignment horizontal)
 Sets the horizontal alignment. More...
 
optional< vertical_alignmentvertical () const
 Returns the optional vertical alignment. More...
 
alignmentvertical (vertical_alignment vertical)
 Sets the vertical alignment. More...
 
bool operator== (const alignment &other) const
 Returns true if this alignment is equivalent to other. More...
 
bool operator!= (const alignment &other) const
 Returns true if this alignment is not equivalent to other. More...
 

Detailed Description

Alignment options that determine how text should be displayed within a cell.

Member Function Documentation

◆ horizontal() [1/2]

optional<horizontal_alignment> xlnt::alignment::horizontal ( ) const

Returns the optional horizontal alignment.

◆ horizontal() [2/2]

alignment& xlnt::alignment::horizontal ( horizontal_alignment  horizontal)

Sets the horizontal alignment.

◆ indent() [1/2]

optional<int> xlnt::alignment::indent ( ) const

Returns the optional value of indentation width in number of spaces.

◆ indent() [2/2]

alignment& xlnt::alignment::indent ( int  indent_size)

Sets the indent size in number of spaces from the side of the cell. This will only take effect when left or right horizontal alignment has also been set.

◆ operator!=()

bool xlnt::alignment::operator!= ( const alignment other) const

Returns true if this alignment is not equivalent to other.

◆ operator==()

bool xlnt::alignment::operator== ( const alignment other) const

Returns true if this alignment is equivalent to other.

◆ rotation() [1/2]

optional<int> xlnt::alignment::rotation ( ) const

Returns the optional value of rotation for text in the cell in degrees.

◆ rotation() [2/2]

alignment& xlnt::alignment::rotation ( int  text_rotation)

Sets the rotation for text in the cell in degrees.

◆ shrink() [1/2]

bool xlnt::alignment::shrink ( ) const

Returns true if shrink-to-fit has been enabled.

◆ shrink() [2/2]

alignment& xlnt::alignment::shrink ( bool  shrink_to_fit)

Sets whether the font size should be reduced until all of the text fits in a cell without wrapping.

◆ vertical() [1/2]

optional<vertical_alignment> xlnt::alignment::vertical ( ) const

Returns the optional vertical alignment.

◆ vertical() [2/2]

alignment& xlnt::alignment::vertical ( vertical_alignment  vertical)

Sets the vertical alignment.

◆ wrap() [1/2]

bool xlnt::alignment::wrap ( ) const

Returns true if text-wrapping has been enabled.

◆ wrap() [2/2]

alignment& xlnt::alignment::wrap ( bool  wrap_text)

Sets whether text in a cell should continue to multiple lines if it doesn't fit in one line.


The documentation for this class was generated from the following file: