CHintBox/CMsgBox: rework text handling and dynamic size behavior

Origin commit data
------------------
Commit: e3f51f2c91
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-03 (Thu, 03 Nov 2016)
This commit is contained in:
2016-11-03 20:10:42 +01:00
parent 0704180bf9
commit c337d0449e
3 changed files with 87 additions and 168 deletions

View File

@@ -128,16 +128,14 @@ CHintBox::CHintBox( const char * const Caption,
void CHintBox::init(const std::string& Text, const int& Width, const std::string& Picon, const int& header_buttons, const int& text_mode, const int& indent) void CHintBox::init(const std::string& Text, const int& Width, const std::string& Picon, const int& header_buttons, const int& text_mode, const int& indent)
{ {
lines = 0;
timeout = HINTBOX_DEFAULT_TIMEOUT; timeout = HINTBOX_DEFAULT_TIMEOUT;
w_indentation = indent; w_indentation = indent;
hb_text_mode = text_mode;
hb_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]; hb_font = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO];
//set required window width and basic height //set required window width and basic height
width = max(HINTBOX_MIN_WIDTH, max(Width, min(hb_font->getRenderWidth(Text), (int)frameBuffer->getScreenWidth()))); width = getMaxWidth(Text, hb_font, Width);
height = max(HINTBOX_MIN_HEIGHT, height); height = max(HINTBOX_MIN_HEIGHT, min(HINTBOX_MAX_HEIGHT, height));
ccw_buttons = header_buttons; ccw_buttons = header_buttons;
@@ -151,19 +149,14 @@ void CHintBox::init(const std::string& Text, const int& Width, const std::string
//disable footer for default //disable footer for default
showFooter(false); showFooter(false);
//add the content container, contains the hint objects y_hint_obj = CC_CENTERED;
obj_content = new CComponentsFrmChain(CC_CENTERED, CC_CENTERED, ccw_body->getWidth(), ccw_body->getHeight(), NULL, CC_DIR_X, ccw_body);
obj_content->doPaintBg(false);
y_hint_obj = 0;
h_hint_obj = obj_content->getHeight();
//initialize timeout bar and its timer //initialize timeout bar and its timer
timeout_pb = NULL; timeout_pb = NULL;
timeout_pb_timer= NULL; timeout_pb_timer= NULL;
if (!Text.empty()) if (!Text.empty())
addHintItem(Text, hb_text_mode, Picon); addHintItem(Text, text_mode, Picon, COL_MENUCONTENT_TEXT, hb_font);
} }
CHintBox::~CHintBox() CHintBox::~CHintBox()
@@ -253,135 +246,73 @@ int CHintBox::exec()
return res; return res;
} }
void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const std::string& Picon, const u_int8_t& at_page_number, const fb_pixel_t& color_text, Font* font_text) void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const std::string& Picon, const fb_pixel_t& color_text, Font* font_text)
{ {
dprintf(DEBUG_INFO, "[CHintBox] [%s - %d] add new hint '%s' %s\n", __func__, __LINE__, Text.c_str(), Picon.c_str()); /* set required font and line height */
Font* item_font = !font_text ? hb_font : font_text;
//set required font and line size /* pre define required info height depends of lines and minimal needed height*/
hb_font = !font_text ? hb_font : font_text; int line_breaks = CTextBox::getLines(Text);
width = getMaxWidth(Text, width); int h_font = item_font->getHeight();
int h_line = hb_font->getHeight(); int h_lines = h_font * line_breaks;
//init side picon object /* get required height depends of possible lines and max height */
CComponentsPicture *obj_picon = new CComponentsPicture(0, timeout > 0 ? TIMEOUT_BAR_HEIGHT : 0, Picon); h_hint_obj = min(HINTBOX_MAX_HEIGHT - (ccw_head ? ccw_head->getHeight() : 0), h_lines + 2*w_indentation);
obj_picon->doPaintBg(false);
obj_picon->SetTransparent(CFrameBuffer::TM_BLACK);
int w_picon = obj_picon->getWidth();
//init text item object /* add scroll mode if needed */
int x_text_obj = (w_picon > 0) ? (w_picon + w_indentation) : 0; int txt_mode = text_mode;
int w_text_obj = obj_content->getWidth() - w_picon - w_indentation; if (h_lines > h_hint_obj){
int h_text_obj = max(h_line, obj_picon->getHeight()); txt_mode = text_mode | CTextBox::SCROLL;
CComponentsText *obj_text = new CComponentsText(x_text_obj, ccw_buttons = ccw_buttons | CComponentsHeader::CC_BTN_TOP | CComponentsHeader::CC_BTN_DOWN;
timeout > 0 ? TIMEOUT_BAR_HEIGHT : 0,
w_text_obj,
h_text_obj,
Text,
text_mode,
hb_font);
//provide the internal textbox object
CTextBox *textbox = obj_text->getCTextBoxObject();
int lines_count = textbox->getLines();
//get required height of text object related to height of current text object, header and footer
int fh_h = (ccw_head ? ccw_head->getHeight() : 0) + (ccw_footer ? ccw_footer->getHeight() : 0) + obj_text->getHeight();
int h_required = min( max(height,fh_h), (int)frameBuffer->getScreenHeight()) ;//lines_count * h_line + (ccw_head ? ccw_head->getHeight() : 0) + (ccw_footer ? ccw_footer->getHeight() : 0);
//set minimal required height
height = max(height, min(HINTBOX_MAX_HEIGHT, max(HINTBOX_MIN_HEIGHT, h_required)));
//if have no pre defined text mode:
//more than 1 line or a picon is defined, then do not center text and allow scroll if > 1 lines
if (text_mode == 0){
if (lines_count == 1)
obj_text->setTextMode(CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH | CTextBox::CENTER);
if (w_picon > 1)
obj_text->setTextMode(CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH);
if (lines_count > 1)
obj_text->setTextMode(CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH | (h_required > HINTBOX_MAX_HEIGHT ? CTextBox::SCROLL : CTextBox::AUTO_HIGH));
if (lines_count > 1 && w_picon == 0)
obj_text->setTextMode(CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH | CTextBox::CENTER | (h_required > HINTBOX_MAX_HEIGHT ? CTextBox::SCROLL : CTextBox::AUTO_HIGH));
}
else
obj_text->setTextMode(text_mode);
//text item object: don't paint background
obj_text->doPaintBg(false);
obj_text->setCorner(corner_rad, corner_type);
//set text color
obj_text->setTextColor(color_text);
//calculate height of hint object
if (obj_content->size() == 0){
if (lines_count == 1){
h_hint_obj = max(h_hint_obj, h_text_obj);
obj_text->setYPos(CC_CENTERED);
}
else
h_hint_obj = max(h_hint_obj, h_line*lines_count);
}
else{
if (lines_count == 1){
h_hint_obj = h_text_obj;
obj_text->setYPos(CC_CENTERED);
}
else
h_hint_obj = h_line*lines_count;
} }
//init hint container object /* define y start position of infobox inside body */
if (isPageChanged()) if(!ccw_body->empty()){
y_hint_obj = 0; ccw_body->front()->setYPos(w_indentation);
CComponentsFrmChain *obj_hint = new CComponentsFrmChain( 0+w_indentation, y_hint_obj += ccw_body->back()->getYPos()+ ccw_body->back()->getHeight();
y_hint_obj, }
obj_content->getWidth()-2*w_indentation,
h_hint_obj,
NULL,
CC_DIR_X,
obj_content);
//don't paint background for hint container /* calcoulation of maximal hintbox height include possible header*/
obj_hint->doPaintBg(false); height = min(HINTBOX_MAX_HEIGHT, (ccw_head ? ccw_head->getHeight() : 0)+ h_hint_obj);
obj_hint->setCorner(corner_rad, corner_type); height = max(height, HINTBOX_MIN_HEIGHT);
obj_hint->setPageNumber(at_page_number);
//add the created items to obj_hint /* get current maximal width and refresh window items TODO: required maximal width*/
obj_hint->addCCItem(obj_picon); width = getMaxWidth(Text, item_font, width);
obj_hint->addCCItem(obj_text);
//text object obtains the full height of its parent object /* initialize infobox as container for text and possible picon*/
obj_text->setHeightP(100); CComponentsInfoBox *info_box = new CComponentsInfoBox( 0,
y_hint_obj,
width, // FIXME: not critical here but ccw_body->getWidth() != width, this should be the same value!
h_hint_obj,
Text,
txt_mode,
item_font,
ccw_body,
CC_SHADOW_OFF,
color_text);
//if we have only one line and a defined picon, then do centering picon to text on the left site /* define picon and disable bg */
if (lines_count == 1) info_box->setPicture(Picon);
obj_picon->setYPos(CC_CENTERED); info_box->doPaintBg(false);
//set next y pos for the next hint object /* recalculate new hintbox height */
y_hint_obj += h_hint_obj;
//recalculate new hintbox height
ReSize(); ReSize();
//set hint box position general to center and refresh window /* set hint box position general to center and refresh window */
setCenterPos(); setCenterPos();
Refresh();
lines += lines_count; Refresh();
} }
void CHintBox::setMsgText(const std::string& Text, const uint& hint_id, const int& mode, Font* font_text, const fb_pixel_t& color_text, const int& style) void CHintBox::setMsgText(const std::string& Text, const uint& hint_id, const int& mode, Font* font_text, const fb_pixel_t& color_text, const int& style)
{ {
uint id = hint_id; uint id = hint_id;
if (hint_id+1 > obj_content->size()){ if (hint_id+1 > ccw_body->size()){
id = 0; id = 0;
dprintf(DEBUG_NORMAL, "[CHintBox] [%s - %d] mismatching hint_id [%u]...\n", __func__, __LINE__, id); dprintf(DEBUG_NORMAL, "[CHintBox] [%s - %d] mismatching hint_id [%u]...\n", __func__, __LINE__, id);
} }
CComponentsFrmChain *obj_hint = static_cast<CComponentsFrmChain*>(obj_content->getCCItem(id)); CComponentsInfoBox *obj_text = static_cast<CComponentsInfoBox*>(ccw_body->getCCItem(id));
CComponentsText *obj_text = static_cast<CComponentsText*>(obj_hint->getCCItem(1));
//set required font and line size //set required font and line size
Font* font = font_text == NULL ? g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO] : font_text; Font* font = font_text == NULL ? g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO] : font_text;
@@ -391,33 +322,29 @@ void CHintBox::setMsgText(const std::string& Text, const uint& hint_id, const in
void CHintBox::ReSize() void CHintBox::ReSize()
{ {
int h_content_old = obj_content->getHeight(); int h = (ccw_head ? ccw_head->getHeight() : 0);
int h_content_new = 0; for (size_t i= 0; i< ccw_body->size(); i++){
for (size_t i= 0; i< obj_content->size(); i++){ CComponentsItem *item = ccw_body->getCCItem(i);
CComponentsItem *item = obj_content->getCCItem(i); h += item->getHeight();
h_content_new += item->getHeight();
} }
int h_content_diff = h_content_new - h_content_old; height = min(HINTBOX_MAX_HEIGHT, max(HINTBOX_MIN_HEIGHT, max(height,h)));
Refresh();
obj_content->setHeight(h_content_new);
setHeight(height+h_content_diff);
} }
void CHintBox::Scroll(bool down, const uint& hint_id) void CHintBox::Scroll(bool down, const uint& hint_id)
{ {
uint id = hint_id; uint id = hint_id;
if (hint_id+1 > obj_content->size()){ if (hint_id+1 > ccw_body->size()){
id = 0; id = 0;
dprintf(DEBUG_NORMAL, "[CHintBox] [%s - %d] mismatching hint_id [%u]...\n", __func__, __LINE__, id); dprintf(DEBUG_NORMAL, "[CHintBox] [%s - %d] mismatching hint_id [%u]...\n", __func__, __LINE__, id);
} }
CComponentsFrmChain *obj_hint = static_cast<CComponentsFrmChain*>(obj_content->getCCItem(id)); CComponentsInfoBox *obj_text = static_cast<CComponentsInfoBox*>(ccw_body->getCCItem(id));
CComponentsText *obj_text = static_cast<CComponentsText*>(obj_hint->getCCItem(1));
if (obj_text) { if (obj_text) {
dprintf(DEBUG_INFO, "[CHintBox] [%s - %d] try to scroll %s hint_id [%u]...Text= %s\n", __func__, __LINE__, down ? "down" : "up", id, obj_text->getText().c_str()); dprintf(DEBUG_DEBUG, "[CHintBox] [%s - %d] try to scroll %s hint_id [%u]...Text= %s\n", __func__, __LINE__, down ? "down" : "up", id, obj_text->getText().c_str());
CTextBox* textbox = obj_text->getCTextBoxObject(); CTextBox* textbox = obj_text->cctext->getCTextBoxObject();
if (textbox) { if (textbox) {
textbox->enableBackgroundPaint(true); textbox->enableBackgroundPaint(true);
if (down) if (down)
@@ -439,9 +366,9 @@ void CHintBox::scroll_down(const uint& hint_id)
Scroll(true, hint_id); Scroll(true, hint_id);
} }
int CHintBox::getMaxWidth(const string& Text, const int& minWidth) int CHintBox::getMaxWidth(const string& Text, Font *font, const int& minWidth)
{ {
return max(HINTBOX_MIN_WIDTH, max(minWidth, min(hb_font->getRenderWidth(Text), (int)frameBuffer->getScreenWidth()))); return max(HINTBOX_MIN_WIDTH, max(minWidth+w_indentation, min(font->getRenderWidth(Text)+w_indentation, (int)frameBuffer->getScreenWidth())));
} }
int ShowHint(const char * const Caption, const char * const Text, const int Width, int timeout, const char * const Icon, const char * const Picon, const int& header_buttons) int ShowHint(const char * const Caption, const char * const Text, const int Width, int timeout, const char * const Icon, const char * const Picon, const int& header_buttons)

View File

@@ -32,7 +32,7 @@
#include <gui/components/cc.h> #include <gui/components/cc.h>
#define HINTBOX_MIN_WIDTH 400 #define HINTBOX_MIN_WIDTH 420
#define HINTBOX_MIN_HEIGHT 125 #define HINTBOX_MIN_HEIGHT 125
#define HINTBOX_MAX_HEIGHT 420 #define HINTBOX_MAX_HEIGHT 420
#define HINTBOX_DEFAULT_TIMEOUT 5 #define HINTBOX_DEFAULT_TIMEOUT 5
@@ -42,6 +42,8 @@
#define HINTBOX_DEFAULT_FRAME_COLOR COL_FRAME #define HINTBOX_DEFAULT_FRAME_COLOR COL_FRAME
#define TIMEOUT_BAR_HEIGHT OFFSET_SHADOW/2 #define TIMEOUT_BAR_HEIGHT OFFSET_SHADOW/2
#define DEFAULT_HINTBOX_TEXT_MODE (CTextBox::NO_AUTO_LINEBREAK)
//! Sub class of CComponentsWindow. Shows a window as a hintbox with text and optional icon beside of text. //! Sub class of CComponentsWindow. Shows a window as a hintbox with text and optional icon beside of text.
/*! /*!
CHintBox provides a small window with header and a text item, CHintBox provides a small window with header and a text item,
@@ -55,19 +57,12 @@ class CHintBox : public CComponentsWindow
int y_hint_obj; int y_hint_obj;
int h_hint_obj; int h_hint_obj;
int w_indentation; int w_indentation;
int hb_text_mode;
Font* hb_font; Font* hb_font;
///global count of lines
uint lines;
///timeout value, see also setTimeOut() ///timeout value, see also setTimeOut()
int timeout; int timeout;
///content container object, contains the hint objects, it's a child of body object
CComponentsFrmChain *obj_content;
///timeout bar ///timeout bar
CProgressBar *timeout_pb; CProgressBar *timeout_pb;
CComponentsTimer *timeout_pb_timer; CComponentsTimer *timeout_pb_timer;
@@ -85,7 +80,7 @@ class CHintBox : public CComponentsWindow
virtual void ReSize(); virtual void ReSize();
void showTimeOutBar(){enableTimeOutBar();} void showTimeOutBar(){enableTimeOutBar();}
int getMaxWidth(const std::string& Text, const int& minWidth); int getMaxWidth(const std::string& Text, Font *font, const int& minWidth);
public: public:
/**CHintBox Constructor /**CHintBox Constructor
@@ -125,7 +120,7 @@ class CHintBox : public CComponentsWindow
const char * const Icon = NULL, const char * const Icon = NULL,
const char * const Picon = NULL, const char * const Picon = NULL,
const int& header_buttons = 0, const int& header_buttons = 0,
const int& text_mode = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE,
const int& indent = W_FRAME); const int& indent = W_FRAME);
/**CHintBox Constructor /**CHintBox Constructor
@@ -139,7 +134,7 @@ class CHintBox : public CComponentsWindow
const char * const Icon = NULL, const char * const Icon = NULL,
const char * const Picon = NULL, const char * const Picon = NULL,
const int& header_buttons = 0, const int& header_buttons = 0,
const int& text_mode = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE,
const int& indent = W_FRAME); const int& indent = W_FRAME);
/**CHintBox Constructor /**CHintBox Constructor
@@ -155,7 +150,7 @@ class CHintBox : public CComponentsWindow
const char * const Icon = NULL, const char * const Icon = NULL,
const char * const Picon = NULL, const char * const Picon = NULL,
const int& header_buttons = 0, const int& header_buttons = 0,
const int& text_mode = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE,
const int& indent = W_FRAME); const int& indent = W_FRAME);
/**CHintBox Constructor /**CHintBox Constructor
@@ -171,7 +166,7 @@ class CHintBox : public CComponentsWindow
const char * const Icon = NULL, const char * const Icon = NULL,
const char * const Picon = NULL, const char * const Picon = NULL,
const int& header_buttons = 0, const int& header_buttons = 0,
const int& text_mode = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE,
const int& indent = W_FRAME); const int& indent = W_FRAME);
virtual ~CHintBox(); virtual ~CHintBox();
@@ -236,17 +231,14 @@ class CHintBox : public CComponentsWindow
* AUTO_LINEBREAK_NO_BREAKCHARS * AUTO_LINEBREAK_NO_BREAKCHARS
* @param[in] Picon * @param[in] Picon
* @li optional: exepts type std::string, defines the picon name on the left side of message text, default = NULL (non Icon) * @li optional: exepts type std::string, defines the picon name on the left side of message text, default = NULL (non Icon)
* @param[in] at_page_number
* @li optional: exepts type int, defines the page number on that this hint will be, default = 0 (first page)
* @param[in] color_text * @param[in] color_text
* @li optional: exepts type fb_pixel_t, defines the text color, default = COL_MENUCONTENT_TEXT * @li optional: exepts type fb_pixel_t, defines the text color, default = COL_MENUCONTENT_TEXT
* * @param[in] font_text * * @param[in] font_text
* @li optional: exepts type Font*, defines the text font type, default = NULL for system preset for message contents * @li optional: exepts type Font*, defines the text font type, default = NULL for system preset for message contents
*/ */
void addHintItem( const std::string& Text, void addHintItem( const std::string& Text,
const int& text_mode = 0, const int& text_mode = DEFAULT_HINTBOX_TEXT_MODE,
const std::string& Picon = std::string(), const std::string& Picon = std::string(),
const u_int8_t& at_page_number = 0,
const fb_pixel_t& color_text = COL_MENUCONTENT_TEXT, const fb_pixel_t& color_text = COL_MENUCONTENT_TEXT,
Font* font_text = NULL); Font* font_text = NULL);
@@ -257,7 +249,7 @@ class CHintBox : public CComponentsWindow
* *
* @see /gui/components/cc_types.h * @see /gui/components/cc_types.h
*/ */
void addHintItem(CComponentsItem* cc_Item){obj_content->addCCItem(cc_Item);} void addHintItem(CComponentsItem* cc_Item){ccw_body->addCCItem(cc_Item);}
/** /**
* Sets a text to a hint item. * Sets a text to a hint item.

View File

@@ -38,7 +38,7 @@
#define MSGBOX_MIN_WIDTH HINTBOX_MIN_WIDTH #define MSGBOX_MIN_WIDTH HINTBOX_MIN_WIDTH
#define MSGBOX_MIN_HEIGHT HINTBOX_MIN_HEIGHT + 75 #define MSGBOX_MIN_HEIGHT HINTBOX_MIN_HEIGHT + 75
#define DEFAULT_TEXT_MODE (CMsgBox::CENTER | CMsgBox::AUTO_WIDTH | CMsgBox::AUTO_HIGH | CMsgBox::SCROLL) #define DEFAULT_MSGBOX_TEXT_MODE (CMsgBox::CENTER | CMsgBox::AUTO_WIDTH | CMsgBox::AUTO_HIGH)
//! Sub class of CHintBox. Shows a window as a messagebox //! Sub class of CHintBox. Shows a window as a messagebox
/*! /*!
@@ -159,7 +159,7 @@ class CMsgBox : public CHintBox
* BOTTOM * BOTTOM
* NO_AUTO_LINEBREAK * NO_AUTO_LINEBREAK
* AUTO_LINEBREAK_NO_BREAKCHARS * AUTO_LINEBREAK_NO_BREAKCHARS
* NOTE: default parameter to find in macro DEFAULT_TEXT_MODE * NOTE: default parameter to find in macro DEFAULT_MSGBOX_TEXT_MODE
* *
* @see class CHintBox() * @see class CHintBox()
*/ */
@@ -171,7 +171,7 @@ class CMsgBox : public CHintBox
const int& Height = MSGBOX_MIN_HEIGHT, const int& Height = MSGBOX_MIN_HEIGHT,
const int& ShowButtons = mbCancel, const int& ShowButtons = mbCancel,
const msg_result_t& Default_result = mbrCancel, const msg_result_t& Default_result = mbrCancel,
const int& Text_mode = DEFAULT_TEXT_MODE); const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE);
/**CMsgBox Constructor /**CMsgBox Constructor
* @param[in] Text * @param[in] Text
@@ -213,7 +213,7 @@ class CMsgBox : public CHintBox
* BOTTOM * BOTTOM
* NO_AUTO_LINEBREAK * NO_AUTO_LINEBREAK
* AUTO_LINEBREAK_NO_BREAKCHARS * AUTO_LINEBREAK_NO_BREAKCHARS
* NOTE: default parameter to find in macro DEFAULT_TEXT_MODE * NOTE: default parameter to find in macro DEFAULT_MSGBOX_TEXT_MODE
* *
* @see class CHintBox() * @see class CHintBox()
*/ */
@@ -225,7 +225,7 @@ class CMsgBox : public CHintBox
const int& Height = MSGBOX_MIN_HEIGHT, const int& Height = MSGBOX_MIN_HEIGHT,
const int& ShowButtons = mbCancel, const int& ShowButtons = mbCancel,
const msg_result_t& Default_result = mbrCancel, const msg_result_t& Default_result = mbrCancel,
const int& Text_mode = DEFAULT_TEXT_MODE); const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE);
// ~CMsgBox(); //inherited // ~CMsgBox(); //inherited
/** /**
@@ -323,7 +323,7 @@ int ShowMsg2UTF( const neutrino_locale_t Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
int ShowMsg2UTF( const char * const Title, int ShowMsg2UTF( const char * const Title,
@@ -334,7 +334,7 @@ int ShowMsg2UTF( const char * const Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
int ShowMsg( const neutrino_locale_t Title, int ShowMsg( const neutrino_locale_t Title,
@@ -345,7 +345,7 @@ int ShowMsg( const neutrino_locale_t Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
int ShowMsg( const char * const Title, int ShowMsg( const char * const Title,
@@ -356,7 +356,7 @@ int ShowMsg( const char * const Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
int ShowMsg( const neutrino_locale_t Title, int ShowMsg( const neutrino_locale_t Title,
@@ -367,7 +367,7 @@ int ShowMsg( const neutrino_locale_t Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
int ShowMsg( const neutrino_locale_t Title, int ShowMsg( const neutrino_locale_t Title,
@@ -378,7 +378,7 @@ int ShowMsg( const neutrino_locale_t Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
int ShowMsg( const std::string & Title, int ShowMsg( const std::string & Title,
@@ -389,13 +389,13 @@ int ShowMsg( const std::string & Title,
const int Width = MSGBOX_MIN_WIDTH, const int Width = MSGBOX_MIN_WIDTH,
const int Timeout = -1, const int Timeout = -1,
bool returnDefaultOnTimeout = false, bool returnDefaultOnTimeout = false,
const int& Text_mode = DEFAULT_TEXT_MODE, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8 fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode = DEFAULT_TEXT_MODE); // UTF-8 void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_TEXT_MODE); // UTF-8 void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode = DEFAULT_TEXT_MODE); // UTF-8 void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
void DisplayInfoMessage(const char * const InfoMsg, const int& Text_mode = DEFAULT_TEXT_MODE, fb_pixel_t color_frame = COL_DARK_GRAY); // UTF-8 void DisplayInfoMessage(const char * const InfoMsg, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = COL_DARK_GRAY); // UTF-8
void DisplayInfoMessage(const char * const InfoMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_TEXT_MODE, fb_pixel_t color_frame = COL_DARK_GRAY); // UTF-8 void DisplayInfoMessage(const char * const InfoMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = COL_DARK_GRAY); // UTF-8
void DisplayInfoMessage(const char * const InfoMsg, const std::string& caption, const int& Text_mode = DEFAULT_TEXT_MODE, fb_pixel_t color_frame = COL_DARK_GRAY); // UTF-8 void DisplayInfoMessage(const char * const InfoMsg, const std::string& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, fb_pixel_t color_frame = COL_DARK_GRAY); // UTF-8
#endif #endif