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(); clearFbData();
} }
inline bool CCDraw::applyPosChanges() bool CCDraw::applyPosChanges()
{ {
bool ret = false; bool ret = false;
if (x != x_old || cc_xr != cc_xr_old){ if (x != x_old || cc_xr != cc_xr_old){
@@ -114,7 +114,7 @@ inline bool CCDraw::applyPosChanges()
return ret; return ret;
} }
inline bool CCDraw::applyDimChanges() bool CCDraw::applyDimChanges()
{ {
bool ret = false; bool ret = false;
if (height != height_old){ if (height != height_old){
@@ -151,7 +151,7 @@ inline bool CCDraw::applyDimChanges()
return ret; return ret;
} }
inline bool CCDraw::applyColChanges() bool CCDraw::applyColChanges()
{ {
bool ret = false; bool ret = false;
if (col_body != col_body_old){ if (col_body != col_body_old){
@@ -193,7 +193,7 @@ inline bool CCDraw::applyColChanges()
return ret; return ret;
} }
inline bool CCDraw::hasChanges() bool CCDraw::hasChanges()
{ {
if (applyPosChanges() || applyDimChanges() || applyColChanges()) if (applyPosChanges() || applyDimChanges() || applyColChanges())
return true; return true;
@@ -201,28 +201,28 @@ inline bool CCDraw::hasChanges()
return false; return false;
} }
inline void CCDraw::setXPos(const int& xpos) void CCDraw::setXPos(const int& xpos)
{ {
if (x == xpos) if (x == xpos)
return; return;
x = xpos; x = xpos;
} }
inline void CCDraw::setYPos(const int& ypos) void CCDraw::setYPos(const int& ypos)
{ {
if (y == ypos) if (y == ypos)
return; return;
y = ypos; y = ypos;
} }
inline void CCDraw::setHeight(const int& h) void CCDraw::setHeight(const int& h)
{ {
if (height == h) if (height == h)
return; return;
height = h; height = h;
} }
inline void CCDraw::setWidth(const int& w) void CCDraw::setWidth(const int& w)
{ {
if (width == w) if (width == w)
return; return;
@@ -262,14 +262,14 @@ bool CCDraw::enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec
return ret; return ret;
} }
inline void CCDraw::setCornerType(const int& type) void CCDraw::setCornerType(const int& type)
{ {
if (corner_type == type) if (corner_type == type)
return; return;
corner_type = type; corner_type = type;
} }
inline void CCDraw::setCorner(const int& radius, const int& type) void CCDraw::setCorner(const int& radius, const int& type)
{ {
setCornerType(type); setCornerType(type);
if (corner_rad == radius) if (corner_rad == radius)
@@ -884,3 +884,23 @@ bool CCDraw::setBodyBGImageName(const std::string& image_name)
{ {
return setBodyBGImage(frameBuffer->getIconPath(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 ///return screen x-position of component
///Note: position of bound components (items) means position related within parent form, not for screen! ///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 ///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 ///return screen y-position of component
///Note: position of bound components (items) means position related within parent form, not for screen! ///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 ///to get the real screen position, use getRealYPos(), to find in CComponentsItem sub classes
int getYPos(){return y;} int getYPos();
///return height of component ///return height of component
int getHeight(){return height;} int getHeight();
///return width of component ///return width of component
int getWidth(){return width;} int getWidth();
///return/set (pass through) width and height of component ///return/set (pass through) width and height of component
void getSize(int* w, int* h){*w=width; *h=height;} void getSize(int* w, int* h){*w=width; *h=height;}