bedit: use inherited version of hide()

This overwrites inherited hide() from CMenuTarget

rework hide
This commit is contained in:
2017-10-12 12:26:02 +02:00
parent 3045baea13
commit d64f06b196
8 changed files with 23 additions and 29 deletions

View File

@@ -169,11 +169,6 @@ void CBEBouquetWidget::paintFoot()
footer.paintButtons(x, y + header_height + body_height, width, footer_height, numbuttons, CBEBouquetWidgetButtons); footer.paintButtons(x, y + header_height + body_height, width, footer_height, numbuttons, CBEBouquetWidgetButtons);
} }
void CBEBouquetWidget::hide()
{
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
}
void CBEBouquetWidget::updateSelection(unsigned int newpos) void CBEBouquetWidget::updateSelection(unsigned int newpos)
{ {
if (newpos == selected || newpos == (unsigned int)-1) if (newpos == selected || newpos == (unsigned int)-1)

View File

@@ -68,7 +68,7 @@ class CBEBouquetWidget : public CBEGlobals, public CMenuTarget, public CListHelp
void paintItem(int pos); void paintItem(int pos);
void paintItems(); void paintItems();
void paintFoot(); void paintFoot();
void hide();
void updateSelection(unsigned int newpos); void updateSelection(unsigned int newpos);
void deleteBouquet(); void deleteBouquet();
@@ -93,6 +93,7 @@ class CBEBouquetWidget : public CBEGlobals, public CMenuTarget, public CListHelp
//CZapitClient::BouquetList Bouquets; //CZapitClient::BouquetList Bouquets;
BouquetList * Bouquets; BouquetList * Bouquets;
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
void hide(){CBEGlobals::hide();}
}; };
#endif #endif

View File

@@ -175,16 +175,6 @@ void CBEChannelWidget::paintFoot()
footer.paintButtons(x, y + header_height + body_height, width, footer_height, numbuttons, CBEChannelWidgetButtons); footer.paintButtons(x, y + header_height + body_height, width, footer_height, numbuttons, CBEChannelWidgetButtons);
} }
void CBEChannelWidget::hide()
{
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
if (dline)
dline->kill();
if (ibox)
ibox->kill();
}
std::string CBEChannelWidget::getInfoText(int index) std::string CBEChannelWidget::getInfoText(int index)
{ {
std::string res = ""; std::string res = "";
@@ -434,7 +424,7 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey*
CNeutrinoApp::getInstance()->handleMsg(msg, data); CNeutrinoApp::getInstance()->handleMsg(msg, data);
} }
} }
hide(); CBEGlobals::hide();
return res; return res;
} }

View File

@@ -62,7 +62,7 @@ class CBEChannelWidget : public CBEGlobals, public CMenuTarget, public CListHelp
void paintItems(); void paintItems();
void paintFoot(); void paintFoot();
void hide();
void updateSelection(unsigned int newpos); void updateSelection(unsigned int newpos);
void deleteChannel(); void deleteChannel();
@@ -85,6 +85,7 @@ class CBEChannelWidget : public CBEGlobals, public CMenuTarget, public CListHelp
//CZapitClient::BouquetChannelList Channels; //CZapitClient::BouquetChannelList Channels;
ZapitChannelList * Channels; ZapitChannelList * Channels;
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
void hide(){CBEGlobals::hide();}
bool hasChanged(); bool hasChanged();
unsigned int getBouquet() { return bouquet; }; unsigned int getBouquet() { return bouquet; };
}; };

View File

@@ -180,16 +180,6 @@ void CBEChannelSelectWidget::paintFoot()
footer.paintButtons(x, y + header_height + body_height, width, footer_height, numbuttons, CBEChannelSelectButtons); footer.paintButtons(x, y + header_height + body_height, width, footer_height, numbuttons, CBEChannelSelectButtons);
} }
void CBEChannelSelectWidget::hide()
{
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
if (dline)
dline->kill();
if (ibox)
ibox->kill();
}
std::string CBEChannelSelectWidget::getInfoText(int index) std::string CBEChannelSelectWidget::getInfoText(int index)
{ {
std::string res = ""; std::string res = "";

View File

@@ -62,7 +62,7 @@ class CBEChannelSelectWidget : public CBEGlobals, public CMenuTarget, public CLi
void paintItems(); void paintItems();
void paintFoot(); void paintFoot();
void hide();
void updateSelection(unsigned int newpos); void updateSelection(unsigned int newpos);
void sortChannels(); void sortChannels();
@@ -77,6 +77,7 @@ class CBEChannelSelectWidget : public CBEGlobals, public CMenuTarget, public CLi
ZapitChannelList Channels; ZapitChannelList Channels;
ZapitChannelList * bouquetChannels; ZapitChannelList * bouquetChannels;
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);
void hide(){CBEGlobals::hide();}
bool hasChanged(); bool hasChanged();
}; };

View File

@@ -109,4 +109,17 @@ void CBEGlobals::paintDetails(int pos, int current)
} }
} }
void CBEGlobals::hide()
{
frameBuffer->paintBackgroundBoxRel(x, y, width + OFFSET_SHADOW, height + OFFSET_SHADOW);
killDetails();
}
void CBEGlobals::killDetails()
{
if (dline)
dline->kill();
if (ibox)
ibox->kill();
}

View File

@@ -34,6 +34,7 @@ class CBEGlobals
virtual std::string getInfoText(int index) = 0; virtual std::string getInfoText(int index) = 0;
void paintDetails(int pos, int current); void paintDetails(int pos, int current);
void killDetails();
public: public:
CBEGlobals(); CBEGlobals();
@@ -64,6 +65,8 @@ class CBEGlobals
int status_icon_width; int status_icon_width;
int timeout; int timeout;
void hide();
}; };
#endif #endif