fixed default constructors for all OverlayElements.

This commit is contained in:
rachytski 2013-01-31 16:25:38 +03:00 committed by Alex Zolotarev
parent da55e60f02
commit d1fbb8ab5b
17 changed files with 58 additions and 5 deletions

View file

@ -28,7 +28,12 @@ namespace graphics
}
Circle::Info::Info()
: Resource::Info(Resource::ECircle)
: Resource::Info(Resource::ECircle),
m_radius(0),
m_color(0, 0, 0, 0),
m_isOutlined(false),
m_outlineWidth(0),
m_outlineColor()
{}
bool Circle::Info::lessThan(Resource::Info const * r) const

View file

@ -4,6 +4,10 @@
namespace graphics
{
CircleElement::Params::Params()
: m_ci()
{}
CircleElement::CircleElement(Params const & p)
: base_t(p),
m_ci(p.m_ci)

View file

@ -22,6 +22,7 @@ namespace graphics
struct Params : public base_t::Params
{
Circle::Info m_ci;
Params();
};
CircleElement(Params const & p);

View file

@ -18,7 +18,8 @@ namespace graphics
}
Image::Info::Info()
: Resource::Info(Resource::EImage)
: Resource::Info(Resource::EImage),
m_size(0, 0)
{}
Image::Info::Info(char const * resourceName)

View file

@ -7,9 +7,10 @@ namespace graphics
{}
OverlayElement::Params::Params()
: m_pivot(),
: m_pivot(0, 0),
m_position(EPosAboveRight),
m_depth(maxDepth)
m_depth(maxDepth),
m_userInfo()
{}
OverlayElement::OverlayElement(Params const & p)

View file

@ -4,6 +4,13 @@
namespace graphics
{
PathTextElement::Params::Params()
: m_pts(0),
m_ptsCount(0),
m_fullLength(0),
m_pathOffset(0)
{}
PathTextElement::PathTextElement(Params const & p)
: TextElement(p),
m_glyphLayout(p.m_glyphCache,

View file

@ -18,6 +18,7 @@ namespace graphics
size_t m_ptsCount;
double m_fullLength;
double m_pathOffset;
Params();
};
PathTextElement(Params const & p);

View file

@ -7,6 +7,12 @@
namespace graphics
{
SymbolElement::Params::Params()
: m_info(),
m_symbolRect(0, 0, 0, 0),
m_renderer(0)
{}
SymbolElement::SymbolElement(Params const & p)
: base_t(p),
m_info(p.m_info),

View file

@ -27,6 +27,7 @@ namespace graphics
Icon::Info m_info;
m2::RectU m_symbolRect;
OverlayRenderer * m_renderer;
Params();
};
SymbolElement(Params const & p);

View file

@ -11,6 +11,15 @@
namespace gui
{
Balloon::Params::Params()
: m_image(),
m_textMarginLeft(10),
m_textMarginTop(10),
m_textMarginRight(10),
m_textMarginBottom(10),
m_imageMarginLeft(10),
m_imageMarginTop(10),
m_imageMarginRight(10),
m_imageMarginBottom(10)
{}
Balloon::Balloon(Params const & p)

View file

@ -37,6 +37,7 @@ namespace gui
shared_ptr<graphics::StraightTextElement> & elem = m_elems[state];
graphics::StraightTextElement::Params params;
params.m_depth = depth();
params.m_fontDesc = font(state);
params.m_fontDesc.m_size *= visualScale();

View file

@ -32,7 +32,7 @@ namespace gui
void purge();
void layout();
struct Params : public gui::Element::Params
struct Params : public Element::Params
{
string m_text;
};

View file

@ -13,6 +13,12 @@
#include "../graphics/screen.hpp"
#include "../graphics/pen.hpp"
CompassArrow::Params::Params()
: m_arrowWidth(0),
m_arrowHeight(0),
m_framework(0)
{}
CompassArrow::CompassArrow(Params const & p)
: base_t(p),
m_arrowWidth(p.m_arrowWidth),

View file

@ -43,6 +43,7 @@ public:
unsigned m_arrowWidth;
unsigned m_arrowHeight;
Framework * m_framework;
Params();
};
CompassArrow(Params const & p);

View file

@ -11,6 +11,10 @@
#include "../std/bind.hpp"
#include "../std/sstream.hpp"
CountryStatusDisplay::Params::Params()
: m_storage(0)
{
}
string const CountryStatusDisplay::displayName() const
{

View file

@ -63,6 +63,7 @@ public:
struct Params : public gui::Element::Params
{
storage::Storage * m_storage;
Params();
};
CountryStatusDisplay(Params const & p);

View file

@ -30,6 +30,10 @@ namespace location
double const State::s_cacheRadius = 500;
State::Params::Params()
: m_locationAreaColor(0, 0, 0, 0),
m_compassAreaColor(0, 0, 0, 0),
m_compassBorderColor(0, 0, 0, 0),
m_framework(0)
{}
State::State(Params const & p)