mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
CTextMenu: add sample code for CComponentsHeader
Origin commit data
------------------
Branch: ni/coolstream
Commit: e4c4a33477
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-11-04 (Sun, 04 Nov 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -68,6 +68,7 @@ CTestMenu::CTestMenu()
|
|||||||
pip = NULL;
|
pip = NULL;
|
||||||
form = NULL;
|
form = NULL;
|
||||||
txt = NULL;
|
txt = NULL;
|
||||||
|
header = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CTestMenu::~CTestMenu()
|
CTestMenu::~CTestMenu()
|
||||||
@@ -78,6 +79,7 @@ CTestMenu::~CTestMenu()
|
|||||||
delete pip;
|
delete pip;
|
||||||
delete form;
|
delete form;
|
||||||
delete txt;
|
delete txt;
|
||||||
|
delete header;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||||
@@ -414,6 +416,16 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
txt->paint();
|
txt->paint();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
else if (actionKey == "header"){
|
||||||
|
if (header == NULL)
|
||||||
|
header = new CComponentsHeader (100, 100, 300, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(), "Test-Header", NEUTRINO_ICON_INFO);
|
||||||
|
|
||||||
|
if (!header->isPainted())
|
||||||
|
header->paint();
|
||||||
|
else
|
||||||
|
header->hide();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
showTestMenu();
|
showTestMenu();
|
||||||
|
|
||||||
@@ -459,6 +471,7 @@ void CTestMenu::showCCTests(CMenuWidget *widget)
|
|||||||
widget->addItem(new CMenuForwarderNonLocalized("PiP", true, NULL, this, "pip"));
|
widget->addItem(new CMenuForwarderNonLocalized("PiP", true, NULL, this, "pip"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Form", true, NULL, this, "form"));
|
widget->addItem(new CMenuForwarderNonLocalized("Form", true, NULL, this, "form"));
|
||||||
widget->addItem(new CMenuForwarderNonLocalized("Text", true, NULL, this, "text"));
|
widget->addItem(new CMenuForwarderNonLocalized("Text", true, NULL, this, "text"));
|
||||||
|
widget->addItem(new CMenuForwarderNonLocalized("Header", true, NULL, this, "header"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTestMenu::showHWTests(CMenuWidget *widget)
|
void CTestMenu::showHWTests(CMenuWidget *widget)
|
||||||
|
@@ -45,6 +45,7 @@ class CTestMenu : public CMenuTarget
|
|||||||
CComponentsPIP* pip;
|
CComponentsPIP* pip;
|
||||||
CComponentsForm *form;
|
CComponentsForm *form;
|
||||||
CComponentsText *txt;
|
CComponentsText *txt;
|
||||||
|
CComponentsHeader *header;
|
||||||
int width, selected;
|
int width, selected;
|
||||||
|
|
||||||
void showTestMenu();
|
void showTestMenu();
|
||||||
|
Reference in New Issue
Block a user