ManaPlus
Public Member Functions | Data Fields
LinePart Class Reference

#include <linepart.h>

Public Member Functions

 LinePart (const int x, const int y, const Color &color, const Color &color2, const std::string &text, const bool bold)
 
 LinePart (const int x, const int y, const Color &color, const Color &color2, Image *const image)
 
 LinePart (const LinePart &l)
 
LinePartoperator= (const LinePart &l)
 
 ~LinePart ()
 

Data Fields

int mX
 
int mY
 
Color mColor
 
Color mColor2
 
std::string mText
 
unsigned char mType
 
ImagemImage
 
bool mBold
 

Detailed Description

Definition at line 34 of file linepart.h.

Constructor & Destructor Documentation

◆ LinePart() [1/3]

LinePart::LinePart ( const int  x,
const int  y,
const Color color,
const Color color2,
const std::string &  text,
const bool  bold 
)
inline

Definition at line 37 of file linepart.h.

39  :
40  mX(x),
41  mY(y),
42  mColor(color),
43  mColor2(color2),
44  mText(text),
45  mType(0),
46  mImage(nullptr),
47  mBold(bold)
48  {
49  }
int mX
Definition: linepart.h:93
unsigned char mType
Definition: linepart.h:98
int mY
Definition: linepart.h:94
bool mBold
Definition: linepart.h:100
Color mColor
Definition: linepart.h:95
Image * mImage
Definition: linepart.h:99
Color mColor2
Definition: linepart.h:96
std::string mText
Definition: linepart.h:97

◆ LinePart() [2/3]

LinePart::LinePart ( const int  x,
const int  y,
const Color color,
const Color color2,
Image *const  image 
)
inline

Definition at line 51 of file linepart.h.

52  :
53  mX(x),
54  mY(y),
55  mColor(color),
56  mColor2(color2),
57  mText(),
58  mType(1),
59  mImage(image),
60  mBold(false)
61  {
62  }

◆ LinePart() [3/3]

LinePart::LinePart ( const LinePart l)
inline

Definition at line 64 of file linepart.h.

64  :
65  mX(l.mX),
66  mY(l.mY),
67  mColor(l.mColor),
68  mColor2(l.mColor2),
69  mText(l.mText),
70  mType(l.mType),
71  mImage(l.mImage),
72  mBold(l.mBold)
73  {
74  }

◆ ~LinePart()

LinePart::~LinePart ( )

Definition at line 29 of file linepart.cpp.

30 {
31  if (mImage != nullptr)
32  mImage->decRef();
33  mImage = nullptr;
34 }

References mImage.

Member Function Documentation

◆ operator=()

LinePart& LinePart::operator= ( const LinePart l)
inline

Definition at line 76 of file linepart.h.

77  {
78  mX = l.mX;
79  mY = l.mY;
80  mColor = l.mColor;
81  mColor2 = l.mColor2;
82  mText = l.mText;
83  mType = l.mType;
84  mImage = l.mImage;
85  mBold = l.mBold;
86  return *this;
87  }

References mBold, mColor, mColor2, mImage, mText, mType, mX, and mY.

Field Documentation

◆ mBold

bool LinePart::mBold

Definition at line 100 of file linepart.h.

Referenced by BrowserBox::draw(), StaticBrowserBox::draw(), and operator=().

◆ mColor

Color LinePart::mColor

Definition at line 95 of file linepart.h.

Referenced by BrowserBox::draw(), StaticBrowserBox::draw(), and operator=().

◆ mColor2

Color LinePart::mColor2

Definition at line 96 of file linepart.h.

Referenced by BrowserBox::draw(), StaticBrowserBox::draw(), and operator=().

◆ mImage

Image* LinePart::mImage

Definition at line 99 of file linepart.h.

Referenced by BrowserBox::draw(), StaticBrowserBox::draw(), operator=(), and ~LinePart().

◆ mText

std::string LinePart::mText

◆ mType

unsigned char LinePart::mType

Definition at line 98 of file linepart.h.

Referenced by BrowserBox::draw(), StaticBrowserBox::draw(), and operator=().

◆ mX

int LinePart::mX

Definition at line 93 of file linepart.h.

Referenced by BrowserBox::draw(), StaticBrowserBox::draw(), and operator=().

◆ mY

int LinePart::mY

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