Provides an hourglass/snake-loader function to visualize running processes.
A template xcf-file for Gimp 2.10 is appended. Feel free to edit.
Origin commit data
------------------
Commit: 0e809c9c76
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-09 (Sat, 09 Oct 2021)
Timeout bar could not be switched off, is now disabled for CHint
TODO: find a better solution to vizualize timeout for CHint.
It looks not so good on the top of the hintbox, especially
with round corners or frameless window.
Origin commit data
------------------
Commit: 77d482a43e
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-04 (Mon, 04 Oct 2021)
Origin message was:
------------------
hintbox: try to fix logic for enable/disable timeout bar.
Timeout bar could not be switched off, is now disabled for CHint
TODO: find a better solution to vizualize timeout for CHint.
It looks not so good on the top of the hintbox, especially
with round corners or frameless window.
This allows to execute one ore more methods inside the ShowHintS() method.
This should simplify calls of CHint messages with or without hide delays
In the simplest or most cases, only one code line is necessary for this,
see examples inside test_menu.cpp or here:
Single methode:
old:
CHintBox *hintBox new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_SERVICEMENU_GETPLUGINS_HINT));
hintBox->paint();
g_Plugins->loadPlugins();
sleep(1);
hintBox->.hide();
delete hintbox;
new:
ShowHintS(LOCALE_SERVICEMENU_GETPLUGINS_HINT, 1, true, sigc::mem_fun(g_Plugins, &CPlugins::loadPlugins));
Multiple methods:
old:
CHint *hint = new CHint("Restart Tuner");
hint->paint();
g_Zapit->setStandby(true);
sleep(2);
g_Zapit->setStandby(false);
sleep(2);
g_Zapit->Rezap();
delete hint;
new:
std::vector <hint_message_data_t> hints;
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), true),"Stopping tuner...", NONEXISTANT_LOCALE, 2, true});
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), false), "Start tuner...", NONEXISTANT_LOCALE, 2, true});
hints.push_back({sigc::hide_return(sigc::mem_fun(g_Zapit, &CZapitClient::Rezap)), "Rezap...", NONEXISTANT_LOCALE, 2, true});
ShowHintS(hints);
slots can be used with sigc::bind, sigc::hide_return (or what ever) too.
sample slot:
sigc::slot<void> sl = sigc::bind(sigc::mem_fun(this, &ClassName::method), parameter);
Note: Usage of namespace sigc are doing to simplify the lines,
but this is a matter of discretion.
TODO: - timeoutbar should visualize a kind of busy mode.
- implemetations
Origin commit data
------------------
Commit: 0ae328d081
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-04 (Mon, 04 Oct 2021)
Origin message was:
------------------
hintbox: expand ShowHintS() with slot parameter
This allows to execute one ore more methods inside the ShowHintS() method.
This should simplify calls of CHint messages with or without hide delays
In the simplest or most cases, only one code line is necessary for this,
see examples inside test_menu.cpp or here:
Single methode:
old:
CHintBox *hintBox new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_SERVICEMENU_GETPLUGINS_HINT));
hintBox->paint();
g_Plugins->loadPlugins();
sleep(1);
hintBox->.hide();
delete hintbox;
new:
ShowHintS(LOCALE_SERVICEMENU_GETPLUGINS_HINT, 1, true, sigc::mem_fun(g_Plugins, &CPlugins::loadPlugins));
Multiple methods:
old:
CHint *hint = new CHint("Restart Tuner");
hint->paint();
g_Zapit->setStandby(true);
sleep(2);
g_Zapit->setStandby(false);
sleep(2);
g_Zapit->Rezap();
delete hint;
new:
std::vector <hint_message_data_t> hints;
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), true),"Stopping tuner...", NONEXISTANT_LOCALE, 2, true});
hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), false), "Start tuner...", NONEXISTANT_LOCALE, 2, true});
hints.push_back({sigc::hide_return(sigc::mem_fun(g_Zapit, &CZapitClient::Rezap)), "Rezap...", NONEXISTANT_LOCALE, 2, true});
ShowHintS(hints);
slots can be used with sigc::bind, sigc::hide_return (or what ever) too.
sample slot:
sigc::slot<void> sl = sigc::bind(sigc::mem_fun(this, &ClassName::method), parameter);
Note: Usage of namespace sigc are doing to simplify the lines,
but this is a matter of discretion.
TODO: - timeoutbar should visualize a kind of busy mode.
- implemetations
enable_timeout_bar was not considered within exec().
Each try to disable timeout bar (eg. with enableTimeOutBar())
was without effect.
Origin commit data
------------------
Commit: 0cc13fb9c5
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-02-13 (Thu, 13 Feb 2020)
So we can enable/disable directly with setTimeOut() method.
Usefully to disable timeout bar if not required.
Origin commit data
------------------
Commit: 86fa9b0ca9
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-23 (Thu, 23 Jan 2020)
Should be easier and more flexible to handle without nano parameter,
some reworkes in other classes and thread handlings are required.
Origin commit data
------------------
Commit: 5afe92e526
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-05 (Sun, 05 Jan 2020)
Prevent multiple connections to slot. Only to be sure.
Origin commit data
------------------
Commit: eb209de47a
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-12-10 (Mon, 10 Dec 2018)
Had some issues while compile with gcc 7.x.
Exact data type was expected.
Origin commit data
------------------
Commit: 882a4654a8
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-12-04 (Mon, 04 Dec 2017)
Last line size was not considered.
Origin commit data
------------------
Commit: 87b53a8597
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-09-17 (Sun, 17 Sep 2017)
Otherwise probably in this context to much colored with default settings.
Origin commit data
------------------
Commit: 8c29b8e68f
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-21 (Sun, 21 May 2017)
Without text, position was not complete calculated.
Only default position was used.
Origin commit data
------------------
Commit: e48cc87b6f
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-17 (Wed, 17 May 2017)
in order to flatten the build dependency tree further, include
fontrenderer.h directly where needed, in header files a forward
declaration is enough
Origin commit data
------------------
Commit: 2303d94300
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-05 (Sun, 05 Feb 2017)
When no scrollbar is present, just pass through up/down keys instead
of only canceling the hintbox. This restores the behaviour before
commit 11b3307251.
Prominent examle is the "channel not available" popup which prevented
further channel switching until canceled.
Origin commit data
------------------
Commit: 5f93b57d84
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-01-29 (Sun, 29 Jan 2017)
RC_up and RC_down are used for text scroll, but most message texts
are small and no scroll mode is required. In case of large texts
it should falling back to scroll mode.
Origin commit data
------------------
Commit: 1d8de839d5
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-10 (Tue, 10 Jan 2017)
This should have no effect, because calculation of position and dimensions
is mostly dependency from message text. So this is only formality.
Origin commit data
------------------
Commit: b714998065
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-22 (Thu, 22 Dec 2016)
default timeout was not defined
Origin commit data
------------------
Commit: bd75701fc3
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-12 (Mon, 12 Dec 2016)
Must be enabled with enum, bool has no effect.
Origin commit data
------------------
Commit: e46d65fb92
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-22 (Tue, 22 Nov 2016)
Passed timeout for messeages an popup's fired by yWeb API was not really
ok.
For popups now we have a setting with default value of 6 seconds timeout
Popups fired with ShowHint() use this as default. Value of 0 and -1
are ignored.
Messages fired with ShowMsg() should be fixed and interpret
value 0 or -1 as no timeout and will remain on the screen.
Origin commit data
------------------
Commit: 8b97f72ed1
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-22 (Tue, 22 Nov 2016)
Include default size and localized setup.
TODO: localize for nederlands and slovak, current english only.
Origin commit data
------------------
Commit: 4988df1dd9
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-20 (Sun, 20 Nov 2016)
Last chars were truncated. Indent and titel text were not considered.
Origin commit data
------------------
Commit: 7f5a576795
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-11 (Fri, 11 Nov 2016)
Width calculation is now depends on largest line of text.
Origin commit data
------------------
Commit: 0952efaba4
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-10 (Thu, 10 Nov 2016)
Explicit call of disableTimeOutBar() after exec() is required to ensure
we have no timebar opened objects. I'm not shure, but otherwise crashs
could be possible.
showTimeOutBar() is required for OnTimer(). It doesn't need any
parameter.
Origin commit data
------------------
Commit: a80b861cb5
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-25 (Tue, 25 Oct 2016)
Timeout bar is not embedded like other cc items in this form, therefor is
is better to kill this object explicit from screen otherwise it is possible
we hab artefacts after closing of hintbox window.
Origin commit data
------------------
Commit: 6580c5a54a
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-21 (Fri, 21 Oct 2016)
Origin message was:
------------------
CHintBox: ensure remove timeout bar from screen if hintbox object is closed
Timeout bar is not embedded like other cc items in this form, therefor is
is better to kill this object explicit from screen otherwise it is possible
we hab artefacts after closing of hintbox window.