Skip to content

XUITagCanvasRendererMonterey

Implements XUITagCanvasRenderer

Description

Renders tags and the autocomplete popup in a way that mimics tags on macOS Monterey. Examples on macOS include Mail.app.

Properties

Name Type Read-Only
mOwner WeakRef
mTitlePadding Integer
mVerticalPadding Integer
mWidgetLeftPadding Integer
mWidgetRightPadding Integer

Methods

Name Parameters Returns
AutocompleteHorizontalPadding Integer
AutocompleteOptionHeight Integer
AutocompleteOptionVerticalPadding Integer
AutocompletePopupBorderRadius Integer
AutocompleteVerticalPadding Integer
Constructor owner As XUITagCanvas
Owner XUITagCanvas
RenderAutocompletePopup maxWidth As Integer, selectedIndex As Integer Picture
RenderTag tag As XUITag, g As Graphics, x As Integer, y As Integer, hasWidget As Boolean Double
TagHeight g As Graphics Integer
TagHorizontalPadding Integer
TagVerticalPadding Integer
TagWidth tag As XUITag, g As Graphics Double

Constants

Name Type
SELECTED_OPTION_BORDER_RADIUS Double
SELECTED_OPTION_H_PADDING Double

SELECTED_OPTION_BORDER_RADIUS As Double The border radius for the background of the currently selected autocomplete option in the popup.


SELECTED_OPTION_H_PADDING As Double The number of pixels to pad to the left and right of a selected autocomplete option in the popup.


Property Descriptions

mOwner As WeakRef

A weak reference to the owning tag canvas.


mTitlePadding As Integer

The number of pixels to pad left and right of the tag's title.


mVerticalPadding As Integer

The number of pixels to pad above and below the tag's title.


mWidgetLeftPadding As Integer

The number of pixels to pad to the left of the drop down icon.


mWidgetRightPadding As Integer

The number of pixels to pad to the right of the drop down icon.


Method Descriptions

AutocompleteHorizontalPadding() As Integer

The suggested number of pixels to pad to the left and right of autocomplete options in the autocomplete popup.

Part of the XUITagCanvasRenderer interface.


AutocompleteOptionHeight() As Integer

Returns the height of an autocomplete option in the autocomplete popup based on the owner's current style.

Part of the XUITagCanvasRenderer interface.


AutocompleteOptionVerticalPadding() As Integer

The suggested number of pixels to pad above and below autocomplete options in the autocomplete popup.

Part of the XUITagCanvasRenderer interface.


AutocompletePopupBorderRadius() As Integer

The border radius of the autocomplete popup.

Part of the XUITagCanvasRenderer interface.


AutocompleteVerticalPadding() As Integer

The number of pixels to pad above the first and below the last autocomplete options in the autocomplete popup.

Part of the XUITagCanvasRenderer interface.


Constructor(owner As XUITagCanvas)

Default constructor.

  • owner is the XUITagCanvas that owns this renderer. A new WeakRef to it will be created.

Owner() As XUITagCanvas

Returns the owning tag canvas.

Part of the XUITagCanvasRenderer interface.


RenderAutocompletePopup(maxWidth As Integer, selectedIndex As Integer) As Picture

Renders and returns a picture for the canvas autocomplete popup.

Part of the XUITagCanvasRenderer interface.


RenderTag(tag As XUITag, g As Graphics, x As Integer, y As Integer, hasWidget As Boolean) As Double

Renders tag to g at x, y. Returns the x coordinate at the far right of the rendered tag.

Part of the XUITagCanvasRenderer interface.


TagHeight(g As Graphics) As Integer

Returns the height of a tag based on the owner's current style.

g is the graphics context that the tag would be drawn to if it was being drawn.

Part of the XUITagCanvasRenderer interface.


TagHorizontalPadding() As Integer

The suggested number of pixels to pad either side of tags in the tag canvas.

Part of the XUITagCanvasRenderer interface.


TagVerticalPadding() As Integer

The suggested number of pixels to pad above and below tags in the tag canvas.

Part of the XUITagCanvasRenderer interface.


TagWidth(tag As XUITag, g As Graphics) As Double

Computes the total width of tag if drawn to the specified graphics context g.

Part of the XUITagCanvasRenderer interface.