ManaPlus
src
gui
widgets
linepart.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2009 Aethyra Development Team
4
* Copyright (C) 2011-2019 The ManaPlus Developers
5
* Copyright (C) 2019-2021 Andrei Karas
6
*
7
* This file is part of The ManaPlus Client.
8
*
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
*/
22
23
#ifndef GUI_WIDGETS_LINEPART_H
24
#define GUI_WIDGETS_LINEPART_H
25
26
#include "
gui/color.h
"
27
28
#include <string>
29
30
#include "
localconsts.h
"
31
32
class
Image
;
33
34
class
LinePart
final
35
{
36
public
:
37
LinePart
(
const
int
x
,
const
int
y
,
const
Color
&color,
38
const
Color
&color2,
const
std::string &text,
39
const
bool
bold) :
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
}
50
51
LinePart
(
const
int
x
,
const
int
y
,
const
Color
&color,
52
const
Color
&color2,
Image
*
const
image) :
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
}
63
64
LinePart
(
const
LinePart
&l) :
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
}
75
76
LinePart
&
operator=
(
const
LinePart
&l)
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
}
88
89
A_DEFAULT_COPY
(
LinePart
)
90
91
~LinePart
();
92
93
int
mX
;
94
int
mY
;
95
Color
mColor
;
96
Color
mColor2
;
97
std::string
mText
;
98
unsigned
char
mType
;
99
Image
*
mImage
;
100
bool
mBold
;
101
};
102
103
#endif
// GUI_WIDGETS_LINEPART_H
Color
Definition:
color.h:76
Image
LinePart
Definition:
linepart.h:35
LinePart::mX
int mX
Definition:
linepart.h:93
LinePart::mType
unsigned char mType
Definition:
linepart.h:98
LinePart::LinePart
LinePart(const int x, const int y, const Color &color, const Color &color2, Image *const image)
Definition:
linepart.h:51
LinePart::mY
int mY
Definition:
linepart.h:94
LinePart::mBold
bool mBold
Definition:
linepart.h:100
LinePart::LinePart
LinePart(const int x, const int y, const Color &color, const Color &color2, const std::string &text, const bool bold)
Definition:
linepart.h:37
LinePart::mColor
Color mColor
Definition:
linepart.h:95
LinePart::operator=
LinePart & operator=(const LinePart &l)
Definition:
linepart.h:76
LinePart::~LinePart
~LinePart()
Definition:
linepart.cpp:29
LinePart::mImage
Image * mImage
Definition:
linepart.h:99
LinePart::mColor2
Color mColor2
Definition:
linepart.h:96
LinePart::mText
std::string mText
Definition:
linepart.h:97
LinePart::LinePart
LinePart(const LinePart &l)
Definition:
linepart.h:64
color.h
y
y
Definition:
graphics_calcImageRect.hpp:73
x
x
Definition:
graphics_calcImageRect.hpp:73
localconsts.h
final
#define final
Definition:
localconsts.h:46
nullptr
#define nullptr
Definition:
localconsts.h:45
A_DEFAULT_COPY
#define A_DEFAULT_COPY(func)
Definition:
localconsts.h:41
Generated on Wed Mar 17 2021 19:19:06 for ManaPlus by
1.9.1