CComponentsForm: add functions to get used or free space of form dimensions

This commit is contained in:
2017-08-04 19:08:50 +02:00
parent a4af92d219
commit 67a71d5e4e
2 changed files with 43 additions and 0 deletions

View File

@@ -695,3 +695,21 @@ bool CComponentsForm::enableColBodyGradient(const int& enable_mode, const fb_pix
}
return false;
}
int CComponentsForm::getUsedDY()
{
int y_res = 0;
for (size_t i= 0; i< v_cc_items.size(); i++)
y_res = max(v_cc_items[i]->getYPos() + v_cc_items[i]->getHeight(), y_res);
return y_res;
}
int CComponentsForm::getUsedDX()
{
int x_res = 0;
for (size_t i= 0; i< v_cc_items.size(); i++)
x_res = max(v_cc_items[i]->getXPos() + v_cc_items[i]->getWidth(), x_res);
return x_res;
}