CComponentsHeader/Window: add possibility to return header height

This commit is contained in:
2013-03-15 22:55:45 +01:00
parent c17e2e5d6c
commit ca42d9ba74
3 changed files with 48 additions and 23 deletions

View File

@@ -71,16 +71,17 @@ void CComponentsWindow::initVarWindow()
//CComponentsForm
initVarForm();
cc_item_type = CC_ITEMTYPE_FRM_WINDOW;
ccw_head = NULL;
ccw_caption = "";
ccw_icon_name = NULL;
//using current screen settings for default dimensions
width = frameBuffer->getScreenWidth();
height = frameBuffer->getScreenHeight();
x=getScreenStartX(width);
y=getScreenStartY(height);
ccw_head = NULL;
ccw_caption = "";
ccw_icon_name = NULL;
ccw_start_y = 0;
setShadowOnOff(true);
}
@@ -106,9 +107,17 @@ void CComponentsWindow::initHeader()
ccw_head->setWidth(width);
ccw_head->setHeaderIcon(ccw_icon_name);
ccw_head->setHeaderText(ccw_caption);
ccw_head->initCCHeaderItems();
ccw_start_y = ccw_head->getHeight();
}
}
int CComponentsWindow::getStartY()
{
initHeader();
return ccw_start_y;
}
void CComponentsWindow::initCCWItems()
{
#ifdef DEBUG_CC