void CRibbonTableButton::NotifyHighlightListItem(int nIndex) { ASSERT_VALID(this); if (m_pPopupMenu != NULL) { if (nIndex < 0) { m_nRows = m_nColumns = 0; } else { m_nRows = nIndex / CELLS_X + 1; m_nColumns = (nIndex % CELLS_X) + 1; } CString strCaption = lpszDefaultCaption; if (m_nColumns > 0 && m_nRows > 0) { strCaption.Format(_T("%dx%d Table"), m_nColumns, m_nRows); } SetGroupName(0, strCaption); RedrawIcons(); } CMFCRibbonGallery::NotifyHighlightListItem(nIndex); }
static void Redraw (void) { char sdev[64]; Video_DrawBackgroud (1); *sdev = '\0'; if (!config.subpath[0]) { strcpy (sdev, ""); if ((config.appDev == 0 || config.appDev == 1) && devices_Get(DEV_SD)) { strcat (sdev, "["); strcat (sdev, devices_Get(DEV_SD)); strcat (sdev, "] "); } if ((config.appDev == 0 || config.appDev == 2) && devices_Get(DEV_USB)) { strcat (sdev, "["); strcat (sdev, devices_Get(DEV_USB)); strcat (sdev, "] "); } if (strlen (sdev) == 0) { strcpy (sdev, "Invalid dev !!!"); } } else { sprintf (sdev, "%s://apps/%s", config.submount, config.subpath); } Video_SetFont(TTFNORM); int w1 = grlib_printf ( 25, 26, GRLIB_ALIGNLEFT, 0, "postLoader::HomeBrews - %s", sdev); int w2 = grlib_printf ( 615, 26, GRLIB_ALIGNRIGHT, 0, "Page %d of %d", page+1, pageMax+1); w1 = w1 + 25; w2 = 615 - w2; Video_SetFont(TTFVERYSMALL); grlib_printf ( w1 + (w2 - w1) / 2, 27, GRLIB_ALIGNCENTER, 0, GetFilterString((w2 - w1) - 30), sdev); if (redrawIcons) RedrawIcons (0,0); Video_DrawVersionInfo (); if (!redrawSkipInfo) DrawInfo (); }
static int ChangePage (int next) { if (next) page++; else page--; if (page > pageMax) page = 0; if (page < 0) page = pageMax; FeedCoverCache (); redrawIcons = false; Redraw (); grlib_PushScreen (); int x = 0, lp; GRRLIB_SetFBMode (1); // Enable double fbmode if (!next) { do { x-=20; grlib_PopScreen (); lp = page; RedrawIcons (x + 640,0); if (page >= pageMax) page = 0; else page = lp+1; RedrawIcons (x,0); page = lp; Overlay (); grlib_DrawIRCursor (); grlib_Render(); } while (x > -640); } else { do { x+=20; grlib_PopScreen (); lp = page; RedrawIcons (x - 640,0); if (page <= 0) page = pageMax; else page = lp-1; RedrawIcons (x,0); page = lp; Overlay (); grlib_DrawIRCursor (); grlib_Render(); } while (x < 640); } redrawIcons = true; redraw = 1; GRRLIB_SetFBMode (0); // Enable double fbmode return page; }