Commit Graph

49 Commits

Author SHA1 Message Date
Thilo Graf
a14e84d286 msgbox.h: Fixed method hiding issue by using 'virtual' keyword for setTimeOut
This should avoid potential -Woverloaded-virtual warnings.
2024-07-07 12:02:51 +02:00
Thilo Graf
6be906e12d hintbox.h: fix wrong type name 2022-11-07 21:21:38 +01:00
Thilo Graf
602d3835f9 hintbox: Add option to enable/disable header for CLoaderHint()
This restores the original intention of showing slim hints while
loading without a header, but keeps the option to enable a header.
2022-11-07 21:21:38 +01:00
Thilo Graf
806cf7d8b4 hintbox.h: rework copy paste source doc for CLoaderHint 2022-11-07 21:21:38 +01:00
svenhoefer
1354fc5c70 - hintbox: introduce and use CLoaderHint()
Signed-off-by: Thilo Graf <dbt@novatux.de>

# Conflicts:
#	src/gui/miscsettings_menu.cpp
#	src/gui/moviebrowser/mb.cpp
#	src/gui/widget/hintbox.h
#	src/neutrino.cpp
2022-11-07 21:21:38 +01:00
Thilo Graf
ab6fe1be57 hintbox: allow usage of hint icons and loader icon with short hints too
Only NEUTRINO_ICON_LOADER must be specified as picon parameter.
2022-09-22 16:04:31 +02:00
Thilo Graf
6134115c63 gui/widget: add class CHourGlass
Provides an hourglass/snake-loader function to visualize running processes.
A template xcf-file for Gimp 2.10 is appended. Feel free to edit.
2021-10-08 23:10:30 +02:00
Thilo Graf
c9efac0665 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.
2021-10-04 17:16:38 +02:00
svenhoefer
2121698c49 - hintbox: remove obsolete include
Signed-off-by: Thilo Graf <dbt@novatux.de>
2021-10-03 17:02:39 +02:00
svenhoefer
887d2f1cb5 - hintbox: setDelay() prototype v2
Signed-off-by: Thilo Graf <dbt@novatux.de>

see commit message at: - change some hintboxes
2021-10-03 17:00:27 +02:00
svenhoefer
1cb25e7cd3 - hintbox: add setDelay() prototype
Signed-off-by: Thilo Graf <dbt@novatux.de>

see commit message at: - change some hintboxes
2021-10-03 17:00:03 +02:00
Thilo Graf
b7e837d82b 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
2021-10-03 11:50:48 +02:00
svenhoefer
2ca7d1d7d1 - hintbox: just code formatting
Signed-off-by: Thilo Graf <dbt@novatux.de>
2021-09-25 09:28:58 +02:00
Thilo Graf
1e76f6ef44 hintbox: add possibility for more control of timeout bar
So we can enable/disable directly with setTimeOut() method.
Usefully to disable timeout bar if not required.
2020-01-22 21:25:53 +01:00
Thilo Graf
9234f67d98 CHintBox/CMsgBox: use frames as default for better highlighting 2019-10-27 16:24:47 +01:00
Thilo Graf
83dfe855b0 cc-classes: add missing virtual destructors 2019-10-27 16:24:47 +01:00
Thilo Graf
cb40dcb9ea widget/hintbox.cpp/h: use disconnect instead check for OnTimer
diconnect ensures handle of current slot.
2018-12-31 11:46:55 +01:00
Thilo Graf
6237bfe07c hintbox/msgbox: add more specific thread names
For better tracing while debugging.
2018-12-31 11:46:55 +01:00
GetAway
6f26012d98 supplement to commit 72badc7; fix scale of box width 2018-10-05 23:37:35 +02:00
Thilo Graf
6e310a8157 comments: fix copy paste errors 2017-08-28 12:16:45 +02:00
Thilo Graf
17a9c691da CHintBox: use OFFSET_INNER_MID as defaul value for W_RAME 2017-02-26 21:29:53 +01:00
Thilo Graf
85fc37090e hintbox.h: use calculated dimensions as default
Useful for possible different screen resolutions.
2017-02-26 21:29:53 +01:00
Thilo Graf
1d8de839d5 CHintBox: add possibility to left hintbox with RC_up and RC_down
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.
2017-01-11 11:32:32 +01:00
Thilo Graf
c60accaeae CHintBox: add overloaded version of setMsgText() with locale parameter 2017-01-05 22:53:47 +01:00
Thilo Graf
10523d8ad4 CHintBox/CMsgBox: reduce minimal dimensions
Better display for smaller texts.
2017-01-05 22:53:44 +01:00
Thilo Graf
4382daf5e4 Message timeout: try to fix timeout defines
Some parameters were confused.
2016-12-08 12:54:37 +01:00
M. Liebmann
1d3a047f6b CHintBox/CMsgBox: Add default icon for header (NEUTRINO_ICON_INFO) 2016-11-27 22:04:52 +01:00
Thilo Graf
8b97f72ed1 Messages: try to fix API message handling
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.
2016-11-22 10:32:10 +01:00
Thilo Graf
075917e32d CHintBox: remove center text mode on used picon 2016-11-11 23:10:39 +01:00
Thilo Graf
3193fef4c6 CHintbox: enlarge possible max height
Better use of available screen size for many lines
2016-11-11 21:42:07 +01:00
Thilo Graf
7f5a576795 CHintBox: try to fix truncated chars
Last chars were truncated. Indent and titel text were not considered.
2016-11-11 21:42:07 +01:00
Thilo Graf
e3f51f2c91 CHintBox/CMsgBox: rework text handling and dynamic size behavior 2016-11-10 11:18:56 +01:00
Thilo Graf
4bdd5e11a9 CHintBox: add member to get maximal required width 2016-11-10 11:15:43 +01:00
Thilo Graf
a80b861cb5 CHintBox: move showTimeOutBar() to protected, add params to enableTimeOutBar()
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.
2016-10-25 08:53:23 +02:00
Thilo Graf
a5ce26dfd9 CHintBox: try to optimize height and width of message window 2016-10-24 10:31:28 +02:00
Thilo Graf
969e2fe600 CHintBox: add doc with doxygen tags 2016-10-24 10:31:28 +02:00
Thilo Graf
2952dcc124 CHintBox: fix text mode pass
Rquired in inherited classes
2016-10-24 10:31:28 +02:00
Thilo Graf
c035b2fc15 CHintBox: add space for timeout bar 2016-10-24 10:31:27 +02:00
Thilo Graf
cb3699deb5 CHintbox/CMsgBox: add vizualized timeout bar 2016-10-24 10:31:27 +02:00
Thilo Graf
b9d44a3fc8 CHintbox: use default text frame depends from default height and width 2016-10-24 10:31:27 +02:00
Thilo Graf
3b60a55f59 CHintBox: reduce window size for used auto size depends on text content 2016-10-24 10:31:26 +02:00
Thilo Graf
3477e28cd7 CComponentsItem: fix changeing color on select switching of frames
expand select mode methodes with paremters for frame properties
This should make variables col_frame_sel and fr_thickness_sel superfluous.
2016-10-24 10:31:25 +02:00
Thilo Graf
dde298b1b7 CMsgBox: rework msgbox classes with Window class implementation
Replacing messagebox, hintbox_ext and some derivated parts with
basic class hintbox and derivated class CMsgBox. This should unify
window handling and avoids maintain of multiple classes with quasi
same purpose and adds more functionality.

TODO: fix and optimize details
2016-10-24 10:31:24 +02:00
svenhoefer
0f45e26728 - hintbox: allow plain neutrino locales in bodytext 2014-12-22 09:15:26 +01:00
svenhoefer
6995e1a765 - adapt ShowHint handling from martii's neutrino-mp 2014-01-22 12:11:52 +01:00
micha-bbg
2ddfd01562 * CHintBox / CHintBoxExt: better draw
- Correct calculation of box width in CHintBoxExt
- Text display in CHintBox and CHintBoxExt centered


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2058 e54a6e83-5905-42d5-8d5c-058d10e6a962
2012-01-14 05:35:53 +00:00
focus
b8c1fa5cc1 * reworked CA menu code
* added support for internal cardreaders for future conax support
* added inactivity shutdown timer for EuP
WARNING: new libcoolstream and libOpenThreads needed.



git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@925 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-12-07 10:00:52 +00:00
focus
95130dee5a All icon file names moved to icons.h; .raw extension removed from icon names
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@219 e54a6e83-5905-42d5-8d5c-058d10e6a962
2010-01-29 14:09:57 +00:00
mrcolor
bc5bd4154e our current experimental Neutrino branch
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@27 e54a6e83-5905-42d5-8d5c-058d10e6a962
2009-12-08 11:05:11 +00:00