Mana
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TextPreview Class Reference

Preview widget for particle colors, etc. More...

#include <textpreview.h>

Inheritance diagram for TextPreview:

Public Member Functions

 TextPreview (const std::string &text)
 
void setTextColor (const gcn::Color *color)
 Sets the color the text is printed in.
 
void setFont (gcn::Font *font)
 Sets the font to render the text in.
 
void setShadow (bool shadow)
 Sets whether to use a shadow while rendering.
 
void setOutline (bool outline)
 Sets whether to use an outline while rendering.
 
void draw (gcn::Graphics *graphics) override
 Widget's draw method.
 

Private Attributes

gcn::Font * mFont
 
std::string mText
 
const gcn::Color * mTextColor
 
bool mShadow = false
 
bool mOutline = false
 

Detailed Description

Preview widget for particle colors, etc.

Definition at line 31 of file textpreview.h.

Constructor & Destructor Documentation

◆ TextPreview()

TextPreview::TextPreview ( const std::string &  text)

Definition at line 26 of file textpreview.cpp.

Member Function Documentation

◆ draw()

void TextPreview::draw ( gcn::Graphics *  graphics)
override

Widget's draw method.

Does the actual job.

Parameters
graphicsgraphics to draw into

Definition at line 33 of file textpreview.cpp.

◆ setFont()

void TextPreview::setFont ( gcn::Font *  font)
inline

Sets the font to render the text in.

Parameters
fontthe font to use.

Definition at line 51 of file textpreview.h.

◆ setOutline()

void TextPreview::setOutline ( bool  outline)
inline

Sets whether to use an outline while rendering.

Parameters
outlinetrue, if an outline is wanted, false else

Definition at line 71 of file textpreview.h.

◆ setShadow()

void TextPreview::setShadow ( bool  shadow)
inline

Sets whether to use a shadow while rendering.

Parameters
shadowtrue, if a shadow is wanted, false else

Definition at line 61 of file textpreview.h.

◆ setTextColor()

void TextPreview::setTextColor ( const gcn::Color *  color)
inline

Sets the color the text is printed in.

Parameters
colorthe color to set

Definition at line 41 of file textpreview.h.

Member Data Documentation

◆ mFont

gcn::Font* TextPreview::mFont
private

Definition at line 84 of file textpreview.h.

◆ mOutline

bool TextPreview::mOutline = false
private

Definition at line 88 of file textpreview.h.

◆ mShadow

bool TextPreview::mShadow = false
private

Definition at line 87 of file textpreview.h.

◆ mText

std::string TextPreview::mText
private

Definition at line 85 of file textpreview.h.

◆ mTextColor

const gcn::Color* TextPreview::mTextColor
private

Definition at line 86 of file textpreview.h.


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