CBEBouquet-Classes: switch to new buttonbar based up cc-footer class

Origin commit data
------------------
Branch: ni/coolstream
Commit: b565700168
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-12-27 (Sat, 27 Dec 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2014-12-27 20:45:40 +01:00
parent 957726b5d1
commit 71e6edbe0b
6 changed files with 18 additions and 15 deletions

View File

@@ -41,7 +41,7 @@
#include <driver/fontrenderer.h> #include <driver/fontrenderer.h>
#include <driver/screen_max.h> #include <driver/screen_max.h>
#include <gui/components/cc.h> #include <gui/components/cc.h>
#include <gui/widget/buttons.h>
#include <gui/widget/hintbox.h> #include <gui/widget/hintbox.h>
#include <gui/widget/messagebox.h> #include <gui/widget/messagebox.h>
#include <gui/widget/stringinput.h> #include <gui/widget/stringinput.h>
@@ -67,7 +67,7 @@ CBEBouquetWidget::CBEBouquetWidget()
state = beDefault; state = beDefault;
Bouquets = NULL; Bouquets = NULL;
iheight = 0; iheight = 0;
ButtonHeight = 0; ButtonHeight = footer.getHeight();
fheight = 0; fheight = 0;
theight = 0; theight = 0;
} }
@@ -154,12 +154,14 @@ const struct button_label CBEBouquetWidgetButtons[6] =
void CBEBouquetWidget::paintFoot() void CBEBouquetWidget::paintFoot()
{ {
::paintButtons(x, y+height, width, 6, CBEBouquetWidgetButtons, width, ButtonHeight); size_t numbuttons = sizeof(CBEBouquetWidgetButtons)/sizeof(CBEBouquetWidgetButtons[0]);
footer.paintButtons(x, y+height, width, ButtonHeight, numbuttons, CBEBouquetWidgetButtons, width/numbuttons-20);
} }
void CBEBouquetWidget::hide() void CBEBouquetWidget::hide()
{ {
frameBuffer->paintBackgroundBoxRel(x,y, width,height+ButtonHeight); frameBuffer->paintBackgroundBoxRel(x,y, width,height);
footer.kill();
} }
void CBEBouquetWidget::updateSelection(unsigned int newpos) void CBEBouquetWidget::updateSelection(unsigned int newpos)
@@ -194,7 +196,6 @@ int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & /*actionKey*
if (parent) if (parent)
parent->hide(); parent->hide();
ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8;
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight();

View File

@@ -38,7 +38,7 @@
#include <zapit/client/zapitclient.h> #include <zapit/client/zapitclient.h>
#include <zapit/channel.h> #include <zapit/channel.h>
#include <zapit/bouquets.h> #include <zapit/bouquets.h>
#include <gui/components/cc.h>
#include <string> #include <string>
/* class for handling when bouquets changed. */ /* class for handling when bouquets changed. */
@@ -57,7 +57,7 @@ class CBEBouquetWidget : public CMenuTarget
private: private:
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;
CComponentsFooter footer;
enum enum
{ {
beDefault, beDefault,

View File

@@ -44,7 +44,7 @@
#include <driver/fontrenderer.h> #include <driver/fontrenderer.h>
#include <driver/screen_max.h> #include <driver/screen_max.h>
#include "bouqueteditor_chanselect.h" #include "bouqueteditor_chanselect.h"
#include <gui/widget/buttons.h> #include <gui/components/cc.h>
#include <gui/widget/icons.h> #include <gui/widget/icons.h>
#include <gui/widget/stringinput.h> #include <gui/widget/stringinput.h>
#include <gui/widget/keyboard_input.h> #include <gui/widget/keyboard_input.h>
@@ -73,7 +73,7 @@ CBEChannelWidget::CBEChannelWidget(const std::string & Caption, unsigned int Bou
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight();
footerHeight= g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; footerHeight= footer.getHeight();
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_YELLOW, &icol_w, &icol_h); frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_YELLOW, &icol_w, &icol_h);
iheight = std::max(fheight, icol_h+2); iheight = std::max(fheight, icol_h+2);
@@ -196,7 +196,8 @@ const struct button_label CBEChannelWidgetButtons[6] =
void CBEChannelWidget::paintFoot() void CBEChannelWidget::paintFoot()
{ {
::paintButtons(x, y + (height-footerHeight), width, 6, CBEChannelWidgetButtons, width, footerHeight); size_t numbuttons = sizeof(CBEChannelWidgetButtons)/sizeof(CBEChannelWidgetButtons[0]);
footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, CBEChannelWidgetButtons, width/numbuttons-20);
} }
std::string CBEChannelWidget::getInfoText(int index) std::string CBEChannelWidget::getInfoText(int index)

View File

@@ -49,7 +49,7 @@ class CBEChannelWidget : public CMenuTarget
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;
CComponentsDetailLine *dline; CComponentsDetailLine *dline;
CComponentsInfoBox *ibox; CComponentsInfoBox *ibox;
CComponentsFooter footer;
enum state_ enum state_
{ {
beDefault, beDefault,

View File

@@ -41,7 +41,7 @@
#include <driver/fontrenderer.h> #include <driver/fontrenderer.h>
#include <driver/screen_max.h> #include <driver/screen_max.h>
#include <gui/widget/icons.h> #include <gui/widget/icons.h>
#include <gui/widget/buttons.h>
#include <zapit/zapit.h> #include <zapit/zapit.h>
#include <zapit/getservices.h> #include <zapit/getservices.h>
@@ -59,7 +59,7 @@ CBEChannelSelectWidget::CBEChannelSelectWidget(const std::string & Caption, CZap
info_height = 0; info_height = 0;
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight();
footerHeight= g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; footerHeight= footer.getHeight();
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_GREEN, &icol_w, &icol_h); frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_GREEN, &icol_w, &icol_h);
iheight = std::max(fheight, icol_h+2); iheight = std::max(fheight, icol_h+2);
@@ -251,7 +251,8 @@ void CBEChannelSelectWidget::paintFoot()
Button[0].locale = LOCALE_CHANNELLIST_FOOT_SORT_ALPHA; Button[0].locale = LOCALE_CHANNELLIST_FOOT_SORT_ALPHA;
break; break;
} }
::paintButtons(x, y + (height-footerHeight), width, numbuttons, Button, width, footerHeight);
footer.paintButtons(x, y + (height-footerHeight), width, footerHeight, numbuttons, Button, width/numbuttons-20);
} }
std::string CBEChannelSelectWidget::getInfoText(int index) std::string CBEChannelSelectWidget::getInfoText(int index)

View File

@@ -52,7 +52,7 @@ class CBEChannelSelectWidget : public CListBox
bool isChannelInBouquet( int index); bool isChannelInBouquet( int index);
CComponentsDetailLine *dline; CComponentsDetailLine *dline;
CComponentsInfoBox *ibox; CComponentsInfoBox *ibox;
CComponentsFooter footer;
uint getItemCount(); uint getItemCount();
void paintItem(uint32_t itemNr, int paintNr, bool selected); void paintItem(uint32_t itemNr, int paintNr, bool selected);
void paintDetails(int index); void paintDetails(int index);