diff --git a/animation.go b/animation.go index 49ee7cf..f927586 100644 --- a/animation.go +++ b/animation.go @@ -9,47 +9,114 @@ import ( // Constants which related to view's animation const ( - // AnimationTag is the constant for the "animation" property tag. - // The "animation" property sets and starts animations. - // Valid types of value are []Animation and Animation + // AnimationTag is the constant for "animation" property tag. + // + // Used by `View`. + // Sets and starts animations. + // + // Supported types: `Animation`, `[]Animation`. + // + // Internal type is `[]Animation`, other types converted to it during assignment. + // See `Animation` description for more details. AnimationTag = "animation" - // AnimationPause is the constant for the "animation-pause" property tag. - // The "animation-pause" property sets whether an animation is running or paused. + // AnimationPaused is the constant for "animation-paused" property tag. + // + // Used by `Animation`. + // Controls whether the animation is running or paused. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Animation is paused. + // `false` or `0` or "false", "no", "off", "0" - Animation is playing. AnimationPaused = "animation-paused" - // TransitionTag is the constant for the "transition" property tag. - // The "transition" property sets transition animation of view properties. - // Valid type of "transition" property value is Params. Valid type of Params value is Animation. + // Transition is the constant for "transition" property tag. + // + // Used by `View`. + // Sets transition animation of view properties. Each provided property must contain `Animation` which describe how + // particular property will be animated on property value change. Transition animation can be applied to properties of the + // type `SizeUnit`, `Color`, `AngleUnit`, `float64` and composite properties that contain elements of the listed types(for + // example, "shadow", "border", etc.). If we'll try to animate other properties with internal type like `bool` or + // `string` no error will occur, simply there will be no animation. + // + // Supported types: `Params`. + // + // See `Params` description for more details. Transition = "transition" - // PropertyTag is the constant for the "property" animation property tag. - // The "property" property describes a scenario for changing a View property. - // Valid types of value are []AnimatedProperty and AnimatedProperty + // PropertyTag is the constant for "property" property tag. + // + // Used by `Animation`. + // Describes a scenario for changing a `View`'s property. Used only for animation script. + // + // Supported types: `[]AnimatedProperty`, `AnimatedProperty`. + // + // Internal type is `[]AnimatedProperty`, other types converted to it during assignment. + // See `AnimatedProperty` description for more details. PropertyTag = "property" - // Duration is the constant for the "duration" animation property tag. - // The "duration" float property sets the length of time in seconds that an animation takes to complete one cycle. + // Duration is the constant for "duration" property tag. + // + // Used by `Animation`. + // Sets the length of time in seconds that an animation takes to complete one cycle. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Duration = "duration" - // Delay is the constant for the "delay" animation property tag. - // The "delay" float property specifies the amount of time in seconds to wait from applying - // the animation to an element before beginning to perform the animation. The animation can start later, - // immediately from its beginning, or immediately and partway through the animation. + // Delay is the constant for "delay" property tag. + // + // Used by `Animation`. + // Specifies the amount of time in seconds to wait from applying the animation to an element before beginning to perform + // the animation. The animation can start later, immediately from its beginning or immediately and partway through the + // animation. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Delay = "delay" - // TimingFunction is the constant for the "timing-function" animation property tag. - // The "timing-function" property sets how an animation progresses through the duration of each cycle. + // TimingFunction is the constant for "timing-function" property tag. + // + // Used by `Animation`. + // Set how an animation progresses through the duration of each cycle. + // + // Supported types: `string`. + // + // Values: + // "ease"(`EaseTiming`) - Speed increases towards the middle and slows down at the end. + // "ease-in"(`EaseInTiming`) - Speed is slow at first, but increases in the end. + // "ease-out"(`EaseOutTiming`) - Speed is fast at first, but decreases in the end. + // "ease-in-out"(`EaseInOutTiming`) - Speed is slow at first, but quickly increases and at the end it decreases again. + // "linear"(`LinearTiming`) - Constant speed. TimingFunction = "timing-function" - // IterationCount is the constant for the "iteration-count" animation property tag. - // The "iteration-count" int property sets the number of times an animation sequence - // should be played before stopping. + // IterationCount is the constant for "iteration-count" property tag. + // + // Used by `Animation`. + // Sets the number of times an animation sequence should be played before stopping. Used only for animation script. + // + // Supported types: `int`, `string`. + // + // Internal type is `int`, other types converted to it during assignment. IterationCount = "iteration-count" - // AnimationDirection is the constant for the "animation-direction" animation property tag. - //The "animation-direction" property sets whether an animation should play forward, backward, - // or alternate back and forth between playing the sequence forward and backward. + // AnimationDirection is the constant for "animation-direction" property tag. + // + // Used by `Animation`. + // Whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward + // and backward. Used only for animation script. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NormalAnimation`) or "normal" - The animation plays forward every iteration, that is, when the animation ends, it is immediately reset to its starting position and played again. + // `1`(`ReverseAnimation`) or "reverse" - The animation plays backwards, from the last position to the first, and then resets to the final position and plays again. + // `2`(`AlternateAnimation`) or "alternate" - The animation changes direction in each cycle, that is, in the first cycle, it starts from the start position, reaches the end position, and in the second cycle, it continues from the end position and reaches the start position, and so on. + // `3`(`AlternateReverseAnimation`) or "alternate-reverse" - The animation starts playing from the end position and reaches the start position, and in the next cycle, continuing from the start position, it goes to the end position. AnimationDirection = "animation-direction" // NormalAnimation is value of the "animation-direction" property. @@ -76,12 +143,16 @@ const ( // EaseTiming - a timing function which increases in velocity towards the middle of the transition, slowing back down at the end EaseTiming = "ease" + // EaseInTiming - a timing function which starts off slowly, with the transition speed increasing until complete EaseInTiming = "ease-in" + // EaseOutTiming - a timing function which starts transitioning quickly, slowing down the transition continues. EaseOutTiming = "ease-out" + // EaseInOutTiming - a timing function which starts transitioning slowly, speeds up, and then slows down again. EaseInOutTiming = "ease-in-out" + // LinearTiming - a timing function at an even speed LinearTiming = "linear" ) diff --git a/animationEvents.go b/animationEvents.go index 02ab84e..6c845bc 100644 --- a/animationEvents.go +++ b/animationEvents.go @@ -5,50 +5,155 @@ import "strings" // Constants which describe values for view's animation events properties const ( // TransitionRunEvent is the constant for "transition-run-event" property tag. - // The "transition-run-event" is fired when a transition is first created, - // i.e. before any transition delay has begun. + // + // Used by `View`. + // Is fired when a transition is first created, i.e. before any transition delay has begun. + // + // General listener format: + // `func(view rui.View, propertyName string)`. + // + // where: + // view - Interface of a view which generated this event, + // propertyName - Name of the property. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(propertyName string)`, + // `func()`. TransitionRunEvent = "transition-run-event" - // TransitionStartEvent is the constant for "transition-end-event" property tag. - // The "transition-start-event" is fired when a transition has actually started, - // i.e., after "delay" has ended. + // TransitionStartEvent is the constant for "transition-start-event" property tag. + // + // Used by `View`. + // Is fired when a transition has actually started, i.e., after "delay" has ended. + // + // General listener format: + // `func(view rui.View, propertyName string)`. + // + // where: + // view - Interface of a view which generated this event, + // propertyName - Name of the property. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(propertyName string)`, + // `func()`. TransitionStartEvent = "transition-start-event" // TransitionEndEvent is the constant for "transition-end-event" property tag. - // The "transition-end-event" is fired when a transition has completed. + // + // Used by `View`. + // Is fired when a transition has completed. + // + // General listener format: + // `func(view rui.View, propertyName string)`. + // + // where: + // view - Interface of a view which generated this event, + // propertyName - Name of the property. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(propertyName string)`, + // `func()`. TransitionEndEvent = "transition-end-event" // TransitionCancelEvent is the constant for "transition-cancel-event" property tag. - // The "transition-cancel-event" is fired when a transition is cancelled. The transition is cancelled when: - // * A new property transition has begun. - // * The "visibility" property is set to "gone". - // * The transition is stopped before it has run to completion, e.g. by moving the mouse off a hover-transitioning view. + // + // Used by `View`. + // Is fired when a transition is cancelled. The transition is cancelled when: * A new property transition has begun. * The + // "visibility" property is set to "gone". * The transition is stopped before it has run to completion, e.g. by moving the + // mouse off a hover-transitioning view. + // + // General listener format: + // `func(view rui.View, propertyName string)`. + // + // where: + // view - Interface of a view which generated this event, + // propertyName - Name of the property. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(propertyName string)`, + // `func()`. TransitionCancelEvent = "transition-cancel-event" // AnimationStartEvent is the constant for "animation-start-event" property tag. - // The "animation-start-event" is fired when an animation has started. - // If there is an animation-delay, this event will fire once the delay period has expired. + // + // Used by `View`. + // Fired when an animation has started. If there is an "animation-delay", this event will fire once the delay period has + // expired. + // + // General listener format: + // `func(view rui.View, animationId string)`. + // + // where: + // view - Interface of a view which generated this event, + // animationId - Id of the animation. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(animationId string)`, + // `func()`. AnimationStartEvent = "animation-start-event" // AnimationEndEvent is the constant for "animation-end-event" property tag. - // The "animation-end-event" is fired when an animation has completed. - // If the animation aborts before reaching completion, such as if the element is removed - // or the animation is removed from the element, the "animation-end-event" is not fired. + // + // Used by `View`. + // Fired when an animation has completed. If the animation aborts before reaching completion, such as if the element is + // removed or the animation is removed from the element, the "animation-end-event" is not fired. + // + // General listener format: + // `func(view rui.View, animationId string)`. + // + // where: + // view - Interface of a view which generated this event, + // animationId - Id of the animation. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(animationId string)`, + // `func()`. AnimationEndEvent = "animation-end-event" // AnimationCancelEvent is the constant for "animation-cancel-event" property tag. - // The "animation-cancel-event" is fired when an animation unexpectedly aborts. - // In other words, any time it stops running without sending the "animation-end-event". - // This might happen when the animation-name is changed such that the animation is removed, - // or when the animating view is hidden. Therefore, either directly or because any of its - // containing views are hidden. - // The event is not supported by all browsers. + // + // Used by `View`. + // Fired when an animation unexpectedly aborts. In other words, any time it stops running without sending the + // "animation-end-event". This might happen when the animation-name is changed such that the animation is removed, or when + // the animating view is hidden. Therefore, either directly or because any of its containing views are hidden. The event + // is not supported by all browsers. + // + // General listener format: + // `func(view rui.View, animationId string)`. + // + // where: + // view - Interface of a view which generated this event, + // animationId - Id of the animation. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(animationId string)`, + // `func()`. AnimationCancelEvent = "animation-cancel-event" // AnimationIterationEvent is the constant for "animation-iteration-event" property tag. - // The "animation-iteration-event" is fired when an iteration of an animation ends, - // and another one begins. This event does not occur at the same time as the animation end event, - // and therefore does not occur for animations with an "iteration-count" of one. + // + // Used by `View`. + // Fired when an iteration of an animation ends, and another one begins. This event does not occur at the same time as the + // animation end event, and therefore does not occur for animations with an "iteration-count" of one. + // + // General listener format: + // `func(view rui.View, animationId string)`. + // + // where: + // view - Interface of a view which generated this event, + // animationId - Id of the animation. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(animationId string)`, + // `func()`. AnimationIterationEvent = "animation-iteration-event" ) diff --git a/border.go b/border.go index ad8a114..c88afee 100644 --- a/border.go +++ b/border.go @@ -9,40 +9,168 @@ import ( const ( // NoneLine constant specifies that there is no border NoneLine = 0 + // SolidLine constant specifies the border/line as a solid line SolidLine = 1 + // DashedLine constant specifies the border/line as a dashed line DashedLine = 2 + // DottedLine constant specifies the border/line as a dotted line DottedLine = 3 + // DoubleLine constant specifies the border/line as a double solid line DoubleLine = 4 + // DoubleLine constant specifies the border/line as a double solid line WavyLine = 5 // LeftStyle is the constant for "left-style" property tag. + // + // Used by `BorderProperty`. + // Left border line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. LeftStyle = "left-style" - // RightStyle is the constant for "-right-style" property tag. + + // RightStyle is the constant for "right-style" property tag. + // + // Used by `BorderProperty`. + // Right border line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. RightStyle = "right-style" + // TopStyle is the constant for "top-style" property tag. + // + // Used by `BorderProperty`. + // Top border line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. TopStyle = "top-style" + // BottomStyle is the constant for "bottom-style" property tag. + // + // Used by `BorderProperty`. + // Bottom border line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. BottomStyle = "bottom-style" + // LeftWidth is the constant for "left-width" property tag. + // + // Used by `BorderProperty`. + // Left border line width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. LeftWidth = "left-width" - // RightWidth is the constant for "-right-width" property tag. + + // RightWidth is the constant for "right-width" property tag. + // + // Used by `BorderProperty`. + // Right border line width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RightWidth = "right-width" + // TopWidth is the constant for "top-width" property tag. + // + // Used by `BorderProperty`. + // Top border line width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopWidth = "top-width" + // BottomWidth is the constant for "bottom-width" property tag. + // + // Used by `BorderProperty`. + // Bottom border line width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomWidth = "bottom-width" + // LeftColor is the constant for "left-color" property tag. + // + // Used by `BorderProperty`. + // Left border line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. LeftColor = "left-color" - // RightColor is the constant for "-right-color" property tag. + + // RightColor is the constant for "right-color" property tag. + // + // Used by `BorderProperty`. + // Right border line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. RightColor = "right-color" + // TopColor is the constant for "top-color" property tag. + // + // Used by `BorderProperty`. + // Top border line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. TopColor = "top-color" + // BottomColor is the constant for "bottom-color" property tag. + // + // Used by `BorderProperty`. + // Bottom border line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BottomColor = "bottom-color" ) diff --git a/canvasView.go b/canvasView.go index 08e98a0..3a41245 100644 --- a/canvasView.go +++ b/canvasView.go @@ -2,9 +2,12 @@ package rui import "strings" -// DrawFunction is the constant for the "draw-function" property tag. -// The "draw-function" property sets the draw function of CanvasView. -// The function should have the following format: func(Canvas) +// DrawFunction is the constant for "draw-function" property tag. +// +// Used by `CanvasView`. +// Property sets the draw function of `CanvasView`. +// +// Supported types: `func(Canvas)`. const DrawFunction = "draw-function" // CanvasView interface of a custom draw view diff --git a/checkbox.go b/checkbox.go index 655a684..d9dde13 100644 --- a/checkbox.go +++ b/checkbox.go @@ -5,8 +5,21 @@ import ( ) // CheckboxChangedEvent is the constant for "checkbox-event" property tag. -// The "checkbox-event" event occurs when the checkbox becomes checked/unchecked. -// The main listener format: func(Checkbox, bool), where the second argument is the checkbox state. +// +// Used by `Checkbox`. +// Event occurs when the checkbox becomes checked/unchecked. +// +// General listener format: +// `func(checkbox rui.Checkbox, checked bool)`. +// +// where: +// checkbox - Interface of a checkbox which generated this event, +// checked - Checkbox state. +// +// Allowed listener formats: +// `func(checkbox rui.Checkbox)`, +// `func(checked bool)`, +// `func()`. const CheckboxChangedEvent = "checkbox-event" // Checkbox represent a Checkbox view diff --git a/colorPicker.go b/colorPicker.go index 760f7b3..12709ad 100644 --- a/colorPicker.go +++ b/colorPicker.go @@ -7,12 +7,35 @@ import ( // Constants for [ColorPicker] specific properties and events. const ( // ColorChangedEvent is the constant for "color-changed" property tag. - // The "color-changed" event occurs when [ColorPicker] value has been changed. - // The main listener format: func(picker ColorPicker, newColor, oldColor Color). + // + // Used by `ColorPicker`. + // Event generated when color picker value has been changed. + // + // General listener format: + // `func(picker rui.ColorPicker, newColor, oldColor rui.Color)`. + // + // where: + // picker - Interface of a color picker which generated this event, + // newColor - New color value, + // oldColor - Old color value. + // + // Allowed listener formats: + // `func(picker rui.ColorPicker, newColor rui.Color)`, + // `func(newColor, oldColor rui.Color)`, + // `func(newColor rui.Color)`, + // `func(picker rui.ColorPicker)`, + // `func()`. ColorChangedEvent = "color-changed" // ColorPickerValue is the constant for "color-picker-value" property tag. - // The "color-picker-value" define current color picker value. + // + // Used by `ColorPicker`. + // Define current color picker value. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. ColorPickerValue = "color-picker-value" ) diff --git a/columnLayout.go b/columnLayout.go index 015e9b3..ffa5ec1 100644 --- a/columnLayout.go +++ b/columnLayout.go @@ -7,49 +7,112 @@ import ( // Constants for [ColumnLayout] specific properties and events const ( - // ColumnCount is the constant for the "column-count" property tag. - // The "column-count" int property specifies number of columns into which the content is break - // Values less than zero are not valid. if the "column-count" property value is 0 then - // the number of columns is calculated based on the "column-width" property + // ColumnCount is the constant for "column-count" property tag. + // + // Used by `ColumnLayout`. + // Specifies number of columns into which the content is break. Values less than zero are not valid. If this property + // value is 0 then the number of columns is calculated based on the "column-width" property. + // + // Supported types: `int`, `string`. + // + // Values: + // `0` or "0" - Use "column-width" to control how many columns will be created. + // >= `0` or >= "0" - Тhe number of columns into which the content is divided. ColumnCount = "column-count" - // ColumnWidth is the constant for the "column-width" property tag. - // The "column-width" SizeUnit property specifies the width of each column. + // ColumnWidth is the constant for "column-width" property tag. + // + // Used by `ColumnLayout`. + // Specifies the width of each column. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ColumnWidth = "column-width" - // ColumnGap is the constant for the "column-gap" property tag. - // The "column-width" SizeUnit property sets the size of the gap (gutter) between columns. + // ColumnGap is the constant for "column-gap" property tag. + // + // Used by `ColumnLayout`. + // Set the size of the gap (gutter) between columns. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ColumnGap = "column-gap" - // ColumnSeparator is the constant for the "column-separator" property tag. - // The "column-separator" property specifies the line drawn between columns in a multi-column layout. + // ColumnSeparator is the constant for "column-separator" property tag. + // + // Used by `ColumnLayout`. + // Specifies the line drawn between columns in a multi-column layout. + // + // Supported types: `ColumnSeparatorProperty`, `ViewBorder`. + // + // Internal type is `ColumnSeparatorProperty`, other types converted to it during assignment. + // See `ColumnSeparatorProperty` and `ViewBorder` description for more details. ColumnSeparator = "column-separator" - // ColumnSeparatorStyle is the constant for the "column-separator-style" property tag. - // The "column-separator-style" int property sets the style of the line drawn between - // columns in a multi-column layout. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // ColumnSeparatorStyle is the constant for "column-separator-style" property tag. + // + // Used by `ColumnLayout`. + // Controls the style of the line drawn between columns in a multi-column layout. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The separator will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a separator. + // `2`(`DashedLine`) or "dashed" - Dashed line as a separator. + // `3`(`DottedLine`) or "dotted" - Dotted line as a separator. + // `4`(`DoubleLine`) or "double" - Double line as a separator. ColumnSeparatorStyle = "column-separator-style" - // ColumnSeparatorWidth is the constant for the "column-separator-width" property tag. - // The "column-separator-width" SizeUnit property sets the width of the line drawn between - // columns in a multi-column layout. + // ColumnSeparatorWidth is the constant for "column-separator-width" property tag. + // + // Used by `ColumnLayout`. + // Set the width of the line drawn between columns in a multi-column layout. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ColumnSeparatorWidth = "column-separator-width" - // ColumnSeparatorColor is the constant for the "column-separator-color" property tag. - // The "column-separator-color" Color property sets the color of the line drawn between - // columns in a multi-column layout. + // ColumnSeparatorColor is the constant for "column-separator-color" property tag. + // + // Used by `ColumnLayout`. + // Set the color of the line drawn between columns in a multi-column layout. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. ColumnSeparatorColor = "column-separator-color" - // ColumnFill is the constant for the "column-fill" property tag. - // The "column-fill" int property controls how an ColumnLayout's contents are balanced when broken into columns. - // Valid values are - // * ColumnFillBalance (0) - Content is equally divided between columns (default value); - // * ColumnFillAuto (1) - Columns are filled sequentially. Content takes up only the room it needs, possibly resulting in some columns remaining empty. + // ColumnFill is the constant for "column-fill" property tag. + // + // Used by `ColumnLayout`. + // Controls how a `ColumnLayout`'s content is balanced when broken into columns. Default value is "balance". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`ColumnFillBalance`) or "balance" - Content is equally divided between columns. + // `1`(`ColumnFillAuto`) or "auto" - Columns are filled sequentially. Content takes up only the room it needs, possibly resulting in some columns remaining empty. ColumnFill = "column-fill" - // ColumnSpanAll is the constant for the "column-span-all" property tag. - // The "column-span-all" bool property makes it possible for a view to span across all columns when its value is set to true. + // ColumnSpanAll is the constant for "column-span-all" property tag. + // + // Used by `ColumnLayout`. + // Property used in views placed inside the column layout container. Makes it possible for a view to span across all + // columns. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - View will span across all columns. + // `false` or `0` or "false", "no", "off", "0" - View will be a part of a column. ColumnSpanAll = "column-span-all" ) diff --git a/dataList.go b/dataList.go index 33ee7ce..a412ac6 100644 --- a/dataList.go +++ b/dataList.go @@ -3,7 +3,101 @@ package rui import "strings" const ( - // DataList is the constant for the "data-list" property tag. + // DataList is the constant for "data-list" property tag. + // + // Used by `ColorPicker`, `DatePicker`, `EditView`, `NumberPicker`, `TimePicker`. + // + // Usage in `ColorPicker`: + // List of pre-defined colors. + // + // Supported types: `[]string`, `string`, `[]fmt.Stringer`, `[]Color`, `[]SizeUnit`, `[]AngleUnit`, `[]any` containing + // elements of `string`, `fmt.Stringer`, `bool`, `rune`, `float32`, `float64`, `int`, `int8` … `int64`, `uint`, `uint8` … + // `uint64`. + // + // Internal type is `[]string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - contain single item. + // `[]string` - an array of items. + // `[]fmt.Stringer` - an array of objects convertible to a string. + // `[]Color` - An array of color values which will be converted to a string array. + // `[]SizeUnit` - an array of size unit values which will be converted to a string array. + // `[]any` - this array must contain only types which were listed in Types section. + // + // Usage in `DatePicker`: + // List of predefined dates. If we set this property, date picker may have a drop-down menu with a list of these values. + // Some browsers may ignore this property, such as Safari for macOS. The value of this property must be an array of + // strings in the format "YYYY-MM-DD". + // + // Supported types: `[]string`, `string`, `[]fmt.Stringer`, `[]Color`, `[]SizeUnit`, `[]AngleUnit`, `[]any` containing + // elements of `string`, `fmt.Stringer`, `bool`, `rune`, `float32`, `float64`, `int`, `int8` … `int64`, `uint`, `uint8` … + // `uint64`. + // + // Internal type is `[]string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - contain single item. + // `[]string` - an array of items. + // `[]fmt.Stringer` - an array of objects convertible to a string. + // `[]Color` - An array of color values which will be converted to a string array. + // `[]SizeUnit` - an array of size unit values which will be converted to a string array. + // `[]any` - this array must contain only types which were listed in Types section. + // + // Usage in `EditView`: + // Array of recommended values. + // + // Supported types: `[]string`, `string`, `[]fmt.Stringer`, `[]Color`, `[]SizeUnit`, `[]AngleUnit`, `[]any` containing + // elements of `string`, `fmt.Stringer`, `bool`, `rune`, `float32`, `float64`, `int`, `int8` … `int64`, `uint`, `uint8` … + // `uint64`. + // + // Internal type is `[]string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - contain single item. + // `[]string` - an array of items. + // `[]fmt.Stringer` - an array of objects convertible to a string. + // `[]Color` - An array of color values which will be converted to a string array. + // `[]SizeUnit` - an array of size unit values which will be converted to a string array. + // `[]any` - this array must contain only types which were listed in Types section. + // + // Usage in `NumberPicker`: + // Specify an array of recommended values. + // + // Supported types: `[]string`, `string`, `[]fmt.Stringer`, `[]Color`, `[]SizeUnit`, `[]AngleUnit`, `[]float`, `[]int`, + // `[]bool`, `[]any` containing elements of `string`, `fmt.Stringer`, `bool`, `rune`, `float32`, `float64`, `int`, `int8` + // … `int64`, `uint`, `uint8` … `uint64`. + // + // Internal type is `[]string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - must contain integer or floating point number, converted to `[]string`. + // `[]string` - an array of strings which must contain integer or floating point numbers, stored as is. + // `[]fmt.Stringer` - object which implement this interface must contain integer or floating point numbers, converted to a `[]string`. + // `[]Color` - an array of color values, converted to `[]string`. + // `[]SizeUnit` - an array of size unit, converted to `[]string`. + // `[]AngleUnit` - an array of angle unit, converted to `[]string`. + // `[]float` - converted to `[]string`. + // `[]int` - converted to `[]string`. + // `[]bool` - converted to `[]string`. + // `[]any` - an array which may contain types listed in Types section above, each value will be converted to a `string` and wrapped to array. + // + // Usage in `TimePicker`: + // An array of recommended values. The value of this property must be an array of strings in the format "HH:MM:SS" or + // "HH:MM". + // + // Supported types: `[]string`, `string`, `[]fmt.Stringer`, `[]Color`, `[]SizeUnit`, `[]AngleUnit`, `[]any` containing + // elements of `string`, `fmt.Stringer`, `bool`, `rune`, `float32`, `float64`, `int`, `int8` … `int64`, `uint`, `uint8` … + // `uint64`. + // + // Internal type is `[]string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - contain single item. + // `[]string` - an array of items. + // `[]fmt.Stringer` - an array of objects convertible to a string. + // `[]Color` - An array of color values which will be converted to a string array. + // `[]SizeUnit` - an array of size unit values which will be converted to a string array. + // `[]any` - this array must contain only types which were listed in Types section. DataList = "data-list" ) diff --git a/datePicker.go b/datePicker.go index 7ff4f26..2efee62 100644 --- a/datePicker.go +++ b/datePicker.go @@ -9,24 +9,104 @@ import ( // Constants for [DatePicker] specific properties and events. const ( // DateChangedEvent is the constant for "date-changed" property tag. - // The "date-changed" event occur when [DatePicker] value has been changed. - // The main listener format: func(picker DatePicker, newDate, oldDate time.Time). + // + // Used by `DatePicker`. + // Occur when date picker value has been changed. + // + // General listener format: + // `func(picker rui.DatePicker, newDate, oldDate time.Time)`. + // + // where: + // picker - Interface of a date picker which generated this event, + // newDate - New date value, + // oldDate - Old date value. + // + // Allowed listener formats: + // `func(picker rui.DatePicker, newDate time.Time)`, + // `func(newDate, oldDate time.Time)`, + // `func(newDate time.Time)`, + // `func(picker rui.DatePicker)`, + // `func()`. DateChangedEvent = "date-changed" // DatePickerMin is the constant for "date-picker-min" property tag. - // The "date-picker-min" define minimum date value. + // + // Used by `DatePicker`. + // Minimum date value. + // + // Supported types: `time.Time`, `string`. + // + // Internal type is `time.Time`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - values of this type parsed and converted to `time.Time`. The following formats are supported: + // "YYYYMMDD" - "20240102". + // "Mon-DD-YYYY" - "Jan-02-24". + // "Mon-DD-YY" - "Jan-02-2024". + // "DD-Mon-YYYY" - "02-Jan-2024". + // "YYYY-MM-DD" - "2024-01-02". + // "Month DD, YYYY" - "January 02, 2024". + // "DD Month YYYY" - "02 January 2024". + // "MM/DD/YYYY" - "01/02/2024". + // "MM/DD/YY" - "01/02/24". + // "MMDDYY" - "010224". DatePickerMin = "date-picker-min" // DatePickerMax is the constant for "date-picker-max" property tag. - // The "date-picker-max" define maximum date value. + // + // Used by `DatePicker`. + // Maximum date value. + // + // Supported types: `time.Time`, `string`. + // + // Internal type is `time.Time`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - values of this type parsed and converted to `time.Time`. The following formats are supported: + // "YYYYMMDD" - "20240102". + // "Mon-DD-YYYY" - "Jan-02-24". + // "Mon-DD-YY" - "Jan-02-2024". + // "DD-Mon-YYYY" - "02-Jan-2024". + // "YYYY-MM-DD" - "2024-01-02". + // "Month DD, YYYY" - "January 02, 2024". + // "DD Month YYYY" - "02 January 2024". + // "MM/DD/YYYY" - "01/02/2024". + // "MM/DD/YY" - "01/02/24". + // "MMDDYY" - "010224". DatePickerMax = "date-picker-max" // DatePickerStep is the constant for "date-picker-step" property tag. - // The "date-picker-step" define date step value in days. + // + // Used by `DatePicker`. + // Date change step in days. + // + // Supported types: `int`, `string`. + // + // Values: + // >= `0` or >= "0" - Step value in days used to increment or decrement date. DatePickerStep = "date-picker-step" // DatePickerValue is the constant for "date-picker-value" property tag. - // The "date-picker-value" define current date value. + // + // Used by `DatePicker`. + // Current value. + // + // Supported types: `time.Time`, `string`. + // + // Internal type is `time.Time`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - values of this type parsed and converted to `time.Time`. The following formats are supported: + // "YYYYMMDD" - "20240102". + // "Mon-DD-YYYY" - "Jan-02-24". + // "Mon-DD-YY" - "Jan-02-2024". + // "DD-Mon-YYYY" - "02-Jan-2024". + // "YYYY-MM-DD" - "2024-01-02". + // "Month DD, YYYY" - "January 02, 2024". + // "DD Month YYYY" - "02 January 2024". + // "MM/DD/YYYY" - "01/02/2024". + // "MM/DD/YY" - "01/02/24". + // "MMDDYY" - "010224". DatePickerValue = "date-picker-value" dateFormat = "2006-01-02" diff --git a/detailsView.go b/detailsView.go index 7da6075..307d995 100644 --- a/detailsView.go +++ b/detailsView.go @@ -4,12 +4,27 @@ import "strings" // Constants for [DetailsView] specific properties and events const ( - // Summary is the constant for the "summary" property tag. - // The contents of the "summary" property are used as the label for the disclosure widget. + // Summary is the constant for "summary" property tag. + // + // Used by `DetailsView`. + // The content of this property is used as the label for the disclosure widget. + // + // Supported types: `string`, `View`. + // + // `string` - Summary as a text. + // `View` - Summary as a view, in this case it can be quite complex if needed. Summary = "summary" - // Expanded is the constant for the "expanded" property tag. - // If the "expanded" boolean property is "true", then the content of view is visible. - // If the value is "false" then the content is collapsed. + + // Expanded is the constant for "expanded" property tag. + // + // Used by `DetailsView`. + // Controls the content expanded state of the details view. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Content is visible. + // `false` or `0` or "false", "no", "off", "0" - Content is collapsed(hidden). Expanded = "expanded" ) diff --git a/dropDownList.go b/dropDownList.go index f39a0d7..6d58725 100644 --- a/dropDownList.go +++ b/dropDownList.go @@ -7,8 +7,18 @@ import ( ) // DropDownEvent is the constant for "drop-down-event" property tag. -// The "drop-down-event" event occurs when a list item becomes selected. -// The main listener format: func(DropDownList, int), where the second argument is the item index. +// +// Used by `DropDownList`. +// Occur when a list item becomes selected. +// +// General listener format: +// `func(list rui.DropDownList, index int)`. +// +// where: +// list - Interface of a drop down list which generated this event, +// index - Index of a newly selected item. +// +// Allowed listener formats: const DropDownEvent = "drop-down-event" // DropDownList represent a DropDownList view diff --git a/editView.go b/editView.go index a025a6f..8f72ae1 100644 --- a/editView.go +++ b/editView.go @@ -7,16 +7,63 @@ import ( // Constants for [EditView] specific properties and events const ( - // EditTextChangedEvent is the constant for the "edit-text-changed" property tag. + // EditTextChangedEvent is the constant for "edit-text-changed" property tag. + // + // Used by `EditView`. + // Occur when edit view text has been changed. + // + // General listener format: + // `func(editView rui.EditView, newText, oldText string)`. + // + // where: + // editView - Interface of an edit view which generated this event, + // newText - New edit view text, + // oldText - Previous edit view text. + // + // Allowed listener formats: + // `func(editView rui.EditView, newText string)`, + // `func(newText, oldText string)`, + // `func(newText string)`, + // `func(editView rui.EditView)`, + // `func()`. EditTextChangedEvent = "edit-text-changed" - // EditViewType is the constant for the "edit-view-type" property tag. + // EditViewType is the constant for "edit-view-type" property tag. + // + // Used by `EditView`. + // Type of the text input. Default value is "text". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`SingleLineText`) or "text" - One-line text editor. + // `1`(`PasswordText`) or "password" - Password editor. The text is hidden by asterisks. + // `2`(`EmailText`) or "email" - Single e-mail editor. + // `3`(`EmailsText`) or "emails" - Multiple e-mail editor. + // `4`(`URLText`) or "url" - Internet address input editor. + // `5`(`PhoneText`) or "phone" - Phone number editor. + // `6`(`MultiLineText`) or "multiline" - Multi-line text editor. EditViewType = "edit-view-type" - // EditViewPattern is the constant for the "edit-view-pattern" property tag. + // EditViewPattern is the constant for "edit-view-pattern" property tag. + // + // Used by `EditView`. + // Regular expression to limit editing of a text. + // + // Supported types: `string`. EditViewPattern = "edit-view-pattern" - // Spellcheck is the constant for the "spellcheck" property tag. + // Spellcheck is the constant for "spellcheck" property tag. + // + // Used by `EditView`. + // Enable or disable spell checker. Available in `SingleLineText` and `MultiLineText` types of edit view. Default value is + // `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Enable spell checker for text. + // `false` or `0` or "false", "no", "off", "0" - Disable spell checker for text. Spellcheck = "spellcheck" ) @@ -24,16 +71,22 @@ const ( const ( // SingleLineText - single-line text type of EditView SingleLineText = 0 + // PasswordText - password type of EditView PasswordText = 1 + // EmailText - e-mail type of EditView. Allows to enter one email EmailText = 2 + // EmailsText - e-mail type of EditView. Allows to enter multiple emails separated by comma EmailsText = 3 + // URLText - url type of EditView. Allows to enter one url URLText = 4 + // PhoneText - telephone type of EditView. Allows to enter one phone number PhoneText = 5 + // MultiLineText - multi-line text type of EditView MultiLineText = 6 ) diff --git a/filePicker.go b/filePicker.go index 2f743b9..7d9812a 100644 --- a/filePicker.go +++ b/filePicker.go @@ -10,13 +10,47 @@ import ( // Constants for [FilePicker] specific properties and events const ( // FileSelectedEvent is the constant for "file-selected-event" property tag. - // The "file-selected-event" is fired when user selects file(s) in the FilePicker. + // + // Used by `FilePicker`. + // Fired when user selects file(s). + // + // General listener format: + // `func(picker rui.FilePicker, files []rui.FileInfo)`. + // + // where: + // picker - Interface of a file picker which generated this event, + // files - Array of description of selected files. + // + // Allowed listener formats: + // `func(picker rui.FilePicker)`, + // `func(files []rui.FileInfo)`, + // `func()`. FileSelectedEvent = "file-selected-event" + // Accept is the constant for "accept" property tag. - // The "accept" property of the FilePicker sets the list of allowed file extensions or MIME types. + // + // Used by `FilePicker`. + // Set the list of allowed file extensions or MIME types. + // + // Supported types: `string`, `[]string`. + // + // Internal type is `string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - may contain single value of multiple separated by comma(`,`). + // `[]string` - an array of acceptable file extensions or MIME types. Accept = "accept" + // Multiple is the constant for "multiple" property tag. - // The "multiple" bool property of the FilePicker sets whether multiple files can be selected + // + // Used by `FilePicker`. + // Controls whether multiple files can be selected. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Several files can be selected. + // `false` or `0` or "false", "no", "off", "0" - Only one file can be selected. Multiple = "multiple" ) @@ -24,10 +58,13 @@ const ( type FileInfo struct { // Name - the file's name. Name string + // LastModified specifying the date and time at which the file was last modified LastModified time.Time + // Size - the size of the file in bytes. Size int64 + // MimeType - the file's MIME type. MimeType string } diff --git a/focusEvents.go b/focusEvents.go index 271bb06..e3ca918 100644 --- a/focusEvents.go +++ b/focusEvents.go @@ -5,19 +5,33 @@ import "strings" // Constants which represent [View] specific focus events properties const ( // FocusEvent is the constant for "focus-event" property tag. - // The "focus-event" event occurs when the View takes input focus. - // The main listener format: - // func(View). - // The additional listener format: - // func(). + // + // Used by `View`. + // Occur when the view takes input focus. + // + // General listener format: + // `func(View)`. + // + // where: + // view - Interface of a view which generated this event. + // + // Allowed listener formats: + // `func()`. FocusEvent = "focus-event" // LostFocusEvent is the constant for "lost-focus-event" property tag. - // The "lost-focus-event" event occurs when the View lost input focus. - // The main listener format: - // func(View). - // The additional listener format: - // func(). + // + // Used by `View`. + // Occur when the View lost input focus. + // + // General listener format: + // `func(view rui.View)`. + // + // where: + // view - Interface of a view which generated this event. + // + // Allowed listener formats: + // `func()`. LostFocusEvent = "lost-focus-event" ) diff --git a/gridLayout.go b/gridLayout.go index d8eee39..6114c76 100644 --- a/gridLayout.go +++ b/gridLayout.go @@ -7,40 +7,72 @@ import ( // Constants related to [GridLayout] specific properties and events const ( - // CellVerticalAlign is the constant for the "cell-vertical-align" property tag. - // The "cell-vertical-align" int property sets the default vertical alignment - // of GridLayout children within the cell they are occupying. Valid values: - // * TopAlign (0) / "top" - // * BottomAlign (1) / "bottom" - // * CenterAlign (2) / "center", and - // * StretchAlign (2) / "stretch" + // CellVerticalAlign is the constant for "cell-vertical-align" property tag. + // + // Used by `GridLayout`, `SvgImageView`. + // + // Usage in `GridLayout`: + // Sets the default vertical alignment of `GridLayout` children within the cell they are occupying. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Full height stretch. + // + // Usage in `SvgImageView`: + // Same as "vertical-align". CellVerticalAlign = "cell-vertical-align" - // CellHorizontalAlign is the constant for the "cell-horizontal-align" property tag. - // The "cell-horizontal-align" int property sets the default horizontal alignment - // of GridLayout children within the occupied cell. Valid values: - // * LeftAlign (0) / "left" - // * RightAlign (1) / "right" - // * CenterAlign (2) / "center" - // * StretchAlign (3) / "stretch" + // CellHorizontalAlign is the constant for "cell-horizontal-align" property tag. + // + // Used by `GridLayout`, `SvgImageView`. + // + // Usage in `GridLayout`: + // Sets the default horizontal alignment of `GridLayout` children within the occupied cell. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Full width stretch. + // + // Usage in `SvgImageView`: + // Same as "horizontal-align". CellHorizontalAlign = "cell-horizontal-align" - // CellVerticalSelfAlign is the constant for the "cell-vertical-self-align" property tag. - // The "cell-vertical-align" int property sets the vertical alignment of GridLayout children - // within the cell they are occupying. The property is set for the child view of GridLayout. Valid values: - // * TopAlign (0) / "top" - // * BottomAlign (1) / "bottom" - // * CenterAlign (2) / "center", and - // * StretchAlign (2) / "stretch" + // CellVerticalSelfAlign is the constant for "cell-vertical-self-align" property tag. + // + // Used by `GridLayout`. + // Sets the vertical alignment of `GridLayout` children within the cell they are occupying. The property is set for the + // child view of `GridLayout`. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Full height stretch. CellVerticalSelfAlign = "cell-vertical-self-align" - // CellHorizontalSelfAlign is the constant for the "cell-horizontal-self-align" property tag. - // The "cell-horizontal-self align" int property sets the horizontal alignment of GridLayout children - // within the occupied cell. The property is set for the child view of GridLayout. Valid values: - // * LeftAlign (0) / "left" - // * RightAlign (1) / "right" - // * CenterAlign (2) / "center" - // * StretchAlign (3) / "stretch" + // CellHorizontalSelfAlign is the constant for "cell-horizontal-self-align" property tag. + // + // Used by `GridLayout`. + // Sets the horizontal alignment of `GridLayout` children within the occupied cell. The property is set for the child view + // of `GridLayout`. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Full width stretch. CellHorizontalSelfAlign = "cell-horizontal-self-align" ) diff --git a/imageView.go b/imageView.go index e622791..2629fe7 100644 --- a/imageView.go +++ b/imageView.go @@ -7,28 +7,55 @@ import ( // Constants which represent [ImageView] specific properties and events const ( - // LoadedEvent is the constant for the "loaded-event" property tag. - // The "loaded-event" event occurs event occurs when the image has been loaded. + // LoadedEvent is the constant for "loaded-event" property tag. + // + // Used by `ImageView`. + // Occur when the image has been loaded. + // + // General listener format: + // `func(image rui.ImageView)`. + // + // where: + // image - Interface of an image view which generated this event. + // + // Allowed listener formats: + // `func()`. LoadedEvent = "loaded-event" - // ErrorEvent is the constant for the "error-event" property tag. - // The "error-event" event occurs event occurs when the image loading failed. + + // ErrorEvent is the constant for "error-event" property tag. + // + // Used by `ImageView`. + // Occur when the image loading has been failed. + // + // General listener format: + // `func(image rui.ImageView)`. + // + // where: + // image - Interface of an image view which generated this event. + // + // Allowed listener formats: + // `func()`. ErrorEvent = "error-event" // NoneFit - value of the "object-fit" property of an ImageView. The replaced content is not resized NoneFit = 0 + // ContainFit - value of the "object-fit" property of an ImageView. The replaced content // is scaled to maintain its aspect ratio while fitting within the element’s content box. // The entire object is made to fill the box, while preserving its aspect ratio, so the object // will be "letterboxed" if its aspect ratio does not match the aspect ratio of the box. ContainFit = 1 + // CoverFit - value of the "object-fit" property of an ImageView. The replaced content // is sized to maintain its aspect ratio while filling the element’s entire content box. // If the object's aspect ratio does not match the aspect ratio of its box, then the object will be clipped to fit. CoverFit = 2 + // FillFit - value of the "object-fit" property of an ImageView. The replaced content is sized // to fill the element’s content box. The entire object will completely fill the box. // If the object's aspect ratio does not match the aspect ratio of its box, then the object will be stretched to fit. FillFit = 3 + // ScaleDownFit - value of the "object-fit" property of an ImageView. The content is sized as // if NoneFit or ContainFit were specified, whichever would result in a smaller concrete object size. ScaleDownFit = 4 diff --git a/keyEvents.go b/keyEvents.go index b103645..653eae6 100644 --- a/keyEvents.go +++ b/keyEvents.go @@ -4,20 +4,40 @@ import "strings" // Constants which represent [View] specific keyboard events properties const ( - // KeyDown is the constant for "key-down-event" property tag. - // The "key-down-event" event is fired when a key is pressed. - // The main listener format: - // func(View, KeyEvent). - // The additional listener formats: - // func(KeyEvent), func(View), and func(). + // KeyDownEvent is the constant for "key-down-event" property tag. + // + // Used by `View`. + // Is fired when a key is pressed. + // + // General listener format: + // `func(view rui.View, event rui.KeyEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Key event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.KeyEvent)`, + // `func()`. KeyDownEvent = "key-down-event" - // KeyPp is the constant for "key-up-event" property tag. - // The "key-up-event" event is fired when a key is released. - // The main listener format: - // func(View, KeyEvent). - // The additional listener formats: - // func(KeyEvent), func(View), and func(). + // KeyUpEvent is the constant for "key-up-event" property tag. + // + // Used by `View`. + // Is fired when a key is released. + // + // General listener format: + // `func(view rui.View, event rui.KeyEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Key event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.KeyEvent)`, + // `func()`. KeyUpEvent = "key-up-event" ) diff --git a/listView.go b/listView.go index 5f81ab2..19155ea 100644 --- a/listView.go +++ b/listView.go @@ -9,30 +9,78 @@ import ( // Constants which represent [ListView] specific properties and events const ( // ListItemClickedEvent is the constant for "list-item-clicked" property tag. - // The "list-item-clicked" event occurs when the user clicks on an item in the list. - // The main listener format: func(ListView, int), where the second argument is the item index. + // + // Used by `ListView`. + // Occur when the user clicks on an item in the list. + // + // General listener format: + // `func(list rui.ListView, item int)`. + // + // where: + // list - Interface of a list which generated this event, + // item - An index of an item clicked. + // + // Allowed listener formats: + // `func(item int)`, + // `func(list rui.ListView)`, + // `func()`. ListItemClickedEvent = "list-item-clicked" // ListItemSelectedEvent is the constant for "list-item-selected" property tag. - // The "list-item-selected" event occurs when a list item becomes selected. - // The main listener format: func(ListView, int), where the second argument is the item index. + // + // Used by `ListView`. + // Occur when a list item becomes selected. + // + // General listener format: + // `func(list rui.ListView, item int)`. + // + // where: + // list - Interface of a list which generated this event, + // item - An index of an item selected. + // + // Allowed listener formats: ListItemSelectedEvent = "list-item-selected" // ListItemCheckedEvent is the constant for "list-item-checked" property tag. - // The "list-item-checked" event occurs when a list item checkbox becomes checked/unchecked. - // The main listener format: func(ListView, []int), where the second argument is the array of checked item indexes. + // + // Used by `ListView`. + // Occur when a list item checkbox becomes checked or unchecked. + // + // General listener format: + // `func(list rui.ListView, checkedItems []int)`. + // + // where: + // list - Interface of a list which generated this event, + // checkedItems - Array of indices of marked elements. + // + // Allowed listener formats: + // `func(checkedItems []int)`, + // `func(list rui.ListView)`, + // `func()`. ListItemCheckedEvent = "list-item-checked" // ListItemStyle is the constant for "list-item-style" property tag. - // The "list-item-style" string property defines the style of an unselected item + // + // Used by `ListView`. + // Defines the style of an unselected item. + // + // Supported types: `string`. ListItemStyle = "list-item-style" // CurrentStyle is the constant for "current-style" property tag. - // The "current-style" string property defines the style of the selected item when the ListView is focused. + // + // Used by `ListView`. + // Defines the style of the selected item when the `ListView` is focused. + // + // Supported types: `string`. CurrentStyle = "current-style" // CurrentInactiveStyle is the constant for "current-inactive-style" property tag. - // The "current-inactive-style" string property defines the style of the selected item when the ListView is unfocused. + // + // Used by `ListView`. + // Defines the style of the selected item when the `ListView` is unfocused. + // + // Supported types: `string`. CurrentInactiveStyle = "current-inactive-style" ) @@ -41,6 +89,7 @@ const ( const ( // VerticalOrientation is the vertical ListView orientation VerticalOrientation = 0 + // HorizontalOrientation is the horizontal ListView orientation HorizontalOrientation = 1 ) @@ -49,8 +98,10 @@ const ( const ( // NoneCheckbox is value of "checkbox" property: no checkbox NoneCheckbox = 0 + // SingleCheckbox is value of "checkbox" property: only one item can be checked SingleCheckbox = 1 + // MultipleCheckbox is value of "checkbox" property: several items can be checked MultipleCheckbox = 2 ) diff --git a/mediaPlayer.go b/mediaPlayer.go index 24c75a7..b9e39ad 100644 --- a/mediaPlayer.go +++ b/mediaPlayer.go @@ -9,124 +9,817 @@ import ( // Constants which related to media player properties and events const ( - // Controls is the constant for the "autoplay" controls tag. - // If the "controls" bool property is "true", the browser will offer controls to allow the user - // to control audio/video playback, including volume, seeking, and pause/resume playback. - // Its default value is false. + // Controls is the constant for "controls" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Controls whether the browser need to provide controls to allow user to control audio playback, volume, seeking and + // pause/resume playback. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - The browser will offer controls to allow the user to control audio playback, volume, seeking and pause/resume playback. + // `false` or `0` or "false", "no", "off", "0" - No controls will be visible to the end user. + // + // Usage in `VideoPlayer`: + // Whether the browser need to provide controls to allow user to control video playback, volume, seeking and pause/resume + // playback. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - The browser will offer controls to allow the user to control video playback, volume, seeking and pause/resume playback. + // `false` or `0` or "false", "no", "off", "0" - No controls will be visible to the end user. Controls = "controls" - // Loop is the constant for the "loop" property tag. - // If the "loop" bool property is "true", the audio/video player will automatically seek back - // to the start upon reaching the end of the audio/video. - // Its default value is false. + // Loop is the constant for "loop" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Controls whether the audio player will play media in a loop. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - The audio player will automatically seek back to the start upon reaching the end of the audio. + // `false` or `0` or "false", "no", "off", "0" - Audio player will stop playing when the end of the media file has been reached. + // + // Usage in `VideoPlayer`: + // Controls whether the video player will play media in a loop. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - The video player will automatically seek back to the start upon reaching the end of the video. + // `false` or `0` or "false", "no", "off", "0" - Video player will stop playing when the end of the media file has been reached. Loop = "loop" - // Muted is the constant for the "muted" property tag. - // The "muted" bool property indicates whether the audio/video will be initially silenced. - // Its default value is false. + // Muted is the constant for "muted" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Controls whether the audio will be initially silenced. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Audio will be muted. + // `false` or `0` or "false", "no", "off", "0" - Audio playing normally. + // + // Usage in `VideoPlayer`: + // Controls whether the video will be initially silenced. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Video will be muted. + // `false` or `0` or "false", "no", "off", "0" - Video playing normally. Muted = "muted" - // Preload is the constant for the "preload" property tag. - // The "preload" int property is intended to provide a hint to the browser about what - // the author thinks will lead to the best user experience. It may have one of the following values: - // PreloadNone (0), PreloadMetadata (1), and PreloadAuto (2) - // The default value is different for each browser. + // Preload is the constant for "preload" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Property is intended to provide a hint to the browser about what the author thinks will lead to the best user + // experience. Default value is different for each browser. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`PreloadNone`) or "none" - Media file must not be pre-loaded. + // `1`(`PreloadMetadata`) or "metadata" - Only metadata is preloaded. + // `2`(`PreloadAuto`) or "auto" - The entire media file can be downloaded even if the user doesn't have to use it. + // + // Usage in `VideoPlayer`: + // Property is intended to provide a hint to the browser about what the author thinks will lead to the best user + // experience. Default value is different for each browser. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`PreloadNone`) or "none" - Media file must not be pre-loaded. + // `1`(`PreloadMetadata`) or "metadata" - Only metadata is preloaded. + // `2`(`PreloadAuto`) or "auto" - The entire media file can be downloaded even if the user doesn't have to use it. Preload = "preload" - // AbortEvent is the constant for the "abort-event" property tag. - // The "abort-event" event fired when the resource was not fully loaded, but not as the result of an error. + // AbortEvent is the constant for "abort-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Fired when the resource was not fully loaded, but not as the result of an error. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Fired when the resource was not fully loaded, but not as the result of an error. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. AbortEvent = "abort-event" - // CanPlayEvent is the constant for the "can-play-event" property tag. - // The "can-play-event" event occurs when the browser can play the media, but estimates that not enough data has been - // loaded to play the media up to its end without having to stop for further buffering of content. + // CanPlayEvent is the constant for "can-play-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the browser can play the media, but estimates that not enough data has been loaded to play the media up to + // its end without having to stop for further buffering of content. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the browser can play the media, but estimates that not enough data has been loaded to play the media up to + // its end without having to stop for further buffering of content. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. CanPlayEvent = "can-play-event" - // CanPlayThroughEvent is the constant for the "can-play-through-event" property tag. - // The "can-play-through-event" event occurs when the browser estimates it can play the media up - // to its end without stopping for content buffering. + // CanPlayThroughEvent is the constant for "can-play-through-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the browser estimates it can play the media up to its end without stopping for content buffering. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the browser estimates it can play the media up to its end without stopping for content buffering. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. CanPlayThroughEvent = "can-play-through-event" - // CompleteEvent is the constant for the "complete-event" property tag. - // The "complete-event" event occurs when the rendering of an OfflineAudioContext is terminated. + // CompleteEvent is the constant for "complete-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the rendering of an OfflineAudioContext has been terminated. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the rendering of an OfflineAudioContext has been terminated. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. CompleteEvent = "complete-event" - // DurationChangedEvent is the constant for the "duration-changed-event" property tag. - // The "duration-changed-event" event occurs when the duration attribute has been updated. + // DurationChangedEvent is the constant for "duration-changed-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the duration attribute has been updated. + // + // General listener format: + // `func(player rui.MediaPlayer, duration float64)`. + // + // where: + // player - Interface of a player which generated this event, + // duration - Current duration. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(duration float64)`, + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the duration attribute has been updated. + // + // General listener format: + // `func(player rui.MediaPlayer, duration float64)`. + // + // where: + // player - Interface of a player which generated this event, + // duration - Current duration. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(duration float64)`, + // `func()`. DurationChangedEvent = "duration-changed-event" - // EmptiedEvent is the constant for the "emptied-event" property tag. - // The "emptied-event" event occurs when the media has become empty; for example, this event is sent if the media has already been loaded - // (or partially loaded), and the HTMLMediaElement.load method is called to reload it. + // EmptiedEvent is the constant for "emptied-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the media has become empty; for example, this event is sent if the media has already been loaded(or + // partially loaded), and the HTMLMediaElement.load method is called to reload it. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the media has become empty; for example, this event is sent if the media has already been loaded(or + // partially loaded), and the HTMLMediaElement.load method is called to reload it. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. EmptiedEvent = "emptied-event" - // EndedEvent is the constant for the "ended-event" property tag. - // The "ended-event" event occurs when the playback has stopped because the end of the media was reached. + // EndedEvent is the constant for "ended-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the playback has stopped because the end of the media was reached. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the playback has stopped because the end of the media was reached. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. EndedEvent = "ended-event" - // LoadedDataEvent is the constant for the "loaded-data-event" property tag. - // The "loaded-data-event" event occurs when the first frame of the media has finished loading. + // LoadedDataEvent is the constant for "loaded-data-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the first frame of the media has finished loading. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the first frame of the media has finished loading. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. LoadedDataEvent = "loaded-data-event" - // LoadedMetadataEvent is the constant for the "loaded-metadata-event" property tag. - // The "loaded-metadata-event" event occurs when the metadata has been loaded. + // LoadedMetadataEvent is the constant for "loaded-metadata-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the metadata has been loaded. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the metadata has been loaded. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. LoadedMetadataEvent = "loaded-metadata-event" - // LoadStartEvent is the constant for the "load-start-event" property tag. - // The "load-start-event" event is fired when the browser has started to load a resource. + // LoadStartEvent is the constant for "load-start-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Fired when the browser has started to load a resource. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Fired when the browser has started to load a resource. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. LoadStartEvent = "load-start-event" - // PauseEvent is the constant for the "pause-event" property tag. - // The "pause-event" event occurs when the playback has been paused. + // PauseEvent is the constant for "pause-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the playback has been paused. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the playback has been paused. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. PauseEvent = "pause-event" - // PlayEvent is the constant for the "play-event" property tag. - // The "play-event" event occurs when the playback has begun. + // PlayEvent is the constant for "play-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the playback has begun. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the playback has begun. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. PlayEvent = "play-event" - // PlayingEvent is the constant for the "playing-event" property tag. - // The "playing-event" event occurs when the playback is ready to start after having been paused or delayed due to lack of data. + // PlayingEvent is the constant for "playing-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the playback is ready to start after having been paused or delayed due to lack of data. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the playback is ready to start after having been paused or delayed due to lack of data. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. PlayingEvent = "playing-event" - // ProgressEvent is the constant for the "progress-event" property tag. - // The "progress-event" event is fired periodically as the browser loads a resource. + // ProgressEvent is the constant for "progress-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Fired periodically as the browser loads a resource. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Fired periodically as the browser loads a resource. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. ProgressEvent = "progress-event" - // RateChangeEvent is the constant for the "rate-change-event" property tag. - // The "rate-change-event" event occurs when the playback rate has changed. + // RateChangedEvent is the constant for "rate-changed-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the playback rate has changed. + // + // General listener format: + // `func(player rui.MediaPlayer, rate float64)`. + // + // where: + // player - Interface of a player which generated this event, + // rate - Playback rate. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(rate float64)`, + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the playback rate has changed. + // + // General listener format: + // `func(player rui.MediaPlayer, rate float64)`. + // + // where: + // player - Interface of a player which generated this event, + // rate - Playback rate. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(rate float64)`, + // `func()`. RateChangedEvent = "rate-changed-event" - // SeekedEvent is the constant for the "seeked-event" property tag. - // The "seeked-event" event occurs when a seek operation completed. + // SeekedEvent is the constant for "seeked-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when a seek operation completed. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when a seek operation completed. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. SeekedEvent = "seeked-event" - // SeekingEvent is the constant for the "seeking-event" property tag. - // The "seeking-event" event occurs when a seek operation began. + // SeekingEvent is the constant for "seeking-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when a seek operation has began. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when a seek operation has began. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. SeekingEvent = "seeking-event" - // StalledEvent is the constant for the "stalled-event" property tag. - // The "stalled-event" event occurs when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. + // StalledEvent is the constant for "stalled-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. StalledEvent = "stalled-event" - // SuspendEvent is the constant for the "suspend-event" property tag. - // The "suspend-event" event occurs when the media data loading has been suspended. + // SuspendEvent is the constant for "suspend-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the media data loading has been suspended. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the media data loading has been suspended. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. SuspendEvent = "suspend-event" - // TimeUpdateEvent is the constant for the "time-update-event" property tag. - // The "time-update-event" event occurs when the time indicated by the currentTime attribute has been updated. + // TimeUpdateEvent is the constant for "time-update-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the time indicated by the currentTime attribute has been updated. + // + // General listener format: + // `func(player rui.MediaPlayer, time float64)`. + // + // where: + // player - Interface of a player which generated this event, + // time - Current time. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(time float64)`, + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the time indicated by the currentTime attribute has been updated. + // + // General listener format: + // `func(player rui.MediaPlayer, time float64)`. + // + // where: + // player - Interface of a player which generated this event, + // time - Current time. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(time float64)`, + // `func()`. TimeUpdateEvent = "time-update-event" - // VolumeChangedEvent is the constant for the "volume-change-event" property tag. - // The "volume-change-event" event occurs when the volume has changed. + // VolumeChangedEvent is the constant for "volume-changed-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the volume has changed. + // + // General listener format: + // `func(player rui.MediaPlayer, volume float64)`. + // + // where: + // player - Interface of a player which generated this event, + // volume - New volume level. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(volume float64)`, + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the volume has changed. + // + // General listener format: + // `func(player rui.MediaPlayer, volume float64)`. + // + // where: + // player - Interface of a player which generated this event, + // volume - New volume level. + // + // Allowed listener formats: + // `func(player rui.MediaPlayer)`, + // `func(volume float64)`, + // `func()`. VolumeChangedEvent = "volume-changed-event" - // WaitingEvent is the constant for the "waiting-event" property tag. - // The "waiting-event" event occurs when the playback has stopped because of a temporary lack of data + // WaitingEvent is the constant for "waiting-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Occur when the playback has stopped because of a temporary lack of data. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. + // + // Usage in `VideoPlayer`: + // Occur when the playback has stopped because of a temporary lack of data. + // + // General listener format: + // `func(player rui.MediaPlayer)`. + // + // where: + // player - Interface of a player which generated this event. + // + // Allowed listener formats: + // `func()`. WaitingEvent = "waiting-event" - // PlayerErrorEvent is the constant for the "player-error-event" property tag. - // The "player-error-event" event is fired when the resource could not be loaded due to an error - // (for example, a network connectivity problem). + // PlayerErrorEvent is the constant for "player-error-event" property tag. + // + // Used by `AudioPlayer`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Fired when the resource could not be loaded due to an error(for example, a network connectivity problem). + // + // General listener format: + // `func(player rui.MediaPlayer, code int, message string)`. + // + // where: + // player - Interface of a player which generated this event, + // code - Error code. See below, + // message - Error message, + // Error codes: + // `0`(`PlayerErrorUnknown`) - Unknown error, + // `1`(`PlayerErrorAborted`) - Fetching the associated resource was interrupted by a user request, + // `2`(`PlayerErrorNetwork`) - Some kind of network error has occurred that prevented the media from successfully ejecting, even though it was previously available, + // `3`(`PlayerErrorDecode`) - Although the resource was previously identified as being used, an error occurred while trying to decode the media resource, + // `4`(`PlayerErrorSourceNotSupported`) - The associated resource object or media provider was found to be invalid. + // + // Allowed listener formats: + // `func(code int, message string)`, + // `func(player rui.MediaPlayer)`, + // `func()`. + // + // Usage in `VideoPlayer`: + // Fired when the resource could not be loaded due to an error(for example, a network connectivity problem). + // + // General listener format: + // `func(player rui.MediaPlayer, code int, message string)`. + // + // where: + // player - Interface of a player which generated this event, + // code - Error code. See below, + // message - Error message, + // Error codes: + // `0`(`PlayerErrorUnknown`) - Unknown error, + // `1`(`PlayerErrorAborted`) - Fetching the associated resource was interrupted by a user request, + // `2`(`PlayerErrorNetwork`) - Some kind of network error has occurred that prevented the media from successfully ejecting, even though it was previously available, + // `3`(`PlayerErrorDecode`) - Although the resource was previously identified as being used, an error occurred while trying to decode the media resource, + // `4`(`PlayerErrorSourceNotSupported`) - The associated resource object or media provider was found to be invalid. + // + // Allowed listener formats: + // `func(code int, message string)`, + // `func(player rui.MediaPlayer)`, + // `func()`. PlayerErrorEvent = "player-error-event" // PreloadNone - value of the view "preload" property: indicates that the audio/video should not be preloaded. diff --git a/mouseEvents.go b/mouseEvents.go index e853f1f..dd0702c 100644 --- a/mouseEvents.go +++ b/mouseEvents.go @@ -8,77 +8,151 @@ import ( // Constants related to [View] mouse events properties const ( // ClickEvent is the constant for "click-event" property tag. - // The "click-event" event occurs when the user clicks on the View. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Occur when the user clicks on the view. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. ClickEvent = "click-event" // DoubleClickEvent is the constant for "double-click-event" property tag. - // The "double-click-event" event occurs when the user double clicks on the View. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Occur when the user double clicks on the view. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. DoubleClickEvent = "double-click-event" // MouseDown is the constant for "mouse-down" property tag. - // The "mouse-down" event is fired at a View when a pointing device button is pressed - // while the pointer is inside the view. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Is fired at a View when a pointing device button is pressed while the pointer is inside the view. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. MouseDown = "mouse-down" // MouseUp is the constant for "mouse-up" property tag. - // The "mouse-up" event is fired at a View when a button on a pointing device (such as a mouse - // or trackpad) is released while the pointer is located inside it. - // "mouse-up" events are the counterpoint to "mouse-down" events. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Is fired at a View when a button on a pointing device (such as a mouse or trackpad) is released while the pointer is + // located inside it. "mouse-up" events are the counterpoint to "mouse-down" events. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. MouseUp = "mouse-up" // MouseMove is the constant for "mouse-move" property tag. - // The "mouse-move" event is fired at a view when a pointing device (usually a mouse) is moved - // while the cursor's hotspot is inside it. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Is fired at a view when a pointing device(usually a mouse) is moved while the cursor's hotspot is inside it. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. MouseMove = "mouse-move" // MouseOut is the constant for "mouse-out" property tag. - // The "mouse-out" event is fired at a View when a pointing device (usually a mouse) is used to move - // the cursor so that it is no longer contained within the view or one of its children. - // "mouse-out" is also delivered to a view if the cursor enters a child view, - // because the child view obscures the visible area of the view. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Is fired at a View when a pointing device (usually a mouse) is used to move the cursor so that it is no longer + // contained within the view or one of its children. "mouse-out" is also delivered to a view if the cursor enters a child + // view, because the child view obscures the visible area of the view. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. MouseOut = "mouse-out" // MouseOver is the constant for "mouse-over" property tag. - // The "mouse-over" event is fired at a View when a pointing device (such as a mouse or trackpad) - // is used to move the cursor onto the view or one of its child views. - // The main listener formats: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Is fired at a View when a pointing device (such as a mouse or trackpad) is used to move the cursor onto the view or one + // of its child views. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. MouseOver = "mouse-over" // ContextMenuEvent is the constant for "context-menu-event" property tag. - // The "context-menu-event" event occurs when the user calls the context menu by the right mouse clicking. - // The main listener format: - // func(View, MouseEvent). - // The additional listener formats: - // func(MouseEvent), func(View), and func(). + // + // Used by `View`. + // Occur when the user calls the context menu by the right mouse clicking. + // + // General listener format: + // `func(view rui.View, event rui.MouseEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Mouse event. + // + // Allowed listener formats: + // `func(view rui.View)`, + // `func(event rui.MouseEvent)`, + // `func()`. ContextMenuEvent = "context-menu-event" // PrimaryMouseButton is a number of the main pressed button, usually the left button or the un-initialized state diff --git a/numberPicker.go b/numberPicker.go index 0a3f59e..c66b482 100644 --- a/numberPicker.go +++ b/numberPicker.go @@ -8,30 +8,76 @@ import ( // Constants related to [NumberPicker] specific properties and events const ( - // NumberChangedEvent is the constant for the "" property tag. - // The "number-changed" property sets listener(s) that track the change in the entered value. + // NumberChangedEvent is the constant for "number-changed" property tag. + // + // Used by `NumberPicker`. + // Set listener(s) that track the change in the entered value. + // + // General listener format: + // `func(picker rui.NumberPicker, newValue, oldValue float64)`. + // + // where: + // picker - Interface of a number picker which generated this event, + // newValue - New value, + // oldValue - Old Value. + // + // Allowed listener formats: + // `func(picker rui.NumberPicker, newValue float64)`, + // `func(newValue, oldValue float64)`, + // `func(newValue float64)`, + // `func()`. NumberChangedEvent = "number-changed" - // NumberPickerType is the constant for the "number-picker-type" property tag. - // The "number-picker-type" int property sets the mode of NumberPicker. It can take the following values: - // * NumberEditor (0) - NumberPicker is presented by editor. Default value; - // * NumberSlider (1) - NumberPicker is presented by slider. | + // NumberPickerType is the constant for "number-picker-type" property tag. + // + // Used by `NumberPicker`. + // Sets the visual representation. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NumberEditor`) or "editor" - Displayed as an editor. + // `1`(`NumberSlider`) or "slider" - Displayed as a slider. NumberPickerType = "number-picker-type" - // NumberPickerMin is the constant for the "number-picker-min" property tag. - // The "number-picker-min" int property sets the minimum value of NumberPicker. The default value is 0. + // NumberPickerMin is the constant for "number-picker-min" property tag. + // + // Used by `NumberPicker`. + // Set the minimum value. The default value is 0. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. NumberPickerMin = "number-picker-min" - // NumberPickerMax is the constant for the "number-picker-max" property tag. - // The "number-picker-max" int property sets the maximum value of NumberPicker. The default value is 1. + // NumberPickerMax is the constant for "number-picker-max" property tag. + // + // Used by `NumberPicker`. + // Set the maximum value. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. NumberPickerMax = "number-picker-max" - // NumberPickerStep is the constant for the "number-picker-step" property tag. - // The "number-picker-step" int property sets the value change step of NumberPicker + // NumberPickerStep is the constant for "number-picker-step" property tag. + // + // Used by `NumberPicker`. + // Set the value change step. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. NumberPickerStep = "number-picker-step" - // NumberPickerValue is the constant for the "number-picker-value" property tag. - // The "number-picker-value" int property sets the current value of NumberPicker. The default value is 0. + // NumberPickerValue is the constant for "number-picker-value" property tag. + // + // Used by `NumberPicker`. + // Current value. The default value is 0. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. NumberPickerValue = "number-picker-value" ) diff --git a/pointerEvents.go b/pointerEvents.go index a2a539d..99b116d 100644 --- a/pointerEvents.go +++ b/pointerEvents.go @@ -7,46 +7,115 @@ import ( // Constants for [View] specific pointer events properties const ( // PointerDown is the constant for "pointer-down" property tag. - // The "pointer-down" event is fired when a pointer becomes active. For mouse, it is fired when - // the device transitions from no buttons depressed to at least one button depressed. - // For touch, it is fired when physical contact is made with the digitizer. - // For pen, it is fired when the stylus makes physical contact with the digitizer. - // The main listener format: func(View, PointerEvent). - // The additional listener formats: func(PointerEvent), func(View), and func(). + // + // Used by `View`. + // Fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons depressed to at + // least one button depressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is + // fired when the stylus makes physical contact with the digitizer. + // + // General listener format: + // `func(view rui.View, event rui.PointerEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Pointer event. + // + // Allowed listener formats: + // `func(event rui.PointerEvent)`, + // `func(view rui.View)`, + // `func()`. PointerDown = "pointer-down" // PointerUp is the constant for "pointer-up" property tag. - // The "pointer-up" event is fired when a pointer is no longer active. - // The main listener format: func(View, PointerEvent). - // The additional listener formats: func(PointerEvent), func(View), and func(). + // + // Used by `View`. + // Is fired when a pointer is no longer active. + // + // General listener format: + // `func(view rui.View, event rui.PointerEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Pointer event. + // + // Allowed listener formats: + // `func(event rui.PointerEvent)`, + // `func(view rui.View)`, + // `func()`. PointerUp = "pointer-up" // PointerMove is the constant for "pointer-move" property tag. - // The "pointer-move" event is fired when a pointer changes coordinates. - // The main listener format: func(View, PointerEvent). - // The additional listener formats: func(PointerEvent), func(View), and func(). + // + // Used by `View`. + // Is fired when a pointer changes coordinates. + // + // General listener format: + // `func(view rui.View, event rui.PointerEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Pointer event. + // + // Allowed listener formats: + // `func(event rui.PointerEvent)`, + // `func(view rui.View)`, + // `func()`. PointerMove = "pointer-move" // PointerCancel is the constant for "pointer-cancel" property tag. - // The "pointer-cancel" event is fired if the pointer will no longer be able to generate events - // (for example the related device is deactivated). - // The main listener format: func(View, PointerEvent). - // The additional listener formats: func(PointerEvent), func(View), and func(). + // + // Used by `View`. + // Is fired if the pointer will no longer be able to generate events (for example the related device is deactivated). + // + // General listener format: + // `func(view rui.View, event rui.PointerEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Pointer event. + // + // Allowed listener formats: + // `func(event rui.PointerEvent)`, + // `func(view rui.View)`, + // `func()`. PointerCancel = "pointer-cancel" // PointerOut is the constant for "pointer-out" property tag. - // The "pointer-out" event is fired for several reasons including: pointing device is moved out - // of the hit test boundaries of an element; firing the pointerup event for a device - // that does not support hover (see "pointer-up"); after firing the pointercancel event (see "pointer-cancel"); - // when a pen stylus leaves the hover range detectable by the digitizer. - // The main listener format: func(View, PointerEvent). - // The additional listener formats: func(PointerEvent), func(View), and func(). + // + // Used by `View`. + // Is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing + // the "pointer-up" event for a device that does not support hover (see "pointer-up"); after firing the "pointer-cancel" + // event (see "pointer-cancel"); when a pen stylus leaves the hover range detectable by the digitizer. + // + // General listener format: + // `func(view rui.View, event rui.PointerEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Pointer event. + // + // Allowed listener formats: + // `func(event rui.PointerEvent)`, + // `func(view rui.View)`, + // `func()`. PointerOut = "pointer-out" // PointerOver is the constant for "pointer-over" property tag. - // The "pointer-over" event is fired when a pointing device is moved into an view's hit test boundaries. - // The main listener format: func(View, PointerEvent). - // The additional listener formats: func(PointerEvent), func(View), and func(). + // + // Used by `View`. + // Is fired when a pointing device is moved into an view's hit test boundaries. + // + // General listener format: + // `func(view rui.View, event rui.PointerEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Pointer event. + // + // Allowed listener formats: + // `func(event rui.PointerEvent)`, + // `func(view rui.View)`, + // `func()`. PointerOver = "pointer-over" ) diff --git a/popup.go b/popup.go index 401c6aa..e388b11 100644 --- a/popup.go +++ b/popup.go @@ -6,59 +6,152 @@ import ( // Constants for [Popup] specific properties and events const ( - // Title is the constant for the "title" property tag. - // The "title" property is defined the Popup/Tabs title + // Title is the constant for "title" property tag. + // + // Used by `Popup`, `TabsLayout`. + // + // Usage in `Popup`: + // Define the title. + // + // Supported types: `string`. + // + // Usage in `TabsLayout`: + // Set the title of the tab. The property is set for the child view of `TabsLayout`. + // + // Supported types: `string`. Title = "title" - // TitleStyle is the constant for the "title-style" property tag. - // The "title-style" string property is used to set the title style of the Popup. + // TitleStyle is the constant for "title-style" property tag. + // + // Used by `Popup`. + // Set popup title style. Default title style is "ruiPopupTitle". + // + // Supported types: `string`. TitleStyle = "title-style" - // CloseButton is the constant for the "close-button" property tag. - // The "close-button" bool property allow to add the close button to the Popup. - // Setting this property to "true" adds a window close button to the title bar (the default value is "false"). + // CloseButton is the constant for "close-button" property tag. + // + // Used by `Popup`. + // Controls whether a close button can be added to the popup. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Close button will be added to a title bar of a window. + // `false` or `0` or "false", "no", "off", "0" - Popup without a close button. CloseButton = "close-button" - // OutsideClose is the constant for the "outside-close" property tag. - // The "outside-close" is a bool property. If it is set to "true", - // then clicking outside the popup window automatically calls the Dismiss() method. + // OutsideClose is the constant for "outside-close" property tag. + // + // Used by `Popup`. + // Controls whether popup can be closed by clicking outside of the window. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Clicking outside the popup window will automatically call the `Dismiss()` method. + // `false` or `0` or "false", "no", "off", "0" - Clicking outside the popup window has no effect. OutsideClose = "outside-close" - // Buttons is the constant for the "buttons" property tag. - // Using the "buttons" property you can add buttons that will be placed at the bottom of the Popup. - // The "buttons" property can be assigned the following data types: PopupButton and []PopupButton + // Buttons is the constant for "buttons" property tag. + // + // Used by `Popup`. + // Buttons that will be placed at the bottom of the popup. + // + // Supported types: `PopupButton`, `[]PopupButton`. + // + // Internal type is `[]PopupButton`, other types converted to it during assignment. + // See `PopupButton` description for more details. Buttons = "buttons" - // ButtonsAlign is the constant for the "buttons-align" property tag. - // The "buttons-align" int property is used for set the horizontal alignment of Popup buttons. - // Valid values: LeftAlign (0), RightAlign (1), CenterAlign (2), and StretchAlign (3) + // ButtonsAlign is the constant for "buttons-align" property tag. + // + // Used by `Popup`. + // Set the horizontal alignment of popup buttons. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Width alignment. ButtonsAlign = "buttons-align" - // DismissEvent is the constant for the "dismiss-event" property tag. - // The "dismiss-event" event is used to track the closing of the Popup. - // It occurs after the Popup disappears from the screen. - // The main listener for this event has the following format: func(Popup) + // DismissEvent is the constant for "dismiss-event" property tag. + // + // Used by `Popup`. + // Used to track the closing state of the `Popup`. It occurs after the `Popup` disappears from the screen. + // + // General listener format: + // `func(popup rui.Popup)`. + // + // where: + // popup - Interface of a popup which generated this event. + // + // Allowed listener formats: + // `func()`. DismissEvent = "dismiss-event" - // Arrow is the constant for the "arrow" property tag. - // Using the "popup-arrow" int property you can add ... + // Arrow is the constant for "arrow" property tag. + // + // Used by `Popup`. + // Add an arrow to popup. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneArrow`) or "none" - No arrow. + // `1`(`TopArrow`) or "top" - Arrow at the top side of the pop-up window. + // `2`(`RightArrow`) or "right" - Arrow on the right side of the pop-up window. + // `3`(`BottomArrow`) or "bottom" - Arrow at the bottom of the pop-up window. + // `4`(`LeftArrow`) or "left" - Arrow on the left side of the pop-up window. Arrow = "arrow" - // ArrowAlign is the constant for the "arrow-align" property tag. - // The "arrow-align" int property is used for set the horizontal alignment of the Popup arrow. - // Valid values: LeftAlign (0), RightAlign (1), TopAlign (0), BottomAlign (1), CenterAlign (2) + // ArrowAlign is the constant for "arrow-align" property tag. + // + // Used by `Popup`. + // Set the horizontal alignment of the popup arrow. Default value is "center". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`/`LeftAlign`) or "top" - Top/left alignment. + // `1`(`BottomAlign`/`RightAlign`) or "bottom" - Bottom/right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. ArrowAlign = "arrow-align" - // ArrowSize is the constant for the "arrow-size" property tag. - // The "arrow-size" SizeUnit property is used for set the size (length) of the Popup arrow. + // ArrowSize is the constant for "arrow-size" property tag. + // + // Used by `Popup`. + // Set the size(length) of the popup arrow. Default value is 16px defined by @ruiArrowSize constant. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ArrowSize = "arrow-size" - // ArrowWidth is the constant for the "arrow-width" property tag. - // The "arrow-width" SizeUnit property is used for set the width of the Popup arrow. + // ArrowWidth is the constant for "arrow-width" property tag. + // + // Used by `Popup`. + // Set the width of the popup arrow. Default value is 16px defined by @ruiArrowWidth constant. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ArrowWidth = "arrow-width" - // ArrowOffset is the constant for the "arrow-offset" property tag. - // The "arrow-offset" SizeUnit property is used for set the offset of the Popup arrow. + // ArrowOffset is the constant for "arrow-offset" property tag. + // + // Used by `Popup`. + // Set the offset of the popup arrow. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ArrowOffset = "arrow-offset" // NoneArrow is value of the popup "arrow" property: no arrow @@ -85,8 +178,10 @@ const ( const ( // NormalButton is the constant of the popup button type: the normal button NormalButton PopupButtonType = 0 + // DefaultButton is the constant of the popup button type: button that fires when the "Enter" key is pressed DefaultButton PopupButtonType = 1 + // CancelButton is the constant of the popup button type: button that fires when the "Escape" key is pressed CancelButton PopupButtonType = 2 ) diff --git a/popupUtils.go b/popupUtils.go index be23b1e..10ae910 100644 --- a/popupUtils.go +++ b/popupUtils.go @@ -152,9 +152,12 @@ func (popup *popupMenuData) IsListItemEnabled(index int) bool { return true } -// PopupMenuResult is the constant for the "popup-menu-result" property tag. -// The "popup-menu-result" property sets the function (format: func(int)) to be called when -// a menu item of popup menu is selected. +// PopupMenuResult is the constant for "popup-menu-result" property tag. +// +// Used by `Popup`. +// Set the function to be called when the menu item of popup menu is selected. +// +// Supported types: `func(index int)`. const PopupMenuResult = "popup-menu-result" // ShowMenu displays the menu. Menu items are set using the Items property. diff --git a/progressBar.go b/progressBar.go index 4744294..cd7e6ce 100644 --- a/progressBar.go +++ b/progressBar.go @@ -8,11 +8,23 @@ import ( // Constants for [ProgressBar] specific properties and events const ( // ProgressBarMax is the constant for "progress-max" property tag. - // The "progress-max" define maximum value of the ProgressBar, default is 1. + // + // Used by `ProgressBar`. + // Maximum value, default is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. ProgressBarMax = "progress-max" // ProgressBarValue is the constant for "progress-value" property tag. - // The "progress-value" define current value of the ProgressBar, default is 0. + // + // Used by `ProgressBar`. + // Current value, default is 0. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. ProgressBarValue = "progress-value" ) diff --git a/propertyNames.go b/propertyNames.go index e3d9d44..8189099 100644 --- a/propertyNames.go +++ b/propertyNames.go @@ -2,724 +2,2752 @@ package rui // Constants for various properties and events of Views'. const ( - // ID is the constant for the "id" property tag. - // The "id" property is an optional textual identifier for the View. + // ID is the constant for "id" property tag. + // + // Used by `View`, `Animation`. + // + // Usage in `View`: + // Optional textual identifier for the view. Used to reference view from source code if needed. + // + // Supported types: `string`. + // + // Usage in `Animation`: + // Specifies the animation identifier. Used only for animation script. + // + // Supported types: `string`. ID = "id" - // Style is the constant for the "style" property tag. - // The string "style" property sets the name of the style that is applied to the View when the "disabled" property is set to false - // or "style-disabled" property is not defined. + // Style is the constant for "style" property tag. + // + // Used by `ColumnSeparatorProperty`, `View`, `BorderProperty`, `OutlineProperty`. + // + // Usage in `ColumnSeparatorProperty`: + // Line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The separator will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a separator. + // `2`(`DashedLine`) or "dashed" - Dashed line as a separator. + // `3`(`DottedLine`) or "dotted" - Dotted line as a separator. + // `4`(`DoubleLine`) or "double" - Double line as a separator. + // + // Usage in `View`: + // Sets the name of the style that is applied to the view when the "disabled" property is set to false or "style-disabled" + // property is not defined. + // + // Supported types: `string`. + // + // Usage in `BorderProperty`: + // Border line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. + // + // Usage in `OutlineProperty`: + // Outline line style. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The outline will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as an outline. + // `2`(`DashedLine`) or "dashed" - Dashed line as an outline. + // `3`(`DottedLine`) or "dotted" - Dotted line as an outline. + // `4`(`DoubleLine`) or "double" - Double line as an outline. Style = "style" - // StyleDisabled is the constant for the "style-disabled" property tag. - // The string "style-disabled" property sets the name of the style that is applied to the View when the "disabled" property is set to true. + // StyleDisabled is the constant for "style-disabled" property tag. + // + // Used by `View`. + // Sets the name of the style that is applied to the view when the "disabled" property is set to true. + // + // Supported types: `string`. StyleDisabled = "style-disabled" - // Disabled is the constant for the "disabled" property tag. - // The bool "disabled" property allows/denies the View to receive focus. + // Disabled is the constant for "disabled" property tag. + // + // Used by `ViewsContainer`. + // Controls whether the view can receive focus and which style to use. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - View can't receive focus and "style-disabled" style will be used by the view. + // `false` or `0` or "false", "no", "off", "0" - View can receive focus and "style" style will be used by the view. Disabled = "disabled" - // Focusable is the constant for the "disabled" property tag. - // The bool "focusable" determines whether the view will receive focus. + // Focusable is the constant for "focusable" property tag. + // + // Used by `View`. + // Controls whether view can receive focus. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - View can have a focus. + // `false` or `0` or "false", "no", "off", "0" - View can't have a focus. Focusable = "focusable" - // Semantics is the constant for the "semantics" property tag. - // The "semantics" property defines the semantic meaning of the View. - // This property may have no visible effect, but it allows search engines to understand the structure of your application. - // It also helps to voice the interface to systems for people with disabilities. + // Semantics is the constant for "semantics" property tag. + // + // Used by `View`. + // Defines the semantic meaning of the view. This property may have no visible effect, but it allows search engines to + // understand the structure of your application. It also helps to voice the interface to systems for people with + // disabilities. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`DefaultSemantics`) or "default" - Default semantics. + // `1`(`ArticleSemantics`) or "article" - Article semantics. + // `2`(`SectionSemantics`) or "section" - Section semantics. + // `3`(`AsideSemantics`) or "aside" - Aside semantics. + // `4`(`HeaderSemantics`) or "header" - Header semantics. + // `5`(`MainSemantics`) or "main" - Main semantics. + // `6`(`FooterSemantics`) or "footer" - Footer semantics. + // `7`(`NavigationSemantics`) or "navigation" - Navigation semantics. + // `8`(`FigureSemantics`) or "figure" - Figure semantics. + // `9`(`FigureCaptionSemantics`) or "figure-caption" - Figure caption semantics. + // `10`(`ButtonSemantics`) or "button" - Button semantics. + // `11`(`ParagraphSemantics`) or "p" - Paragraph semantics. + // `12`(`H1Semantics`) or "h1" - Heading level 1 semantics. + // `13`(`H2Semantics`) or "h2" - Heading level 2 semantics. + // `14`(`H3Semantics`) or "h3" - Heading level 3 semantics. + // `15`(`H4Semantics`) or "h4" - Heading level 4 semantics. + // `16`(`H5Semantics`) or "h5" - Heading level 5 semantics. + // `17`(`H6Semantics`) or "h6" - Heading level 6 semantics. + // `18`(`BlockquoteSemantics`) or "blockquote" - Blockquote semantics. + // `19`(`CodeSemantics`) or "code" - Code semantics. Semantics = "semantics" - // Visibility is the constant for the "visibility" property tag. - // The "visibility" int property specifies the visibility of the View. Valid values are - // * Visible (0) - the View is visible (default value); - // * Invisible (1) - the View is invisible but takes up space; - // * Gone (2) - the View is invisible and does not take up space. + // Visibility is the constant for "visibility" property tag. + // + // Used by `View`. + // Specifies the visibility of the view. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`Visible`) or "visible" - The view is visible. + // `1`(`Invisible`) or "invisible" - The view is invisible but takes up space. + // `2`(`Gone`) or "gone" - The view is invisible and does not take up space. Visibility = "visibility" - // ZIndex is the constant for the "z-index" property tag. - // The int "z-index" property sets the z-order of a positioned view. - // Overlapping views with a larger z-index cover those with a smaller one. + // ZIndex is the constant for "z-index" property tag. + // + // Used by `View`. + // Sets the z-order of a positioned view. Overlapping views with a larger z-index cover those with a smaller one. + // + // Supported types: `int`, `string`. + // + // Values: + // < `0` or < "0" - Views with lower value will be behind views with higher value. + // >= `0` or >= "0" - Views with higher value will be on top of views with lower value. ZIndex = "z-index" - // Opacity is the constant for the "opacity" property tag. - // The float "opacity" property in [1..0] range sets the opacity of an element. - // Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. + // Opacity is the constant for "opacity" property tag. + // + // Used by `View`, `ViewFilter`. + // + // Usage in `View`: + // In [1..0] range sets the opacity of view. Opacity is the degree to which content behind the view is hidden, and is the + // opposite of transparency. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `ViewFilter`: + // Opacity is the degree to which content behind the view is hidden, and is the opposite of transparency. Value is in + // range 0% to 100%, where 0% is fully transparent. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Opacity = "opacity" - // Overflow is the constant for the "overflow" property tag. - // The "overflow" int property sets the desired behavior for an element's overflow — i.e. - // when an element's content is too big to fit in its block formatting context — in both directions. - // Valid values: OverflowHidden (0), OverflowVisible (1), OverflowScroll (2), OverflowAuto (3) + // Overflow is the constant for "overflow" property tag. + // + // Used by `View`. + // Set the desired behavior for an element's overflow i.e. when an element's content is too big to fit in its block + // formatting context in both directions. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`OverflowHidden`) or "hidden" - The overflow is clipped, and the rest of the content will be invisible. + // `1`(`OverflowVisible`) or "visible" - The overflow is not clipped. The content renders outside the element's box. + // `2`(`OverflowScroll`) or "scroll" - The overflow is clipped, and a scrollbar is added to see the rest of the content. + // `3`(`OverflowAuto`) or "auto" - Similar to `OverflowScroll`, but it adds scrollbars only when necessary. Overflow = "overflow" - // Row is the constant for the "row" property tag. + // Row is the constant for "row" property tag. + // + // Used by `View`. + // Row of the view inside the container like `GridLayout`. + // + // Supported types: `Range`, `int`, `string`. + // + // Internal type is `Range`, other types converted to it during assignment. + // + // Conversion rules: + // `int` - set single value(index). + // `string` - can contain single integer value(index) or a range of integer values(indices), examples: "0", "0:3". Row = "row" - // Column is the constant for the "column" property tag. + // Column is the constant for "column" property tag. + // + // Used by `View`. + // Column of the view inside the container like `GridLayout`. + // + // Supported types: `Range`, `int`, `string`. + // + // Internal type is `Range`, other types converted to it during assignment. + // + // Conversion rules: + // `int` - set single value(index). + // `string` - can contain single integer value(index) or a range of integer values(indices), examples: "0", "0:3". Column = "column" - // Left is the constant for the "left" property tag. - // The "left" SizeUnit property participates in specifying the left border position of a positioned view. - // Used only for views placed in an AbsoluteLayout. + // Left is the constant for "left" property tag. + // + // Used by `View`, `BoundsProperty`, `ClipShape`. + // + // Usage in `View`: + // Offset from left border of the container. Used only for views placed in an `AbsoluteLayout`. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `BoundsProperty`: + // Left bound value. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ClipShape`: + // Specifies the left border position of inset clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Left = "left" - // Right is the constant for the "right" property tag. - // The "right" SizeUnit property participates in specifying the right border position of a positioned view. - // Used only for views placed in an AbsoluteLayout. + // Right is the constant for "right" property tag. + // + // Used by `View`, `BoundsProperty`, `ClipShape`. + // + // Usage in `View`: + // Offset from right border of the container. Used only for views placed in an `AbsoluteLayout`. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `BoundsProperty`: + // Right bound value. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ClipShape`: + // Specifies the right border position of inset clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Right = "right" - // Top is the constant for the "top" property tag. - // The "top" SizeUnit property participates in specifying the top border position of a positioned view. - // Used only for views placed in an AbsoluteLayout. + // Top is the constant for "top" property tag. + // + // Used by `View`, `BoundsProperty`, `ClipShape`. + // + // Usage in `View`: + // Offset from top border of the container. Used only for views placed in an `AbsoluteLayout`. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `BoundsProperty`: + // Top bound value. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ClipShape`: + // Specifies the top border position of inset clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Top = "top" - // Bottom is the constant for the "bottom" property tag. - // The "bottom" SizeUnit property participates in specifying the bottom border position of a positioned view. - // Used only for views placed in an AbsoluteLayout. + // Bottom is the constant for "bottom" property tag. + // + // Used by `View`, `BoundsProperty`, `ClipShape`. + // + // Usage in `View`: + // Offset from bottom border of the container. Used only for views placed in an `AbsoluteLayout`. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `BoundsProperty`: + // Bottom bound value. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ClipShape`: + // Specifies the bottom border position of inset clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Bottom = "bottom" - // Width is the constant for the "width" property tag. - // The "width" SizeUnit property sets an view's width. + // Width is the constant for "width" property tag. + // + // Used by `ColumnSeparatorProperty`, `View`, `BorderProperty`, `OutlineProperty`. + // + // Usage in `ColumnSeparatorProperty`: + // Line width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `View`: + // Set a view's width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `BorderProperty`: + // Border line width. + // + // Supported types: `SizeUnit`, `string`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `OutlineProperty`: + // Outline line width. + // + // Supported types: `SizeUnit`, `string`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Width = "width" - // Height is the constant for the "height" property tag. - // The "height" SizeUnit property sets an view's height. + // Height is the constant for "height" property tag. + // + // Used by `View`. + // Set a view's height. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Height = "height" - // MinWidth is the constant for the "min-width" property tag. - // The "width" SizeUnit property sets an view's minimal width. + // MinWidth is the constant for "min-width" property tag. + // + // Used by `View`. + // Set a view's minimal width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MinWidth = "min-width" - // MinHeight is the constant for the "min-height" property tag. - // The "height" SizeUnit property sets an view's minimal height. + // MinHeight is the constant for "min-height" property tag. + // + // Used by `View`. + // Set a view's minimal height. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MinHeight = "min-height" - // MaxWidth is the constant for the "max-width" property tag. - // The "width" SizeUnit property sets an view's maximal width. + // MaxWidth is the constant for "max-width" property tag. + // + // Used by `View`. + // Set a view's maximal width. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MaxWidth = "max-width" - // MaxHeight is the constant for the "max-height" property tag. - // The "height" SizeUnit property sets an view's maximal height. + // MaxHeight is the constant for "max-height" property tag. + // + // Used by `View`. + // Set a view's maximal height. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MaxHeight = "max-height" - // Margin is the constant for the "margin" property tag. - // The "margin" property sets the margin area on all four sides of an element. - // ... + // Margin is the constant for "margin" property tag. + // + // Used by `View`. + // Set the margin area on all four sides of an element. + // + // Supported types: `BoundsProperty`, `Bounds`, `SizeUnit`, `float32`, `float64`, `int`, `string`. + // + // Internal type could be `BoundsProperty` or `SizeUnit` depending on whether single value or multiple values has been set, other types converted to them during assignment. + // See `BoundsProperty`, `Bounds`, `SizeUnit` for more information. + // + // Conversion rules: + // `BoundsProperty` - stored as is, no conversion performed. + // `Bounds` - new `BoundsProperty` will be created and corresponding values for top, right, bottom and left border will be set. + // `SizeUnit` - stored as is and the same value will be used for all borders. + // `float` - new `SizeUnit` will be created and the same value(in pixels) will be used for all borders. + // `int` - new `SizeUnit` will be created and the same value(in pixels) will be used for all borders. + // `string` - can contain one or four `SizeUnit` separated with comma(`,`). In case one value will be provided a new `SizeUnit` will be created and the same value will be used for all borders. If four values will be provided then they will be set respectively for top, right, bottom and left border. Margin = "margin" - // MarginLeft is the constant for the "margin-left" property tag. - // The "margin-left" SizeUnit property sets the margin area on the left of a view. - // A positive value places it farther from its neighbors, while a negative value places it closer. + // MarginLeft is the constant for "margin-left" property tag. + // + // Used by `View`. + // Set the margin area on the left of a view. A positive value places it farther from its neighbors, while a negative + // value places it closer. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MarginLeft = "margin-left" - // MarginRight is the constant for the "margin-right" property tag. - // The "margin-right" SizeUnit property sets the margin area on the right of a view. - // A positive value places it farther from its neighbors, while a negative value places it closer. + // MarginRight is the constant for "margin-right" property tag. + // + // Used by `View`. + // Set the margin area on the right of a view. A positive value places it farther from its neighbors, while a negative + // value places it closer. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MarginRight = "margin-right" - // MarginTop is the constant for the "margin-top" property tag. - // The "margin-top" SizeUnit property sets the margin area on the top of a view. - // A positive value places it farther from its neighbors, while a negative value places it closer. + // MarginTop is the constant for "margin-top" property tag. + // + // Used by `View`. + // Set the margin area on the top of a view. A positive value places it farther from its neighbors, while a negative value + // places it closer. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MarginTop = "margin-top" - // MarginBottom is the constant for the "margin-bottom" property tag. - // The "margin-bottom" SizeUnit property sets the margin area on the bottom of a view. - // A positive value places it farther from its neighbors, while a negative value places it closer. + // MarginBottom is the constant for "margin-bottom" property tag. + // + // Used by `View`. + // Set the margin area on the bottom of a view. A positive value places it farther from its neighbors, while a negative + // value places it closer. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. MarginBottom = "margin-bottom" - // Padding is the constant for the "padding" property tag. - // The "padding" Bounds property sets the padding area on all four sides of a view at once. - // An element's padding area is the space between its content and its border. + // Padding is the constant for "padding" property tag. + // + // Used by `View`. + // Sets the padding area on all four sides of a view at once. An element's padding area is the space between its content + // and its border. + // + // Supported types: `BoundsProperty`, `Bounds`, `SizeUnit`, `float32`, `float64`, `int`, `string`. + // + // Internal type could be `BoundsProperty` or `SizeUnit` depending on whether single value or multiple values has been set, other types converted to them during assignment. + // See `BoundsProperty`, `Bounds`, `SizeUnit` for more information. + // + // Conversion rules: + // `BoundsProperty` - stored as is, no conversion performed. + // `Bounds` - new `BoundsProperty` will be created and corresponding values for top, right, bottom and left border will be set. + // `SizeUnit` - stored as is and the same value will be used for all borders. + // `float` - new `SizeUnit` will be created and the same value(in pixels) will be used for all borders. + // `int` - new `SizeUnit` will be created and the same value(in pixels) will be used for all borders. + // `string` - can contain one or four `SizeUnit` separated with comma(`,`). In case one value will be provided a new `SizeUnit` will be created and the same value will be used for all borders. If four values will be provided then they will be set respectively for top, right, bottom and left border. Padding = "padding" - // PaddingLeft is the constant for the "padding-left" property tag. - // The "padding-left" SizeUnit property sets the width of the padding area to the left of a view. + // PaddingLeft is the constant for "padding-left" property tag. + // + // Used by `View`. + // Set the width of the padding area to the left of a view. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. PaddingLeft = "padding-left" - // PaddingRight is the constant for the "padding-right" property tag. - // The "padding-right" SizeUnit property sets the width of the padding area to the right of a view. + // PaddingRight is the constant for "padding-right" property tag. + // + // Used by `View`. + // Set the width of the padding area to the right of a view. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. PaddingRight = "padding-right" - // PaddingTop is the constant for the "padding-top" property tag. - // The "padding-top" SizeUnit property sets the height of the padding area to the top of a view. + // PaddingTop is the constant for "padding-top" property tag. + // + // Used by `View`. + // Set the height of the padding area to the top of a view. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. PaddingTop = "padding-top" - // PaddingBottom is the constant for the "padding-bottom" property tag. - // The "padding-bottom" SizeUnit property sets the height of the padding area to the bottom of a view. + // PaddingBottom is the constant for "padding-bottom" property tag. + // + // Used by `View`. + // Set the height of the padding area to the bottom of a view. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. PaddingBottom = "padding-bottom" - // AccentColor is the constant for the "accent-color" property tag. - // The "accent-color" property sets sets the accent color for UI controls generated by some elements. + // AccentColor is the constant for "accent-color" property tag. + // + // Used by `View`. + // Sets the accent color for UI controls generated by some elements. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. AccentColor = "accent-color" - // BackgroundColor is the constant for the "background-color" property tag. - // The "background-color" property sets the background color of a view. + // BackgroundColor is the constant for "background-color" property tag. + // + // Used by `View`. + // Set the background color of a view. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BackgroundColor = "background-color" - // Background is the constant for the "background" property tag. - // The "background" property sets one or more background images and/or gradients on a view. - // ... + // Background is the constant for "background" property tag. + // + // Used by `View`. + // Set one or more background images and/or gradients for the view. + // + // Supported types: `BackgroundElement`, `[]BackgroundElement`, `string`. + // + // Internal type is `[]BackgroundElement`, other types converted to it during assignment. + // See `BackgroundElement` description for more details. + // + // Conversion rules: + // `string` - must contain text representation of background element(s) like in resource files. Background = "background" - // Cursor is the constant for the "cursor" property tag. - // The "cursor" int property sets the type of mouse cursor, if any, to show when the mouse pointer is over a view - // Valid values are "auto" (0), "default" (1), "none" (2), "context-menu" (3), "help" (4), "pointer" (5), - // "progress" (6), "wait" (7), "cell" (8), "crosshair" (9), "text" (10), "vertical-text" (11), "alias" (12), - // "copy" (13), "move" (14), "no-drop" (15), "not-allowed" (16), "e-resize" (17), "n-resize" (18), - // "ne-resize" (19), "nw-resize" (20), "s-resize" (21), "se-resize" (22), "sw-resize" (23), "w-resize" (24), - // "ew-resize" (25), "ns-resize" (26), "nesw-resize" (27), "nwse-resize" (28), "col-resize" (29), - // "row-resize" (30), "all-scroll" (31), "zoom-in" (32), "zoom-out" (33), "grab" (34), "grabbing" (35). + // Cursor is the constant for "cursor" property tag. + // + // Used by `View`. + // Sets the type of mouse cursor, if any, to show when the mouse pointer is over the view. + // + // Supported types: `int`, `string`. + // + // Values: + // `0` or "auto" - Auto cursor. + // `1` or "default" - Default cursor. + // `2` or "none" - None cursor. + // `3` or "context-menu" - Context menu cursor. + // `4` or "help" - Help cursor. + // `5` or "pointer" - Pointer cursor. + // `6` or "progress" - Progress cursor. + // `7` or "wait" - Wait cursor. + // `8` or "cell" - Cell cursor. + // `9` or "crosshair" - Crosshair cursor. + // `10` or "text" - Text cursor. + // `11` or "vertical-text" - Vertical text cursor. + // `12` or "alias" - Alias cursor. + // `13` or "copy" - Copy cursor. + // `14` or "move" - Move cursor. + // `15` or "no-drop" - No drop cursor. + // `16` or "not-allowed" - Not allowed cursor. + // `17` or "e-resize" - Resize cursor. + // `18` or "n-resize" - Resize cursor. + // `19` or "ne-resize" - Resize cursor. + // `20` or "nw-resize" - Resize cursor. + // `21` or "s-resize" - Resize cursor. + // `22` or "se-resize" - Resize cursor. + // `23` or "sw-resize" - Resize cursor. + // `24` or "w-resize" - Resize cursor. + // `25` or "ew-resize" - Resize cursor. + // `26` or "ns-resize" - Resize cursor. + // `27` or "nesw-resize" - Resize cursor. + // `28` or "nwse-resize" - Resize cursor. + // `29` or "col-resize" - Col resize cursor. + // `30` or "row-resize" - Row resize cursor. + // `31` or "all-scroll" - All scroll cursor. + // `32` or "zoom-in" - Zoom in cursor. + // `33` or "zoom-out" - Zoom out cursor. + // `34` or "grab" - Grab cursor. + // `35` or "grabbing" - Grabbing cursor. Cursor = "cursor" - // Border is the constant for the "border" property tag. - // The "border" property sets a view's border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // Border is the constant for "border" property tag. + // + // Used by `View`. + // Set a view's border. It sets the values of a border width, style, and color. + // + // Supported types: `BorderProperty`, `ViewBorder`, `ViewBorders`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `BorderProperty`, `ViewBorder`, `ViewBorders` description for more details. + // + // Conversion rules: + // `ViewBorder` - style, width and color applied to all borders and stored in internal implementation of `BorderProperty`. + // `ViewBorders` - style, width and color of each border like top, right, bottom and left applied to related borders, stored in internal implementation of `BorderProperty`. Border = "border" - // BorderLeft is the constant for the "border-left" property tag. - // The "border-left" property sets a view's left border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // BorderLeft is the constant for "border-left" property tag. + // + // Used by `View`. + // Set a view's left border. It sets the values of a border width, style, and color. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder`, `BorderProperty` description for more details. BorderLeft = "border-left" - // BorderRight is the constant for the "border-right" property tag. - // The "border-right" property sets a view's right border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // BorderRight is the constant for "border-right" property tag. + // + // Used by `View`. + // Set a view's right border. It sets the values of a border width, style, and color. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder`, `BorderProperty` description for more details. BorderRight = "border-right" - // BorderTop is the constant for the "border-top" property tag. - // The "border-top" property sets a view's top border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // BorderTop is the constant for "border-top" property tag. + // + // Used by `View`. + // Set a view's top border. It sets the values of a border width, style, and color. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder`, `BorderProperty` description for more details. BorderTop = "border-top" - // BorderBottom is the constant for the "border-bottom" property tag. - // The "border-bottom" property sets a view's bottom border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // BorderBottom is the constant for "border-bottom" property tag. + // + // Used by `View`. + // Set a view's bottom border. It sets the values of a border width, style, and color. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder`, `BorderProperty` description for more details. BorderBottom = "border-bottom" - // BorderStyle is the constant for the "border-style" property tag. - // The "border-style" property sets the line style for all four sides of a view's border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // BorderStyle is the constant for "border-style" property tag. + // + // Used by `View`. + // Set the line style for all four sides of a view's border. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. BorderStyle = "border-style" - // BorderLeftStyle is the constant for the "border-left-style" property tag. - // The "border-left-style" int property sets the line style of a view's left border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // BorderLeftStyle is the constant for "border-left-style" property tag. + // + // Used by `View`. + // Set the line style of a view's left border. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. BorderLeftStyle = "border-left-style" - // BorderRightStyle is the constant for the "border-right-style" property tag. - // The "border-right-style" int property sets the line style of a view's right border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // BorderRightStyle is the constant for "border-right-style" property tag. + // + // Used by `View`. + // Set the line style of a view's right border. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. BorderRightStyle = "border-right-style" - // BorderTopStyle is the constant for the "border-top-style" property tag. - // The "border-top-style" int property sets the line style of a view's top border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // BorderTopStyle is the constant for "border-top-style" property tag. + // + // Used by `View`. + // Set the line style of a view's top border. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. BorderTopStyle = "border-top-style" - // BorderBottomStyle is the constant for the "border-bottom-style" property tag. - // The "border-bottom-style" int property sets the line style of a view's bottom border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // BorderBottomStyle is the constant for "border-bottom-style" property tag. + // + // Used by `View`. + // Sets the line style of a view's bottom border. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. BorderBottomStyle = "border-bottom-style" - // BorderWidth is the constant for the "border-width" property tag. - // The "border-width" property sets the line width for all four sides of a view's border. + // BorderWidth is the constant for "border-width" property tag. + // + // Used by `View`. + // Set the line width for all four sides of a view's border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BorderWidth = "border-width" - // BorderLeftWidth is the constant for the "border-left-width" property tag. - // The "border-left-width" SizeUnit property sets the line width of a view's left border. + // BorderLeftWidth is the constant for "border-left-width" property tag. + // + // Used by `View`. + // Set the line width of a view's left border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BorderLeftWidth = "border-left-width" - // BorderRightWidth is the constant for the "border-right-width" property tag. - // The "border-right-width" SizeUnit property sets the line width of a view's right border. + // BorderRightWidth is the constant for "border-right-width" property tag. + // + // Used by `View`. + // Set the line width of a view's right border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BorderRightWidth = "border-right-width" - // BorderTopWidth is the constant for the "border-top-width" property tag. - // The "border-top-width" SizeUnit property sets the line width of a view's top border. + // BorderTopWidth is the constant for "border-top-width" property tag. + // + // Used by `View`. + // Set the line width of a view's top border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BorderTopWidth = "border-top-width" - // BorderBottomWidth is the constant for the "border-bottom-width" property tag. - // The "border-bottom-width" SizeUnit property sets the line width of a view's bottom border. + // BorderBottomWidth is the constant for "border-bottom-width" property tag. + // + // Used by `View`. + // Set the line width of a view's bottom border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BorderBottomWidth = "border-bottom-width" - // BorderColor is the constant for the "border-color" property tag. - // The "border-color" property sets the line color for all four sides of a view's border. + // BorderColor is the constant for "border-color" property tag. + // + // Used by `View`. + // Set the line color for all four sides of a view's border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BorderColor = "border-color" - // BorderLeftColor is the constant for the "border-left-color" property tag. - // The "border-left-color" property sets the line color of a view's left border. + // BorderLeftColor is the constant for "border-left-color" property tag. + // + // Used by `View`. + // Set the line color of a view's left border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BorderLeftColor = "border-left-color" - // BorderRightColor is the constant for the "border-right-color" property tag. - // The "border-right-color" property sets the line color of a view's right border. + // BorderRightColor is the constant for "border-right-color" property tag. + // + // Used by `View`. + // Set the line color of a view's right border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BorderRightColor = "border-right-color" - // BorderTopColor is the constant for the "border-top-color" property tag. - // The "border-top-color" property sets the line color of a view's top border. + // BorderTopColor is the constant for "border-top-color" property tag. + // + // Used by `View`. + // Set the line color of a view's top border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BorderTopColor = "border-top-color" - // BorderBottomColor is the constant for the "border-bottom-color" property tag. - // The "border-bottom-color" property sets the line color of a view's bottom border. + // BorderBottomColor is the constant for "border-bottom-color" property tag. + // + // Used by `View`. + // Set the line color of a view's bottom border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. BorderBottomColor = "border-bottom-color" - // Outline is the constant for the "outline" property tag. - // The "border" property sets a view's outline. It sets the values of an outline width, style, and color. + // Outline is the constant for "outline" property tag. + // + // Used by `View`. + // Set a view's outline. It sets the values of an outline width, style, and color. + // + // Supported types: `OutlineProperty`, `ViewOutline`, `ViewBorder`. + // + // Internal type is `OutlineProperty`, other types converted to it during assignment. + // See `OutlineProperty`, `ViewOutline` and `ViewBorder` description for more details. Outline = "outline" - // OutlineStyle is the constant for the "outline-style" property tag. - // The "outline-style" int property sets the style of an view's outline. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // OutlineStyle is the constant for "outline-style" property tag. + // + // Used by `View`. + // Set the style of an view's outline. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The outline will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as an outline. + // `2`(`DashedLine`) or "dashed" - Dashed line as an outline. + // `3`(`DottedLine`) or "dotted" - Dotted line as an outline. + // `4`(`DoubleLine`) or "double" - Double line as an outline. OutlineStyle = "outline-style" - // OutlineColor is the constant for the "outline-color" property tag. - // The "outline-color" property sets the color of an view's outline. + // OutlineColor is the constant for "outline-color" property tag. + // + // Used by `View`. + // Set the color of an view's outline. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. OutlineColor = "outline-color" - // OutlineWidth is the constant for the "outline-width" property tag. - // The "outline-width" SizeUnit property sets the width of an view's outline. + // OutlineWidth is the constant for "outline-width" property tag. + // + // Used by `View`. + // Set the width of an view's outline. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. OutlineWidth = "outline-width" - // OutlineWidth is the constant for the "outline-offset" property tag. - // The "outline-offset" SizeUnit property sets the amount of space between an outline and the edge or border of an element.. + // OutlineOffset is the constant for "outline-offset" property tag. + // + // Used by `View`. + // Set the amount of space between an outline and the edge or border of a view. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. OutlineOffset = "outline-offset" - // Shadow is the constant for the "shadow" property tag. - // The "shadow" property adds shadow effects around a view's frame. A shadow is described - // by X and Y offsets relative to the element, blur and spread radius, and color. - // ... + // Shadow is the constant for "shadow" property tag. + // + // Used by `View`. + // Adds shadow effects around a view's frame. A shadow is described by X and Y offsets relative to the element, blur, + // spread radius and color. + // + // Supported types: `ViewShadow`, `[]ViewShadow`, `string`. + // + // Internal type is `[]ViewShadow`, other types converted to it during assignment. + // See `ViewShadow` description for more details. + // + // Conversion rules: + // `[]ViewShadow` - stored as is. no conversion performed. + // `ViewShadow` - converted to `[]ViewShadow` during assignment. + // `string` - must contain a string representation of `ViewShadow` Shadow = "shadow" - // FontName is the constant for the "font-name" property tag. - // The "font-name" string property specifies a prioritized list of one or more font family names and/or - // generic family names for the selected view. Values are separated by commas to indicate that they are alternatives. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // FontName is the constant for "font-name" property tag. + // + // Used by `View`. + // Specifies a prioritized list of one or more font family names and/or generic family names for the view. Values are + // separated by commas to indicate that they are alternatives. This is an inherited property, i.e. if it is not defined, + // then the value of the parent view is used. + // + // Supported types: `string`. FontName = "font-name" - // TextColor is the constant for the "text-color" property tag. - // The "color" property sets the foreground color value of a view's text and text decorations. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextColor is the constant for "text-color" property tag. + // + // Used by `View`. + // Set the foreground color value of a view's text and text decorations. This is an inherited property, i.e. if it is not + // defined, then the value of the parent view is used. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. TextColor = "text-color" - // TextSize is the constant for the "text-size" property tag. - // The "text-size" SizeUnit property sets the size of the font. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextSize is the constant for "text-size" property tag. + // + // Used by `View`. + // Set the size of the font. This is an inherited property, i.e. if it is not defined, then the value of the parent view + // is used. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TextSize = "text-size" - // Italic is the constant for the "italic" property tag. - // The "italic" is the bool property. If it is "true" then a text is displayed in italics. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // Italic is the constant for "italic" property tag. + // + // Used by `View`. + // Controls whether the text is displayed in italics. This is an inherited property, i.e. if it is not defined, then the + // value of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Text is displayed in italics. + // `false` or `0` or "false", "no", "off", "0" - Normal text. Italic = "italic" - // SmallCaps is the constant for the "small-caps" property tag. - // The "small-caps" is the bool property. If it is "true" then a text is displayed in small caps. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // SmallCaps is the constant for "small-caps" property tag. + // + // Used by `View`. + // Controls whether to use small caps characters while displaying the text. This is an inherited property, i.e. if it is + // not defined, then the value of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Text displayed using small caps. + // `false` or `0` or "false", "no", "off", "0" - Normal text display. SmallCaps = "small-caps" - // Strikethrough is the constant for the "strikethrough" property tag. - // The "strikethrough" is the bool property. If it is "true" then a text is displayed strikethrough. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // Strikethrough is the constant for "strikethrough" property tag. + // + // Used by `View`. + // Controls whether to draw line over the text. This is an inherited property, i.e. if it is not defined, then the value + // of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Draw line over the text. + // `false` or `0` or "false", "no", "off", "0" - Normal text display. Strikethrough = "strikethrough" - // Overline is the constant for the "overline" property tag. - // The "overline" is the bool property. If it is "true" then a text is displayed overlined. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // Overline is the constant for "overline" property tag. + // + // Used by `View`. + // Controls whether the line needs to be displayed on top of the text. This is an inherited property, i.e. if it is not + // defined, then the value of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Overline text. + // `false` or `0` or "false", "no", "off", "0" - No overline. Overline = "overline" - // Underline is the constant for the "underline" property tag. - // The "underline" is the bool property. If it is "true" then a text is displayed underlined. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // Underline is the constant for "underline" property tag. + // + // Used by `View`. + // Controls whether to draw line below the text, This is an inherited property, i.e. if it is not defined, then the value + // of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Draw line below the text. + // `false` or `0` or "false", "no", "off", "0" - Normal text display. Underline = "underline" - // TextLineThickness is the constant for the "text-line-thickness" property tag. - // The "text-line-thickness" SizeUnit property sets the stroke thickness of the decoration line that - // is used on text in an element, such as a line-through, underline, or overline. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextLineThickness is the constant for "text-line-thickness" property tag. + // + // Used by `View`. + // Set the stroke thickness of the decoration line that is used on text in an element, such as a strikethrough, underline, + // or overline. This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TextLineThickness = "text-line-thickness" - // TextLineStyle is the constant for the "text-line-style" property tag. - // The "text-line-style" int property sets the style of the lines specified by "text-decoration" property. - // The style applies to all lines that are set with "text-decoration" property. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextLineStyle is the constant for "text-line-style" property tag. + // + // Used by `View`. + // Set the style of the lines specified by "strikethrough", "overline" and "underline" properties. This is an inherited + // property, i.e. if it is not defined, then the value of the parent view is used. + // + // Supported types: `int`, `string`. + // + // Values: + // `1`(`SolidLine`) or "solid" - Solid line as a text line. + // `2`(`DashedLine`) or "dashed" - Dashed line as a text line. + // `3`(`DottedLine`) or "dotted" - Dotted line as a text line. + // `4`(`DoubleLine`) or "double" - Double line as a text line. + // `5`(`WavyLine`) or "wavy" - Wavy line as a text line. TextLineStyle = "text-line-style" - // TextLineColor is the constant for the "text-line-color" property tag. - // The "text-line-color" Color property sets the color of the lines specified by "text-decoration" property. - // The color applies to all lines that are set with "text-decoration" property. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextLineColor is the constant for "text-line-color" property tag. + // + // Used by `View`. + // Sets the color of the lines specified by "strikethrough", "overline" and "underline" properties. This is an inherited + // property, i.e. if it is not defined, then the value of the parent view is used. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. TextLineColor = "text-line-color" - // TextWeight is the constant for the "text-weight" property tag. - // Valid values are SolidLine (1), DashedLine (2), DottedLine (3), DoubleLine (4) and WavyLine (5). - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextWeight is the constant for "text-weight" property tag. + // + // Used by `View`. + // Sets weight of the text. + // + // Supported types: `int`, `string`. + // + // Values: + // `1`(`ThinFont`) or "thin" - Thin font. + // `2`(`ExtraLightFont`) or "extra-light" - Extra light font. + // `3`(`LightFont`) or "light" - Light font. + // `4`(`NormalFont`) or "normal" - Normal font. + // `5`(`MediumFont`) or "medium" - Medium font. + // `6`(`SemiBoldFont`) or "semi-bold" - Semi-bold font. + // `7`(`BoldFont`) or "bold" - Bold font. + // `8`(`ExtraBoldFont`) or "extra-bold" - Extra bold font. + // `9`(`BlackFont`) or "black" - Black font. TextWeight = "text-weight" - // TextAlign is the constant for the "text-align" property tag. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextAlign is the constant for "text-align" property tag. + // + // Used by `TableView`, `View`. + // + // Usage in `TableView`: + // Sets the horizontal alignment of the content inside a table cell. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`JustifyAlign`) or "justify" - Justify alignment. + // + // Usage in `View`: + // Alignment of the text in view. This is an inherited property, i.e. if it is not defined, then the value of the parent + // view is used. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`JustifyAlign`) or "justify" - Justify alignment. TextAlign = "text-align" - // TextIndent is the constant for the "text-indent" property tag. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextIndent is the constant for "text-indent" property tag. + // + // Used by `View`. + // Determines the size of the indent(empty space) before the first line of text. This is an inherited property, i.e. if it + // is not defined, then the value of the parent view is used. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TextIndent = "text-indent" - // TextShadow is the constant for the "text-shadow" property tag. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextShadow is the constant for "text-shadow" property tag. + // + // Used by `View`. + // Specify shadow for the text. + // + // Supported types: `ViewShadow`, `[]ViewShadow`, `string`. + // + // Internal type is `[]ViewShadow`, other types converted to it during assignment. + // See `ViewShadow` description for more details. + // + // Conversion rules: + // `[]ViewShadow` - stored as is. no conversion performed. + // `ViewShadow` - converted to `[]ViewShadow` during assignment. + // `string` - must contain a string representation of `ViewShadow` TextShadow = "text-shadow" - // TextWrap is the constant for the "text-wrap" property tag. - // The "text-wrap" int property controls how text inside a View is wrapped. - // Valid values ​​are: - // * TextWrapOn / 0 / "wrap" - text is wrapped across lines at appropriate characters (for example spaces, in languages like English that use space separators) to minimize overflow. This is the default value. - // * TextWrapOff / 1 / "nowrap" - text does not wrap across lines. It will overflow its containing element rather than breaking onto a new line. - // * TextWrapBalance / 2 / "balance" - text is wrapped in a way that best balances the number of characters on each line, enhancing layout quality and legibility. Because counting characters and balancing them across multiple lines is computationally expensive, this value is only supported for blocks of text spanning a limited number of lines (six or less for Chromium and ten or less for Firefox). + // TextWrap is the constant for "text-wrap" property tag. + // + // Used by `View`. + // Controls how text inside the view is wrapped. Default value is "wrap". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TextWrapOn`) or "wrap" - Text is wrapped across lines at appropriate characters (for example spaces, in languages like English that use space separators) to minimize overflow. + // `1`(`TextWrapOff`) or "nowrap" - Text does not wrap across lines. It will overflow its containing element rather than breaking onto a new line. + // `2`(`TextWrapBalance`) or "balance" - Text is wrapped in a way that best balances the number of characters on each line, enhancing layout quality and legibility. Because counting characters and balancing them across multiple lines is computationally expensive, this value is only supported for blocks of text spanning a limited number of lines (six or less for Chromium and ten or less for Firefox). TextWrap = "text-wrap" - // TabSize is the constant for the "tab-size" property tag. - // The "tab-size" int property sets the width of tab characters (U+0009) in spaces. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TabSize is the constant for "tab-size" property tag. + // + // Used by `View`. + // Set the width of tab characters (U+0009) in spaces. This is an inherited property, i.e. if it is not defined, then the + // value of the parent view is used. Default value is `8`. + // + // Supported types: `int`, `string`. + // + // Values: + // > `0` or > "0" - Number of spaces in tab character. TabSize = "tab-size" - // LetterSpacing is the constant for the "letter-spacing" property tag. - // The "letter-spacing" SizeUnit property sets the horizontal spacing behavior between text characters. - // This value is added to the natural spacing between characters while rendering the text. - // Positive values of letter-spacing causes characters to spread farther apart, - // while negative values of letter-spacing bring characters closer together. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // LetterSpacing is the constant for "letter-spacing" property tag. + // + // Used by `View`. + // Set the horizontal spacing behavior between text characters. This value is added to the natural spacing between + // characters while rendering the text. Positive values of letter-spacing causes characters to spread farther apart, while + // negative values of letter-spacing bring characters closer together. This is an inherited property, i.e. if it is not + // defined, then the value of the parent view is used. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. LetterSpacing = "letter-spacing" - // WordSpacing is the constant for the "word-spacing" property tag. - // The "word-spacing" SizeUnit property sets the length of space between words and between tags. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // WordSpacing is the constant for "word-spacing" property tag. + // + // Used by `View`. + // Set the length of space between words and between tags. This is an inherited property, i.e. if it is not defined, then + // the value of the parent view is used. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. WordSpacing = "word-spacing" - // LineHeight is the constant for the "line-height" property tag. - // The "line-height" SizeUnit property sets the height of a line box. - // It's commonly used to set the distance between lines of text. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // LineHeight is the constant for "line-height" property tag. + // + // Used by `View`. + // Set the height of a line box. It's commonly used to set the distance between lines of text. This is an inherited + // property, i.e. if it is not defined, then the value of the parent view is used. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. LineHeight = "line-height" - // WhiteSpace is the constant for the "white-space" property tag. - // The "white-space" int property sets how white space inside an element is handled. - // Valid values are WhiteSpaceNormal (0), WhiteSpaceNowrap (1), WhiteSpacePre (2), - // WhiteSpacePreWrap (3), WhiteSpacePreLine (4), WhiteSpaceBreakSpaces (5) - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // WhiteSpace is the constant for "white-space" property tag. + // + // Used by `View`. + // Sets how white space inside an element is handled. This is an inherited property, i.e. if it is not defined, then the + // value of the parent view is used. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`WhiteSpaceNormal`) or "normal" - Sequences of spaces are concatenated into one space. Newlines in the source are treated as a single space. Applying this value optionally splits lines to fill inline boxes. + // `1`(`WhiteSpaceNowrap`) or "nowrap" - Concatenates sequences of spaces into one space, like a normal value, but does not wrap lines(text wrapping) within the text. + // `2`(`WhiteSpacePre`) or "pre" - Sequences of spaces are saved as they are specified in the source. Lines are wrapped only where newlines are specified in the source and where "br" elements are specified in the source. + // `3`(`WhiteSpacePreWrap`) or "pre-wrap" - Sequences of spaces are saved as they are indicated in the source. Lines are wrapped only where newlines are specified in the source and there, where "br" elements are specified in the source, and optionally to fill inline boxes. + // `4`(`WhiteSpacePreLine`) or "pre-line" - Sequences of spaces are concatenated into one space. Lines are split on newlines, on "br" elements, and optionally to fill inline boxes. + // `5`(`WhiteSpaceBreakSpaces`) or "break-spaces" - The behavior is identical to `WhiteSpacePreWrap` with the following differences:
1. Sequences of spaces are preserved as specified in the source, including spaces at the end of lines.
2. Lines are wrapped on any spaces, including in the middle of a sequence of spaces.
3. Spaces take up space and do not hang at the ends of lines, which means they affect the internal dimensions (min-content and max-content). WhiteSpace = "white-space" - // WordBreak is the constant for the "word-break" property tag. - // The "word-break" int property sets whether line breaks appear wherever the text would otherwise overflow its content box. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // WordBreak is the constant for "word-break" property tag. + // + // Used by `View`. + // Set whether line breaks appear wherever the text would otherwise overflow its content box. This is an inherited + // property, i.e. if it is not defined, then the value of the parent view is used. Default value is "normal". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`WordBreakNormal`) or "normal" - Default behavior for linefeed placement. + // `1`(`WordBreakAll`) or "break-all" - If the block boundaries are exceeded, a line break will be inserted between any two characters(except for Chinese/Japanese/Korean text). + // `2`(`WordBreakKeepAll`) or "keep-all" - Line break will not be used in Chinese/Japanese/ Korean text. For text in other languages, the default behavior(normal) will be applied. + // `3`(`WordBreakWord`) or "break-word" - When the block boundaries are exceeded, the remaining whole words can be broken in an arbitrary place, if a more suitable place for line break is not found. WordBreak = "word-break" - // TextTransform is the constant for the "text-transform" property tag. - // The "text-transform" int property specifies how to capitalize an element's text. - // It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextTransform is the constant for "text-transform" property tag. + // + // Used by `View`. + // Specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or + // with each word capitalized. This is an inherited property, i.e. if it is not defined, then the value of the parent view + // is used. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneTextTransform`) or "none" - Original case of characters. + // `1`(`CapitalizeTextTransform`) or "capitalize" - Every word starts with a capital letter. + // `2`(`LowerCaseTextTransform`) or "lowercase" - All characters are lowercase. + // `3`(`UpperCaseTextTransform`) or "uppercase" - All characters are uppercase. TextTransform = "text-transform" - // TextDirection is the constant for the "text-direction" property tag. - // The "text-direction" int property sets the direction of text, table columns, and horizontal overflow. - // Use 1 (LeftToRightDirection) for languages written from right to left (like Hebrew or Arabic), - // and 2 (RightToLeftDirection) for those written from left to right (like English and most other languages). - // The default value of the property is 0 (SystemTextDirection): use the system text direction. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // TextDirection is the constant for "text-direction" property tag. + // + // Used by `ColumnLayout`, `View`. + // + // Usage in `ColumnLayout`: + // Sets the direction of text, table columns, and horizontal overflow. This is an inherited property, i.e. if it is not + // defined, then the value of the parent view is used. Default value is "system". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`SystemTextDirection`) or "system" - Use the system text direction. + // `1`(`LeftToRightDirection`) or "left-to-right" - For languages written from left to right (like English and most other languages). + // `2`(`RightToLeftDirection`) or "right-to-left" - For languages written from right to left (like Hebrew or Arabic). + // + // Usage in `View`: + // Set the direction of text, table columns, and horizontal overflow. This is an inherited property, i.e. if it is not + // defined, then the value of the parent view is used, Default value is "system". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`SystemTextDirection`) or "system" - Use the system text direction. + // `1`(`LeftToRightDirection`) or "left-to-right" - For languages written from left to right (like English and most other languages). + // `2`(`RightToLeftDirection`) or "right-to-left" - For languages written from right to left (like Hebrew or Arabic). TextDirection = "text-direction" - // WritingMode is the constant for the "writing-mode" property tag. - // The "writing-mode" int property sets whether lines of text are laid out horizontally or vertically, - // as well as the direction in which blocks progress - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // WritingMode is the constant for "writing-mode" property tag. + // + // Used by `View`. + // Set whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. Default value is + // "horizontal-top-to-bottom". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`HorizontalTopToBottom`) or "horizontal-top-to-bottom" - Horizontal lines are displayed from top to bottom. + // `1`(`HorizontalBottomToTop`) or "horizontal-bottom-to-top" - Horizontal lines are displayed from bottom to top. + // `2`(`VerticalRightToLeft`) or "vertical-right-to-left" - Vertical lines are output from right to left. + // `3`(`VerticalLeftToRight`) or "vertical-left-to-right" - Vertical lines are output from left to right. WritingMode = "writing-mode" - // VerticalTextOrientation is the constant for the "vertical-text-orientation" property tag. - // The "vertical-text-orientation" int property sets the orientation of the text characters in a line. - // It only affects text in vertical mode ("writing-mode" property). + // VerticalTextOrientation is the constant for "vertical-text-orientation" property tag. + // + // Used by `View`. + // Set the orientation of the text characters in a line. It only affects text in vertical mode ("writing-mode" property). // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`MixedTextOrientation`) or "mixed" - Symbols rotated 90° clockwise. + // `1`(`UprightTextOrientation`) or "upright" - Symbols are arranged normally(vertically). VerticalTextOrientation = "vertical-text-orientation" - // TextOverflow is the constant for the "text-overflow" property tag. - // The "text-overflow" int property sets how hidden overflow content is signaled to users. - // It can be clipped or display an ellipsis ('…'). Valid values are + // TextOverflow is the constant for "text-overflow" property tag. + // + // Used by `TextView`. + // Sets how hidden overflow content is signaled to users. Default value is "clip". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TextOverflowClip`) or "clip" - Text is clipped at the border. + // `1`(`TextOverflowEllipsis`) or "ellipsis" - At the end of the visible part of the text "…" is displayed. TextOverflow = "text-overflow" - // Hint is the constant for the "hint" property tag. - // The "hint" string property sets a hint to the user of what can be entered in the control. + // Hint is the constant for "hint" property tag. + // + // Used by `EditView`. + // Sets a hint to the user of what can be entered in the control. + // + // Supported types: `string`. Hint = "hint" - // MaxLength is the constant for the "max-length" property tag. - // The "max-length" int property sets the maximum number of characters that the user can enter + // MaxLength is the constant for "max-length" property tag. + // + // Used by `EditView`. + // Sets the maximum number of characters that the user can enter. + // + // Supported types: `int`, `string`. + // + // Values: + // >= `0` or >= "0" - Maximum number of characters. MaxLength = "max-length" - // ReadOnly is the constant for the "readonly" property tag. - // This bool property indicates that the user cannot modify the value of the EditView. + // ReadOnly is the constant for "readonly" property tag. + // + // Used by `EditView`. + // Controls whether the user can modify value or not. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - User not able to modify the value. + // `false` or `0` or "false", "no", "off", "0" - Value can be modified. ReadOnly = "readonly" - // Content is the constant for the "content" property tag. + // Content is the constant for "content" property tag. + // + // Used by `Checkbox`, `GridLayout`, `ListLayout`, `Resizable`, `StackLayout`, `SvgImageView`, `TableView`, `TabsLayout`, `ViewsContainer`. + // + // Usage in `Checkbox`: + // An array of child views. + // + // Supported types: `View`, `[]View`, `string`, `[]string`, `[]any` containing elements of `View` or `string`. + // + // Internal type is `[]View`, other types converted to it during assignment. + // + // Conversion rules: + // `View` - converted to `[]View` containing one element. + // `[]View` - nil-elements are prohibited, if the array contains nil, then the property will not be set, and the `Set` function will return false and an error message will be written to the log. + // `string` - if the string is a text representation of the `View`, then the corresponding view is created, otherwise a `TextView` is created, to which the given string is passed as a text. Then a `[]View` is created containing the resulting view. + // `[]string` - each element of an array is converted to `View` as described above. + // `[]any` - this array must contain only `View` and a `string`. Each `string` element is converted to a view as described above. If array contains invalid values, the "content" property will not be set, and the `Set` function will return `false` and an error message will be written to the log. + // + // Usage in `GridLayout`: + // Defines an array of child views or can be an implementation of `GridAdapter` interface. + // + // Supported types: `[]View`, `GridAdapter`, `View`, `string`, `[]string`. + // + // Internal type is either `[]View` or `GridAdapter`, other types converted to `[]View` during assignment. + // + // Conversion rules: + // `View` - view which describe one cell, converted to `[]View`. + // `[]View` - describe several cells, stored as is. + // `string` - text representation of the view which describe one cell, converted to `[]View`. + // `[]string` - an array of text representation of the views which describe several cells, converted to `[]View`. + // `GridAdapter` - interface which describe several cells, see `GridAdapter` description for more details. + // + // Usage in `ListLayout`: + // Defines an array of child views or can be an implementation of `ListAdapter` interface. + // + // Supported types: `[]View`, `ListAdapter`, `View`, `string`, `[]string`. + // + // Internal type is either `[]View` or `ListAdapter`, other types converted to `[]View` during assignment. + // + // Conversion rules: + // `View` - view which describe one item, converted to `[]View`. + // `[]View` - describe several items, stored as is. + // `string` - text representation of the view which describe one item, converted to `[]View`. + // `[]string` - an array of text representation of the views which describe several items, converted to `[]View`. + // `ListAdapter` - interface which describe several items, see `ListAdapter` description for more details. + // + // Usage in `Resizable`: + // Content view to make it resizable or text in this case `TextView` will be created. + // + // Supported types: `View`, `string`. + // + // Internal type is `View`, other types converted to it during assignment. + // + // Usage in `StackLayout`: + // An array of child views. + // + // Supported types: `View`, `[]View`, `string`, `[]string`, `[]any` containing elements of `View`, `string`. + // + // Internal type is `[]View`, other types converted to it during assignment. + // + // Conversion rules: + // `View` - converted to `[]View` containing one element. + // `[]View` - nil-elements are prohibited, if the array contains nil, then the property will not be set, and the `Set` function will return false and an error message will be written to the log. + // `string` - if the string is a text representation of the `View`, then the corresponding view is created, otherwise a `TextView` is created, to which the given string is passed as a text. Then a `[]View` is created containing the resulting view. + // `[]string` - each element of an array is converted to `View` as described above. + // `[]any` - this array must contain only `View` and a `string`. Each `string` element is converted to a view as described above. If array contains invalid values, the "content" property will not be set, and the `Set` function will return `false` and an error message will be written to the log. + // + // Usage in `SvgImageView`: + // Image to display. Could be the image file name in the images folder of the resources, image URL or content of the svg + // image. + // + // Supported types: `string`. + // + // Usage in `TableView`: + // Defines the content of the table. + // + // Supported types: `TableAdapter`, `[][]string`, `[][]any`. + // + // Internal type is `TableAdapter`, other types converted to it during assignment. + // See `TableAdapter` description for more details. + // + // Usage in `TabsLayout`: + // An array of child views. + // + // Supported types: `View`, `[]View`, `string`, `[]string`, `[]any` containing elements of `View` or `string`. + // + // Internal type is `[]View`, other types converted to it during assignment. + // + // Conversion rules: + // `View` - converted to `[]View` containing one element. + // `[]View` - nil-elements are prohibited, if the array contains nil, then the property will not be set, and the `Set` function will return false and an error message will be written to the log. + // `string` - if the string is a text representation of the `View`, then the corresponding view is created, otherwise a `TextView` is created, to which the given string is passed as a text. Then a `[]View` is created containing the resulting view. + // `[]string` - each element of an array is converted to `View` as described above. + // `[]any` - this array must contain only `View` and a `string`. Each `string` element is converted to a view as described above. If array contains invalid values, the "content" property will not be set, and the `Set` function will return `false` and an error message will be written to the log. + // + // Usage in `ViewsContainer`: + // An array of child views. + // + // Supported types: `View`, `[]View`, `string`, `[]string`, `[]any` containing elements of `View`, `string`. + // + // Internal type is `[]View`, other types converted to it during assignment. + // + // Conversion rules: + // `View` - converted to `[]View` containing one element. + // `[]View` - nil-elements are prohibited, if the array contains nil, then the property will not be set, and the `Set` function will return false and an error message will be written to the log. + // `string` - if the string is a text representation of the `View`, then the corresponding view is created, otherwise a `TextView` is created, to which the given string is passed as a text. Then a `[]View` is created containing the resulting view. + // `[]string` - each element of an array is converted to `View` as described above. + // `[]any` - this array must contain only `View` and a `string`. Each `string` element is converted to a view as described above. If array contains invalid values, the "content" property will not be set, and the `Set` function will return `false` and an error message will be written to the log. Content = "content" - // Items is the constant for the "items" property tag. + // Items is the constant for "items" property tag. + // + // Used by `DropDownList`, `ListView`, `Popup`. + // + // Usage in `DropDownList`: + // Array of data elements. + // + // Supported types: `[]string`, `string`, `[]fmt.Stringer`, `[]Color`, `[]SizeUnit`, `[]AngleUnit`, `[]any` containing + // elements of `string`, `fmt.Stringer`, `bool`, `rune`, `float32`, `float64`, `int`, `int8` … `int64`, `uint`, `uint8` … + // `uint64`. + // + // Internal type is `[]string`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - contain single item. + // `[]string` - an array of items. + // `[]fmt.Stringer` - an array of objects convertible to string. + // `[]Color` - An array of color values which will be converted to a string array. + // `[]SizeUnit` - an array of size unit values which will be converted to a string array. + // `[]any` - this array must contain only types which were listed in Types section. + // + // Usage in `ListView`: + // List content. Main value is an implementation of `ListAdapter` interface. + // + // Supported types: `ListAdapter`, `[]View`, `[]string`, `[]any` containing elements of `View`, `string`, `fmt.Stringer`, + // `float` and `int`. + // + // Internal type is either `[]View` or `ListAdapter`, other types converted to it during assignment. + // + // Conversion rules: + // `ListAdapter` - interface which provides an access to list items and other information, stored as is. + // `[]View` - an array of list items, each in a form of some view-based element. Stored as is. + // `[]string` - an array of text. Converted into an internal implementation of `ListAdapter`, each list item will be an instance of `TextView`. + // `[]any` - an array of items of arbitrary type, where types like `string`, `fmt.Stringer`, `float` and `int` will be converted to `TextView`. `View` type will remain unchanged. All values after conversion will be wrapped by internal implementation of `ListAdapter`. + // + // Usage in `Popup`: + // Array of menu items. + // + // Supported types: `ListAdapter`, `[]string`. + // + // Internal type is `ListAdapter` internal implementation, other types converted to it during assignment. Items = "items" - // DisabledItems is the constant for the "disabled-items" property tag. - // The "disabled-items" []int property specifies an array of disabled(non selectable) items indices of DropDownList. + // DisabledItems is the constant for "disabled-items" property tag. + // + // Used by `DropDownList`. + // An array of disabled(non selectable) items indices. + // + // Supported types: `[]int`, `string`, `[]string`, `[]any` containing elements of `string` or `int`. + // + // Internal type is `[]int`, other types converted to it during assignment. + // Rules of conversion. + // `[]int` - Array of indices. + // `string` - Single index value or multiple index values separated by comma(`,`). + // `[]string` - Array of indices in text format. + // `[]any` - Array of strings or integer values. DisabledItems = "disabled-items" - // ItemSeparators is the constant for the "item-separators" property tag. - // The "item-separators" []int property specifies an array of indices of DropDownList items after which a separator should be added. + // ItemSeparators is the constant for "item-separators" property tag. + // + // Used by `DropDownList`. + // An array of indices of `DropDownList` items after which a separator should be added. + // + // Supported types: `[]int`, `string`, `[]string`, `[]any` containing elements of `string` or `int`. + // + // Internal type is `[]int`, other types converted to it during assignment. + // Rules of conversion. + // `[]int` - Array of indices. + // `string` - Single index value or multiple index values separated by comma(`,`). + // `[]string` - Array of indices in text format. + // `[]any` - Array of strings or integer values. ItemSeparators = "item-separators" - // Current is the constant for the "current" property tag. + // Current is the constant for "current" property tag. + // + // Used by `DropDownList`, `ListView`, `StackLayout`, `TableView`, `TabsLayout`. + // + // Usage in `DropDownList`: + // Current selected item. + // + // Supported types: `int`, `string`. + // + // Values: + // `-1` or "-1" - No item has been selected. + // >= `0` or >= "0" - Index of selected item. + // + // Usage in `ListView`: + // Set or get index of selected item. + // + // Supported types: `int`, `string`. + // + // Values: + // `-1` or "-1" - No item has been selected. + // >= `0` or >= "0" - Index of selected item. + // + // Usage in `StackLayout`: + // Set or Index of current(visible) view. + // + // Supported types: `int`, `string`. + // + // Values: + // `-1` or "-1" - No visible view. + // >= `0` or >= "0" - Index of visible view. + // + // Usage in `TableView`: + // Sets the coordinates of the selected cell/row. + // + // Supported types: `CellIndex`, `int`, `string`. + // + // Internal type is `CellIndex`, other types converted to it during assignment. + // See `CellIndex` description for more details. + // + // Conversion rules: + // `int` - specify index of current table row, current column index will be set to -1. + // `string` - can be one integer value which specify current row or pair of integer values separated by comma(`,`). When two values provided then first value specify current row index and second one specify column index. + // + // Usage in `TabsLayout`: + // Defines index of the current active child view. + // + // Supported types: `int`, `string`. + // + // Values: + // `-1` or "-1" - No visible tab. + // >= `0` or >= "0" - Index of visible tab. Current = "current" - // Type is the constant for the "type" property tag. + // Type is the constant for "type" property tag. + // + // Used by `EditView`, `NumberPicker`. + // + // Usage in `EditView`: + // Same as "edit-view-type". + // + // Usage in `NumberPicker`: + // Same as "number-picker-type". Type = "type" - // Pattern is the constant for the "pattern" property tag. + // Pattern is the constant for "pattern" property tag. + // + // Used by `EditView`. + // Same as "edit-view-pattern". Pattern = "pattern" - // GridAutoFlow is the constant for the "grid-auto-flow" property tag. - // The "grid-auto-flow" int property controls how the GridLayout auto-placement algorithm works, - // specifying exactly how auto-placed items get flowed into the grid. - // Valid values are RowAutoFlow (0), ColumnAutoFlow (1), RowDenseAutoFlow (2), and ColumnDenseAutoFlow (3) + // GridAutoFlow is the constant for "grid-auto-flow" property tag. + // + // Used by `GridLayout`. + // Controls how to place child controls if `Row` and `Column` properties were not set for children views. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`RowAutoFlow`) or "row" - Views are placed by filling each row in turn, adding new rows as necessary. + // `1`(`ColumnAutoFlow`) or "column" - Views are placed by filling each column in turn, adding new columns as necessary. + // `2`(`RowDenseAutoFlow`) or "row-dense" - Views are placed by filling each row, adding new rows as necessary. "dense" packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. This may cause views to appear out-of-order, when doing so would fill in holes left by larger views. + // `3`(`ColumnDenseAutoFlow`) or "column-dense" - Views are placed by filling each column, adding new columns as necessary. "dense" packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. This may cause views to appear out-of-order, when doing so would fill in holes left by larger views. GridAutoFlow = "grid-auto-flow" - // CellWidth is the constant for the "cell-width" property tag. - // The "cell-width" properties allow to set a fixed width of GridLayout cells regardless of the size of the child elements. - // These properties are of type []SizeUnit. Each element in the array determines the size of the corresponding column. + // CellWidth is the constant for "cell-width" property tag. + // + // Used by `GridLayout`. + // Set a fixed width of `GridLayout` cells regardless of the size of the child elements. Each element in the array + // determines the size of the corresponding column. By default, the sizes of the cells are calculated based on the sizes + // of the child views placed in them. + // + // Supported types: `SizeUnit`, `[]SizeUnit`, `SizeFunc`, `string`, `[]string`, `[]any` containing elements of `string` or + // `SizeUnit`. + // + // Internal type is either `SizeUnit` or `[]SizeUnit`, other types converted to it during assignment. + // + // Conversion rules: + // `SizeUnit`, `SizeFunc` - stored as is and all cells are set to have the same width. + // `[]SizeUnit` - stored as is and each column of the grid layout has width which is specified in an array. + // `string` - containing textual representations of `SizeUnit` (or `SizeUnit` constants), may contain several values separated by comma(`,`). Each column of the grid layout has width which is specified in an array. + // `[]string` - each element must be a textual representation of a `SizeUnit` (or a `SizeUnit` constant). Each column of the grid layout has width which is specified in an array. + // If the number of elements in an array is less than the number of columns used, then the missing elements are set to have `Auto` size. + // The values can use `SizeUnit` type `SizeInFraction`. This type means 1 part. The part is calculated as follows: the size of all cells that are not of type `SizeInFraction` is subtracted from the size of the container, and then the remaining size is divided by the number of parts. The `SizeUnit` value of type `SizeInFraction` can be either integer or fractional. CellWidth = "cell-width" - // CellHeight is the constant for the "cell-height" property tag. - // The "cell-height" properties allow to set a fixed height of GridLayout cells regardless of the size of the child elements. - // These properties are of type []SizeUnit. Each element in the array determines the size of the corresponding row. + // CellHeight is the constant for "cell-height" property tag. + // + // Used by `GridLayout`. + // Set a fixed height of `GridLayout` cells regardless of the size of the child elements. Each element in the array + // determines the size of the corresponding row. By default, the sizes of the cells are calculated based on the sizes of + // the child views placed in them. + // + // Supported types: `SizeUnit`, `[]SizeUnit`, `SizeFunc`, `string`, `[]string`, `[]any` containing elements of `string` or + // `SizeUnit`. + // + // Internal type is either `SizeUnit` or `[]SizeUnit`, other types converted to it during assignment. + // + // Conversion rules: + // `SizeUnit`, `SizeFunc` - stored as is and all cells are set to have the same height. + // `[]SizeUnit` - stored as is and each row of the grid layout has height which is specified in an array. + // `string` - containing textual representations of `SizeUnit` (or `SizeUnit` constants), may contain several values separated by comma(`,`). Each row of the grid layout has height which is specified in an array. + // `[]string` - each element must be a textual representation of a `SizeUnit` (or a `SizeUnit` constant). Each row of the grid layout has height which is specified in an array. + // If the number of elements in an array is less than the number of rows used, then the missing elements are set to have `Auto` size. + // The values can use `SizeUnit` type `SizeInFraction`. This type means 1 part. The part is calculated as follows: the size of all cells that are not of type `SizeInFraction` is subtracted from the size of the container, and then the remaining size is divided by the number of parts. The `SizeUnit` value of type `SizeInFraction` can be either integer or fractional. CellHeight = "cell-height" - // GridRowGap is the constant for the "grid-row-gap" property tag. - // The "grid-row-gap" SizeUnit properties allow to set the distance between the rows of the GridLayout container. - // The default is 0px. + // GridRowGap is the constant for "grid-row-gap" property tag. + // + // Used by `GridLayout`. + // Space between rows. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. GridRowGap = "grid-row-gap" - // GridColumnGap is the constant for the "grid-column-gap" property tag. - // The "grid-column-gap" SizeUnit properties allow to set the distance between the columns of the GridLayout container. - // The default is 0px. + // GridColumnGap is the constant for "grid-column-gap" property tag. + // + // Used by `GridLayout`. + // Space between columns. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. GridColumnGap = "grid-column-gap" - // Source is the constant for the "src" property tag. - // The "src" property specifies the image to display in the ImageView. + // Source is the constant for "src" property tag. + // + // Used by `AudioPlayer`, `ImageView`, `VideoPlayer`. + // + // Usage in `AudioPlayer`: + // Specifies the location of the media file(s). Since different browsers support different file formats and codecs, it is + // recommended to specify multiple sources in different formats. The player chooses the most suitable one from the list of + // sources. Setting mime types makes this process easier for the browser. + // + // Supported types: `string`, `MediaSource`, `[]MediaSource`. + // + // Internal type is `[]MediaSource`, other types converted to it during assignment. + // + // Usage in `ImageView`: + // Set either the name of the image in the "images" folder of the resources, or the URL of the image or inline-image. An + // inline-image is the content of an image file encoded in base64 format. + // + // Supported types: `string`. + // + // Usage in `VideoPlayer`: + // Specifies the location of the media file(s). Since different browsers support different file formats and codecs, it is + // recommended to specify multiple sources in different formats. The player chooses the most suitable one from the list of + // sources. Setting mime types makes this process easier for the browser. + // + // Supported types: `string`, `MediaSource`, `[]MediaSource`. + // + // Internal type is `[]MediaSource`, other types converted to it during assignment. Source = "src" - // SrcSet is the constant for the "srcset" property tag. - // The "srcset" property is a string which identifies one or more image candidate strings, separated using commas (,) - // each specifying image resources to use under given screen density. - // This property is only used if you are building an application for js/wasm platform + // SrcSet is the constant for "srcset" property tag. + // + // Used by `ImageView`. + // String which identifies one or more image candidate strings, separated using comma(`,`) each specifying image resources + // to use under given screen density. This property is only used if building an application for js/wasm platform. + // + // Supported types: `string`. SrcSet = "srcset" - // Fit is the constant for the "fit" property tag. + // Fit is the constant for "fit" property tag. + // + // Used by `ImageView`, `BackgroundElement`. + // + // Usage in `ImageView`: + // Defines the image scaling parameters. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneFit`) or "none" - The image is not resized. + // `1`(`ContainFit`) or "contain" - The image is scaled to maintain its aspect ratio while fitting within the element’s content box. The entire object is made to fill the box, while preserving its aspect ratio, so the object will be "letterboxed" if its aspect ratio does not match the aspect ratio of the box. + // `2`(`CoverFit`) or "cover" - The image is sized to maintain its aspect ratio while filling the element’s entire content box. If the object's aspect ratio does not match the aspect ratio of its box, then the object will be clipped to fit. + // `3`(`FillFit`) or "fill" - The image to fill the element’s content box. The entire object will completely fill the box. If the object's aspect ratio does not match the aspect ratio of its box, then the object will be stretched to fit. + // `4`(`ScaleDownFit`) or "scale-down" - The image is sized as if NoneFit or ContainFit were specified, whichever would result in a smaller concrete object size. + // + // Usage in `BackgroundElement`: + // Used for image background only. Defines the image scaling parameters. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneFit`) or "none" - The image is not resized. + // `1`(`ContainFit`) or "contain" - The image is scaled to maintain its aspect ratio while fitting within the element’s content box. The entire object is made to fill the box, while preserving its aspect ratio, so the object will be "letterboxed" if its aspect ratio does not match the aspect ratio of the box. + // `2`(`CoverFit`) or "cover" - The image is sized to maintain its aspect ratio while filling the element’s entire content box. If the object's aspect ratio does not match the aspect ratio of its box, then the object will be clipped to fit. Fit = "fit" backgroundFit = "background-fit" - // Repeat is the constant for the "repeat" property tag. + // Repeat is the constant for "repeat" property tag. + // + // Used by `BackgroundElement`. + // Used for image background only. Specifying the repetition of the image. Used only for a background image. Default value + // is "no-repeat". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoRepeat`) or "no-repeat" - Image does not repeat. + // `1`(`RepeatXY`) or "repeat" - Image repeat horizontally and vertically. + // `2`(`RepeatX`) or "repeat-x" - Image repeat only horizontally. + // `3`(`RepeatY`) or "repeat-y" - Image repeat only vertically. + // `4`(`RepeatRound`) or "round" - Image is repeated so that an integer number of images fit into the background area. If this fails, then the background images are scaled. + // `5`(`RepeatSpace`) or "space" - Image is repeated as many times as necessary to fill the background area. If this fails, an empty space is added between the pictures. Repeat = "repeat" - // Attachment is the constant for the "attachment" property tag. + // Attachment is the constant for "attachment" property tag. + // + // Used by `BackgroundElement`. + // Used for image background only. Sets whether a background image's position is fixed within the viewport or scrolls with + // its containing block. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`ScrollAttachment`) or "scroll" - The background image will scroll with the page. + // `1`(`FixedAttachment`) or "fixed" - The background image will not scroll with the page. + // `2`(`LocalAttachment`) or "local" - The background image will scroll with the element's contents. Attachment = "attachment" - // BackgroundClip is the constant for the "background-clip" property tag. + // BackgroundClip is the constant for "background-clip" property tag. + // + // Used by `View`. + // Determines how the background color and/or background image will be displayed below the box borders. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`BorderBoxClip`) or "border-box" - The background extends to the outer edge of the border(but below the border in z-order). + // `1`(`PaddingBoxClip`) or "padding-box" - The background extends to the outer edge of the padding. No background is drawn below the border. + // `2`(`ContentBoxClip`) or "content-box" - The background is painted inside(clipped) of the content box. BackgroundClip = "background-clip" - // Gradient is the constant for the "gradient" property tag. + // Gradient is the constant for "gradient" property tag. + // + // Used by `BackgroundElement`. + // Describe gradient stop points. This is a mandatory property while describing background gradients. + // + // Supported types: `[]BackgroundGradientPoint`, `[]BackgroundGradientAngle`, `[]GradientPoint`, `[]Color`, `string`. + // + // Internal type is `[]BackgroundGradientPoint` or `[]BackgroundGradientAngle`, other types converted to it during assignment. + // See `BackgroundGradientPoint`, `[]BackgroundGradientAngle`, `[]GradientPoint` description for more details. + // + // Conversion rules: + // `[]BackgroundGradientPoint` - stored as is, no conversion performed. Used to set gradient stop points for linear and radial gradients. + // `[]BackgroundGradientAngle` - stored as is, no conversion performed. Used to set gradient stop points for conic gradient. + // `[]GradientPoint` - converted to `[]BackgroundGradientPoint`. Used to set gradient stop points for linear and radial gradients. Since `GradientPoint` contains values from `0` to `1.0` they will be converted to precent values. + // `[]Color` - converted to `[]BackgroundGradientPoint`. Used for setting gradient stop points which are uniformly distributed across gradient diretion. + // `string` - string representation of stop points or color values. Format: "color1 pos1,color2 pos2"... . Position of stop points can be described either in `SizeUnit` or `AngleUnit` string representations. Examples: "white 0deg, black 90deg, gray 360deg", "white 0%, black 100%". Gradient = "gradient" - // Direction is the constant for the "direction" property tag. + // Direction is the constant for "direction" property tag. + // + // Used by `BackgroundElement`. + // Used for linear gradient only. Defines the direction of the gradient line. Default is `4`(`ToBottomGradient`) or + // "to-bottom". + // + // Supported types: `AngleUnit`, `int`, `string`. + // + // See `AngleUnit` description for more details. + // + // Values: + // `0`(`ToTopGradient`) or "to-top" - Line goes from bottom to top. + // `1`(`ToRightTopGradient`) or "to-right-top" - From bottom left to top right. + // `2`(`ToRightGradient`) or "to-right" - From left to right. + // `3`(`ToRightBottomGradient`) or "to-right-bottom" - From top left to bottom right. + // `4`(`ToBottomGradient`) or "to-bottom" - From top to bottom. + // `5`(`ToLeftBottomGradient`) or "to-left-bottom" - From the upper right corner to the lower left. + // `6`(`ToLeftGradient`) or "to-left" - From right to left. + // `7`(`ToLeftTopGradient`) or "to-left-top" - From the bottom right corner to the top left. Direction = "direction" - // Repeating is the constant for the "repeating" property tag. + // Repeating is the constant for "repeating" property tag. + // + // Used by `BackgroundElement`. + // Define whether stop points needs to be repeated after the last one. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Gradient will repeat after the last key point. + // `false` or `0` or "false", "no", "off", "0" - No repetition of gradient stop points. Value of the last point used will be extrapolated. Repeating = "repeating" - // Repeating is the constant for the "repeating" property tag. + // From is the constant for "from" property tag. + // + // Used by `BackgroundElement`. + // Used for conic gradient only. Start angle position of the gradient. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types converted to it during assignment. + // See `AngleUnit` description for more details. From = "from" - // RadialGradientRadius is the constant for the "radial-gradient-radius" property tag. + // RadialGradientRadius is the constant for "radial-gradient-radius" property tag. + // + // Used by `BackgroundElement`. + // Define radius of the radial gradient. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadialGradientRadius = "radial-gradient-radius" - // RadialGradientShape is the constant for the "radial-gradient-shape" property tag. + // RadialGradientShape is the constant for "radial-gradient-shape" property tag. + // + // Used by `BackgroundElement`. + // Define shape of the radial gradient. The default is `0`(`EllipseGradient` or "ellipse". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`EllipseGradient`) or "ellipse" - The shape is an axis-aligned ellipse. + // `1`(`CircleGradient`) or "circle" - The shape is a circle with a constant radius. RadialGradientShape = "radial-gradient-shape" - // Shape is the constant for the "shape" property tag. It's a short form of "radial-gradient-shape" + // Shape is the constant for "shape" property tag. + // + // Used by `BackgroundElement`. + // Same as "radial-gradient-shape". Shape = "shape" - // CenterX is the constant for the "center-x" property tag. + // CenterX is the constant for "center-x" property tag. + // + // Used by `BackgroundElement`. + // Used for conic and radial gradients only. Center X point of the gradient. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CenterX = "center-x" - // CenterY is the constant for the "center-x" property tag. + // CenterY is the constant for "center-y" property tag. + // + // Used by `BackgroundElement`. + // Used for conic and radial gradients only. Center Y point of the gradient. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CenterY = "center-y" - // AltText is the constant for the "alt-text" property tag. + // AltText is the constant for "alt-text" property tag. + // + // Used by `ImageView`. + // Set a description of the image. + // + // Supported types: `string`. AltText = "alt-text" - altTag = "alt" - // AvoidBreak is the constant for the "avoid-break" property tag. - // The "avoid-break" bool property sets how region breaks should behave inside a generated box. - // If the property value is "true" then avoids any break from being inserted within the principal box. - // If the property value is "false" then allows, but does not force, any break to be inserted within - // the principal box. + altTag = "alt" + + // AvoidBreak is the constant for "avoid-break" property tag. + // + // Used by `ColumnLayout`. + // Controls how region breaks should behave inside a generated box. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Avoid any break from being inserted within the principal box. + // `false` or `0` or "false", "no", "off", "0" - Allow, but does not force, any break to be inserted within the principal box. AvoidBreak = "avoid-break" - // ItemWidth is the constant for the "item-width" property tag. + // ItemWidth is the constant for "item-width" property tag. + // + // Used by `ListView`. + // Fixed width of list elements. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ItemWidth = "item-width" - // ItemHeight is the constant for the "item-height" property tag. + // ItemHeight is the constant for "item-height" property tag. + // + // Used by `ListView`. + // Fixed height of list elements. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ItemHeight = "item-height" - // ListWrap is the constant for the "wrap" property tag. + // ListWrap is the constant for "list-wrap" property tag. + // + // Used by `ListLayout`, `ListView`. + // + // Usage in `ListLayout`: + // Defines the position of elements in case of reaching the border of the container. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`ListWrapOff`) or "off" - The column or row of elements continues and goes beyond the bounds of the visible area. + // `1`(`ListWrapOn`) or "on" - Starts a new column or row of elements as necessary. The new column is positioned towards the end. + // `2`(`ListWrapReverse`) or "reverse" - Starts a new column or row of elements as necessary. The new column is positioned towards the beginning. + // + // Usage in `ListView`: + // Defines the position of elements in case of reaching the border of the container. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`ListWrapOff`) or "off" - The column or row of elements continues and goes beyond the bounds of the visible area. + // `1`(`ListWrapOn`) or "on" - Starts a new column or row of elements as necessary. The new column is positioned towards the end. + // `2`(`ListWrapReverse`) or "reverse" - Starts a new column or row of elements as necessary. The new column is positioned towards the beginning. ListWrap = "list-wrap" - // EditWrap is the constant for the "wrap" property tag. + // EditWrap is the constant for "edit-wrap" property tag. + // + // Used by `EditView`. + // Controls whether the text will wrap around when edit view border has been reached. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Text wrapped to the next line. + // `false` or `0` or "false", "no", "off", "0" - Do not wrap text. Horizontal scrolling will appear if necessary. EditWrap = "edit-wrap" - // CaretColor is the constant for the "caret-color" property tag. - // The "caret-color" Color property sets the color of the insertion caret, the visible marker - // where the next character typed will be inserted. This is sometimes referred to as the text input cursor. + // CaretColor is the constant for "caret-color" property tag. + // + // Used by `EditView`, `View`. + // + // Usage in `EditView`: + // Sets the color of the insertion caret, the visible marker where the next character typed will be inserted. This is + // sometimes referred to as the text input cursor. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. + // + // Usage in `View`: + // Sets the color of the insertion caret, the visible marker where the next character typed will be inserted. This is + // sometimes referred to as the text input cursor. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. CaretColor = "caret-color" - // Min is the constant for the "min" property tag. + // Min is the constant for "min" property tag. + // + // Used by `DatePicker`, `NumberPicker`, `TimePicker`. + // + // Usage in `DatePicker`: + // Same as "date-picker-min". + // + // Usage in `NumberPicker`: + // Same as "number-picker-min". + // + // Usage in `TimePicker`: + // Same as "time-picker-min". Min = "min" - // Max is the constant for the "max" property tag. + // Max is the constant for "max" property tag. + // + // Used by `DatePicker`, `NumberPicker`, `ProgressBar`, `TimePicker`. + // + // Usage in `DatePicker`: + // Same as "date-picker-max". + // + // Usage in `NumberPicker`: + // Same as "number-picker-max". + // + // Usage in `ProgressBar`: + // Same as "progress-max". + // + // Usage in `TimePicker`: + // Same as "time-picker-max". Max = "max" - // Step is the constant for the "step" property tag. + // Step is the constant for "step" property tag. + // + // Used by `DatePicker`, `NumberPicker`, `TimePicker`. + // + // Usage in `DatePicker`: + // Same as "date-picker-step". + // + // Usage in `NumberPicker`: + // Same as "number-picker-step". + // + // Usage in `TimePicker`: + // Same as "time-picker-step". Step = "step" - // Value is the constant for the "value" property tag. + // Value is the constant for "value" property tag. + // + // Used by `DatePicker`, `NumberPicker`, `ProgressBar`, `TimePicker`. + // + // Usage in `DatePicker`: + // Same as "date-picker-value". + // + // Usage in `NumberPicker`: + // Same as "number-picker-value". + // + // Usage in `ProgressBar`: + // Same as "progress-value". + // + // Usage in `TimePicker`: + // Same as "time-picker-value". Value = "value" - // Orientation is the constant for the "orientation" property tag. + // Orientation is the constant for "orientation" property tag. + // + // Used by `ListLayout`, `ListView`, `View`. + // + // Usage in `ListLayout`: + // Specifies how the children will be positioned relative to each other. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopDownOrientation`) or "up-down" - Child elements are arranged in a column from top to bottom. + // `1`(`StartToEndOrientation`) or "start-to-end" - Child elements are laid out in a row from beginning to end. + // `2`(`BottomUpOrientation`) or "bottom-up" - Child elements are arranged in a column from bottom to top. + // `3`(`EndToStartOrientation`) or "end-to-start" - Child elements are laid out in a line from end to beginning. + // + // Usage in `ListView`: + // Specifies how the children will be positioned relative to each other. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopDownOrientation`) or "up-down" - Child elements are arranged in a column from top to bottom. + // `1`(`StartToEndOrientation`) or "start-to-end" - Child elements are laid out in a row from beginning to end. + // `2`(`BottomUpOrientation`) or "bottom-up" - Child elements are arranged in a column from bottom to top. + // `3`(`EndToStartOrientation`) or "end-to-start" - Child elements are laid out in a line from end to beginning. + // + // Usage in `View`: + // Specify layout of the children or view. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopDownOrientation`) or "up-down" - Child elements are arranged in a column from top to bottom. + // `1`(`StartToEndOrientation`) or "start-to-end" - Child elements are laid out in a row from beginning to end. + // `2`(`BottomUpOrientation`) or "bottom-up" - Child elements are arranged in a column from bottom to top. + // `3`(`EndToStartOrientation`) or "end-to-start" - Child elements are laid out in a line from end to beginning. Orientation = "orientation" - // Gap is t he constant for the "gap" property tag. + // Gap is the constant for "gap" property tag. + // + // Used by `GridLayout`, `ListLayout`, `ListView`, `TableView`. + // + // Usage in `GridLayout`: + // Specify both "grid-column-gap" and "grid-row-gap". + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ListLayout`: + // Specify both "list-column-gap" and "list-row-gap". + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ListView`: + // Specify both "list-column-gap" and "list-row-gap". + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `TableView`: + // Define the gap between rows and columns of a table. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Gap = "gap" - // ListRowGap is the constant for the "list-row-gap" property tag. - // The "list-row-gap" SizeUnit properties allow to set the distance between the rows of the ListLayout or ListView. - // The default is 0px. + // ListRowGap is the constant for "list-row-gap" property tag. + // + // Used by `ListLayout`, `ListView`. + // + // Usage in `ListLayout`: + // Set the distance between the rows of the `ListLayout`. Default value 0px. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ListView`: + // Set the distance between the rows of the `ListLayout`. Default value 0px. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ListRowGap = "list-row-gap" - // ListColumnGap is the constant for the "list-column-gap" property tag. - // The "list-column-gap" SizeUnit properties allow to set the distance between the columns of the GridLayout or ListView. - // The default is 0px. + // ListColumnGap is the constant for "list-column-gap" property tag. + // + // Used by `ListLayout`, `ListView`. + // + // Usage in `ListLayout`: + // Set the distance between the columns of the `ListLayout`. Default value 0px. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ListView`: + // Set the distance between the columns of the `ListLayout`. Default value 0px. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ListColumnGap = "list-column-gap" - // Text is the constant for the "text" property tag. + // Text is the constant for "text" property tag. + // + // Used by `EditView`, `TextView`. + // + // Usage in `EditView`: + // Edit view text. + // + // Supported types: `string`. + // + // Usage in `TextView`: + // Text to display. + // + // Supported types: `string`. Text = "text" - // VerticalAlign is the constant for the "vertical-align" property tag. + // VerticalAlign is the constant for "vertical-align" property tag. + // + // Used by `Checkbox`, `ListLayout`, `ListView`, `Popup`, `SvgImageView`. + // + // Usage in `Checkbox`: + // Sets the vertical alignment of the content inside a block element. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Content aligned to top side of the content area. + // `1`(`BottomAlign`) or "bottom" - Content aligned to bottom side of the content area. + // `2`(`CenterAlign`) or "center" - Content aligned in the center of the content area. + // `3`(`StretchAlign`) or "stretch" - Content relaxed to fill all content area. + // + // Usage in `ListLayout`: + // Sets the vertical alignment of the content inside a block element. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Height alignment. + // + // Usage in `ListView`: + // Sets the vertical alignment of the content inside a block element. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Height alignment. + // + // Usage in `Popup`: + // Vertical alignment of the popup on the screen. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Height alignment. + // + // Usage in `SvgImageView`: + // Sets the vertical alignment of the image relative to its bounds. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. VerticalAlign = "vertical-align" - // HorizontalAlign is the constant for the "horizontal-align" property tag. - // The "horizontal-align" int property sets the horizontal alignment of the content inside a block element + // HorizontalAlign is the constant for "horizontal-align" property tag. + // + // Used by `Checkbox`, `ListLayout`, `ListView`, `Popup`, `SvgImageView`. + // + // Usage in `Checkbox`: + // Sets the horizontal alignment of the content inside a block element. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Content aligned to left side of the content area. + // `1`(`RightAlign`) or "right" - Content aligned to right side of the content area. + // `2`(`CenterAlign`) or "center" - Content aligned in the center of the content area. + // `3`(`StretchAlign`) or "stretch" - Content relaxed to fill all content area. + // + // Usage in `ListLayout`: + // Sets the horizontal alignment of the content inside a block element. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Width alignment. + // + // Usage in `ListView`: + // Sets the horizontal alignment of the content inside a block element. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Width alignment. + // + // Usage in `Popup`: + // Horizontal alignment of the popup on the screen. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Width alignment. + // + // Usage in `SvgImageView`: + // Sets the horizontal alignment of the image relative to its bounds. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. HorizontalAlign = "horizontal-align" - // ImageVerticalAlign is the constant for the "image-vertical-align" property tag. + // ImageVerticalAlign is the constant for "image-vertical-align" property tag. + // + // Used by `ImageView`. + // Sets the vertical alignment of the image relative to its bounds. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. ImageVerticalAlign = "image-vertical-align" - // ImageHorizontalAlign is the constant for the "image-horizontal-align" property tag. + // ImageHorizontalAlign is the constant for "image-horizontal-align" property tag. + // + // Used by `ImageView`. + // Sets the horizontal alignment of the image relative to its bounds. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. ImageHorizontalAlign = "image-horizontal-align" - // Checked is the constant for the "checked" property tag. + // Checked is the constant for "checked" property tag. + // + // Used by `Checkbox`, `ListView`. + // + // Usage in `Checkbox`: + // Current state of the checkbox. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Checkbox is checked. + // `false` or `0` or "false", "no", "off", "0" - Checkbox is unchecked. + // + // Usage in `ListView`: + // Set or get the list of checked items. Stores array of indices of checked items. + // + // Supported types: `[]int`, `int`, `string`. + // + // Internal type is `[]int`, other types converted to it during assignment. + // + // Conversion rules: + // `[]int` - contains indices of selected list items. Stored as is. + // `int` - contains index of one selected list item, converted to `[]int`. + // `string` - contains one or several indices of selected list items separated by comma(`,`). Checked = "checked" - // ItemVerticalAlign is the constant for the "item-vertical-align" property tag. + // ItemVerticalAlign is the constant for "item-vertical-align" property tag. + // + // Used by `ListView`. + // Sets the vertical alignment of the contents of the list items. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Height alignment. ItemVerticalAlign = "item-vertical-align" - // ItemHorizontalAlign is the constant for the "item-horizontal-align" property tag. + // ItemHorizontalAlign is the constant for "item-horizontal-align" property tag. + // + // Used by `ListView`. + // Sets the horizontal alignment of the contents of the list items. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Left alignment. + // `1`(`RightAlign`) or "right" - Right alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Height alignment. ItemHorizontalAlign = "item-horizontal-align" - // ItemCheckbox is the constant for the "checkbox" property tag. + // ItemCheckbox is the constant for "checkbox" property tag. + // + // Used by `ListView`. + // Style of checkbox used to mark items in a list. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneCheckbox`) or "none" - There is no checkbox. + // `1`(`SingleCheckbox`) or "single" - A checkbox that allows you to mark only one item, example: ◉. + // `2`(`MultipleCheckbox`) or "multiple" - A checkbox that allows you to mark several items, example: ☑. ItemCheckbox = "checkbox" - // CheckboxHorizontalAlign is the constant for the "checkbox-horizontal-align" property tag. + // CheckboxHorizontalAlign is the constant for "checkbox-horizontal-align" property tag. + // + // Used by `Checkbox`, `ListView`. + // + // Usage in `Checkbox`: + // Horizontal alignment of checkbox inside the checkbox container. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Checkbox on the left edge, content on the right. + // `1`(`RightAlign`) or "right" - Checkbox on the right edge, content on the left. + // `2`(`CenterAlign`) or "center" - Center horizontally. Content below or above. + // + // Usage in `ListView`: + // Checkbox horizontal alignment(if enabled by "checkbox" property). + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`LeftAlign`) or "left" - Checkbox on the left edge, content on the right. + // `1`(`RightAlign`) or "right" - Checkbox on the right edge, content on the left. + // `2`(`CenterAlign`) or "center" - Center horizontally. Content below or above. CheckboxHorizontalAlign = "checkbox-horizontal-align" - // CheckboxVerticalAlign is the constant for the "checkbox-vertical-align" property tag. + // CheckboxVerticalAlign is the constant for "checkbox-vertical-align" property tag. + // + // Used by `Checkbox`, `ListView`. + // + // Usage in `Checkbox`: + // Vertical alignment of checkbox inside the checkbox container. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Checkbox on the top, content on the bottom. + // `1`(`BottomAlign`) or "bottom" - Checkbox on the bottom, content on the top. + // `2`(`CenterAlign`) or "center" - Checkbox on the top, content on the bottom. + // + // Usage in `ListView`: + // Checkbox vertical alignment(if enabled by "checkbox" property). + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. CheckboxVerticalAlign = "checkbox-vertical-align" - // NotTranslate is the constant for the "not-translate" property tag. - // This bool property indicates that no need to translate the text. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // NotTranslate is the constant for "not-translate" property tag. + // + // Used by `DetailsView`, `TextView`, `View`. + // + // Usage in `DetailsView`: + // Controls whether the label set for the details view require translation. This is an inherited property, i.e. if it is + // not defined, then the value of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - No need to lookup for label text translation in resources. + // `false` or `0` or "false", "no", "off", "0" - Lookup for label text translation. + // + // Usage in `TextView`: + // Controls whether the text set for the text view require translation. This is an inherited property, i.e. if it is not + // defined, then the value of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - No need to lookup for text translation in resources. + // `false` or `0` or "false", "no", "off", "0" - Lookup for text translation. + // + // Usage in `View`: + // Controls whether the text require translation. This is an inherited property, i.e. if it is not defined, then the value + // of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - No need to lookup for text translation in resources. + // `false` or `0` or "false", "no", "off", "0" - Lookup for text translation. NotTranslate = "not-translate" - // Filter is the constant for the "filter" property tag. - // The "filter" property applies graphical effects to a View, - // such as such as blurring, color shifting, changing brightness/contrast, etc. + // Filter is the constant for "filter" property tag. + // + // Used by `View`. + // Applies graphical effects to a view, such as blurring, color shifting, changing brightness/contrast, etc. + // + // Supported types: `ViewFilter`. + // + // See `ViewFilter` description for more details. Filter = "filter" - // BackdropFilter is the constant for the "backdrop-filter" property tag. - // The "backdrop-filter" property applies graphical effects to the area behind a View, - // such as such as blurring, color shifting, changing brightness/contrast, etc. + // BackdropFilter is the constant for "backdrop-filter" property tag. + // + // Used by `View`. + // Applies graphical effects to the area behind a view, such as blurring, color shifting, changing brightness/contrast, + // etc. + // + // Supported types: `ViewFilter`. + // + // See `ViewFilter` description for more details. BackdropFilter = "backdrop-filter" - // Clip is the constant for the "clip" property tag. - // The "clip" property creates a clipping region that sets what part of a View should be shown. + // Clip is the constant for "clip" property tag. + // + // Used by `View`. + // Creates a clipping region that sets what part of a view should be shown. + // + // Supported types: `ClipShape`, `string`. + // + // Internal type is `ClipShape`, other types converted to it during assignment. + // See `ClipShape` description for more details. Clip = "clip" - // Points is the constant for the "points" property tag. + // Points is the constant for "points" property tag. + // + // Used by `ClipShape`. + // Points which describe polygon clip area. Values are in a sequence of pair like: x1, y1, x2, y2 ... + // + // Supported types: `[]SizeUnit`, `string`. Points = "points" - // ShapeOutside is the constant for the "shape-outside" property tag. - // The "shape-outside" property defines a shape (which may be non-rectangular) around which adjacent - // inline content should wrap. By default, inline content wraps around its margin box; - // "shape-outside" provides a way to customize this wrapping, making it possible to wrap text around - // complex objects rather than simple boxes. + // ShapeOutside is the constant for "shape-outside" property tag. + // + // Used by `View`. + // __WARNING__ Currently not supported. Property defines a shape(which may be non-rectangular) around which adjacent + // inline content should wrap. By default, inline content wraps around its margin box. Property provides a way to + // customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. + // + // Supported types: `ClipShape`, `string`. + // + // Internal type is `ClipShape`, other types converted to it during assignment. + // See `ClipShape` description for more details. ShapeOutside = "shape-outside" - // Float is the constant for the "float" property tag. - // The "float" property places a View on the left or right side of its container, - // allowing text and inline Views to wrap around it. + // Float is the constant for "float" property tag. + // + // Used by `View`. + // Places a view on the left or right side of its container, allowing text and inline views to wrap around it. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneFloat`) or "none" - Text and other views inside the container will not wrap around this view. + // `1`(`LeftFloat`) or "left" - Text and other views inside the container will wrap around this view on the right side. + // `2`(`RightFloat`) or "right" - Text and other views inside the container will wrap around this view on the left side. Float = "float" - // UserData is the constant for the "user-data" property tag. - // The "user-data" property can contain any user data + // UserData is the constant for "user-data" property tag. + // + // Used by `View`. + // Can contain any user data. + // + // Supported types: `any`. UserData = "user-data" - // Resize is the constant for the "resize" property tag. - // The "resize" int property sets whether an element is resizable, and if so, in which directions. - // Valid values are "none" / NoneResize (0), "both" / BothResize (1), - // "horizontal" / HorizontalResize (2), and "vertical" / VerticalResize (3) + // Resize is the constant for "resize" property tag. + // + // Used by `View`. + // Sets whether view is resizable, and if so, in which directions. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneResize`) or "none" - View cannot be resized. + // `1`(`BothResize`) or "both" - The View displays a mechanism for allowing the user to resize it, which may be resized both horizontally and vertically. + // `2`(`HorizontalResize`) or "horizontal" - The View displays a mechanism for allowing the user to resize it in the horizontal direction. + // `3`(`VerticalResize`) or "vertical" - The View displays a mechanism for allowing the user to resize it in the vertical direction. Resize = "resize" - // UserSelect is the constant for the "user-select" property tag. - // The "user-select" bool property controls whether the user can select text. - // This is an inherited property, i.e. if it is not defined, then the value of the parent view is used. + // UserSelect is the constant for "user-select" property tag. + // + // Used by `View`. + // Controls whether the user can select the text. This is an inherited property, i.e. if it is not defined, then the value + // of the parent view is used. Default value is `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - User can select the text. + // `false` or `0` or "false", "no", "off", "0" - Text is not selectable. UserSelect = "user-select" - // Order is the constant for the "Order" property tag. - // The "Order" int property sets the order to layout an item in a ListLayout or GridLayout container. - // Items in a container are sorted by ascending order value and then by their source code order. + // Order is the constant for "Order" property tag. + // + // Used by `GridLayout`, `ListLayout`, `ListView`, `View`. + // + // Usage in `GridLayout`: + // Used in child views to specify visual order of the view inside the `GridLayout`. Items in a container are sorted by + // ascending order value and then by their addition to the container order. + // + // Supported types: `int`, `string`. + // + // Values: + // < `0` or < "0" - Views with lower value will be at the beginning. + // >= `0` or >= "0" - Views with higher value will be at the end. + // + // Usage in `ListLayout`: + // Used in child views to specify visual order of the view inside the `ListLayout`. Items in a container are sorted by + // ascending order value and then by their addition to the container order. + // + // Supported types: `int`, `string`. + // + // Values: + // < `0` or < "0" - Views with lower value will be at the beginning. + // >= `0` or >= "0" - Views with higher value will be at the end. + // + // Usage in `ListView`: + // Used in child views to specify visual order of the view inside the `ListLayout`. Items in a container are sorted by + // ascending order value and then by their addition to the container order. + // + // Supported types: `int`, `string`. + // + // Values: + // < `0` or < "0" - Views with lower value will be at the beginning. + // >= `0` or >= "0" - Views with higher value will be at the end. + // + // Usage in `View`: + // Set the order to layout an item in a `ListLayout` or `GridLayout` container. Items in a container are sorted by + // ascending order value and then by their addition to container order. + // + // Supported types: `int`, `string`. + // + // Values: + // < `0` or < "0" - Views with lower value will be at the beginning. + // >= `0` or >= "0" - Views with higher value will be at the end. Order = "Order" - // BackgroundBlendMode is the constant for the "background-blend-mode" property tag. - // The "background-blend-mode" int property sets how an view's background images should blend - // with each other and with the view's background color. - // Valid values are "normal" (0), "multiply" (1), "screen" (2), "overlay" (3), "darken" (4), "lighten" (5), - // "color-dodge" (6), "color-burn" (7), "hard-light" (8), "soft-light" (9), "difference" (10), - // "exclusion" (11), "hue" (12), "saturation" (13), "color" (14), "luminosity" (15). + // BackgroundBlendMode is the constant for "background-blend-mode" property tag. + // + // Used by `View`. + // Sets how view's background images should blend with each other and with the view's background color. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`BlendNormal`) or "normal" - The final color is the top color, regardless of what the bottom color is. The effect is like two opaque pieces of paper overlapping. + // `1`(`BlendMultiply`) or "multiply" - The final color is the result of multiplying the top and bottom colors. A black layer leads to a black final layer, and a white layer leads to no change. The effect is like two images printed on transparent film overlapping. + // `2`(`BlendScreen`) or "screen" - The final color is the result of inverting the colors, multiplying them, and inverting that value. A black layer leads to no change, and a white layer leads to a white final layer. The effect is like two images shone onto a projection screen. + // `3`(`BlendOverlay`) or "overlay" - The final color is the result of multiply if the bottom color is darker, or screen if the bottom color is lighter. This blend mode is equivalent to hard-light but with the layers swapped. + // `4`(`BlendDarken`) or "darken" - The final color is composed of the darkest values of each color channel. + // `5`(`BlendLighten`) or "lighten" - The final color is composed of the lightest values of each color channel. + // `6`(`BlendColorDodge`) or "color-dodge" - The final color is the result of dividing the bottom color by the inverse of the top color. A black foreground leads to no change. A foreground with the inverse color of the backdrop leads to a fully lit color. This blend mode is similar to screen, but the foreground need only be as light as the inverse of the backdrop to create a fully lit color. + // `7`(`BlendColorBurn`) or "color-burn" - The final color is the result of inverting the bottom color, dividing the value by the top color, and inverting that value. A white foreground leads to no change. A foreground with the inverse color of the backdrop leads to a black final image. This blend mode is similar to multiply, but the foreground need only be as dark as the inverse of the backdrop to make the final image black. + // `8`(`BlendHardLight`) or "hard-light" - The final color is the result of multiply if the top color is darker, or screen if the top color is lighter. This blend mode is equivalent to overlay but with the layers swapped. The effect is similar to shining a harsh spotlight on the backdrop. + // `9`(`BlendSoftLight`) or "soft-light" - The final color is similar to hard-light, but softer. This blend mode behaves similar to hard-light. The effect is similar to shining a diffused spotlight on the backdrop. + // `10`(`BlendDifference`) or "difference" - The final color is the result of subtracting the darker of the two colors from the lighter one. A black layer has no effect, while a white layer inverts the other layer's color. + // `11`(`BlendExclusion`) or "exclusion" - The final color is similar to difference, but with less contrast. As with difference, a black layer has no effect, while a white layer inverts the other layer's color. + // `12`(`BlendHue`) or "hue" - The final color has the hue of the top color, while using the saturation and luminosity of the bottom color. + // `13`(`BlendSaturation`) or "saturation" - The final color has the saturation of the top color, while using the hue and luminosity of the bottom color. A pure gray backdrop, having no saturation, will have no effect. + // `14`(`BlendColor`) or "color" - The final color has the hue and saturation of the top color, while using the luminosity of the bottom color. The effect preserves gray levels and can be used to colorize the foreground. + // `15`(`BlendLuminosity`) or "luminosity" - The final color has the luminosity of the top color, while using the hue and saturation of the bottom color. This blend mode is equivalent to `BlendColor`, but with the layers swapped. BackgroundBlendMode = "background-blend-mode" - // MixBlendMode is the constant for the "mix-blend-mode" property tag. - // The "mix-blend-mode" int property sets how a view's content should blend - // with the content of the view's parent and the view's background. - // Valid values are "normal" (0), "multiply" (1), "screen" (2), "overlay" (3), "darken" (4), "lighten" (5), - // "color-dodge" (6), "color-burn" (7), "hard-light" (8), "soft-light" (9), "difference" (10), - // "exclusion" (11), "hue" (12), "saturation" (13), "color" (14), "luminosity" (15). + // MixBlendMode is the constant for "mix-blend-mode" property tag. + // + // Used by `View`. + // Sets how view's content should blend with the content of the view's parent and the view's background. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`BlendNormal`) or "normal" - The final color is the top color, regardless of what the bottom color is. The effect is like two opaque pieces of paper overlapping. + // `1`(`BlendMultiply`) or "multiply" - The final color is the result of multiplying the top and bottom colors. A black layer leads to a black final layer, and a white layer leads to no change. The effect is like two images printed on transparent film overlapping. + // `2`(`BlendScreen`) or "screen" - The final color is the result of inverting the colors, multiplying them, and inverting that value. A black layer leads to no change, and a white layer leads to a white final layer. The effect is like two images shone onto a projection screen. + // `3`(`BlendOverlay`) or "overlay" - The final color is the result of multiply if the bottom color is darker, or screen if the bottom color is lighter. This blend mode is equivalent to hard-light but with the layers swapped. + // `4`(`BlendDarken`) or "darken" - The final color is composed of the darkest values of each color channel. + // `5`(`BlendLighten`) or "lighten" - The final color is composed of the lightest values of each color channel. + // `6`(`BlendColorDodge`) or "color-dodge" - The final color is the result of dividing the bottom color by the inverse of the top color. A black foreground leads to no change. A foreground with the inverse color of the backdrop leads to a fully lit color. This blend mode is similar to screen, but the foreground need only be as light as the inverse of the backdrop to create a fully lit color. + // `7`(`BlendColorBurn`) or "color-burn" - The final color is the result of inverting the bottom color, dividing the value by the top color, and inverting that value. A white foreground leads to no change. A foreground with the inverse color of the backdrop leads to a black final image. This blend mode is similar to multiply, but the foreground need only be as dark as the inverse of the backdrop to make the final image black. + // `8`(`BlendHardLight`) or "hard-light" - The final color is the result of multiply if the top color is darker, or screen if the top color is lighter. This blend mode is equivalent to overlay but with the layers swapped. The effect is similar to shining a harsh spotlight on the backdrop. + // `9`(`BlendSoftLight`) or "soft-light" - The final color is similar to hard-light, but softer. This blend mode behaves similar to hard-light. The effect is similar to shining a diffused spotlight on the backdrop. + // `10`(`BlendDifference`) or "difference" - The final color is the result of subtracting the darker of the two colors from the lighter one. A black layer has no effect, while a white layer inverts the other layer's color. + // `11`(`BlendExclusion`) or "exclusion" - The final color is similar to difference, but with less contrast. As with difference, a black layer has no effect, while a white layer inverts the other layer's color. + // `12`(`BlendHue`) or "hue" - The final color has the hue of the top color, while using the saturation and luminosity of the bottom color. + // `13`(`BlendSaturation`) or "saturation" - The final color has the saturation of the top color, while using the hue and luminosity of the bottom color. A pure gray backdrop, having no saturation, will have no effect. + // `14`(`BlendColor`) or "color" - The final color has the hue and saturation of the top color, while using the luminosity of the bottom color. The effect preserves gray levels and can be used to colorize the foreground. + // `15`(`BlendLuminosity`) or "luminosity" - The final color has the luminosity of the top color, while using the hue and saturation of the bottom color. This blend mode is equivalent to `BlendColor`, but with the layers swapped. MixBlendMode = "mix-blend-mode" - // TabIndex is the constant for the "tabindex" property tag. - // The "tabindex" int property indicates that View can be focused, and where it participates in sequential keyboard navigation - // (usually with the Tab key, hence the name). - // * A negative value means that View is not reachable via sequential keyboard navigation, but could be focused by clicking with the mouse or touching. - // * tabindex="0" means that View should be focusable in sequential keyboard navigation, after any positive tabindex values and its order is defined in order of its addition. - // * A positive value means View should be focusable in sequential keyboard navigation, with its order defined by the value of the number. + // TabIndex is the constant for "tabindex" property tag. + // + // Used by `View`. + // Indicates that view can be focused, and where it participates in sequential keyboard navigation(usually with the Tab + // key). + // + // Supported types: `int`, `string`. + // + // Values: + // < `0` or < "0" - View can be selected with the mouse or touch, but does not participate in sequential navigation. + // `0` or "0" - View can be selected and reached using sequential navigation, the order of navigation is determined by the browser(usually in order of addition). + // > `0` or > "0" - View will be reached(and selected) using sequential navigation, and navigation is performed by ascending "tabindex" value. TabIndex = "tabindex" // Tooltip is the constant for "tooltip" property tag. - // The "tooltip" string property specifies the tooltip text. Tooltip pops up when hovering the mouse cursor over the view. - // HTML tags are supported when formatting tooltip text. + // + // Used by `View`. + // Specifies the tooltip text. Tooltip pops up when hovering the mouse cursor over the view. HTML tags are supported when + // formatting tooltip text. + // + // Supported types: `string`. Tooltip = "tooltip" ) diff --git a/radius.go b/radius.go index 6c8a8dc..fd7d2b2 100644 --- a/radius.go +++ b/radius.go @@ -7,92 +7,384 @@ import ( // Constants for [RadiusProperty] specific properties const ( - // Radius is the SizeUnit view property that determines the corners rounding radius - // of an element's outer border edge. + // Radius is the constant for "radius" property tag. + // + // Used by `View`, `BackgroundElement`, `ClipShape`. + // + // Usage in `View`: + // Specifies the corners rounding radius of an element's outer border edge. + // + // Supported types: `RadiusProperty`, `SizeUnit`, `SizeFunc`, `BoxRadius`, `string`, `float`, `int`. + // + // Internal type is either `RadiusProperty` or `SizeUnit`, other types converted to them during assignment. + // See `RadiusProperty`, `SizeUnit`, `SizeFunc` and `BoxRadius` description for more details. + // + // Conversion rules: + // `RadiusProperty` - stored as is, no conversion performed. + // `SizeUnit` - stored as is and set all corners to have the same value. + // `BoxRadius` - a new `RadiusProperty` will be created and all corresponding elliptical radius values will be set. + // `string` - if one value will be provided then it will be set as a radius for all corners. If two values will be provided divided by (`/`) then x and y radius will be set for all corners. Examples: "1em", "1em/0.5em", "2/4". Values which doesn't have size prefix will use size in pixels by default. + // `float` - values of this type will set radius for all corners in pixels. + // `int` - values of this type will set radius for all corners in pixels. + // + // Usage in `BackgroundElement`: + // Same as "radial-gradient-radius". + // + // Usage in `ClipShape`: + // Specifies the radius of the corners or the radius of the cropping area. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Radius = "radius" - // RadiusX is the SizeUnit view property that determines the x-axis corners elliptic rounding - // radius of an element's outer border edge. + + // RadiusX is the constant for "radius-x" property tag. + // + // Used by `View`, `ClipShape`. + // + // Usage in `View`: + // Specifies the x-axis corners elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ClipShape`: + // Specifies the x-axis corners elliptic rounding radius of the elliptic clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusX = "radius-x" - // RadiusY is the SizeUnit view property that determines the y-axis corners elliptic rounding - // radius of an element's outer border edge. + + // RadiusY is the constant for "radius-y" property tag. + // + // Used by `View`, `ClipShape`. + // + // Usage in `View`: + // Specifies the y-axis corners elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `ClipShape`: + // Specifies the y-axis corners elliptic rounding radius of of the elliptic clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusY = "radius-y" - // RadiusTopLeft is the SizeUnit view property that determines the top-left corner rounding radius - // of an element's outer border edge. + + // RadiusTopLeft is the constant for "radius-top-left" property tag. + // + // Used by `View`. + // Specifies the top-left corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusTopLeft = "radius-top-left" - // RadiusTopLeftX is the SizeUnit view property that determines the x-axis top-left corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusTopLeftX is the constant for "radius-top-left-x" property tag. + // + // Used by `View`. + // Specifies the x-axis top-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusTopLeftX = "radius-top-left-x" - // RadiusTopLeftY is the SizeUnit view property that determines the y-axis top-left corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusTopLeftY is the constant for "radius-top-left-y" property tag. + // + // Used by `View`. + // Specifies the y-axis top-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusTopLeftY = "radius-top-left-y" - // RadiusTopRight is the SizeUnit view property that determines the top-right corner rounding radius - // of an element's outer border edge. + + // RadiusTopRight is the constant for "radius-top-right" property tag. + // + // Used by `View`. + // Specifies the top-right corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusTopRight = "radius-top-right" - // RadiusTopRightX is the SizeUnit view property that determines the x-axis top-right corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusTopRightX is the constant for "radius-top-right-x" property tag. + // + // Used by `View`. + // Specifies the x-axis top-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusTopRightX = "radius-top-right-x" - // RadiusTopRightY is the SizeUnit view property that determines the y-axis top-right corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusTopRightY is the constant for "radius-top-right-y" property tag. + // + // Used by `View`. + // Specifies the y-axis top-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusTopRightY = "radius-top-right-y" - // RadiusBottomLeft is the SizeUnit view property that determines the bottom-left corner rounding radius - // of an element's outer border edge. + + // RadiusBottomLeft is the constant for "radius-bottom-left" property tag. + // + // Used by `View`. + // Specifies the bottom-left corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusBottomLeft = "radius-bottom-left" - // RadiusBottomLeftX is the SizeUnit view property that determines the x-axis bottom-left corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusBottomLeftX is the constant for "radius-bottom-left-x" property tag. + // + // Used by `View`. + // Specifies the x-axis bottom-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusBottomLeftX = "radius-bottom-left-x" - // RadiusBottomLeftY is the SizeUnit view property that determines the y-axis bottom-left corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusBottomLeftY is the constant for "radius-bottom-left-y" property tag. + // + // Used by `View`. + // Specifies the y-axis bottom-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusBottomLeftY = "radius-bottom-left-y" - // RadiusBottomRight is the SizeUnit view property that determines the bottom-right corner rounding radius - // of an element's outer border edge. + + // RadiusBottomRight is the constant for "radius-bottom-right" property tag. + // + // Used by `View`. + // Specifies the bottom-right corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusBottomRight = "radius-bottom-right" - // RadiusBottomRightX is the SizeUnit view property that determines the x-axis bottom-right corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusBottomRightX is the constant for "radius-bottom-right-x" property tag. + // + // Used by `View`. + // Specifies the x-axis bottom-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusBottomRightX = "radius-bottom-right-x" - // RadiusBottomRightY is the SizeUnit view property that determines the y-axis bottom-right corner elliptic - // rounding radius of an element's outer border edge. + + // RadiusBottomRightY is the constant for "radius-bottom-right-y" property tag. + // + // Used by `View`. + // Specifies the y-axis bottom-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. RadiusBottomRightY = "radius-bottom-right-y" - // X is the SizeUnit property of the ShadowProperty that determines the x-axis corners elliptic rounding - // radius of an element's outer border edge. + + // X is the constant for "x" property tag. + // + // Used by `ClipShape`, `RadiusProperty`. + // + // Usage in `ClipShape`: + // Specifies x-axis position of the clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `RadiusProperty`: + // Determines the x-axis top-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. X = "x" - // Y is the SizeUnit property of the ShadowProperty that determines the y-axis corners elliptic rounding - // radius of an element's outer border edge. + + // Y is the constant for "y" property tag. + // + // Used by `ClipShape`, `RadiusProperty`. + // + // Usage in `ClipShape`: + // Specifies y-axis position of the clip shape. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `RadiusProperty`: + // Determines the y-axis top-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Y = "y" - // TopLeft is the SizeUnit property of the ShadowProperty that determines the top-left corner rounding radius - // of an element's outer border edge. + + // TopLeft is the constant for "top-left" property tag. + // + // Used by `RadiusProperty`. + // Determines the top-left corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopLeft = "top-left" - // TopLeftX is the SizeUnit property of the ShadowProperty that determines the x-axis top-left corner elliptic - // rounding radius of an element's outer border edge. + + // TopLeftX is the constant for "top-left-x" property tag. + // + // Used by `RadiusProperty`. + // Determines the x-axis top-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopLeftX = "top-left-x" - // TopLeftY is the SizeUnit property of the ShadowProperty that determines the y-axis top-left corner elliptic - // rounding radius of an element's outer border edge. + + // TopLeftY is the constant for "top-left-y" property tag. + // + // Used by `RadiusProperty`. + // Determines the y-axis top-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopLeftY = "top-left-y" - // TopRight is the SizeUnit property of the ShadowProperty that determines the top-right corner rounding radius - // of an element's outer border edge. + + // TopRight is the constant for "top-right" property tag. + // + // Used by `RadiusProperty`. + // Determines the top-right corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopRight = "top-right" - // TopRightX is the SizeUnit property of the ShadowProperty that determines the x-axis top-right corner elliptic - // rounding radius of an element's outer border edge. + + // TopRightX is the constant for "top-right-x" property tag. + // + // Used by `RadiusProperty`. + // Determines the x-axis top-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopRightX = "top-right-x" - // TopRightY is the SizeUnit property of the ShadowProperty that determines the y-axis top-right corner elliptic - // rounding radius of an element's outer border edge. + + // TopRightY is the constant for "top-right-y" property tag. + // + // Used by `RadiusProperty`. + // Determines the y-axis top-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TopRightY = "top-right-y" - // BottomLeft is the SizeUnit property of the ShadowProperty that determines the bottom-left corner rounding radius - // of an element's outer border edge. + + // BottomLeft is the constant for "bottom-left" property tag. + // + // Used by `RadiusProperty`. + // Determines the bottom-left corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomLeft = "bottom-left" - // BottomLeftX is the SizeUnit property of the ShadowProperty that determines the x-axis bottom-left corner elliptic - // rounding radius of an element's outer border edge. + + // BottomLeftX is the constant for "bottom-left-x" property tag. + // + // Used by `RadiusProperty`. + // Determines the x-axis bottom-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomLeftX = "bottom-left-x" - // BottomLeftY is the SizeUnit property of the ShadowProperty that determines the y-axis bottom-left corner elliptic - // rounding radius of an element's outer border edge. + + // BottomLeftY is the constant for "bottom-left-y" property tag. + // + // Used by `RadiusProperty`. + // Determines the y-axis bottom-left corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomLeftY = "bottom-left-y" - // BottomRight is the SizeUnit property of the ShadowProperty that determines the bottom-right corner rounding radius - // of an element's outer border edge. + + // BottomRight is the constant for "bottom-right" property tag. + // + // Used by `RadiusProperty`. + // Determines the bottom-right corner rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomRight = "bottom-right" - // BottomRightX is the SizeUnit property of the ShadowProperty that determines the x-axis bottom-right corner elliptic - // rounding radius of an element's outer border edge. + + // BottomRightX is the constant for "bottom-right-x" property tag. + // + // Used by `RadiusProperty`. + // Determines the x-axis bottom-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomRightX = "bottom-right-x" - // BottomRightY is the SizeUnit property of the ShadowProperty that determines the y-axis bottom-right corner elliptic - // rounding radius of an element's outer border edge. + + // BottomRightY is the constant for "bottom-right-y" property tag. + // + // Used by `RadiusProperty`. + // Determines the y-axis bottom-right corner elliptic rounding radius of an element's outer border edge. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BottomRightY = "bottom-right-y" ) diff --git a/resizable.go b/resizable.go index 0bece40..d10d119 100644 --- a/resizable.go +++ b/resizable.go @@ -8,13 +8,31 @@ import ( // Constants for [Resizable] specific properties and events const ( - // Side is the constant for the "side" property tag. - // The "side" int property determines which side of the container is used to resize. - // The value of property is or-combination of TopSide (1), RightSide (2), BottomSide (4), and LeftSide (8) + // Side is the constant for "side" property tag. + // + // Used by `Resizable`. + // Determines which side of the container is used to resize. The value of property is an or-combination of values listed. + // Default value is "all". + // + // Supported types: `int`, `string`. + // + // Values: + // `1`(`TopSide`) or "top" - Top frame side. + // `2`(`RightSide`) or "right" - Right frame side. + // `4`(`BottomSide`) or "bottom" - Bottom frame side. + // `8`(`LeftSide`) or "left" - Left frame side. + // `15`(`AllSides`) or "all" - All frame sides. Side = "side" - // ResizeBorderWidth is the constant for the "resize-border-width" property tag. - // The "ResizeBorderWidth" SizeUnit property determines the width of the resizing border + // ResizeBorderWidth is the constant for "resize-border-width" property tag. + // + // Used by `Resizable`. + // Specifies the width of the resizing border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. ResizeBorderWidth = "resize-border-width" ) diff --git a/resizeEvent.go b/resizeEvent.go index ee53b62..8cafdb0 100644 --- a/resizeEvent.go +++ b/resizeEvent.go @@ -1,14 +1,21 @@ package rui // ResizeEvent is the constant for "resize-event" property tag. -// The "resize-event" is fired when the view changes its size. -// The main listener format: // -// func(View, Frame). +// Used by `View`. +// Is fired when the view changes its size. // -// The additional listener formats: +// General listener format: +// `func(view rui.View, frame rui.Frame)`. // -// func(Frame), func(View), and func(). +// where: +// view - Interface of a view which generated this event, +// frame - New offset and size of the view's visible area. +// +// Allowed listener formats: +// `func(frame rui.Frame)`, +// `func(view rui.View)`, +// `func()`. const ResizeEvent = "resize-event" func (view *viewData) onResize(self View, x, y, width, height float64) { diff --git a/scrollEvent.go b/scrollEvent.go index 3e630db..29d6f17 100644 --- a/scrollEvent.go +++ b/scrollEvent.go @@ -1,14 +1,21 @@ package rui // ScrollEvent is the constant for "scroll-event" property tag. -// The "scroll-event" is fired when the content of the view is scrolled. -// The main listener format: // -// func(View, Frame). +// Used by `View`. +// Is fired when the content of the view is scrolled. // -// The additional listener formats: +// General listener format: +// `func(view rui.View, frame rui.Frame)`. // -// func(Frame), func(View), and func(). +// where: +// view - Interface of a view which generated this event, +// frame - New offset and size of the view's visible area. +// +// Allowed listener formats: +// `func(frame rui.Frame)`, +// `func(view rui.View)`, +// `func()`. const ScrollEvent = "scroll-event" func (view *viewData) onScroll(self View, x, y, width, height float64) { diff --git a/shadow.go b/shadow.go index 1cce2c1..69efc4b 100644 --- a/shadow.go +++ b/shadow.go @@ -7,24 +7,99 @@ import ( // Constants for [ViewShadow] specific properties const ( - // ColorTag is the name of the color property of the shadow. + // ColorTag is the constant for "color" property tag. + // + // Used by `ColumnSeparatorProperty`, `BorderProperty`, `OutlineProperty`, `ViewShadow`. + // + // Usage in `ColumnSeparatorProperty`: + // Line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. + // + // Usage in `BorderProperty`: + // Border line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. + // + // Usage in `OutlineProperty`: + // Outline line color. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. + // + // Usage in `ViewShadow`: + // Color property of the shadow. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. ColorTag = "color" - // Inset is the name of bool property of the shadow. If it is set to "false" (default) then the shadow - // is assumed to be a drop shadow (as if the box were raised above the content). - // If it is set to "true" then the shadow to one inside the frame (as if the content was depressed inside the box). - // Inset shadows are drawn inside the border (even transparent ones), above the background, but below content. + + // Inset is the constant for "inset" property tag. + // + // Used by `ViewShadow`. + // Controls whether to draw shadow inside the frame or outside. Inset shadows are drawn inside the border(even transparent + // ones), above the background, but below content. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Drop shadow inside the frame(as if the content was depressed inside the box). + // `false` or `0` or "false", "no", "off", "0" - Shadow is assumed to be a drop shadow(as if the box were raised above the content). Inset = "inset" - // XOffset is the name of the SizeUnit property of the shadow that determines the shadow horizontal offset. - // Negative values place the shadow to the left of the element. + + // XOffset is the constant for "x-offset" property tag. + // + // Used by `ViewShadow`. + // Determines the shadow horizontal offset. Negative values place the shadow to the left of the element. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. XOffset = "x-offset" - // YOffset is the name of the SizeUnit property of the shadow that determines the shadow vertical offset. - // Negative values place the shadow above the element. + + // YOffset is the constant for "y-offset" property tag. + // + // Used by `ViewShadow`. + // Determines the shadow vertical offset. Negative values place the shadow above the element. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. YOffset = "y-offset" - // BlurRadius is the name of the SizeUnit property of the shadow that determines the radius of the blur effect. - // The larger this value, the bigger the blur, so the shadow becomes bigger and lighter. Negative values are not allowed. + + // BlurRadius is the constant for "blur" property tag. + // + // Used by `ViewShadow`. + // Determines the radius of the blur effect. The larger this value, the bigger the blur, so the shadow becomes bigger and + // lighter. Negative values are not allowed. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. BlurRadius = "blur" - // SpreadRadius is the name of the SizeUnit property of the shadow. Positive values will cause the shadow to expand - // and grow bigger, negative values will cause the shadow to shrink. + + // SpreadRadius is the constant for "spread-radius" property tag. + // + // Used by `ViewShadow`. + // Positive values will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. SpreadRadius = "spread-radius" ) diff --git a/tableView.go b/tableView.go index aef41b2..34a9bd5 100644 --- a/tableView.go +++ b/tableView.go @@ -8,199 +8,521 @@ import ( // Constants for [TableView] specific properties and events const ( - // TableVerticalAlign is the constant for the "table-vertical-align" property tag. - // The "table-vertical-align" int property sets the vertical alignment of the content inside a table cell. - // Valid values are TopAlign (0), BottomAlign (1), CenterAlign (2), and BaselineAlign (3, 4) + // TableVerticalAlign is the constant for "table-vertical-align" property tag. + // + // Used by `TableView`. + // Set the vertical alignment of the content inside a table cell. + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopAlign`) or "top" - Top alignment. + // `1`(`BottomAlign`) or "bottom" - Bottom alignment. + // `2`(`CenterAlign`) or "center" - Center alignment. + // `3`(`StretchAlign`) or "stretch" - Work as baseline alignment, see below. + // `4`(`BaselineAlign`) or "baseline" - Baseline alignment. TableVerticalAlign = "table-vertical-align" - // HeadHeight is the constant for the "head-height" property tag. - // The "head-height" int property sets the number of rows in the table header. - // The default value is 0 (no header) + // HeadHeight is the constant for "head-height" property tag. + // + // Used by `TableView`. + // Sets the number of rows in the table header. The default value is `0` (no header). + // + // Supported types: `int`, `string`. + // + // Values: + // `0` or "0" - No header. + // > `0` or > "0" - Number of rows act as a header. HeadHeight = "head-height" - // HeadStyle is the constant for the "head-style" property tag. - // The "head-style" string property sets the header style name + // HeadStyle is the constant for "head-style" property tag. + // + // Used by `TableView`. + // Set the header style name or description of style properties. + // + // Supported types: `string`, `Params`. + // + // Internal type is either `string` or `Params`. + // + // Conversion rules: + // `string` - must contain style name defined in resources. + // `Params` - must contain style properties. HeadStyle = "head-style" - // FootHeight is the constant for the "foot-height" property tag. - // The "foot-height" int property sets the number of rows in the table footer. - // The default value is 0 (no footer) + // FootHeight is the constant for "foot-height" property tag. + // + // Used by `TableView`. + // Sets the number of rows in the table footer. The default value is `0` (no footer). + // + // Supported types: `int`, `string`. + // + // Values: + // `0` or "0" - No footer. + // > `0` or > "0" - Number of rows act as a footer. FootHeight = "foot-height" - // FootStyle is the constant for the "foot-style" property tag. - // The "foot-style" string property sets the footer style name + // FootStyle is the constant for "foot-style" property tag. + // + // Used by `TableView`. + // Set the footer style name or description of style properties. + // + // Supported types: `string`, `Params`. + // + // Internal type is either `string` or `Params`. + // + // Conversion rules: + // `string` - must contain style name defined in resources. + // `Params` - must contain style properties. FootStyle = "foot-style" - // RowSpan is the constant for the "row-span" property tag. - // The "row-span" int property sets the number of table row to span. - // Used only when specifying cell parameters in the implementation of TableCellStyle + // RowSpan is the constant for "row-span" property tag. + // + // Used by `TableView`. + // Set the number of table row to span. Used only when specifying cell parameters in the implementation of + // `TableCellStyle`. + // + // Supported types: `int`, `string`. + // + // Values: + // `0` or "0" - No merging will be applied. + // > `0` or > "0" - Number of rows including current one to be merged together. RowSpan = "row-span" - // ColumnSpan is the constant for the "column-span" property tag. - // The "column-span" int property sets the number of table column to span. - // Used only when specifying cell parameters in the implementation of TableCellStyle + // ColumnSpan is the constant for "column-span" property tag. + // + // Used by `TableView`. + // Sets the number of table column cells to be merged together. Used only when specifying cell parameters in the + // implementation of `TableCellStyle`. + // + // Supported types: `int`, `string`. + // + // Values: + // `0` or "0" - No merging will be applied. + // > `0` or > "0" - Number of columns including current one to be merged together. ColumnSpan = "column-span" - // RowStyle is the constant for the "row-style" property tag. - // The "row-style" property sets the adapter which specifies styles of each table row. - // This property can be assigned or by an implementation of TableRowStyle interface, or by an array of Params. + // RowStyle is the constant for "row-style" property tag. + // + // Used by `TableView`. + // Set the adapter which specifies styles of each table row. + // + // Supported types: `TableRowStyle`, `[]Params`. + // + // Internal type is `TableRowStyle`, other types converted to it during assignment. + // See `TableRowStyle` description for more details. RowStyle = "row-style" - // ColumnStyle is the constant for the "column-style" property tag. - // The "column-style" property sets the adapter which specifies styles of each table column. - // This property can be assigned or by an implementation of TableColumnStyle interface, or by an array of Params. + // ColumnStyle is the constant for "column-style" property tag. + // + // Used by `TableView`. + // Set the adapter which specifies styles of each table column. + // + // Supported types: `TableColumnStyle`, `[]Params`. + // + // Internal type is `TableColumnStyle`, other types converted to it during assignment. + // See `TableColumnStyle` description for more details. ColumnStyle = "column-style" - // CellStyle is the constant for the "cell-style" property tag. - // The "cell-style" property sets the adapter which specifies styles of each table cell. - // This property can be assigned only by an implementation of TableCellStyle interface. + // CellStyle is the constant for "cell-style" property tag. + // + // Used by `TableView`. + // Set the adapter which specifies styles of each table cell. This property can be assigned only by an implementation of + // `TableCellStyle` interface. + // + // Supported types: `TableCellStyle`. CellStyle = "cell-style" - // CellPadding is the constant for the "cell-padding" property tag. - // The "cell-padding" Bounds property sets the padding area on all four sides of a table call at once. - // An element's padding area is the space between its content and its border. + // CellPadding is the constant for "cell-padding" property tag. + // + // Used by `TableView`. + // Sets the padding area on all four sides of a table cell at once. An element's padding area is the space between its + // content and its border. + // + // Supported types: `BoundsProperty`, `Bounds`, `SizeUnit`, `float32`, `float64`, `int`. + // + // Internal type is `BoundsProperty`, other types converted to it during assignment. + // See `BoundsProperty`, `Bounds` and `SizeUnit` description for more details. CellPadding = "cell-padding" - // CellPaddingLeft is the constant for the "cell-padding-left" property tag. - // The "cell-padding-left" SizeUnit property sets the width of the padding area to the left of a cell content. - // An element's padding area is the space between its content and its border. + // CellPaddingLeft is the constant for "cell-padding-left" property tag. + // + // Used by `TableView`. + // Set the width of the padding area to the left of a cell content. An element's padding area is the space between its + // content and its border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellPaddingLeft = "cell-padding-left" - // CellPaddingRight is the constant for the "cell-padding-right" property tag. - // The "cell-padding-right" SizeUnit property sets the width of the padding area to the left of a cell content. - // An element's padding area is the space between its content and its border. + // CellPaddingRight is the constant for "cell-padding-right" property tag. + // + // Used by `TableView`. + // Set the width of the padding area to the left of a cell content. An element's padding area is the space between its + // content and its border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellPaddingRight = "cell-padding-right" - // CellPaddingTop is the constant for the "cell-padding-top" property tag. - // The "cell-padding-top" SizeUnit property sets the height of the padding area to the top of a cell content. - // An element's padding area is the space between its content and its border. + // CellPaddingTop is the constant for "cell-padding-top" property tag. + // + // Used by `TableView`. + // Set the height of the padding area to the top of a cell content. An element's padding area is the space between its + // content and its border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellPaddingTop = "cell-padding-top" - // CellPaddingBottom is the constant for the "cell-padding-bottom" property tag. - // The "cell-padding-bottom" SizeUnit property sets the height of the padding area to the bottom of a cell content. + // CellPaddingBottom is the constant for "cell-padding-bottom" property tag. + // + // Used by `TableView`. + // Set the height of the padding area to the bottom of a cell content. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellPaddingBottom = "cell-padding-bottom" - // CellBorder is the constant for the "cell-border" property tag. - // The "cell-border" property sets a table cell's border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // CellBorder is the constant for "cell-border" property tag. + // + // Used by `TableView`. + // Set a table cell's border. It sets the values of a border width, style, and color. Can also be used when setting + // parameters in properties "row-style", "column-style", "foot-style" and "head-style". + // + // Supported types: `BorderProperty`, `ViewBorder`, `ViewBorders`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `BorderProperty`, `ViewBorder` and `ViewBorders` description for more details. CellBorder = "cell-border" - // CellBorderLeft is the constant for the "cell-border-left" property tag. - // The "cell-border-left" property sets a view's left border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // CellBorderLeft is the constant for "cell-border-left" property tag. + // + // Used by `TableView`. + // Set a view's left border. It sets the values of a border width, style, and color. This property can be assigned a value + // of `BorderProperty`, `ViewBorder` types or `BorderProperty` text representation. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder` and `BorderProperty` description for more details. CellBorderLeft = "cell-border-left" - // CellBorderRight is the constant for the "cell-border-right" property tag. - // The "cell-border-right" property sets a view's right border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // CellBorderRight is the constant for "cell-border-right" property tag. + // + // Used by `TableView`. + // Set a view's right border. It sets the values of a border width, style, and color. This property can be assigned a + // value of `BorderProperty`, `ViewBorder` types or `BorderProperty` text representation. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder` and `BorderProperty` description for more details. CellBorderRight = "cell-border-right" - // CellBorderTop is the constant for the "cell-border-top" property tag. - // The "cell-border-top" property sets a view's top border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // CellBorderTop is the constant for "cell-border-top" property tag. + // + // Used by `TableView`. + // Set a view's top border. It sets the values of a border width, style, and color. This property can be assigned a value + // of `BorderProperty`, `ViewBorder` types or `BorderProperty` text representation. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder` and `BorderProperty` description for more details. CellBorderTop = "cell-border-top" - // CellBorderBottom is the constant for the "cell-border-bottom" property tag. - // The "cell-border-bottom" property sets a view's bottom border. It sets the values of a border width, style, and color. - // This property can be assigned a value of BorderProperty type, or ViewBorder type, or BorderProperty text representation. + // CellBorderBottom is the constant for "cell-border-bottom" property tag. + // + // Used by `TableView`. + // Set a view's bottom border. It sets the values of a border width, style, and color. + // + // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // + // Internal type is `BorderProperty`, other types converted to it during assignment. + // See `ViewBorder` and `BorderProperty` description for more details. CellBorderBottom = "cell-border-bottom" - // CellBorderStyle is the constant for the "cell-border-style" property tag. - // The "cell-border-style" int property sets the line style for all four sides of a table cell's border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // CellBorderStyle is the constant for "cell-border-style" property tag. + // + // Used by `TableView`. + // Set the line style for all four sides of a table cell's border. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. CellBorderStyle = "cell-border-style" - // CellBorderLeftStyle is the constant for the "cell-border-left-style" property tag. - // The "cell-border-left-style" int property sets the line style of a table cell's left border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // CellBorderLeftStyle is the constant for "cell-border-left-style" property tag. + // + // Used by `TableView`. + // Set the line style of a table cell's left border. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. CellBorderLeftStyle = "cell-border-left-style" - // CellBorderRightStyle is the constant for the "cell-border-right-style" property tag. - // The "cell-border-right-style" int property sets the line style of a table cell's right border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // CellBorderRightStyle is the constant for "cell-border-right-style" property tag. + // + // Used by `TableView`. + // Set the line style of a table cell's right border. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. CellBorderRightStyle = "cell-border-right-style" - // CellBorderTopStyle is the constant for the "cell-border-top-style" property tag. - // The "cell-border-top-style" int property sets the line style of a table cell's top border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // CellBorderTopStyle is the constant for "cell-border-top-style" property tag. + // + // Used by `TableView`. + // Set the line style of a table cell's top border. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. CellBorderTopStyle = "cell-border-top-style" - // CellBorderBottomStyle is the constant for the "cell-border-bottom-style" property tag. - // The "cell-border-bottom-style" int property sets the line style of a table cell's bottom border. - // Valid values are NoneLine (0), SolidLine (1), DashedLine (2), DottedLine (3), and DoubleLine (4). + // CellBorderBottomStyle is the constant for "cell-border-bottom-style" property tag. + // + // Used by `TableView`. + // Sets the line style of a table cell's bottom border. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneLine`) or "none" - The border will not be drawn. + // `1`(`SolidLine`) or "solid" - Solid line as a border. + // `2`(`DashedLine`) or "dashed" - Dashed line as a border. + // `3`(`DottedLine`) or "dotted" - Dotted line as a border. + // `4`(`DoubleLine`) or "double" - Double line as a border. CellBorderBottomStyle = "cell-border-bottom-style" - // CellBorderWidth is the constant for the "cell-border-width" property tag. - // The "cell-border-width" property sets the line width for all four sides of a table cell's border. + // CellBorderWidth is the constant for "cell-border-width" property tag. + // + // Used by `TableView`. + // Set the line width for all four sides of a table cell's border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellBorderWidth = "cell-border-width" - // CellBorderLeftWidth is the constant for the "cell-border-left-width" property tag. - // The "cell-border-left-width" SizeUnit property sets the line width of a table cell's left border. + // CellBorderLeftWidth is the constant for "cell-border-left-width" property tag. + // + // Used by `TableView`. + // Set the line width of a table cell's left border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellBorderLeftWidth = "cell-border-left-width" - // CellBorderRightWidth is the constant for the "cell-border-right-width" property tag. - // The "cell-border-right-width" SizeUnit property sets the line width of a table cell's right border. + // CellBorderRightWidth is the constant for "cell-border-right-width" property tag. + // + // Used by `TableView`. + // Set the line width of a table cell's right border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellBorderRightWidth = "cell-border-right-width" - // CellBorderTopWidth is the constant for the "cell-border-top-width" property tag. - // The "cell-border-top-width" SizeUnit property sets the line width of a table cell's top border. + // CellBorderTopWidth is the constant for "cell-border-top-width" property tag. + // + // Used by `TableView`. + // Set the line width of a table cell's top border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellBorderTopWidth = "cell-border-top-width" - // CellBorderBottomWidth is the constant for the "cell-border-bottom-width" property tag. - // The "cell-border-bottom-width" SizeUnit property sets the line width of a table cell's bottom border. + // CellBorderBottomWidth is the constant for "cell-border-bottom-width" property tag. + // + // Used by `TableView`. + // Set the line width of a table cell's bottom border. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. CellBorderBottomWidth = "cell-border-bottom-width" - // CellBorderColor is the constant for the "cell-border-color" property tag. - // The "cell-border-color" property sets the line color for all four sides of a table cell's border. + // CellBorderColor is the constant for "cell-border-color" property tag. + // + // Used by `TableView`. + // Set the line color for all four sides of a table cell's border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. CellBorderColor = "cell-border-color" - // CellBorderLeftColor is the constant for the "cell-border-left-color" property tag. - // The "cell-border-left-color" property sets the line color of a table cell's left border. + // CellBorderLeftColor is the constant for "cell-border-left-color" property tag. + // + // Used by `TableView`. + // Set the line color of a table cell's left border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. CellBorderLeftColor = "cell-border-left-color" - // CellBorderRightColor is the constant for the "cell-border-right-color" property tag. - // The "cell-border-right-color" property sets the line color of a table cell's right border. + // CellBorderRightColor is the constant for "cell-border-right-color" property tag. + // + // Used by `TableView`. + // Set the line color of a table cell's right border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. CellBorderRightColor = "cell-border-right-color" - // CellBorderTopColor is the constant for the "cell-border-top-color" property tag. - // The "cell-border-top-color" property sets the line color of a table cell's top border. + // CellBorderTopColor is the constant for "cell-border-top-color" property tag. + // + // Used by `TableView`. + // Set the line color of a table cell's top border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. CellBorderTopColor = "cell-border-top-color" - // CellBorderBottomColor is the constant for the "cell-border-bottom-color" property tag. - // The "cell-border-bottom-color" property sets the line color of a table cell's bottom border. + // CellBorderBottomColor is the constant for "cell-border-bottom-color" property tag. + // + // Used by `TableView`. + // Set the line color of a table cell's bottom border. + // + // Supported types: `Color`, `string`. + // + // Internal type is `Color`, other types converted to it during assignment. + // See `Color` description for more details. CellBorderBottomColor = "cell-border-bottom-color" - // SelectionMode is the constant for the "selection-mode" property tag. - // The "selection-mode" int property sets the mode of the table elements selection. - // Valid values are NoneSelection (0), CellSelection (1), and RowSelection (2) + // SelectionMode is the constant for "selection-mode" property tag. + // + // Used by `TableView`. + // Sets the mode of the table elements selection. Default value is "none". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`NoneSelection`) or "none" - Table elements are not selectable. The table cannot receive input focus. + // `1`(`CellSelection`) or "cell" - One table cell can be selected(highlighted). The cell is selected interactively using the mouse or keyboard(using the cursor keys). + // `2`(`RowSelection`) or "row" - The entire table row can be selected (highlighted). The row is selected interactively using the mouse or keyboard (using the cursor keys). SelectionMode = "selection-mode" // TableCellClickedEvent is the constant for "table-cell-clicked" property tag. - // The "table-cell-clicked" event occurs when the user clicks on a table cell. - // The main listener format: func(TableView, int, int), where the second argument is the row number, - // and third argument is the column number. + // + // Used by `TableView`. + // Occur when the user clicks on a table cell. + // + // General listener format: + // `func(table rui.TableView, row, col int)`. + // + // where: + // table - Interface of a table view which generated this event, + // row - Row of the clicked cell, + // col - Column of the clicked cell. + // + // Allowed listener formats: + // `func(row, col int)`. TableCellClickedEvent = "table-cell-clicked" // TableCellSelectedEvent is the constant for "table-cell-selected" property tag. - // The "table-cell-selected" event occurs when a table cell becomes selected. - // The main listener format: func(TableView, int, int), where the second argument is the row number, - // and third argument is the column number. + // + // Used by `TableView`. + // Occur when a table cell becomes selected. + // + // General listener format: + // `func(table rui.TableView, row, col int)`. + // + // where: + // table - Interface of a table view which generated this event, + // row - Row of the selected cell, + // col - Column of the selected cell. + // + // Allowed listener formats: + // `func(row, col int)`. TableCellSelectedEvent = "table-cell-selected" // TableRowClickedEvent is the constant for "table-row-clicked" property tag. - // The "table-row-clicked" event occurs when the user clicks on a table row. - // The main listener format: func(TableView, int), where the second argument is the row number. + // + // Used by `TableView`. + // Occur when the user clicks on a table row. + // + // General listener format: + // `func(table rui.TableView, row int)`. + // + // where: + // table - Interface of a table view which generated this event, + // row - Clicked row. + // + // Allowed listener formats: + // `func(row int)`. TableRowClickedEvent = "table-row-clicked" // TableRowSelectedEvent is the constant for "table-row-selected" property tag. - // The "table-row-selected" event occurs when a table row becomes selected. - // The main listener format: func(TableView, int), where the second argument is the row number. + // + // Used by `TableView`. + // Occur when a table row becomes selected. + // + // General listener format: + // `func(table rui.TableView, row int)`. + // + // where: + // table - Interface of a table view which generated this event, + // row - Selected row. + // + // Allowed listener formats: + // `func(row int)`. TableRowSelectedEvent = "table-row-selected" - // AllowSelection is the constant for the "allow-selection" property tag. - // The "allow-selection" property sets the adapter which specifies styles of each table row. - // This property can be assigned or by an implementation of TableAllowCellSelection - // or TableAllowRowSelection interface. + // AllowSelection is the constant for "allow-selection" property tag. + // + // Used by `TableView`. + // Set the adapter which specifies whether cell/row selection is allowed. This property can be assigned by an + // implementation of `TableAllowCellSelection` or `TableAllowRowSelection` interface. + // + // Supported types: `TableAllowCellSelection`, `TableAllowRowSelection`. + // + // Internal type is either `TableAllowCellSelection`, `TableAllowRowSelection`, see their description for more details. AllowSelection = "allow-selection" ) diff --git a/tabsLayout.go b/tabsLayout.go index 28c698e..e30f02d 100644 --- a/tabsLayout.go +++ b/tabsLayout.go @@ -8,43 +8,105 @@ import ( // Constants for [TabsLayout] specific properties and events const ( // CurrentTabChangedEvent is the constant for "current-tab-changed" property tag. - // The "current-tab-changed" event occurs when the new tab becomes active. - // The main listener format: func(TabsLayout, int, int), where - // the second argument is the index of the new active tab, - // the third argument is the index of the old active tab. + // + // Used by `TabsLayout`. + // Occur when the new tab becomes active. + // + // General listener format: + // `func(tabsLayout rui.TabsLayout, newTab, oldTab int)`. + // + // where: + // tabsLayout - Interface of a tabs layout which generated this event, + // newTab - Index of a new active tab, + // oldTab - Index of an old active tab. + // + // Allowed listener formats: + // `func(tabsLayout rui.TabsLayout, newTab int)`, + // `func(newTab, oldTab int)`, + // `func(newTab int)`, + // `func()`. CurrentTabChangedEvent = "current-tab-changed" // Icon is the constant for "icon" property tag. - // The string "icon" property defines the icon name that is displayed in the tab. + // + // Used by `TabsLayout`. + // Defines the icon name that is displayed in the tab. The property is set for the child view of `TabsLayout`. + // + // Supported types: `string`. Icon = "icon" // TabCloseButton is the constant for "tab-close-button" property tag. - // The "tab-close-button" is the bool property. If it is "true" then a close button is displayed within the tab. + // + // Used by `TabsLayout`. + // Controls whether to add close button to a tab(s). This property can be set separately for each child view or for tabs + // layout itself. Property set for child view takes precedence over the value set for tabs layout. Default value is + // `false`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Tab(s) has close button. + // `false` or `0` or "false", "no", "off", "0" - No close button in tab(s). TabCloseButton = "tab-close-button" // TabCloseEvent is the constant for "tab-close-event" property tag. - // The "tab-close-event" occurs when when the user clicks on the tab close button. - // The main listener format: func(TabsLayout, int), where the second argument is the index of the tab. + // + // Used by `TabsLayout`. + // Occurs when the user clicks on the tab close button. + // + // General listener format: + // `func(tabsLayout rui.TabsLayout, tab int)`. + // + // where: + // tabsLayout - Interface of a tabs layout which generated this event, + // tab - Index of the tab. + // + // Allowed listener formats: + // `func(tab int)`, + // `func(tabsLayout rui.TabsLayout)`, + // `func()`. TabCloseEvent = "tab-close-event" - // Tabs is the constant for the "tabs" property tag. - // The "tabs" is the int property that sets where the tabs are located. - // Valid values: TopTabs (0), BottomTabs (1), LeftTabs (2), RightTabs (3), LeftListTabs (4), RightListTabs (5), and HiddenTabs (6). + // Tabs is the constant for "tabs" property tag. + // + // Used by `TabsLayout`. + // Sets where the tabs are located. Default value is "top". + // + // Supported types: `int`, `string`. + // + // Values: + // `0`(`TopTabs`) or "top" - Tabs on the top. + // `1`(`BottomTabs`) or "bottom" - Tabs on the bottom. + // `2`(`LeftTabs`) or "left" - Tabs on the left. Each tab is rotated 90° counterclockwise. + // `3`(`RightTabs`) or "right" - Tabs located on the right. Each tab is rotated 90° clockwise. + // `4`(`LeftListTabs`) or "left-list" - Tabs on the left. The tabs are displayed as a list. + // `5`(`RightListTabs`) or "right-list" - Tabs on the right. The tabs are displayed as a list. + // `6`(`HiddenTabs`) or "hidden" - Tabs are hidden. Tabs = "tabs" - // TabBarStyle is the constant for the "tab-bar-style" property tag. - // The "tab-bar-style" is the string property that sets the style for the display of the tab bar. - // The default value is "ruiTabBar". + // TabBarStyle is the constant for "tab-bar-style" property tag. + // + // Used by `TabsLayout`. + // Set the style for the display of the tab bar. The default value is "ruiTabBar". + // + // Supported types: `string`. TabBarStyle = "tab-bar-style" - // TabStyle is the constant for the "tab-style" property tag. - // The "tab-style" is the string property that sets the style for the display of the tab. - // The default value is "ruiTab" or "ruiVerticalTab". + // TabStyle is the constant for "tab-style" property tag. + // + // Used by `TabsLayout`. + // Set the style for the display of the tab. The default value is "ruiTab" or "ruiVerticalTab". + // + // Supported types: `string`. TabStyle = "tab-style" - // CurrentTabStyle is the constant for the "current-tab-style" property tag. - // The "current-tab-style" is the string property that sets the style for the display of the current (selected) tab. - // The default value is "ruiCurrentTab" or "ruiCurrentVerticalTab". + // CurrentTabStyle is the constant for "current-tab-style" property tag. + // + // Used by `TabsLayout`. + // Set the style for the display of the current(selected) tab. The default value is "ruiCurrentTab" or + // "ruiCurrentVerticalTab". + // + // Supported types: `string`. CurrentTabStyle = "current-tab-style" inactiveTabStyle = "data-inactiveTabStyle" diff --git a/timePicker.go b/timePicker.go index e523fee..599cfb0 100644 --- a/timePicker.go +++ b/timePicker.go @@ -9,24 +9,86 @@ import ( // Constants for [TimePicker] specific properties and events. const ( // TimeChangedEvent is the constant for "time-changed" property tag. - // The "time-changed" event occur when current time of the [TimePicker] has been changed. - // The main listener format: func(picker TimePicker, newTime, oldTime time.Time). + // + // Used by `TimePicker`. + // Occur when current time of the time picker has been changed. + // + // General listener format: + // `func(picker rui.TimePicker, newTime, oldTime time.Time)`. + // + // where: + // picker - Interface of a time picker which generated this event, + // newTime - New time value, + // oldTime - Old time value. + // + // Allowed listener formats: + // `func(picker rui.TimePicker, newTime time.Time)`, + // `func(newTime, oldTime time.Time)`, + // `func(newTime time.Time)`, + // `func(picker rui.TimePicker)`, + // `func()`. TimeChangedEvent = "time-changed" // TimePickerMin is the constant for "time-picker-min" property tag. - // The "time-picker-min" define the minimum value of the time. + // + // Used by `TimePicker`. + // The minimum value of the time. + // + // Supported types: `time.Time`, `string`. + // + // Internal type is `time.Time`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - values of this type parsed and converted to `time.Time`. The following formats are supported: + // "HH:MM:SS" - "08:15:00". + // "HH:MM:SS PM" - "08:15:00 AM". + // "HH:MM" - "08:15". + // "HH:MM PM" - "08:15 AM". TimePickerMin = "time-picker-min" // TimePickerMax is the constant for "time-picker-max" property tag. - // The "time-picker-max" define the maximum value of the time. + // + // Used by `TimePicker`. + // The maximum value of the time. + // + // Supported types: `time.Time`, `string`. + // + // Internal type is `time.Time`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - values of this type parsed and converted to `time.Time`. The following formats are supported: + // "HH:MM:SS" - "08:15:00". + // "HH:MM:SS PM" - "08:15:00 AM". + // "HH:MM" - "08:15". + // "HH:MM PM" - "08:15 AM". TimePickerMax = "time-picker-max" // TimePickerStep is the constant for "time-picker-step" property tag. - // The "time-picker-step" define time step in seconds. + // + // Used by `TimePicker`. + // Time step in seconds. + // + // Supported types: `int`, `string`. + // + // Values: + // >= `0` or >= "0" - Step value in seconds used to increment or decrement time. TimePickerStep = "time-picker-step" // TimePickerValue is the constant for "time-picker-value" property tag. - // The "time-picker-value" define current value of the TimePicker. + // + // Used by `TimePicker`. + // Current value. + // + // Supported types: `time.Time`, `string`. + // + // Internal type is `time.Time`, other types converted to it during assignment. + // + // Conversion rules: + // `string` - values of this type parsed and converted to `time.Time`. The following formats are supported: + // "HH:MM:SS" - "08:15:00". + // "HH:MM:SS PM" - "08:15:00 AM". + // "HH:MM" - "08:15". + // "HH:MM PM" - "08:15 AM". TimePickerValue = "time-picker-value" timeFormat = "15:04:05" diff --git a/touchEvents.go b/touchEvents.go index 1dab574..7834c9e 100644 --- a/touchEvents.go +++ b/touchEvents.go @@ -8,28 +8,76 @@ import ( // Constants which represent [View] specific touch events properties const ( // TouchStart is the constant for "touch-start" property tag. - // The "touch-start" event is fired when one or more touch points are placed on the touch surface. - // The main listener format: func(View, TouchEvent). - // The additional listener formats: func(TouchEvent), func(View), and func(). + // + // Used by `View`. + // Is fired when one or more touch points are placed on the touch surface. + // + // General listener format: + // `func(view rui.View, event rui.TouchEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Touch event. + // + // Allowed listener formats: + // `func(event rui.TouchEvent)`, + // `func(view rui.View)`, + // `func()`. TouchStart = "touch-start" // TouchEnd is the constant for "touch-end" property tag. - // The "touch-end" event fires when one or more touch points are removed from the touch surface. - // The main listener format: func(View, TouchEvent). - // The additional listener formats: func(TouchEvent), func(View), and func(). + // + // Used by `View`. + // Fired when one or more touch points are removed from the touch surface. + // + // General listener format: + // `func(view rui.View, event rui.TouchEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Touch event. + // + // Allowed listener formats: + // `func(event rui.TouchEvent)`, + // `func(view rui.View)`, + // `func()`. TouchEnd = "touch-end" // TouchMove is the constant for "touch-move" property tag. - // The "touch-move" event is fired when one or more touch points are moved along the touch surface. - // The main listener format: func(View, TouchEvent). - // The additional listener formats: func(TouchEvent), func(View), and func(). + // + // Used by `View`. + // Is fired when one or more touch points are moved along the touch surface. + // + // General listener format: + // `func(view rui.View, event rui.TouchEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Touch event. + // + // Allowed listener formats: + // `func(event rui.TouchEvent)`, + // `func(view rui.View)`, + // `func()`. TouchMove = "touch-move" // TouchCancel is the constant for "touch-cancel" property tag. - // The "touch-cancel" event is fired when one or more touch points have been disrupted - // in an implementation-specific manner (for example, too many touch points are created). - // The main listener format: func(View, TouchEvent). - // The additional listener formats: func(TouchEvent), func(View), and func(). + // + // Used by `View`. + // Is fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many + // touch points are created). + // + // General listener format: + // `func(view rui.View, event rui.TouchEvent)`. + // + // where: + // view - Interface of a view which generated this event, + // event - Touch event. + // + // Allowed listener formats: + // `func(event rui.TouchEvent)`, + // `func(view rui.View)`, + // `func()`. TouchCancel = "touch-cancel" ) @@ -42,22 +90,26 @@ type Touch struct { // X provides the horizontal coordinate within the view's viewport. X float64 + // Y provides the vertical coordinate within the view's viewport. Y float64 // ClientX provides the horizontal coordinate within the application's viewport at which the event occurred. ClientX float64 + // ClientY provides the vertical coordinate within the application's viewport at which the event occurred. ClientY float64 // ScreenX provides the horizontal coordinate (offset) of the touch pointer in global (screen) coordinates. ScreenX float64 + // ScreenY provides the vertical coordinate (offset) of the touch pointer in global (screen) coordinates. ScreenY float64 // RadiusX is the X radius of the ellipse that most closely circumscribes the area of contact with the screen. // The value is in pixels of the same scale as screenX. RadiusX float64 + // RadiusY is the Y radius of the ellipse that most closely circumscribes the area of contact with the screen. // The value is in pixels of the same scale as screenX. RadiusY float64 diff --git a/videoPlayer.go b/videoPlayer.go index abe0694..e309bf6 100644 --- a/videoPlayer.go +++ b/videoPlayer.go @@ -6,18 +6,34 @@ import ( // Constants for [VideoPlayer] specific properties and events const ( - // VideoWidth is the constant for the "video-width" property tag of VideoPlayer. - // The "video-width" float property defines the width of the video's display area in pixels. + // VideoWidth is the constant for "video-width" property tag. + // + // Used by `VideoPlayer`. + // Defines the width of the video's display area in pixels. + // + // Supported types: `float`, `int`, `string`. + // + // Values: + // Internal type is `float`, other types converted to it during assignment. VideoWidth = "video-width" - // VideoHeight is the constant for the "video-height" property tag of VideoPlayer. - // The "video-height" float property defines the height of the video's display area in pixels. + // VideoHeight is the constant for "video-height" property tag. + // + // Used by `VideoPlayer`. + // Defines the height of the video's display area in pixels. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. VideoHeight = "video-height" - // Poster is the constant for the "poster" property tag of VideoPlayer. - // The "poster" property defines an URL for an image to be shown while the video is downloading. - // If this attribute isn't specified, nothing is displayed until the first frame is available, - // then the first frame is shown as the poster frame. + // Poster is the constant for "poster" property tag. + // + // Used by `VideoPlayer`. + // Defines an URL for an image to be shown while the video is downloading. If this attribute isn't specified, nothing is + // displayed until the first frame is available, then the first frame is shown as the poster frame. + // + // Supported types: `string`. Poster = "poster" ) diff --git a/viewFilter.go b/viewFilter.go index a90ec2e..2454faa 100644 --- a/viewFilter.go +++ b/viewFilter.go @@ -7,67 +7,124 @@ import ( // Constants for [ViewFilter] specific properties and events const ( - // Blur is the constant for the "blur" property tag of the ViewFilter interface. - // The "blur" float64 property applies a Gaussian blur. The value of radius defines the value - // of the standard deviation to the Gaussian function, or how many pixels on the screen blend - // into each other, so a larger value will create more blur. The lacuna value for interpolation is 0. - // The parameter is specified as a length in pixels. + // Blur is the constant for "blur" property tag. + // + // Used by `ViewFilter`. + // Applies a Gaussian blur. The value of radius defines the value of the standard deviation to the Gaussian function, or + // how many pixels on the screen blend into each other, so a larger value will create more blur. The lacuna value for + // interpolation is 0. The parameter is specified as a length in pixels. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Blur = "blur" - // Brightness is the constant for the "brightness" property tag of the ViewFilter interface. - // The "brightness" float64 property applies a linear multiplier to input image, making it appear more - // or less bright. A value of 0% will create an image that is completely black. - // A value of 100% leaves the input unchanged. Other values are linear multipliers on the effect. - // Values of an amount over 100% are allowed, providing brighter results. + // Brightness is the constant for "brightness" property tag. + // + // Used by `ViewFilter`. + // Applies a linear multiplier to input image, making it appear more or less bright. A value of 0% will create an image + // that is completely black. A value of 100% leaves the input unchanged. Other values are linear multipliers on the + // effect. Values of an amount over 100% are allowed, providing brighter results. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Brightness = "brightness" - // Contrast is the constant for the "contrast" property tag of the ViewFilter interface. - // The "contrast" float64 property adjusts the contrast of the input. - // A value of 0% will create an image that is completely black. A value of 100% leaves the input unchanged. - // Values of amount over 100% are allowed, providing results with less contrast. + // Contrast is the constant for "contrast" property tag. + // + // Used by `ViewFilter`. + // Adjusts the contrast of the input. A value of 0% will create an image that is completely black. A value of 100% leaves + // the input unchanged. Values of amount over 100% are allowed, providing results with less contrast. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Contrast = "contrast" - // DropShadow is the constant for the "drop-shadow" property tag of the ViewFilter interface. - // The "drop-shadow" property applies a drop shadow effect to the input image. - // A drop shadow is effectively a blurred, offset version of the input image's alpha mask - // drawn in a particular color, composited below the image. - // Shadow parameters are set using the ViewShadow interface + // DropShadow is the constant for "drop-shadow" property tag. + // + // Used by `ViewFilter`. + // Applies a drop shadow effect to the input image. A drop shadow is effectively a blurred, offset version of the input + // image's alpha mask drawn in a particular color, composited below the image. Shadow parameters are set using the + // `ViewShadow` interface. + // + // Supported types: `[]ViewShadow`, `ViewShadow`, `string`. + // + // Internal type is `[]ViewShadow`, other types converted to it during assignment. + // See `ViewShadow` description for more details. + // + // Conversion rules: + // `[]ViewShadow` - stored as is, no conversion performed. + // `ViewShadow` - converted to `[]ViewShadow`. + // `string` - string representation of `ViewShadow`. Example: "_{blur = 1em, color = black, spread-radius = 0.5em}". DropShadow = "drop-shadow" - // Grayscale is the constant for the "grayscale" property tag of the ViewFilter interface. - // The "grayscale" float64 property converts the input image to grayscale. - // The value of ‘amount’ defines the proportion of the conversion. - // A value of 100% is completely grayscale. A value of 0% leaves the input unchanged. - // Values between 0% and 100% are linear multipliers on the effect. + // Grayscale is the constant for "grayscale" property tag. + // + // Used by `ViewFilter`. + // Converts the input image to grayscale. The value of ‘amount’ defines the proportion of the conversion. A value of 100% + // is completely grayscale. A value of 0% leaves the input unchanged. Values between 0% and 100% are linear multipliers on + // the effect. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Grayscale = "grayscale" - // HueRotate is the constant for the "hue-rotate" property tag of the ViewFilter interface. - // The "hue-rotate" AngleUnit property applies a hue rotation on the input image. - // The value of ‘angle’ defines the number of degrees around the color circle the input samples will be adjusted. - // A value of 0deg leaves the input unchanged. If the ‘angle’ parameter is missing, a value of 0deg is used. - // Though there is no maximum value, the effect of values above 360deg wraps around. + // HueRotate is the constant for "hue-rotate" property tag. + // + // Used by `ViewFilter`. + // Applies a hue rotation on the input image. The value of ‘angle’ defines the number of degrees around the color circle + // the input samples will be adjusted. A value of 0deg leaves the input unchanged. If the ‘angle’ parameter is missing, a + // value of 0deg is used. Though there is no maximum value, the effect of values above 360deg wraps around. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. HueRotate = "hue-rotate" - // Invert is the constant for the "invert" property tag of the ViewFilter interface. - // The "invert" float64 property inverts the samples in the input image. - // The value of ‘amount’ defines the proportion of the conversion. - // A value of 100% is completely inverted. A value of 0% leaves the input unchanged. - // Values between 0% and 100% are linear multipliers on the effect. + // Invert is the constant for "invert" property tag. + // + // Used by `ViewFilter`. + // Inverts the samples in the input image. The value of ‘amount’ defines the proportion of the conversion. A value of 100% + // is completely inverted. A value of 0% leaves the input unchanged. Values between 0% and 100% are linear multipliers on + // the effect. + // + // Supported types: `float64`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Invert = "invert" - // Saturate is the constant for the "saturate" property tag of the ViewFilter interface. - // The "saturate" float64 property saturates the input image. - // The value of ‘amount’ defines the proportion of the conversion. - // A value of 0% is completely un-saturated. A value of 100% leaves the input unchanged. - // Other values are linear multipliers on the effect. - // Values of amount over 100% are allowed, providing super-saturated results. + // Saturate is the constant for "saturate" property tag. + // + // Used by `ViewFilter`. + // Saturates the input image. The value of ‘amount’ defines the proportion of the conversion. A value of 0% is completely + // un-saturated. A value of 100% leaves the input unchanged. Other values are linear multipliers on the effect. Values of + // amount over 100% are allowed, providing super-saturated results. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Saturate = "saturate" - // Sepia is the constant for the "sepia" property tag of the ViewFilter interface. - // The "sepia" float64 property converts the input image to sepia. - // The value of ‘amount’ defines the proportion of the conversion. - // A value of 100% is completely sepia. A value of 0% leaves the input unchanged. - // Values between 0% and 100% are linear multipliers on the effect. + // Sepia is the constant for "sepia" property tag. + // + // Used by `ViewFilter`. + // Converts the input image to sepia. The value of ‘amount’ defines the proportion of the conversion. A value of 100% is + // completely sepia. A value of 0% leaves the input unchanged. Values between 0% and 100% are linear multipliers on the + // effect. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. Sepia = "sepia" //Opacity = "opacity" diff --git a/viewTransform.go b/viewTransform.go index c28d758..cb8f6ab 100644 --- a/viewTransform.go +++ b/viewTransform.go @@ -8,94 +8,381 @@ import ( // Constants for [Transform] specific properties const ( - // Perspective is the name of the SizeUnit property that determines the distance between the z = 0 plane - // and the user in order to give a 3D-positioned element some perspective. Each 3D element - // with z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. - // The default value is 0 (no 3D effects). + // Perspective is the constant for "perspective" property tag. + // + // Used by `View`. + // Distance between the z-plane and the user in order to give a 3D-positioned element some perspective. Each 3D element + // with z > 0 becomes larger, each 3D-element with z < 0 becomes smaller. The default value is 0 (no 3D effects). + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. Perspective = "perspective" - // PerspectiveOriginX is the name of the SizeUnit property that determines the x-coordinate of the position - // at which the viewer is looking. It is used as the vanishing point by the Perspective property. - // The default value is 50%. + // PerspectiveOriginX is the constant for "perspective-origin-x" property tag. + // + // Used by `View`. + // x-coordinate of the position at which the viewer is looking. It is used as the vanishing point by the "perspective" + // property. The default value is 50%. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. PerspectiveOriginX = "perspective-origin-x" - // PerspectiveOriginY is the name of the SizeUnit property that determines the y-coordinate of the position - // at which the viewer is looking. It is used as the vanishing point by the Perspective property. - // The default value is 50%. + // PerspectiveOriginY is the constant for "perspective-origin-y" property tag. + // + // Used by `View`. + // y-coordinate of the position at which the viewer is looking. It is used as the vanishing point by the "perspective" + // property. The default value is 50%. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. PerspectiveOriginY = "perspective-origin-y" - // BackfaceVisible is the name of the bool property that sets whether the back face of an element is - // visible when turned towards the user. Values: - // true - the back face is visible when turned towards the user (default value); - // false - the back face is hidden, effectively making the element invisible when turned away from the user. + // BackfaceVisible is the constant for "backface-visibility" property tag. + // + // Used by `View`. + // Controls whether the back face of a view is visible when turned towards the user. Default value is `true`. + // + // Supported types: `bool`, `int`, `string`. + // + // Values: + // `true` or `1` or "true", "yes", "on", "1" - Back face is visible when turned towards the user. + // `false` or `0` or "false", "no", "off", "0" - Back face is hidden, effectively making the view invisible when turned away from the user. BackfaceVisible = "backface-visibility" - // OriginX is the name of the SizeUnit property that determines the x-coordinate of the point around which - // a view transformation is applied. - // The default value is 50%. + // OriginX is the constant for "origin-x" property tag. + // + // Used by `View`. + // x-coordinate of the point around which a view transformation is applied. The default value is 50%. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. OriginX = "origin-x" - // OriginY is the name of the SizeUnit property that determines the y-coordinate of the point around which - // a view transformation is applied. - // The default value is 50%. + // OriginY is the constant for "origin-y" property tag. + // + // Used by `View`. + // y-coordinate of the point around which a view transformation is applied. The default value is 50%. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. OriginY = "origin-y" - // OriginZ is the name of the SizeUnit property that determines the z-coordinate of the point around which - // a view transformation is applied. - // The default value is 50%. + // OriginZ is the constant for "origin-z" property tag. + // + // Used by `View`. + // z-coordinate of the point around which a view transformation is applied. The default value is 50%. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. OriginZ = "origin-z" - // TransformTag is the name of the Transform property that specify the x-, y-, and z-axis translation values, - // the x-, y-, and z-axis scaling values, the angle to use to distort the element along the abscissa and ordinate, - // the angle of the view rotation + // TransformTag is the constant for "transform" property tag. + // + // Used by `View`. + // Specify translation, scale and rotation over x, y and z axes as well as a distorsion of a view along x and y axes. + // + // Supported types: `Transform`, `string`. + // + // See `Transform` description for more details. + // + // Conversion rules: + // `Transform` - stored as is, no conversion performed. + // `string` - string representation of `Transform` interface. Example: "_{translate-x = 10px, scale-y = 1.1}". TransformTag = "transform" - // TranslateX is the name of the SizeUnit property that specify the x-axis translation value - // of a 2D/3D translation + // TranslateX is the constant for "translate-x" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // x-axis translation value of a 2D/3D translation. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `Transform`: + // x-axis translation value of a 2D/3D translation. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TranslateX = "translate-x" - // TranslateY is the name of the SizeUnit property that specify the y-axis translation value - // of a 2D/3D translation + // TranslateY is the constant for "translate-y" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // y-axis translation value of a 2D/3D translation. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `Transform`: + // x-axis translation value of a 2D/3D translation. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TranslateY = "translate-y" - // TranslateZ is the name of the SizeUnit property that specify the z-axis translation value - // of a 3D translation + // TranslateZ is the constant for "translate-z" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // z-axis translation value of a 3D translation. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. + // + // Usage in `Transform`: + // z-axis translation value of a 3D translation. + // + // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // + // Internal type is `SizeUnit`, other types converted to it during assignment. + // See `SizeUnit` description for more details. TranslateZ = "translate-z" - // ScaleX is the name of the float property that specify the x-axis scaling value of a 2D/3D scale - // The default value is 1. + // ScaleX is the constant for "scale-x" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // x-axis scaling value of a 2D/3D scale. The original scale is 1. Values between 0 and 1 are used to decrease original + // scale, more than 1 - to increase. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `Transform`: + // x-axis scaling value of a 2D/3D scale. The original scale is 1. Values between 0 and 1 are used to decrease original + // scale, more than 1 - to increase. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. ScaleX = "scale-x" - // ScaleY is the name of the float property that specify the y-axis scaling value of a 2D/3D scale - // The default value is 1. + // ScaleY is the constant for "scale-y" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // y-axis scaling value of a 2D/3D scale. The original scale is 1. Values between 0 and 1 are used to decrease original + // scale, more than 1 - to increase. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `Transform`: + // y-axis scaling value of a 2D/3D scale. The original scale is 1. Values between 0 and 1 are used to decrease original + // scale, more than 1 - to increase. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. ScaleY = "scale-y" - // ScaleZ is the name of the float property that specify the z-axis scaling value of a 3D scale - // The default value is 1. + // ScaleZ is the constant for "scale-z" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // z-axis scaling value of a 3D scale. The original scale is 1. Values between 0 and 1 are used to decrease original + // scale, more than 1 - to increase. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `Transform`: + // z-axis scaling value of a 3D scale. The original scale is 1. Values between 0 and 1 are used to decrease original + // scale, more than 1 - to increase. The default value is 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. ScaleZ = "scale-z" - // Rotate is the name of the AngleUnit property that determines the angle of the view rotation. - // A positive angle denotes a clockwise rotation, a negative angle a counter-clockwise one. + // Rotate is the constant for "rotate" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // Angle of the view rotation. A positive angle denotes a clockwise rotation, a negative angle a counter-clockwise. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. + // + // Usage in `Transform`: + // Angle of the view rotation. A positive angle denotes a clockwise rotation, a negative angle a counter-clockwise. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. Rotate = "rotate" - // RotateX is the name of the float property that determines the x-coordinate of the vector denoting - // the axis of rotation which could between 0 and 1. + // RotateX is the constant for "rotate-x" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // x-coordinate of the vector denoting the axis of rotation in range 0 to 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `Transform`: + // x-coordinate of the vector denoting the axis of rotation in range 0 to 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. RotateX = "rotate-x" - // RotateY is the name of the float property that determines the y-coordinate of the vector denoting - // the axis of rotation which could between 0 and 1. + // RotateY is the constant for "rotate-y" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // y-coordinate of the vector denoting the axis of rotation in range 0 to 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `Transform`: + // y-coordinate of the vector denoting the axis of rotation in range 0 to 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. RotateY = "rotate-y" - // RotateZ is the name of the float property that determines the z-coordinate of the vector denoting - // the axis of rotation which could between 0 and 1. + // RotateZ is the constant for "rotate-z" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // z-coordinate of the vector denoting the axis of rotation in range 0 to 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. + // + // Usage in `Transform`: + // z-coordinate of the vector denoting the axis of rotation in range 0 to 1. + // + // Supported types: `float`, `int`, `string`. + // + // Internal type is `float`, other types converted to it during assignment. RotateZ = "rotate-z" - // SkewX is the name of the AngleUnit property that representing the angle to use to distort - // the element along the abscissa. The default value is 0. + // SkewX is the constant for "skew-x" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // Angle to use to distort the element along the abscissa. The default value is 0. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. + // + // Usage in `Transform`: + // Angle to use to distort the element along the abscissa. The default value is 0. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. SkewX = "skew-x" - // SkewY is the name of the AngleUnit property that representing the angle to use to distort - // the element along the ordinate. The default value is 0. + // SkewY is the constant for "skew-y" property tag. + // + // Used by `View`, `Transform`. + // + // Usage in `View`: + // Angle to use to distort the element along the ordinate. The default value is 0. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. + // + // Usage in `Transform`: + // Angle to use to distort the element along the ordinate. The default value is 0. + // + // Supported types: `AngleUnit`, `string`, `float`, `int`. + // + // Internal type is `AngleUnit`, other types will be converted to it during assignment. + // See `AngleUnit` description for more details. + // + // Conversion rules: + // `AngleUnit` - stored as is, no conversion performed. + // `string` - must contain string representation of `AngleUnit`. If numeric value will be provided without any suffix then `AngleUnit` with value and `Radian` value type will be created. + // `float` - a new `AngleUnit` value will be created with `Radian` as a type. + // `int` - a new `AngleUnit` value will be created with `Radian` as a type. SkewY = "skew-y" )