cc_draw.cpp/h: move position members into cpp file

clean up
This commit is contained in:
2018-12-07 21:41:19 +01:00
parent d9e66f4142
commit c7f8392ef6
2 changed files with 34 additions and 14 deletions

View File

@@ -95,7 +95,7 @@ CCDraw::~CCDraw()
clearFbData();
}
inline bool CCDraw::applyPosChanges()
bool CCDraw::applyPosChanges()
{
bool ret = false;
if (x != x_old || cc_xr != cc_xr_old){
@@ -114,7 +114,7 @@ inline bool CCDraw::applyPosChanges()
return ret;
}
inline bool CCDraw::applyDimChanges()
bool CCDraw::applyDimChanges()
{
bool ret = false;
if (height != height_old){
@@ -151,7 +151,7 @@ inline bool CCDraw::applyDimChanges()
return ret;
}
inline bool CCDraw::applyColChanges()
bool CCDraw::applyColChanges()
{
bool ret = false;
if (col_body != col_body_old){
@@ -193,7 +193,7 @@ inline bool CCDraw::applyColChanges()
return ret;
}
inline bool CCDraw::hasChanges()
bool CCDraw::hasChanges()
{
if (applyPosChanges() || applyDimChanges() || applyColChanges())
return true;
@@ -201,28 +201,28 @@ inline bool CCDraw::hasChanges()
return false;
}
inline void CCDraw::setXPos(const int& xpos)
void CCDraw::setXPos(const int& xpos)
{
if (x == xpos)
return;
x = xpos;
}
inline void CCDraw::setYPos(const int& ypos)
void CCDraw::setYPos(const int& ypos)
{
if (y == ypos)
return;
y = ypos;
}
inline void CCDraw::setHeight(const int& h)
void CCDraw::setHeight(const int& h)
{
if (height == h)
return;
height = h;
}
inline void CCDraw::setWidth(const int& w)
void CCDraw::setWidth(const int& w)
{
if (width == w)
return;
@@ -262,14 +262,14 @@ bool CCDraw::enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec
return ret;
}
inline void CCDraw::setCornerType(const int& type)
void CCDraw::setCornerType(const int& type)
{
if (corner_type == type)
return;
corner_type = type;
}
inline void CCDraw::setCorner(const int& radius, const int& type)
void CCDraw::setCorner(const int& radius, const int& type)
{
setCornerType(type);
if (corner_rad == radius)
@@ -884,3 +884,23 @@ bool CCDraw::setBodyBGImageName(const std::string& image_name)
{
return setBodyBGImage(frameBuffer->getIconPath(image_name));
}
int CCDraw::getXPos()
{
return x;
}
int CCDraw::getYPos()
{
return y;
}
int CCDraw::getHeight()
{
return height;
}
int CCDraw::getWidth()
{
return width;
}

View File

@@ -194,15 +194,15 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes
///return screen x-position of component
///Note: position of bound components (items) means position related within parent form, not for screen!
///to get the real screen position, use getRealXPos(), to find in CComponentsItem sub classes
int getXPos(){return x;};
int getXPos();
///return screen y-position of component
///Note: position of bound components (items) means position related within parent form, not for screen!
///to get the real screen position, use getRealYPos(), to find in CComponentsItem sub classes
int getYPos(){return y;}
int getYPos();
///return height of component
int getHeight(){return height;}
int getHeight();
///return width of component
int getWidth(){return width;}
int getWidth();
///return/set (pass through) width and height of component
void getSize(int* w, int* h){*w=width; *h=height;}