mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Branch: ni/coolstream
Commit: a7553aad1b
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-05 (Mon, 05 Dec 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1991,7 +1991,7 @@ movieplayer.bookmarkname_hint2
|
||||
movieplayer.chapters Kapitel
|
||||
movieplayer.fileplayback Abspielen (Multiformat)
|
||||
movieplayer.head Movieplayer
|
||||
movieplayer.help_additional Weitere benutzerdefinierte Tastenbelegungen sind unter "Hauptmenü" > "Einstellungen" > "Tasten" > "Bearbeiten" > "Movieplayer" zu finden.
|
||||
movieplayer.help_additional Weitere benutzerdefinierte Tastenbelegungen sind unter "Hauptmenü" > "Einstellungen" > "Tasten" > "Bearbeiten" > "Movieplayer" zu finden.\n\nWährend der Wiedergabe von Filmen sind im Hauptmenü einige Menüpunkte deaktiviert.
|
||||
movieplayer.help_button_1 1 Minute zurück
|
||||
movieplayer.help_button_2 Zum Filmanfang springen
|
||||
movieplayer.help_button_3 1 Minute vor
|
||||
|
@@ -1991,7 +1991,7 @@ movieplayer.bookmarkname_hint2
|
||||
movieplayer.chapters Chapters
|
||||
movieplayer.fileplayback File play
|
||||
movieplayer.head Movieplayer
|
||||
movieplayer.help_additional To find more user definable key bindings, see "Mainmenu" > "Settings" > "Keys" > "Edit" > "Movieplayer".
|
||||
movieplayer.help_additional To find more user definable key bindings, see "Mainmenu" > "Settings" > "Keys" > "Edit" > "Movieplayer".\n\nWhile movie playback some menuitems in mainmenu are deactivated.
|
||||
movieplayer.help_button_1 1 minute backward
|
||||
movieplayer.help_button_2 Jump to movie's start
|
||||
movieplayer.help_button_3 1 minute forward
|
||||
@@ -2003,7 +2003,7 @@ movieplayer.help_button_8 Jump to movie's end
|
||||
movieplayer.help_button_9 10 minutes forward
|
||||
movieplayer.help_button_backward Fast rewind
|
||||
movieplayer.help_button_forward Fast forward
|
||||
movieplayer.help_button_menu Open main manu
|
||||
movieplayer.help_button_menu Open main menu
|
||||
movieplayer.help_button_pause Pause / Continue
|
||||
movieplayer.help_button_stop Stop
|
||||
movieplayer.plugin Movieplayer plugin
|
||||
|
@@ -75,11 +75,6 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in
|
||||
int h_line = getLineHeight(line_height, font);
|
||||
|
||||
CComponentsFrmChain *line = new CComponentsFrmChain(line_indent, hbox_y, 0, h_line);
|
||||
if ((hbox_y + h_line)>ccw_body->getHeight()){
|
||||
addPagebreak();
|
||||
line->setYPos(hbox_y);
|
||||
}
|
||||
line->setPageNumber(page);
|
||||
|
||||
int w_body = ccw_body->getWidth();
|
||||
line->setWidth(w_body - 2*line_indent);
|
||||
@@ -99,15 +94,31 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in
|
||||
line->addCCItem(picon);
|
||||
}
|
||||
|
||||
int txt_height = 0;
|
||||
if (!text.empty()){
|
||||
int x_text = w_picon + (picon ? OFFSET_INNER_MID : 0);
|
||||
CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, line->getHeight(), text, text_mode, font);
|
||||
CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, 0, text, text_mode, font);
|
||||
#if 0 //"contrast agent", if you want to see where the text items are drawn.
|
||||
txt->setColorBody(COL_RED);
|
||||
txt->doPaintBg(true);
|
||||
#endif
|
||||
int lines = txt->getCTextBoxObject()->getLines();
|
||||
txt_height = std::max(lines*font->getHeight(), h_line);
|
||||
txt->setHeight(txt_height);
|
||||
|
||||
line->addCCItem(txt);
|
||||
}
|
||||
|
||||
if (txt_height > line->getHeight())
|
||||
line->setHeight(txt_height);
|
||||
|
||||
if ((hbox_y + line->getHeight()) > ccw_body->getHeight())
|
||||
{
|
||||
addPagebreak();
|
||||
line->setYPos(hbox_y);
|
||||
}
|
||||
line->setPageNumber(page);
|
||||
|
||||
addWindowItem(line);
|
||||
}
|
||||
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
#define HELPBOX_DEFAULT_LINE_HEIGHT 0 // use font height as default
|
||||
#define HELPBOX_DEFAULT_LINE_INDENT OFFSET_INNER_MID
|
||||
#define HELPBOX_DEFAULT_TEXT_MODE CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH
|
||||
|
||||
class Helpbox : public CComponentsWindowMax
|
||||
{
|
||||
@@ -44,9 +45,30 @@ private:
|
||||
///default font
|
||||
Font* hbox_font;
|
||||
public:
|
||||
/**
|
||||
* Creates a window with pre defined items added with addLine() or
|
||||
* inhertited addWindowItem() methods. This allows to add any compatible cc-items types
|
||||
* e.g. Text, label, infobox, images ...
|
||||
* NOTE: addLine() members are used only for compatibilty with older implementation
|
||||
* of lines.
|
||||
* @param[in] Title
|
||||
* @li exepts type std::string, defines caption of window
|
||||
* @param[in] Default_Text
|
||||
* @li optional: exepts type std::string, defines a pre defined help text
|
||||
* @param[in] text_mode
|
||||
* @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes
|
||||
* @param[in] line_height
|
||||
* @li optional: exepts type int, defines height of line
|
||||
* @param[in] line_indent
|
||||
* @li optional: exepts type int, defines lenght of indent from left
|
||||
* @param[in] font_text
|
||||
* @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used
|
||||
* @param[in] Icon
|
||||
* @li exepts type const char*, defins the title bar icon and can be name (see /gui/icons.h) or path to an image file
|
||||
*/
|
||||
Helpbox( const std::string& Title,
|
||||
const std::string& Default_Text = std::string(),
|
||||
const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH,
|
||||
const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE,
|
||||
const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT,
|
||||
Font* font_text = NULL,
|
||||
const char* Icon = NEUTRINO_ICON_INFO);
|
||||
@@ -54,35 +76,88 @@ public:
|
||||
///show = paint, for compatibility
|
||||
void show(bool do_save_bg = true){ paint(do_save_bg) ;}
|
||||
|
||||
|
||||
/**Adds an item with pre defined text
|
||||
* @param[in] text
|
||||
* @li exepts type std::string
|
||||
* @param[in] text_mode
|
||||
* @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes
|
||||
* @param[in] line_height
|
||||
* @li optional: exepts type int, defines height of line
|
||||
* @param[in] line_indent
|
||||
* @li optional: exepts type int, defines lenght of indent from left
|
||||
* @param[in] font_text
|
||||
* @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used
|
||||
*/
|
||||
void addLine( const std::string& text,
|
||||
const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH,
|
||||
const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE,
|
||||
const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT,
|
||||
const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT,
|
||||
Font* font_text = NULL);
|
||||
|
||||
/**Adds an item with pre defined text
|
||||
* @param[in] text
|
||||
* @li exepts type const char *
|
||||
* @param[in] text_mode
|
||||
* @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes
|
||||
* @param[in] line_height
|
||||
* @li optional: exepts type int, defines height of line
|
||||
* @param[in] line_indent
|
||||
* @li optional: exepts type int, defines lenght of indent from left
|
||||
* @param[in] font_text
|
||||
* @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used
|
||||
*/
|
||||
void addLine( const char *text,
|
||||
const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH,
|
||||
const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE,
|
||||
const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT,
|
||||
const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT,
|
||||
Font* font_text = NULL);
|
||||
|
||||
/**Adds an item with pre defined icon and text
|
||||
* @param[in] icon
|
||||
* @li exepts type std::string, icon can be name (see /gui/icons.h) or path to an image file
|
||||
* @param[in] text
|
||||
* @li exepts type std::string
|
||||
* @param[in] text_mode
|
||||
* @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes
|
||||
* @param[in] line_height
|
||||
* @li optional: exepts type int, defines height of line
|
||||
* @param[in] line_indent
|
||||
* @li optional: exepts type int, defines lenght of indent from left
|
||||
* @param[in] font_text
|
||||
* @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used
|
||||
*/
|
||||
void addLine( const std::string& icon,
|
||||
const std::string& text,
|
||||
const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH,
|
||||
const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE,
|
||||
const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT,
|
||||
const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT,
|
||||
Font* font_text = NULL);
|
||||
|
||||
/**Adds an item with pre defined icon and text
|
||||
* @param[in] icon
|
||||
* @li exepts type const char *, icon can be name (see /gui/icons.h) or path to an image file
|
||||
* @param[in] text
|
||||
* @li exepts type const char *
|
||||
* @param[in] text_mode
|
||||
* @li optional: exepts type int, defines text modes, see /gui/widget/textbox.h for possible modes
|
||||
* @param[in] line_height
|
||||
* @li optional: exepts type int, defines height of line
|
||||
* @param[in] line_indent
|
||||
* @li optional: exepts type int, defines lenght of indent from left
|
||||
* @param[in] font_text
|
||||
* @li optional: exepts type Font*, default = NULL, this means SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO is used
|
||||
*/
|
||||
void addLine( const char *icon,
|
||||
const char *text,
|
||||
const int& text_mode = CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH,
|
||||
const int& text_mode = HELPBOX_DEFAULT_TEXT_MODE,
|
||||
const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT,
|
||||
const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT,
|
||||
Font* font_text = NULL);
|
||||
|
||||
|
||||
///adds a separator as horizontal line, arg 'line_height' defines the space of full separator height, the separator line itself has a defined height of 2px and is centered within line space.
|
||||
///arg 'line_indent' defines begin of line from left border within body object.
|
||||
///arg 'enable_gradient' enable/disable gradient, Note: default = true, but gradient is only effected, if global/theme gradient settings are enabled!
|
||||
///gradient is only effected, if global/theme gradient settings are enabled!
|
||||
void addSeparatorLine( const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT,
|
||||
const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT);
|
||||
///adds a simple empty separator as horizontal space, arg 'line_height' defines the space of full separator height
|
||||
|
Reference in New Issue
Block a user