Style

expect class Style : Closable

Provides a style that can be applied to multiple LVGL objects.

actual class Style : Closable
actual class Style : Closable

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Functions

close
Link copied to clipboard
abstract fun close()
open override fun close()
open override fun close()
Link copied to clipboard
expect fun reset()

Clear all properties from a style, and free all allocated memory.

actual fun reset()
actual fun reset()
Link copied to clipboard
expect infix fun setAlign(value: UByte)

Set the alignment which determines from which point of the parent the X and Y coordinates should be interpreted.

actual infix fun setAlign(value: UByte)
actual infix fun setAlign(value: UByte)
Link copied to clipboard
expect infix fun setArcColor(value: Color)

Set the color of the arc.

actual infix fun setArcColor(value: Color)
actual infix fun setArcColor(value: Color)
Link copied to clipboard

Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs.

Link copied to clipboard
expect infix fun setArcOpacity(value: UByte)

Set the opacity of the arcs.

actual infix fun setArcOpacity(value: UByte)
actual infix fun setArcOpacity(value: UByte)
Link copied to clipboard
expect infix fun setArcRounded(value: Boolean)

Make the end points of the arcs rounded.

actual infix fun setArcRounded(value: Boolean)
actual infix fun setArcRounded(value: Boolean)
Link copied to clipboard
expect infix fun setArcWidth(value: Short)

Set the width (thickness) of the arcs in pixel.

actual infix fun setArcWidth(value: Short)
actual infix fun setArcWidth(value: Short)
Link copied to clipboard
expect infix fun setBackgroundColor(value: Color)

Set the background color of the object.

actual infix fun setBackgroundColor(value: Color)
actual infix fun setBackgroundColor(value: Color)
Link copied to clipboard
expect infix fun setBackgroundGradientColor(value: Color)

Set the gradient color of the background. Used only if grad_dir isn't LV_GRAD_DIR_NONE.

actual infix fun setBackgroundGradientColor(value: Color)
actual infix fun setBackgroundGradientColor(value: Color)
Link copied to clipboard
expect infix fun setBackgroundGradientDirection(value: UByte)

Set the direction of the gradient of the background. The possible values are LV_GRAD_DIR_NONE/HOR/VER.

actual infix fun setBackgroundGradientDirection(value: UByte)
actual infix fun setBackgroundGradientDirection(value: UByte)
Link copied to clipboard
expect infix fun setBackgroundGradientStop(value: Short)

Set the point from which the background's gradient color should start.

actual infix fun setBackgroundGradientStop(value: Short)
actual infix fun setBackgroundGradientStop(value: Short)
Link copied to clipboard
expect infix fun setBackgroundImageOpacity(value: UByte)

Set the opacity of the background image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setBackgroundImageOpacity(value: UByte)
actual infix fun setBackgroundImageOpacity(value: UByte)
Link copied to clipboard
expect infix fun setBackgroundImageRecolor(value: Color)

Set a color to mix to the background image.

actual infix fun setBackgroundImageRecolor(value: Color)
actual infix fun setBackgroundImageRecolor(value: Color)
Link copied to clipboard
expect infix fun setBackgroundImageRecolorOpacity(value: UByte)

Set the intensity of background image recoloring. Value 0, LV_OPA_0 or LV_OPA_TRANSP means no mixing, 256, LV_OPA_100 or LV_OPA_COVER means full recoloring, other values or LV_OPA_10, LV_OPA_20, etc are interpreted proportionally.

actual infix fun setBackgroundImageRecolorOpacity(value: UByte)
actual infix fun setBackgroundImageRecolorOpacity(value: UByte)
Link copied to clipboard

Set a background image from a StringReference.

Set a background image from a String.

Link copied to clipboard
expect infix fun setBackgroundImageTiled(value: Boolean)

If enabled the background image will be tiled.

actual infix fun setBackgroundImageTiled(value: Boolean)
actual infix fun setBackgroundImageTiled(value: Boolean)
Link copied to clipboard
expect infix fun setBackgroundMainStop(value: Short)

Set the point from which the background color should start for gradients.

actual infix fun setBackgroundMainStop(value: Short)
actual infix fun setBackgroundMainStop(value: Short)
Link copied to clipboard
expect infix fun setBackgroundOpacity(value: UByte)

Set the opacity of the background. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setBackgroundOpacity(value: UByte)
actual infix fun setBackgroundOpacity(value: UByte)
Link copied to clipboard
expect infix fun setBorderColor(value: Color)

Set the color of the border.

actual infix fun setBorderColor(value: Color)
actual infix fun setBorderColor(value: Color)
Link copied to clipboard
expect infix fun setBorderOpacity(value: UByte)

Set the opacity of the border. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setBorderOpacity(value: UByte)
actual infix fun setBorderOpacity(value: UByte)
Link copied to clipboard
expect infix fun setBorderPost(value: Boolean)

Sets whether the border should be drawn before or after the children are drawn.

actual infix fun setBorderPost(value: Boolean)
actual infix fun setBorderPost(value: Boolean)
Link copied to clipboard
expect infix fun setBorderSide(value: UByte)

Set which side(s) the border should be drawn. The possible values are LV_BORDER_SIDE_NONE/TOP/BOTTOM/LEFT/RIGHT/INTERNAL. Note that OR-ed calues can be used as well, e.g. LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_LEFT.

actual infix fun setBorderSide(value: UByte)
actual infix fun setBorderSide(value: UByte)
Link copied to clipboard
expect infix fun setBorderWidth(value: Short)

Set the width of the border. Only pixel values can be used.

actual infix fun setBorderWidth(value: Short)
actual infix fun setBorderWidth(value: Short)
Link copied to clipboard
expect infix fun setColorFilterOpacity(value: UByte)

The intensity of mixing of color filter.

actual infix fun setColorFilterOpacity(value: UByte)
actual infix fun setColorFilterOpacity(value: UByte)
Link copied to clipboard
expect fun setFlexCrossPlace(value: FlexAlignment)

Changes the Flexbox cross place.

actual fun setFlexCrossPlace(value: FlexAlignment)
actual fun setFlexCrossPlace(value: FlexAlignment)
Link copied to clipboard
expect fun setFlexFlow(value: UInt)

Sets up the Flexbox layout on the object. All possible values for this function include the following:

actual fun setFlexFlow(value: UInt)
actual fun setFlexFlow(value: UInt)
Link copied to clipboard
expect fun setFlexGrow(value: UByte)

Used to make one or more children fill the available space on the track. If more children has grow the available space will be distributed proportionally to the grow values. For example, let's say there is 400 pixels remaining space and 4 objects with grow:

actual fun setFlexGrow(value: UByte)
actual fun setFlexGrow(value: UByte)
Link copied to clipboard
expect fun setFlexMainPlace(value: FlexAlignment)

Changes the Flexbox main place.

actual fun setFlexMainPlace(value: FlexAlignment)
actual fun setFlexMainPlace(value: FlexAlignment)
Link copied to clipboard
expect fun setFlexTrackPlace(value: FlexAlignment)

Changes the Flexbox track place.

actual fun setFlexTrackPlace(value: FlexAlignment)
actual fun setFlexTrackPlace(value: FlexAlignment)
Link copied to clipboard
expect infix fun setHeight(value: Short)

Sets the height of the LVGL object. Pixel, percentage and LV_SIZE_CONTENT can be used. Percentage values are relative to the height of the parent's content area.

actual infix fun setHeight(value: Short)
actual infix fun setHeight(value: Short)
Link copied to clipboard
expect infix fun setImageOpacity(value: UByte)

Set the opacity of an image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setImageOpacity(value: UByte)
actual infix fun setImageOpacity(value: UByte)
Link copied to clipboard
expect infix fun setImageRecolor(value: Color)

Set color to mix to the image.

actual infix fun setImageRecolor(value: Color)
actual infix fun setImageRecolor(value: Color)
Link copied to clipboard
expect infix fun setImageRecolorOpa(value: UByte)

Set the intensity of the color mixing. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setImageRecolorOpa(value: UByte)
actual infix fun setImageRecolorOpa(value: UByte)
Link copied to clipboard
expect fun setLayout(value: UShort)

Changes the layout.

actual fun setLayout(value: UShort)
actual fun setLayout(value: UShort)
Link copied to clipboard
expect infix fun setLineColor(value: Color)

Set the color fo the lines.

actual infix fun setLineColor(value: Color)
actual infix fun setLineColor(value: Color)
Link copied to clipboard
expect infix fun setLineDashGap(value: Short)

Set the gap between dashes in pixel. Note that dash works only on horizontal and vertical lines.

actual infix fun setLineDashGap(value: Short)
actual infix fun setLineDashGap(value: Short)
Link copied to clipboard
expect infix fun setLineDashWidth(value: Short)

Set the width of dashes in pixel. Note that dash works only on horizontal and vertical lines.

actual infix fun setLineDashWidth(value: Short)
actual infix fun setLineDashWidth(value: Short)
Link copied to clipboard
expect infix fun setLineOpacity(value: UByte)

Set the opacity of the lines.

actual infix fun setLineOpacity(value: UByte)
actual infix fun setLineOpacity(value: UByte)
Link copied to clipboard
expect infix fun setLineRounded(value: Boolean)

Make the end points of the lines rounded.

actual infix fun setLineRounded(value: Boolean)
actual infix fun setLineRounded(value: Boolean)
Link copied to clipboard
expect infix fun setLineWidth(value: Short)

Set the width of the lines in pixel.

actual infix fun setLineWidth(value: Short)
actual infix fun setLineWidth(value: Short)
Link copied to clipboard
expect infix fun setMaxHeight(value: Short)

Sets the maximum height. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area.

actual infix fun setMaxHeight(value: Short)
actual infix fun setMaxHeight(value: Short)
Link copied to clipboard
expect infix fun setMaxWidth(value: Short)

Sets the maximum width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

actual infix fun setMaxWidth(value: Short)
actual infix fun setMaxWidth(value: Short)
Link copied to clipboard
expect infix fun setMinHeight(value: Short)

Sets the minimum height. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

actual infix fun setMinHeight(value: Short)
actual infix fun setMinHeight(value: Short)
Link copied to clipboard
expect infix fun setMinWidth(value: Short)

Sets the minimum width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

actual infix fun setMinWidth(value: Short)
actual infix fun setMinWidth(value: Short)
Link copied to clipboard
expect infix fun setOpacity(value: UByte)

Scale down all opacity values of the object by this factor. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setOpacity(value: UByte)
actual infix fun setOpacity(value: UByte)
Link copied to clipboard
expect infix fun setOutlineColor(value: Color)

Set the color of the outline.

actual infix fun setOutlineColor(value: Color)
actual infix fun setOutlineColor(value: Color)
Link copied to clipboard
expect infix fun setOutlineOpacity(value: UByte)

Set the opacity of the outline. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setOutlineOpacity(value: UByte)
actual infix fun setOutlineOpacity(value: UByte)
Link copied to clipboard
expect infix fun setOutlinePad(value: Short)

Set the padding of the outline, i.e. the gap between object and the outline.

actual infix fun setOutlinePad(value: Short)
actual infix fun setOutlinePad(value: Short)
Link copied to clipboard
expect infix fun setOutlineWidth(value: Short)

Set the width of the outline in pixels.

actual infix fun setOutlineWidth(value: Short)
actual infix fun setOutlineWidth(value: Short)
Link copied to clipboard
expect infix fun setPadAll(value: Short)

Sets the padding on all sides.

actual infix fun setPadAll(value: Short)
actual infix fun setPadAll(value: Short)
Link copied to clipboard
expect infix fun setPadBottom(value: Short)

Sets the padding on the bottom. It makes the content area smaller in this direction.

actual infix fun setPadBottom(value: Short)
actual infix fun setPadBottom(value: Short)
Link copied to clipboard
expect infix fun setPadColumn(value: Short)

Sets the padding between the columns. Used by the layouts.

actual infix fun setPadColumn(value: Short)
actual infix fun setPadColumn(value: Short)
Link copied to clipboard
expect infix fun setPadLeft(value: Short)

Sets the padding on the left. It makes the content area smaller in this direction.

actual infix fun setPadLeft(value: Short)
actual infix fun setPadLeft(value: Short)
Link copied to clipboard
expect infix fun setPadRight(value: Short)

Sets the padding on the right. It makes the content area smaller in this direction.

actual infix fun setPadRight(value: Short)
actual infix fun setPadRight(value: Short)
Link copied to clipboard
expect infix fun setPadRow(value: Short)

Sets the padding between the rows. Used by the layouts.

actual infix fun setPadRow(value: Short)
actual infix fun setPadRow(value: Short)
Link copied to clipboard
expect infix fun setPadTop(value: Short)

Sets the padding on the top. It makes the content area smaller in this direction.

actual infix fun setPadTop(value: Short)
actual infix fun setPadTop(value: Short)
Link copied to clipboard
expect infix fun setRadius(value: Short)

Set the radius on every corner.

actual infix fun setRadius(value: Short)
actual infix fun setRadius(value: Short)
Link copied to clipboard
expect infix fun setShadowColor(value: Color)

Set the color of the shadow.

actual infix fun setShadowColor(value: Color)
actual infix fun setShadowColor(value: Color)
Link copied to clipboard
expect infix fun setShadowOpacity(value: UByte)

Set the opacity of the shadow. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setShadowOpacity(value: UByte)
actual infix fun setShadowOpacity(value: UByte)
Link copied to clipboard
expect infix fun setShadowSpread(value: Short)

Make the shadow calculation to use a larger or smaller rectangle as base. The value can be in pixel to make the area larger/smaller

actual infix fun setShadowSpread(value: Short)
actual infix fun setShadowSpread(value: Short)
Link copied to clipboard
expect infix fun setShadowWidth(value: Short)

Set the width of the shadow in pixels. The value should be >= 0.

actual infix fun setShadowWidth(value: Short)
actual infix fun setShadowWidth(value: Short)
Link copied to clipboard
expect infix fun setShadowXOffset(value: Short)

Set an offset on the shadow in pixels in X direction.

actual infix fun setShadowXOffset(value: Short)
actual infix fun setShadowXOffset(value: Short)
Link copied to clipboard
expect infix fun setShadowYOffset(value: Short)

Set an offset on the shadow in pixels in Y direction.

actual infix fun setShadowYOffset(value: Short)
actual infix fun setShadowYOffset(value: Short)
Link copied to clipboard
expect infix fun setTextAlign(value: TextAlignment)

Set how to align the lines of the text. Note that it doesn't align the object itself, only the lines inside the object. The possible values are LEFT/CENTER/RIGHT/AUTO. Use TextAlignment.AUTO to detect the text base direction and use left or right alignment accordingly.

actual infix fun setTextAlign(value: TextAlignment)
actual infix fun setTextAlign(value: TextAlignment)
Link copied to clipboard
expect infix fun setTextColor(value: Color)

Sets the color of the text.

actual infix fun setTextColor(value: Color)
actual infix fun setTextColor(value: Color)
Link copied to clipboard
expect infix fun setTextDecor(value: UByte)

Set decoration for the text. The possible values are LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH. Note that OR-ed values can be used as well.

actual infix fun setTextDecor(value: UByte)
actual infix fun setTextDecor(value: UByte)
Link copied to clipboard
expect fun setTextFont(value: Font)

Changes the text font.

actual fun setTextFont(value: Font)
actual fun setTextFont(value: Font)
Link copied to clipboard
expect infix fun setTextLetterSpace(value: Short)

Set the letter space.

actual infix fun setTextLetterSpace(value: Short)
actual infix fun setTextLetterSpace(value: Short)
Link copied to clipboard
expect infix fun setTextLineSpace(value: Short)

Set the line space.

actual infix fun setTextLineSpace(value: Short)
actual infix fun setTextLineSpace(value: Short)
Link copied to clipboard
expect infix fun setTextOpacity(value: UByte)

Set the opacity of the text. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 256, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc indicate semi-transparency.

actual infix fun setTextOpacity(value: UByte)
actual infix fun setTextOpacity(value: UByte)
Link copied to clipboard
expect infix fun setTransformAngle(value: Short)

Rotate image-like objects. Added to the rotation set on the object. The value is interpreted in 0.1 degree unit. E.g. 45 deg. = 450

actual infix fun setTransformAngle(value: Short)
actual infix fun setTransformAngle(value: Short)
Link copied to clipboard
expect infix fun setTransformHeight(value: Short)

Make the object higher on both sides with this value. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's height.

actual infix fun setTransformHeight(value: Short)
actual infix fun setTransformHeight(value: Short)
Link copied to clipboard
expect infix fun setTransformWidth(value: Short)

Make the object wider on both sides with this value. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's width.

actual infix fun setTransformWidth(value: Short)
actual infix fun setTransformWidth(value: Short)
Link copied to clipboard
expect infix fun setTransformZoom(value: Short)

Zoom image-like objects. Multiplied with the zoom set on the object. The value 256 (or LV_IMG_ZOOM_NONE) means normal size, 128 half size, 512 double size, and so on.

actual infix fun setTransformZoom(value: Short)
actual infix fun setTransformZoom(value: Short)
Link copied to clipboard
expect infix fun setTranslateX(value: Short)

Move the object with this value in X direction. Applied after layouts, aligns and other positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's width.

actual infix fun setTranslateX(value: Short)
actual infix fun setTranslateX(value: Short)
Link copied to clipboard
expect infix fun setTranslateY(value: Short)

Move the object with this value in Y direction. Applied after layouts, aligns and other positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's height.

actual infix fun setTranslateY(value: Short)
actual infix fun setTranslateY(value: Short)
Link copied to clipboard
expect infix fun setWidth(value: Short)

Sets the width of the LVGL object. Pixel, percentage and LV_SIZE_CONTENT values can be used. Percentage values are relative to the width of the parent's content area.

actual infix fun setWidth(value: Short)
actual infix fun setWidth(value: Short)
Link copied to clipboard
expect infix fun setXPos(value: Short)

Set the X coordinate of the LVGL object considering the set align. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

actual infix fun setXPos(value: Short)
actual infix fun setXPos(value: Short)
Link copied to clipboard
expect infix fun setYPos(value: Short)

Set the Y coordinate of the LVGL object considering the set align. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area.

actual infix fun setYPos(value: Short)
actual infix fun setYPos(value: Short)

Properties

Link copied to clipboard
expect val isEmpty: Boolean

Checks if a style is empty (has no properties).

actual val isEmpty: Boolean
actual val isEmpty: Boolean
lvStylePtr
Link copied to clipboard
val lvStylePtr: CPointer<lv_style_t>?
val lvStylePtr: CPointer<lv_style_t>?

Extensions

Link copied to clipboard
Link copied to clipboard
expect fun Style.setGridCellColumnSpan(value: Short)
actual fun Style.setGridCellColumnSpan(value: Short)
actual fun Style.setGridCellColumnSpan(value: Short)
Link copied to clipboard
Link copied to clipboard
expect fun Style.setGridCellRowSpan(value: Short)
actual fun Style.setGridCellRowSpan(value: Short)
actual fun Style.setGridCellRowSpan(value: Short)
Link copied to clipboard
expect fun Style.setGridCellXAlignment(value: Short)
actual fun Style.setGridCellXAlignment(value: Short)
actual fun Style.setGridCellXAlignment(value: Short)
Link copied to clipboard
expect fun Style.setGridCellYAlignment(value: Short)
actual fun Style.setGridCellYAlignment(value: Short)
actual fun Style.setGridCellYAlignment(value: Short)
Link copied to clipboard
Link copied to clipboard
expect fun Style.setGridColumnDescriptor(vararg values: Short)
actual fun Style.setGridColumnDescriptor(vararg values: Short)
actual fun Style.setGridColumnDescriptor(vararg values: Short)
Link copied to clipboard
Link copied to clipboard
expect fun Style.setGridRowDescriptor(vararg values: Short)
actual fun Style.setGridRowDescriptor(vararg values: Short)
actual fun Style.setGridRowDescriptor(vararg values: Short)