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

A comment can be applied to a cell to provide extra information about its contents. More...

#include <comment.hpp>

Public Member Functions

 comment ()
 Constructs a new blank comment. More...
 
 comment (const rich_text &text, const std::string &author)
 Constructs a new comment with the given text and author. More...
 
 comment (const std::string &text, const std::string &author)
 Constructs a new comment with the given unformatted text and author. More...
 
rich_text text () const
 Returns the text that will be displayed for this comment. More...
 
std::string plain_text () const
 Returns the plain text that will be displayed for this comment without formatting information. More...
 
std::string author () const
 Returns the author of this comment. More...
 
void hide ()
 Makes this comment only visible when the associated cell is hovered. More...
 
void show ()
 Makes this comment always visible. More...
 
bool visible () const
 Returns true if this comment is not hidden. More...
 
void position (int left, int top)
 Sets the absolute position of this cell to the given coordinates. More...
 
int left () const
 Returns the distance from the left side of the sheet to the left side of the comment. More...
 
int top () const
 Returns the distance from the top of the sheet to the top of the comment. More...
 
void size (int width, int height)
 Sets the size of the comment. More...
 
int width () const
 Returns the width of this comment. More...
 
int height () const
 Returns the height of this comment. More...
 
bool operator== (const comment &other) const
 Return true if this comment is equivalent to other. More...
 
bool operator!= (const comment &other) const
 Returns true if this comment is not equivalent to other. More...
 

Detailed Description

A comment can be applied to a cell to provide extra information about its contents.

Constructor & Destructor Documentation

◆ comment() [1/3]

xlnt::comment::comment ( )

Constructs a new blank comment.

◆ comment() [2/3]

xlnt::comment::comment ( const rich_text text,
const std::string &  author 
)

Constructs a new comment with the given text and author.

◆ comment() [3/3]

xlnt::comment::comment ( const std::string &  text,
const std::string &  author 
)

Constructs a new comment with the given unformatted text and author.

Member Function Documentation

◆ author()

std::string xlnt::comment::author ( ) const

Returns the author of this comment.

◆ height()

int xlnt::comment::height ( ) const

Returns the height of this comment.

◆ hide()

void xlnt::comment::hide ( )

Makes this comment only visible when the associated cell is hovered.

◆ left()

int xlnt::comment::left ( ) const

Returns the distance from the left side of the sheet to the left side of the comment.

◆ operator!=()

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

Returns true if this comment is not equivalent to other.

◆ operator==()

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

Return true if this comment is equivalent to other.

◆ plain_text()

std::string xlnt::comment::plain_text ( ) const

Returns the plain text that will be displayed for this comment without formatting information.

◆ position()

void xlnt::comment::position ( int  left,
int  top 
)

Sets the absolute position of this cell to the given coordinates.

◆ show()

void xlnt::comment::show ( )

Makes this comment always visible.

◆ size()

void xlnt::comment::size ( int  width,
int  height 
)

Sets the size of the comment.

◆ text()

rich_text xlnt::comment::text ( ) const

Returns the text that will be displayed for this comment.

◆ top()

int xlnt::comment::top ( ) const

Returns the distance from the top of the sheet to the top of the comment.

◆ visible()

bool xlnt::comment::visible ( ) const

Returns true if this comment is not hidden.

◆ width()

int xlnt::comment::width ( ) const

Returns the width of this comment.


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