Skip to content

XUISourceListRendererMonterey

Implements XUISourceListRenderer

Description

A source list renderer that renders a XUISourceList similar to that seen in the macOS Monterey Finder.

Properties

Name Type Read-Only
mOwner WeakRef

Methods

Name Parameters Returns
Constructor owner As XUISourceList
DrawBadge g As Graphics, badgeValue As Integer, x As Double, y As Double, w As Double, h As Double
IndentWidth Integer
Owner XUISourceList
RenderBackground g As Graphics, row As Integer
RenderItem item As XUISourceListItem, g As Graphics, hoveringOverRow As Boolean, isSelected As Boolean, draggingOverRow As Boolean
RenderSection section As XUISourceListItem, g As Graphics, hoveringOverRow As Boolean
RowHeight Integer

Constants

Name Type
BADGE_HORIZ_PADDING Double
BADGE_LEFT_PADDING Double
BADGE_MIN_WIDTH Double
BADGE_VERT_PADDING Double
CONTENT_HORIZ_PADDING Double
CONTENT_VERT_PADDING Double
DISCLOSURE_LEFT_PADDING Double
DISCLOSURE_MAX_WIDTH Double
DISCLOSURE_OFFSET_FROM_BOTTOM Double
DOWN_DISCLOSURE_HEIGHT Double
DOWN_DISCLOSURE_OFFSET_FROM_BOTTOM Double
DOWN_DISCLOSURE_WIDTH Double
ICON_LEFT_PADDING Double
INDENT_WIDTH_HIERARCHICAL Double
INDENT_WIDTH_NON_HIERARCHICAL Double
RIGHT_DISCLOSURE_HALF_HEIGHT Double
RIGHT_DISCLOSURE_HEIGHT Double
RIGHT_DISCLOSURE_WIDTH Double
SECTION_BADGE_OFFSET_FROM_BOTTOM Double
SECTION_LEFT_PADDING Double
SECTION_WIDGET_DIAMETER Double
SECTION_WIDGET_LEFT_PADDING Double
SECTION_WIDGET_OFFSET_FROM_BOTTOM Double
SECTION_WIDGET_PLUS_HEIGHT Double
SECTION_WIDGET_PLUS_WIDTH Double
SECTION_WIDGET_RADIUS Double
TITLE_LEFT_PADDING Double

BADGE_HORIZ_PADDING As Double The number of pixels to pad the the badge value internally left and right from the surrounding rounded rect.


BADGE_LEFT_PADDING As Double The number of pixels to pad the left edge of the badge.


BADGE_MIN_WIDTH As Double The mimimum width of a badge.


BADGE_VERT_PADDING As Double The number of pixels to pad the the badge value internally above and below from the surrounding rounded rect.


CONTENT_HORIZ_PADDING As Double The number of pixels to pad the content of a row from its left and right edges.


CONTENT_VERT_PADDING As Double The number of pixels to pad the content of a row above and below.


DISCLOSURE_LEFT_PADDING As Double The number of pixels to pad the left edge of the disclosure widget.


DISCLOSURE_MAX_WIDTH As Double The maximum width the disclosure widget is.


DISCLOSURE_OFFSET_FROM_BOTTOM As Double The number of pixels the bottom of the disclosure widget is offset from the bottom edge of the row.


DOWN_DISCLOSURE_HEIGHT As Double The height in pixels of the downwards facing disclosure widget.


DOWN_DISCLOSURE_OFFSET_FROM_BOTTOM As Double The number of pixels the bottom of the down disclosure widget is offset from the bottom edge of the row.


DOWN_DISCLOSURE_WIDTH As Double The width in pixels of the downwards facing disclosure widget.


ICON_LEFT_PADDING As Double The number of pixels to pad the left side of an item's icon from a disclosure widget.


INDENT_WIDTH_HIERARCHICAL As Double The number of pixels of indentation each level of depth adds to the X offset.


INDENT_WIDTH_NON_HIERARCHICAL As Double The number of pixels of indentation each level of depth adds to the X offset.


RIGHT_DISCLOSURE_HALF_HEIGHT As Double The half height in pixels of the rightwards facing disclosure widget.


RIGHT_DISCLOSURE_HEIGHT As Double The height in pixels of the rightwards facing disclosure widget.


RIGHT_DISCLOSURE_WIDTH As Double The width in pixels of the rightwards facing disclosure widget.


SECTION_BADGE_OFFSET_FROM_BOTTOM As Double The number of pixels to offset the bottom badges from the bottom edge of section rows.


SECTION_LEFT_PADDING As Double The number of pixels to pad the left of the section title in from the content area.


SECTION_WIDGET_DIAMETER As Double The diameter of the section widget circle.


SECTION_WIDGET_LEFT_PADDING As Double The number of pixels to pad the left edge of the badge.


SECTION_WIDGET_OFFSET_FROM_BOTTOM As Double The number of pixels the bottom of the section widget is offset from the bottom edge of the row.


SECTION_WIDGET_PLUS_HEIGHT As Double The height of the plus icon in the section widget.


SECTION_WIDGET_PLUS_WIDTH As Double The width of the plus icon in the section widget.


SECTION_WIDGET_RADIUS As Double The raidus of the section widget circle.


TITLE_LEFT_PADDING As Double The number of pixels to pad the left side of an item's title from its icon.


Property Descriptions

mOwner As WeakRef

A weak reference to the source list that this renderer operates on.


Method Descriptions

Constructor(owner As XUISourceList)

owner is the XUISourceList that owns this renderer. A WeakRef will be created.


DrawBadge(g As Graphics, badgeValue As Integer, x As Double, y As Double, w As Double, h As Double)

Draws a badge at x, y of width w and height h.

Assumes the font name and size have been previously set.


IndentWidth() As Integer

Returns the indent width to use. Depends on whether or not the source list is hierarchical.


Owner() As XUISourceList

The source list that this renderer operates on.

Part of the XUISourceListRenderer interface.


RenderBackground(g As Graphics, row As Integer)

Draw the background for the specified row. The row may be empty.

Part of the XUISourceListRenderer interface.


RenderItem(item As XUISourceListItem, g As Graphics, hoveringOverRow As Boolean, isSelected As Boolean, draggingOverRow As Boolean)

Renders item to the passed graphics context. The context is the entire row the item occupies.

Part of the XUISourceListRenderer interface.


RenderSection(section As XUISourceListItem, g As Graphics, hoveringOverRow As Boolean)

Renders section as a section to the passed graphics context.

Assumes g is the graphics context provided by the PaintCellBackground event.

When hovered over the presentation is:

TITLE BADGE WIDGET DISCLOSURE

When not hovered over the presentation is:

TITLE BADGE


RowHeight() As Integer

The height of a row in the source list.

Part of the XUISourceListRenderer interface.