Members

(static, constant) GENRE_LABEL_INSET

Inset of the genre action-tile label from the backdrop edges.

Default Value
  • 5

(static, constant) POSTER_TOP_OFFSET

Vertical offset of the poster/placeholder from the cell top. The title label sits below the poster, inside the grid's inter-row spacing (see updateLayout).

Default Value
  • 22

(static, constant) TITLE_GAP

Gap between the bottom of the poster and the title label. Matches JRRowItem's FOCUS_PADDING so grid and row cells share one vertical rhythm.

Default Value
  • 18

Methods

(static) evaluateGridTextureState() → {void}

Central texture decision — called when renderTracking, textureManagerState, or loadedRowRange changes.

State machine (same as JRRowItem but without horizontal buffer): "destroyed" → force unload everything (no guards) "init" → no-op (freeze state during layout changes) "hidden" → no-op (freeze — screen is behind another on the stack) "active" → managed rows (visible + buffer): always loaded. Outside rows: renderTracking decides.

Returns:
Type: 
void

(static) forceUnloadGridTexture() → {void}

Force-unloads textures unconditionally — used only during onDestroy(). Ignores m.isTextureUnloaded and m.cachedPosterUri guards so every cell releases memory.

Returns:
Type: 
void

(static) getGridRowPosition() → {string}

Returns this cell's row position relative to the managed row ranges. Derives the grid row from the cached flat index and numColumns. or "outside" if not in any managed range

Returns:

"visible" if in a visible row, "buffer" if in a vertical buffer row,

Type: 
string

(static) getGridTextureManagerState() → {string}

Returns the current texture manager state from the content root.

Returns:

"init", "active", "hidden", "destroyed", or "init" if unavailable

Type: 
string

(static) init() → {void}

Returns:
Type: 
void

(static) onFocusChanged() → {void}

Enable title scrolling based on item focus

Returns:
Type: 
void

(static) onItemContentChanged() → {void}

Re-render when the parent assigns a new item to this (possibly recycled) cell. Texture observers only need itemContent, so wire them up even before the cell has been sized; the actual render waits until width/height are known (onSizeChanged fires the first paint when the parent applies itemSize/rowItemSize).

Returns:
Type: 
void

(static) onLoadedRowRangeChanged() → {void}

Fires when the parent screen updates the loaded row range (focus change).

Returns:
Type: 
void

(static) onPosterLoadStatusChanged() → {void}

Toggle the JRPlaceholder fallback based on the real poster's load state. Mirrors the canonical state machine from JRRowItem.bs onPosterLoadStatusChanged.

Returns:
Type: 
void

(static) onRenderTrackingChanged() → {void}

Fires when the cell scrolls in/out of the visible area.

Returns:
Type: 
void

(static) onSizeChanged() → {void}

Re-render when the parent applies/changes the cell size (MarkupGrid itemSize or RowList rowItemSize). Mirrors JRRowItem so one component renders every cell size.

Returns:
Type: 
void

(static) onTextureManagerStateChanged() → {void}

Fires when textureManagerState changes (init → active, active → hidden, etc.)

Returns:
Type: 
void

(static) reloadGridTexture() → {void}

Restores poster URI from cache when the cell scrolls back on screen. The backdrop will show briefly while the image reloads from Roku's HTTP cache.

Returns:
Type: 
void

(static) renderGenreTile(itemData) → {void}

Renders a "View All [Genre]" action tile: themed backdrop + centered genre label, no poster image. The below-tile item title is hidden — the tile's own centered label already names the genre, and the row's genre header sits directly above it, so a third copy is redundant. cachedPosterUri is cleared so texture management skips this cell.

Parameters:
NameTypeDescription
itemDataobject
Returns:
Type: 
void

(static) renderItem() → {void}

Returns:
Type: 
void

(static) renderMediaItem(itemData, itemType) → {void}

Renders a standard media item: poster image with the JRPlaceholder fallback state machine and texture management.

Parameters:
NameTypeDescription
itemDataobject
itemTypestring
Returns:
Type: 
void

(static) resetPlaceholderToLoading() → {void}

Reset the JRPlaceholder to loading state (themed backdrop visible, no glyph). Used by the initial-load branches in renderMediaItem and by the texture unload paths so off-screen / unloaded cells don't carry a stale failure-state glyph back into view when they reload.

Returns:
Type: 
void

(static) resolveGridViewConfig() → {void}

Resolves the owning BaseGridView and reads its display/title config. Walks up the node tree to the first ancestor exposing gridTitles rather than assuming a fixed depth: the MarkupGrid puts cells 2 levels below BaseGridView, but the genre RowList nests them deeper. The old fixed GetParent().GetParent() walk missed BaseGridView for RowList cells, so genre tiles silently fell back to scaleToZoom (cropping posters the presenter intended as scaleToFit) and an empty gridTitles (no titles ever). Idempotent — caches m.gridView on first success.

Returns:
Type: 
void

(static) resolveLoadDisplayMode(itemType) → {string}

Picks the poster scaling mode. Music posters are square art that must not be cropped; everything else uses the grid's configured display mode (default scaleToZoom).

Parameters:
NameTypeDescription
itemTypestring
Returns:
Type: 
string

(static) setPosterRect(x, y, rw, rh) → {void}

Positions/sizes the placeholder, poster, and genre backdrop to the same rect.

Parameters:
NameTypeDescription
xinteger
yinteger
rwfloat
rhfloat
Returns:
Type: 
void

(static) setupGridTextureObserver() → {void}

One-time setup: observes loadedRowRange and textureManagerState on the MarkupGrid's content root. The content root is the direct parent of itemContent in the content tree (flat model, unlike RowList's 2-level hierarchy): contentRoot → itemNode (itemContent) Called from onItemContentChanged. Skips if already connected.

Returns:
Type: 
void

(static) shouldLoadGridTexture() → {boolean}

Determines whether this cell should load its poster during initial render. Mirrors evaluateGridTextureState logic: managed rows trust buffer logic, outside rows trust renderTracking.

Returns:
Type: 
boolean

(static) showPlaceholder(itemType) → {void}

Flip the placeholder into failure state with a type-appropriate glyph, then clear the poster URI so the glyph isn't covered by a stale broken image. itemType="" puts JRPlaceholder in loading state (backdrop only, no glyph); resolveItemPlaceholderType returns "" only for invalid/typeless items, so valid items always end up here with a typed glyph or the Folder fallback.

Parameters:
NameTypeDescription
itemTypestring
Returns:
Type: 
void

(static) unloadGridTexture() → {void}

Clears poster URI to release texture memory when the cell is off-screen. Items with no real image (cachedPosterUri = "") are skipped — they already show a lightweight local placeholder that costs negligible texture memory.

Returns:
Type: 
void

(static) updateLayout(w, h) → {void}

Sizes and positions every child to the current cell dimensions. The focus slot is rowItemSize/itemSize; the poster fills it at POSTER_TOP_OFFSET so the poster overflows the slot bottom and the focus border (drawn behind it) reads with a top margin and no overlap. The title sits below at POSTER_TOP_OFFSET + h + TITLE_GAP — kept OUTSIDE the focus border because the container sets rowHeights/itemSize taller than the slot (the focus border pins to the slot, not the cell's full bounding box).

Parameters:
NameTypeDescription
wfloat
hfloat
Returns:
Type: 
void