mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
testmenu: add CHint demos
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6f0cac34bd
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-04 (Mon, 04 Oct 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1010,6 +1010,23 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
DisplayInfoMessage("Info Test!");
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if (actionKey == "short_hint"){
|
||||
CHint *hint = new CHint("Info Test!");
|
||||
// Set the message window outside of screen mid to demonstrate the hide behavior,
|
||||
// so that the hide behavior will not be influenced by any other window or menu.
|
||||
hint->setPos(10, 10);
|
||||
hint->paint();
|
||||
sleep(3);
|
||||
// We must call hide() or kill() explicitly, because there is no instruction of hide() inside any destructors.
|
||||
// This behavior is by design.
|
||||
hint->hide();
|
||||
delete hint;
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if (actionKey == "short_hint_timed"){
|
||||
ShowHintS("Info Test...", 3, true);
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if (actionKey == "msgbox_alt_btn"){
|
||||
CMsgBox msgBox("Variable buttontext...", "Msgbox Test");
|
||||
msgBox.setShowedButtons(CMsgBox::mbNo | CMsgBox::mbYes);
|
||||
@@ -1327,6 +1344,9 @@ void CTestMenu::showMsgTests(CMenuWidget *widget)
|
||||
widget->addItem(new CMenuSeparator(CMenuSeparator::STRING | CMenuSeparator::LINE, "Error/Info"));
|
||||
widget->addItem(new CMenuForwarder("Error Message!", true, NULL, this, "msgbox_error"));
|
||||
widget->addItem(new CMenuForwarder("Info Message!", true, NULL, this, "msgbox_info"));
|
||||
widget->addItem(new CMenuSeparator(CMenuSeparator::STRING | CMenuSeparator::LINE, "Short Hint"));
|
||||
widget->addItem(new CMenuForwarder("Short hint!", true, NULL, this, "short_hint"));
|
||||
widget->addItem(new CMenuForwarder("Short hint with timeout!", true, NULL, this, "short_hint_timed"));
|
||||
}
|
||||
|
||||
void CTestMenu::showSeparatorTypes(CMenuWidget *widget)
|
||||
|
Reference in New Issue
Block a user