//contains all actions to init and add the window object and items void CImageInfo::ShowWindow() { CComponentsFooter *footer = NULL; if (cc_win == NULL){ cc_win = new CComponentsWindowMax(LOCALE_IMAGEINFO_HEAD, NEUTRINO_ICON_INFO, 0, CC_SHADOW_ON); cc_win->setWindowHeaderButtons(CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT); footer = cc_win->getFooterObject(); int h_footer = footer->getHeight(); fb_pixel_t btn_col = g_settings.gradiant ? COL_BUTTON_BODY : footer->getColorBody(); btn_red = new CComponentsButtonRed(10, CC_CENTERED, 250, h_footer-h_footer/4, LOCALE_BUILDINFO_MENU, footer, false , true, false, footer->getColorBody(), btn_col); } //prepare minitv InitMinitv(); //prepare infos InitInfos(); //prepare build infos InitBuildInfos(); //prepare info text InitInfoText(getLicenseText()); //paint window cc_win->paint(CC_SAVE_SCREEN_NO); }
//contains all actions to init and add the window object and items void CImageInfo::ShowWindow() { CComponentsFooter *footer = NULL; if (cc_win == NULL){ cc_win = new CComponentsWindowMax(LOCALE_IMAGEINFO_HEAD, NEUTRINO_ICON_INFO, CC_SHADOW_ON); cc_win->setWindowHeaderButtons(CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT); footer = cc_win->getFooterObject(); footer->setColorBody(COL_INFOBAR_SHADOW_PLUS_1); btn_red = new CComponentsButtonRed(10, CC_CENTERED, 250, footer->getHeight(), LOCALE_BUILDINFO_MENU, false , true, false, footer->getColorBody(), footer->getColorBody()); footer->addCCItem(btn_red); } //prepare minitv InitMinitv(); //prepare infos InitInfos(); //prepare build infos InitBuildInfos(); //prepare info text InitInfoText(getLicenseText()); //paint window cc_win->paint(); }
void CBouquetList::paint() { //ensure stop info clock before paint this window CInfoClock::getInstance()->disableInfoClock(); liststart = (selected/listmaxshow)*listmaxshow; int lastnum = liststart + listmaxshow; numwidth = 0; int maxDigitWidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getMaxDigitWidth(); int _lastnum = lastnum; while (_lastnum) { numwidth += maxDigitWidth; _lastnum /= 10; } frameBuffer->paintBoxRel(x, y + header_height, width, height - header_height - footer_height, COL_MENUCONTENT_PLUS_0); // no buttons in favonly mode int numButtons = (favonly) ? 0 : sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]); CComponentsFooter footer; footer.enableShadow(CC_SHADOW_ON, -1, true); footer.paintButtons(x, y + height - footer_height, width, footer_height, numButtons, CBouquetListButtons); if (!Bouquets.empty()) { for (unsigned int count = 0; count < listmaxshow; count++) { paintItem(count); } } int total_pages; int current_page; getScrollBarData(&total_pages, ¤t_page, Bouquets.size(), listmaxshow, selected); paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page, CC_SHADOW_RIGHT_CORNER_ALL); }