mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsText: add member clearCCText()
This commit is contained in:
@@ -224,6 +224,7 @@ class CComponentsText : public CComponentsItem
|
|||||||
Font * ct_font;
|
Font * ct_font;
|
||||||
|
|
||||||
void initVarText();
|
void initVarText();
|
||||||
|
void clearCCText();
|
||||||
private:
|
private:
|
||||||
const char* ct_text;
|
const char* ct_text;
|
||||||
int ct_text_mode; //see textbox.h for possible modes
|
int ct_text_mode; //see textbox.h for possible modes
|
||||||
@@ -231,7 +232,7 @@ class CComponentsText : public CComponentsItem
|
|||||||
bool ct_text_sended;
|
bool ct_text_sended;
|
||||||
|
|
||||||
|
|
||||||
void initText();
|
void initCCText();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CComponentsText();
|
CComponentsText();
|
||||||
|
@@ -274,15 +274,7 @@ CComponentsText::~CComponentsText()
|
|||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
clearSavedScreen();
|
clearSavedScreen();
|
||||||
|
clearCCText();
|
||||||
if (ct_box)
|
|
||||||
delete ct_box;
|
|
||||||
ct_box = NULL;
|
|
||||||
|
|
||||||
if (ct_textbox)
|
|
||||||
delete ct_textbox;
|
|
||||||
ct_textbox = NULL;
|
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +295,7 @@ void CComponentsText::initVarText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CComponentsText::initText()
|
void CComponentsText::initCCText()
|
||||||
{
|
{
|
||||||
//set default font, if is no font definied
|
//set default font, if is no font definied
|
||||||
if (ct_font == NULL)
|
if (ct_font == NULL)
|
||||||
@@ -338,9 +330,20 @@ void CComponentsText::initText()
|
|||||||
ct_text_sended = ct_textbox->setText(&new_text, width);
|
ct_text_sended = ct_textbox->setText(&new_text, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsText::clearCCText()
|
||||||
|
{
|
||||||
|
if (ct_box)
|
||||||
|
delete ct_box;
|
||||||
|
ct_box = NULL;
|
||||||
|
|
||||||
|
if (ct_textbox)
|
||||||
|
delete ct_textbox;
|
||||||
|
ct_textbox = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsText::paint(bool do_save_bg)
|
void CComponentsText::paint(bool do_save_bg)
|
||||||
{
|
{
|
||||||
initText();
|
initCCText();
|
||||||
paintInit(do_save_bg);
|
paintInit(do_save_bg);
|
||||||
if (ct_text_sended)
|
if (ct_text_sended)
|
||||||
ct_textbox->paint();
|
ct_textbox->paint();
|
||||||
@@ -397,15 +400,7 @@ CComponentsInfoBox::~CComponentsInfoBox()
|
|||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
clearSavedScreen();
|
clearSavedScreen();
|
||||||
|
clearCCText();
|
||||||
if (ct_textbox)
|
|
||||||
delete ct_textbox;
|
|
||||||
ct_textbox = NULL;
|
|
||||||
|
|
||||||
if (ct_box)
|
|
||||||
delete ct_box;
|
|
||||||
ct_box = NULL;
|
|
||||||
|
|
||||||
delete pic;
|
delete pic;
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user