mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsForm: add basics for CComponentsForm
Origin commit data
------------------
Branch: ni/coolstream
Commit: 16d12b4243
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-09-05 (Wed, 05 Sep 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -401,12 +401,15 @@ class CComponentsTitleBar : public CComponentsItemBox
|
||||
class CComponentsForm : public CComponentsContainer
|
||||
{
|
||||
private:
|
||||
CComponentsTitleBar tb;
|
||||
|
||||
void initVarForm();
|
||||
|
||||
public:
|
||||
CComponentsForm();
|
||||
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void hide(bool no_restore = false);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -1242,6 +1242,7 @@ CComponentsTitleBar::CComponentsTitleBar()
|
||||
{
|
||||
//CComponentsTitleBar
|
||||
initVarTitleBar();
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
}
|
||||
|
||||
void CComponentsTitleBar::initVarTitleBar()
|
||||
@@ -1371,13 +1372,45 @@ void CComponentsTitleBar::paint(bool do_save_bg)
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//sub class CComponentsForm from CComponentsItemBox
|
||||
CComponentsForm::CComponentsForm()
|
||||
{
|
||||
//CComponentsForm
|
||||
initVarForm();
|
||||
}
|
||||
|
||||
void CComponentsForm::initVarForm()
|
||||
{
|
||||
//CComponentsContainer
|
||||
initVarContainer();
|
||||
bgMode = CC_BGMODE_PERMANENT;
|
||||
|
||||
//simple default dimensions
|
||||
width = 150;
|
||||
height = 150;
|
||||
setCornerRadius(RADIUS_LARGE);
|
||||
setCornerType(CORNER_BOTTOM);
|
||||
}
|
||||
|
||||
void CComponentsForm::paint(bool do_save_bg)
|
||||
{
|
||||
int ytmp = y;
|
||||
int htmp = height;
|
||||
tb.setXPos(x);
|
||||
tb.setYPos(y);
|
||||
tb.setWidth(width);
|
||||
tb.addText("Form");
|
||||
tb.addIcon(NEUTRINO_ICON_INFO);
|
||||
tb.paint(do_save_bg);
|
||||
|
||||
y = height+tb.getHeight();
|
||||
height = height-tb.getHeight();
|
||||
paintInit(do_save_bg);
|
||||
y = ytmp;
|
||||
height = htmp;
|
||||
}
|
||||
|
||||
void CComponentsForm::hide(bool no_restore)
|
||||
{
|
||||
tb.hide(no_restore);
|
||||
hideContainer(no_restore);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user