From a8242c99fe19e5d9bc40ed236439cccff818930a Mon Sep 17 00:00:00 2001 From: Alexei Anoshenko <2277098+anoshenko@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:15:39 +0300 Subject: [PATCH] Updated doc comments --- CHANGELOG.md | 3 +- angleUnit.go | 4 + animation.go | 99 +- animationEvents.go | 119 +- appWasm.go | 2 +- background.go | 47 +- backgroundConicGradient.go | 7 + backgroundImage.go | 19 + backgroundLinearGradient.go | 12 +- backgroundRadialGradient.go | 16 +- border.go | 120 +- bounds.go | 3 + canvas.go | 106 +- checkbox.go | 14 +- color.go | 8 + colorPicker.go | 18 +- columnLayout.go | 82 +- columnSeparator.go | 28 +- dataList.go | 109 +- datePicker.go | 110 +- detailsView.go | 19 +- dropDownList.go | 13 +- editView.go | 54 +- filePicker.go | 28 +- focusEvents.go | 12 +- gridLayout.go | 68 +- imageView.go | 12 +- keyEvents.go | 32 +- listView.go | 61 +- mediaPlayer.go | 597 ++------- mouseEvents.go | 128 +- numberPicker.go | 58 +- outline.go | 7 +- path.go | 40 +- pointerEvents.go | 96 +- popup.go | 154 ++- popupUtils.go | 3 + progressBar.go | 12 +- propertyNames.go | 2535 +++++++++++++++++------------------ propertyValues.go | 6 +- radius.go | 342 +++-- resizable.go | 22 +- resizeEvent.go | 16 +- scrollEvent.go | 16 +- shadow.go | 130 +- sizeFunc.go | 2 + stackLayout.go | 174 +-- tableAdapter.go | 26 +- tableView.go | 402 +++--- tabsLayout.go | 82 +- timePicker.go | 74 +- touchEvents.go | 64 +- transform.go | 306 ++--- videoPlayer.go | 16 +- view.go | 4 +- viewClip.go | 11 +- viewFilter.go | 74 +- viewUtils.go | 13 +- 58 files changed, 3121 insertions(+), 3514 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a81998..6936f2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,11 @@ NewViewShadow function -> NewShadow NewInsetViewShadow function -> NewInsetShadow NewShadowWithParams function -> NewShadowProperty + NewColumnSeparator function -> NewColumnSeparatorProperty * Added functions: NewBounds, NewEllipticRadius, NewRadii, NewLinearGradient, NewCircleRadialGradient, NewEllipseRadialGradient, GetPushTransform, GetPushDuration, GetPushTiming, IsMoveToFrontAnimation, -GetBackground, GetMask, GetBackgroundClip,GetBackgroundOrigin, GetMaskClip, GetMaskOrigin. +GetBackground, GetMask, GetBackgroundClip,GetBackgroundOrigin, GetMaskClip, GetMaskOrigin, NewColumnSeparator. * Added SetConicGradientFillStyle and SetConicGradientStrokeStyle methods to Canvas interface. diff --git a/angleUnit.go b/angleUnit.go index dae0d5a..422aa0f 100644 --- a/angleUnit.go +++ b/angleUnit.go @@ -15,12 +15,16 @@ type AngleUnitType uint8 const ( // Radian - angle in radians Radian AngleUnitType = 0 + // Radian - angle in radians * π PiRadian AngleUnitType = 1 + // Degree - angle in degrees Degree AngleUnitType = 2 + // Gradian - angle in gradian (1⁄400 of a full circle) Gradian AngleUnitType = 3 + // Turn - angle in turns (1 turn = 360 degree) Turn AngleUnitType = 4 ) diff --git a/animation.go b/animation.go index 6d5afb7..b187f20 100644 --- a/animation.go +++ b/animation.go @@ -11,132 +11,146 @@ import ( const ( // AnimationTag is the constant for "animation" property tag. // - // Used by `View`. + // Used by View. // Sets and starts animations. // - // Supported types: `Animation`, `[]Animation`. + // Supported types: Animation, []Animation. // - // Internal type is `[]Animation`, other types converted to it during assignment. - // See `Animation` description for more details. + // Internal type is []Animation, other types converted to it during assignment. + // See Animation description for more details. AnimationTag PropertyName = "animation" // AnimationPaused is the constant for "animation-paused" property tag. // - // Used by `Animation`. + // Used by Animation. // Controls whether the animation is running or paused. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Animation is paused. + // - false, 0, "false", "no", "off", or "0" - Animation is playing. AnimationPaused PropertyName = "animation-paused" // 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 + // 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. + // 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`. + // Supported types: Params. // - // See `Params` description for more details. + // See Params description for more details. Transition PropertyName = "transition" // 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. + // Used by Animation. // - // Supported types: `[]AnimatedProperty`, `AnimatedProperty`. + // Describes a scenario for changing a View's property. Used only for animation script. // - // Internal type is `[]AnimatedProperty`, other types converted to it during assignment. - // See `AnimatedProperty` description for more details. + // Supported types: []AnimatedProperty, AnimatedProperty. + // + // Internal type is []AnimatedProperty, other types converted to it during assignment. + // See AnimatedProperty description for more details. PropertyTag PropertyName = "property" // Duration is the constant for "duration" property tag. // - // Used by `Animation`. + // Used by Animation. + // // Sets the length of time in seconds that an animation takes to complete one cycle. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Duration PropertyName = "duration" // Delay is the constant for "delay" property tag. // - // Used by `Animation`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Delay PropertyName = "delay" // TimingFunction is the constant for "timing-function" property tag. // - // Used by `Animation`. + // Used by Animation. + // // Set how an animation progresses through the duration of each cycle. // - // Supported types: `string`. + // 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. + // - "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. + // - "step(n)" (StepTiming(n int) function) - Timing function along stepCount stops along the transition, displaying each stop for equal lengths of time. + // - "cubic-bezier(x1, y1, x2, y2)" (CubicBezierTiming(x1, y1, x2, y2 float64) function) - Cubic-Bezier curve timing function. x1 and x2 must be in the range [0, 1]. TimingFunction PropertyName = "timing-function" // IterationCount is the constant for "iteration-count" property tag. // - // Used by `Animation`. + // 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`. + // Supported types: int, string. // - // Internal type is `int`, other types converted to it during assignment. + // Internal type is int, other types converted to it during assignment. IterationCount PropertyName = "iteration-count" // AnimationDirection is the constant for "animation-direction" property tag. // - // Used by `Animation`. + // 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`. + // 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. + // - 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 PropertyName = "animation-direction" // NormalAnimation is value of the "animation-direction" property. + // // The animation plays forwards each cycle. In other words, each time the animation cycles, // the animation will reset to the beginning state and start over again. This is the default value. NormalAnimation = 0 // ReverseAnimation is value of the "animation-direction" property. + // // The animation plays backwards each cycle. In other words, each time the animation cycles, // the animation will reset to the end state and start over again. Animation steps are performed // backwards, and timing functions are also reversed. + // // For example, an "ease-in" timing function becomes "ease-out". ReverseAnimation = 1 // AlternateAnimation is value of the "animation-direction" property. + // // The animation reverses direction each cycle, with the first iteration being played forwards. // The count to determine if a cycle is even or odd starts at one. AlternateAnimation = 2 // AlternateReverseAnimation is value of the "animation-direction" property. + // // The animation reverses direction each cycle, with the first iteration being played backwards. // The count to determine if a cycle is even or odd starts at one. AlternateReverseAnimation = 3 @@ -200,6 +214,7 @@ type animationData struct { } // Animation interface is used to set animation parameters. Used properties: +// // "property", "id", "duration", "delay", "timing-function", "iteration-count", and "animation-direction" type Animation interface { Properties diff --git a/animationEvents.go b/animationEvents.go index f666de6..2fd7028 100644 --- a/animationEvents.go +++ b/animationEvents.go @@ -4,154 +4,155 @@ package rui const ( // TransitionRunEvent is the constant for "transition-run-event" property tag. // - // Used by `View`. + // 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)`. + // func(view rui.View, propertyName rui.PropertyName). // // where: - // view - Interface of a view which generated this event, - // propertyName - Name of the property. + // - 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()`. + // func(view rui.View), + // func(propertyName rui.PropertyName) + // func(). TransitionRunEvent PropertyName = "transition-run-event" // TransitionStartEvent is the constant for "transition-start-event" property tag. // - // Used by `View`. + // 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)`. + // func(view rui.View, propertyName rui.PropertyName). // // where: - // view - Interface of a view which generated this event, - // propertyName - Name of the property. + // - 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()`. + // func(view rui.View) + // func(propertyName rui.PropertyName) + // func() TransitionStartEvent PropertyName = "transition-start-event" // TransitionEndEvent is the constant for "transition-end-event" property tag. // - // Used by `View`. + // Used by View: // Is fired when a transition has completed. // // General listener format: - // `func(view rui.View, propertyName string)`. + // func(view rui.View, propertyName rui.PropertyName). // // where: - // view - Interface of a view which generated this event, - // propertyName - Name of the property. + // - 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()`. + // func(view rui.View) + // func(propertyName rui.PropertyName) + // func() TransitionEndEvent PropertyName = "transition-end-event" // TransitionCancelEvent is the constant for "transition-cancel-event" property tag. // - // 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. + // 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)`. + // func(view rui.View, propertyName rui.PropertyName). // // where: - // view - Interface of a view which generated this event, - // propertyName - Name of the property. + // - 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()`. + // func(view rui.View) + // func(propertyName rui.PropertyName) + // func() TransitionCancelEvent PropertyName = "transition-cancel-event" // AnimationStartEvent is the constant for "animation-start-event" property tag. // - // Used by `View`. + // 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)`. + // func(view rui.View, animationId string). // // where: - // view - Interface of a view which generated this event, - // animationId - Id of the animation. + // - 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()`. + // func(view rui.View) + // func(animationId string) + // func() AnimationStartEvent PropertyName = "animation-start-event" // AnimationEndEvent is the constant for "animation-end-event" property tag. // - // Used by `View`. + // 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)`. + // func(view rui.View, animationId string). // // where: - // view - Interface of a view which generated this event, - // animationId - Id of the animation. + // - 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()`. + // func(view rui.View) + // func(animationId string) + // func() AnimationEndEvent PropertyName = "animation-end-event" // AnimationCancelEvent is the constant for "animation-cancel-event" property tag. // - // Used by `View`. + // 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)`. + // func(view rui.View, animationId string). // // where: - // view - Interface of a view which generated this event, - // animationId - Id of the animation. + // - 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()`. + // func(view rui.View) + // func(animationId string) + // func() AnimationCancelEvent PropertyName = "animation-cancel-event" // AnimationIterationEvent is the constant for "animation-iteration-event" property tag. // - // Used by `View`. + // 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)`. + // func(view rui.View, animationId string). // // where: - // view - Interface of a view which generated this event, - // animationId - Id of the animation. + // - 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()`. + // func(view rui.View) + // func(animationId string) + // func() AnimationIterationEvent PropertyName = "animation-iteration-event" ) diff --git a/appWasm.go b/appWasm.go index 1a07c36..045e787 100644 --- a/appWasm.go +++ b/appWasm.go @@ -141,7 +141,7 @@ func (app *wasmApp) init(params AppParams) { div := document.Call("createElement", "div") div.Set("className", "ruiRoot") div.Set("id", "ruiRootView") - viewHTML(app.session.RootView(), buffer) + viewHTML(app.session.RootView(), buffer, "") div.Set("innerHTML", buffer.String()) body.Call("appendChild", div) diff --git a/background.go b/background.go index 235cb4e..592cb68 100644 --- a/background.go +++ b/background.go @@ -6,36 +6,24 @@ import ( const ( // BorderBox is the value of the following properties: - // - // * BackgroundClip - The background extends to the outside edge of the border (but underneath the border in z-ordering). - // - // * BackgroundOrigin - The background is positioned relative to the border box. - // - // * MaskClip - The painted content is clipped to the border box. - // - // * MaskOrigin - The mask is positioned relative to the border box. + // - BackgroundClip - The background extends to the outside edge of the border (but underneath the border in z-ordering). + // - BackgroundOrigin - The background is positioned relative to the border box. + // - MaskClip - The painted content is clipped to the border box. + // - MaskOrigin - The mask is positioned relative to the border box. BorderBox = 0 // PaddingBox is value of the BackgroundClip and MaskClip property: - // - // * BackgroundClip - The background extends to the outside edge of the padding. No background is drawn beneath the border. - // - // * BackgroundOrigin - The background is positioned relative to the padding box. - // - // * MaskClip - The painted content is clipped to the padding box. - // - // * MaskOrigin - The mask is positioned relative to the padding box. + // - BackgroundClip - The background extends to the outside edge of the padding. No background is drawn beneath the border. + // - BackgroundOrigin - The background is positioned relative to the padding box. + // - MaskClip - The painted content is clipped to the padding box. + // - MaskOrigin - The mask is positioned relative to the padding box. PaddingBox = 1 // ContentBox is value of the BackgroundClip and MaskClip property: - // - // * BackgroundClip - The background is painted within (clipped to) the content box. - // - // * BackgroundOrigin - The background is positioned relative to the content box. - // - // * MaskClip - The painted content is clipped to the content box. - // - // * MaskOrigin - The mask is positioned relative to the content box. + // - BackgroundClip - The background is painted within (clipped to) the content box. + // - BackgroundOrigin - The background is positioned relative to the content box. + // - MaskClip - The painted content is clipped to the content box. + // - MaskOrigin - The mask is positioned relative to the content box. ContentBox = 2 ) @@ -58,7 +46,6 @@ type backgroundElement struct { dataProperty } -// NewBackgroundImage creates the new background image func createBackground(obj DataObject) BackgroundElement { var result BackgroundElement = nil @@ -280,12 +267,14 @@ func backgroundStyledPropery(view View, subviewID []string, tag PropertyName) [] } // GetBackground returns the view background. +// // If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. func GetBackground(view View, subviewID ...string) []BackgroundElement { return backgroundStyledPropery(view, subviewID, Background) } // GetMask returns the view mask. +// // If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. func GetMask(view View, subviewID ...string) []BackgroundElement { return backgroundStyledPropery(view, subviewID, Mask) @@ -293,7 +282,7 @@ func GetMask(view View, subviewID ...string) []BackgroundElement { // GetBackgroundClip returns a "background-clip" of the subview. Returns one of next values: // -// BorderBox (0), PaddingBox (1), ContentBox (2) +// BorderBox (0), PaddingBox (1), ContentBox (2) // // If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. func GetBackgroundClip(view View, subviewID ...string) int { @@ -302,7 +291,7 @@ func GetBackgroundClip(view View, subviewID ...string) int { // GetBackgroundOrigin returns a "background-origin" of the subview. Returns one of next values: // -// BorderBox (0), PaddingBox (1), ContentBox (2) +// BorderBox (0), PaddingBox (1), ContentBox (2) // // If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. func GetBackgroundOrigin(view View, subviewID ...string) int { @@ -311,7 +300,7 @@ func GetBackgroundOrigin(view View, subviewID ...string) int { // GetMaskClip returns a "mask-clip" of the subview. Returns one of next values: // -// BorderBox (0), PaddingBox (1), ContentBox (2) +// BorderBox (0), PaddingBox (1), ContentBox (2) // // If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. func GetMaskClip(view View, subviewID ...string) int { @@ -320,7 +309,7 @@ func GetMaskClip(view View, subviewID ...string) int { // GetMaskOrigin returns a "mask-origin" of the subview. Returns one of next values: // -// BorderBox (0), PaddingBox (1), ContentBox (2) +// BorderBox (0), PaddingBox (1), ContentBox (2) // // If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. func GetMaskOrigin(view View, subviewID ...string) int { diff --git a/backgroundConicGradient.go b/backgroundConicGradient.go index c441fe9..f44524f 100644 --- a/backgroundConicGradient.go +++ b/backgroundConicGradient.go @@ -19,6 +19,13 @@ type BackgroundGradientAngle struct { } // NewBackgroundConicGradient creates the new background conic gradient +// +// The following properties can be used: +// - "gradient" [Gradient] - Describes gradient stop points. This is a mandatory property while describing background gradients. +// - "center-x" [CenterX] - center X point of the gradient. +// - "center-y" [CenterY] - center Y point of the gradient. +// - "from" [From] - start angle position of the gradient. +// - "repeating" [Repeating] - Defines whether stop points needs to be repeated after the last one. func NewBackgroundConicGradient(params Params) BackgroundElement { result := new(backgroundConicGradient) result.init() diff --git a/backgroundImage.go b/backgroundImage.go index aac13fb..37dcd95 100644 --- a/backgroundImage.go +++ b/backgroundImage.go @@ -7,50 +7,59 @@ import ( // Constants related to view's background description const ( // NoRepeat is value of the Repeat property of an background image: + // // The image is not repeated (and hence the background image painting area // will not necessarily be entirely covered). The position of the non-repeated // background image is defined by the background-position CSS property. NoRepeat = 0 // RepeatXY is value of the Repeat property of an background image: + // // The image is repeated as much as needed to cover the whole background // image painting area. The last image will be clipped if it doesn't fit. RepeatXY = 1 // RepeatX is value of the Repeat property of an background image: + // // The image is repeated horizontally as much as needed to cover // the whole width background image painting area. The image is not repeated vertically. // The last image will be clipped if it doesn't fit. RepeatX = 2 // RepeatY is value of the Repeat property of an background image: + // // The image is repeated vertically as much as needed to cover // the whole height background image painting area. The image is not repeated horizontally. // The last image will be clipped if it doesn't fit. RepeatY = 3 // RepeatRound is value of the Repeat property of an background image: + // // As the allowed space increases in size, the repeated images will stretch (leaving no gaps) // until there is room (space left >= half of the image width) for another one to be added. // When the next image is added, all of the current ones compress to allow room. RepeatRound = 4 // RepeatSpace is value of the Repeat property of an background image: + // // The image is repeated as much as possible without clipping. The first and last images // are pinned to either side of the element, and whitespace is distributed evenly between the images. RepeatSpace = 5 // ScrollAttachment is value of the Attachment property of an background image: + // // The background is fixed relative to the element itself and does not scroll with its contents. // (It is effectively attached to the element's border.) ScrollAttachment = 0 // FixedAttachment is value of the Attachment property of an background image: + // // The background is fixed relative to the viewport. Even if an element has // a scrolling mechanism, the background doesn't move with the element. FixedAttachment = 1 // LocalAttachment is value of the Attachment property of an background image: + // // The background is fixed relative to the element's contents. If the element has a scrolling mechanism, // the background scrolls with the element's contents, and the background painting area // and background positioning area are relative to the scrollable area of the element @@ -63,6 +72,16 @@ type backgroundImage struct { } // NewBackgroundImage creates the new background image +// +// The following properties can be used: +// - "src" [Source] - the name of the image in the "images" folder of the resources, or the URL of the image or inline-image. +// - "width" [Width] - the width of the image. +// - "height" [Height] - the height of the image. +// - "image-horizontal-align" [ImageHorizontalAlign] - the horizontal alignment of the image relative to view's bounds. +// - "image-vertical-align" [ImageVerticalAlign] - the vertical alignment of the image relative to view's bounds. +// - "repeat" [Repeat] - the repetition of the image. +// - "fit" [Fit] - the image scaling parameters. +// - "attachment" [Attachment] - defines whether a background image's position is fixed within the viewport or scrolls with its containing block. func NewBackgroundImage(params Params) BackgroundElement { result := new(backgroundImage) result.init() diff --git a/backgroundLinearGradient.go b/backgroundLinearGradient.go index e93b00b..4eb7ec7 100644 --- a/backgroundLinearGradient.go +++ b/backgroundLinearGradient.go @@ -37,7 +37,7 @@ type BackgroundGradientPoint struct { // Can take a value of Color type or string (color constant or textual description of the color) Color any // Pos - the distance from the start of the gradient straight line. Optional (may be nil). - // Can take a value of SizeUnit type or string (angle constant or textual description of the SizeUnit) + // Can take a value of SizeUnit type or string (size constant or textual description of the SizeUnit) Pos any } @@ -50,13 +50,11 @@ type backgroundLinearGradient struct { } // NewBackgroundLinearGradient creates the new background linear gradient. +// // The following properties can be used: -// -// "gradient" (Gradient) - Describes gradient stop points. This is a mandatory property while describing background gradients. -// -// "direction" (Direction) - Defines the direction of the gradient line. -// -// "repeating" (Repeating) - Defines whether stop points needs to be repeated after the last one. +// - "gradient" [Gradient] - Describes gradient stop points. This is a mandatory property while describing background gradients. +// - "direction" [Direction] - Defines the direction of the gradient line. +// - "repeating" [Repeating] - Defines whether stop points needs to be repeated after the last one. func NewBackgroundLinearGradient(params Params) BackgroundElement { result := new(backgroundLinearGradient) result.init() diff --git a/backgroundRadialGradient.go b/backgroundRadialGradient.go index e39a3d7..d126899 100644 --- a/backgroundRadialGradient.go +++ b/backgroundRadialGradient.go @@ -40,17 +40,13 @@ type backgroundRadialGradient struct { } // NewBackgroundRadialGradient creates the new background radial gradient. +// // The following properties can be used: -// -// "gradient" (Gradient) - Describes gradient stop points. This is a mandatory property while describing background gradients. -// -// "center-x" (CenterX), "center-y" (CenterY) - Defines the gradient center point cooordinates. -// -// "radial-gradient-radius" (RadialGradientRadius) - Defines radius of the radial gradient. -// -// "radial-gradient-shape" (RadialGradientShape) - Defines shape of the radial gradient. -// -// "repeating" (Repeating) - Defines whether stop points needs to be repeated after the last one. +// - "gradient" (Gradient) - Describes gradient stop points. This is a mandatory property while describing background gradients. +// - "center-x" (CenterX), "center-y" (CenterY) - Defines the gradient center point cooordinates. +// - "radial-gradient-radius" (RadialGradientRadius) - Defines radius of the radial gradient. +// - "radial-gradient-shape" (RadialGradientShape) - Defines shape of the radial gradient. +// - "repeating" (Repeating) - Defines whether stop points needs to be repeated after the last one. func NewBackgroundRadialGradient(params Params) BackgroundElement { result := new(backgroundRadialGradient) result.init() diff --git a/border.go b/border.go index 209ea80..a4cfef7 100644 --- a/border.go +++ b/border.go @@ -27,150 +27,150 @@ const ( // LeftStyle is the constant for "left-style" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Left border line style. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "left-style" // RightStyle is the constant for "right-style" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Right border line style. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "right-style" // TopStyle is the constant for "top-style" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Top border line style. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "top-style" // BottomStyle is the constant for "bottom-style" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Bottom border line style. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "bottom-style" // LeftWidth is the constant for "left-width" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Left border line width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. LeftWidth PropertyName = "left-width" // RightWidth is the constant for "right-width" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Right border line width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. RightWidth PropertyName = "right-width" // TopWidth is the constant for "top-width" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Top border line width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. TopWidth PropertyName = "top-width" // BottomWidth is the constant for "bottom-width" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Bottom border line width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. BottomWidth PropertyName = "bottom-width" // LeftColor is the constant for "left-color" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Left border line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. LeftColor PropertyName = "left-color" // RightColor is the constant for "right-color" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Right border line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. RightColor PropertyName = "right-color" // TopColor is the constant for "top-color" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Top border line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. TopColor PropertyName = "top-color" // BottomColor is the constant for "bottom-color" property tag. // - // Used by `BorderProperty`. + // Used by BorderProperty. // Bottom border line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BottomColor PropertyName = "bottom-color" ) diff --git a/bounds.go b/bounds.go index 1384318..3a6931d 100644 --- a/bounds.go +++ b/bounds.go @@ -20,6 +20,7 @@ type boundsPropertyData struct { } // NewBoundsProperty creates the new BoundsProperty object. +// // The following SizeUnit properties can be used: "left" (Left), "right" (Right), "top" (Top), and "bottom" (Bottom). func NewBoundsProperty(params Params) BoundsProperty { bounds := new(boundsPropertyData) @@ -36,7 +37,9 @@ func NewBoundsProperty(params Params) BoundsProperty { } // NewBounds creates the new BoundsProperty object. +// // The arguments specify the boundaries in a clockwise direction: "top", "right", "bottom", and "left". +// // If the argument is specified as int or float64, the value is considered to be in pixels. func NewBounds[topType SizeUnit | int | float64, rightType SizeUnit | int | float64, bottomType SizeUnit | int | float64, leftType SizeUnit | int | float64]( top topType, right rightType, bottom bottomType, left leftType) BoundsProperty { diff --git a/canvas.go b/canvas.go index 6fb405b..f537997 100644 --- a/canvas.go +++ b/canvas.go @@ -129,15 +129,15 @@ type Canvas interface { ClipPath(path Path) // SetScale adds a scaling transformation to the canvas units horizontally and/or vertically. - // x - scaling factor in the horizontal direction. A negative value flips pixels across + // * x - scaling factor in the horizontal direction. A negative value flips pixels across // the vertical axis. A value of 1 results in no horizontal scaling; - // y - scaling factor in the vertical direction. A negative value flips pixels across + // * y - scaling factor in the vertical direction. A negative value flips pixels across // the horizontal axis. A value of 1 results in no vertical scaling. SetScale(x, y float64) // SetTranslation adds a translation transformation to the current matrix. - // x - distance to move in the horizontal direction. Positive values are to the right, and negative to the left; - // y - distance to move in the vertical direction. Positive values are down, and negative are up. + // * x - distance to move in the horizontal direction. Positive values are to the right, and negative to the left; + // * y - distance to move in the vertical direction. Positive values are down, and negative are up. SetTranslation(x, y float64) // SetRotation adds a rotation to the transformation matrix. @@ -147,12 +147,13 @@ type Canvas interface { // SetTransformation multiplies the current transformation with the matrix described by the arguments // of this method. This lets you scale, rotate, translate (move), and skew the context. // The transformation matrix is described by: - // ⎡ xScale xSkew dx ⎤ - // ⎢ ySkew yScale dy ⎥ - // ⎣ 0 0 1 ⎦ - // xScale, yScale - horizontal and vertical scaling. A value of 1 results in no scaling; - // xSkew, ySkew - horizontal and vertical skewing; - // dx, dy - horizontal and vertical translation (moving). + // ⎡ xScale xSkew dx ⎤ + // ⎢ ySkew yScale dy ⎥ + // ⎣ 0 0 1 ⎦ + // where + // * xScale, yScale - horizontal and vertical scaling. A value of 1 results in no scaling; + // * xSkew, ySkew - horizontal and vertical skewing; + // * dx, dy - horizontal and vertical translation (moving). SetTransformation(xScale, yScale, xSkew, ySkew, dx, dy float64) // ResetTransformation resets the current transform to the identity matrix @@ -165,63 +166,64 @@ type Canvas interface { SetSolidColorStrokeStyle(color Color) // SetLinearGradientFillStyle sets a gradient along the line connecting two given coordinates to use inside shapes - // x0, y0 - coordinates of the start point; - // x1, y1 - coordinates of the end point; - // startColor, endColor - the start and end color - // stopPoints - the array of stop points + // * x0, y0 - coordinates of the start point; + // * x1, y1 - coordinates of the end point; + // * startColor, endColor - the start and end color + // * stopPoints - the array of stop points SetLinearGradientFillStyle(x0, y0 float64, color0 Color, x1, y1 float64, color1 Color, stopPoints []GradientPoint) // SetLinearGradientStrokeStyle sets a gradient along the line connecting two given coordinates to use for the strokes (outlines) around shapes - // x0, y0 - coordinates of the start point; - // x1, y1 - coordinates of the end point; - // color0, color1 - the start and end color - // stopPoints - the array of stop points + // * x0, y0 - coordinates of the start point; + // * x1, y1 - coordinates of the end point; + // * color0, color1 - the start and end color + // * stopPoints - the array of stop points SetLinearGradientStrokeStyle(x0, y0 float64, color0 Color, x1, y1 float64, color1 Color, stopPoints []GradientPoint) // SetRadialGradientFillStyle sets a radial gradient using the size and coordinates of two circles // to use inside shapes - // x0, y0 - coordinates of the center of the start circle; - // r0 - the radius of the start circle; - // x1, y1 - coordinates the center of the end circle; - // r1 - the radius of the end circle; - // color0, color1 - the start and end color - // stopPoints - the array of stop points + // * x0, y0 - coordinates of the center of the start circle; + // * r0 - the radius of the start circle; + // * x1, y1 - coordinates the center of the end circle; + // * r1 - the radius of the end circle; + // * color0, color1 - the start and end color + // * stopPoints - the array of stop points SetRadialGradientFillStyle(x0, y0, r0 float64, color0 Color, x1, y1, r1 float64, color1 Color, stopPoints []GradientPoint) // SetRadialGradientStrokeStyle sets a radial gradient using the size and coordinates of two circles // to use for the strokes (outlines) around shapes - // x0, y0 - coordinates of the center of the start circle; - // r0 - the radius of the start circle; - // x1, y1 - coordinates the center of the end circle; - // r1 - the radius of the end circle; - // color0, color1 - the start and end color - // stopPoints - the array of stop points + // * x0, y0 - coordinates of the center of the start circle; + // * r0 - the radius of the start circle; + // * x1, y1 - coordinates the center of the end circle; + // * r1 - the radius of the end circle; + // * color0, color1 - the start and end color + // * stopPoints - the array of stop points SetRadialGradientStrokeStyle(x0, y0, r0 float64, color0 Color, x1, y1, r1 float64, color1 Color, stopPoints []GradientPoint) // SetConicGradientFillStyle sets a conic gradient around a point // to use inside shapes - // x, y - coordinates of the center of the conic gradient in pilels; - // startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise. - // startColor - the start color; - // endColor - the end color; - // stopPoints - the array of stop points. The Pos field of GradientPoint, in the range from 0 to 1, specifies the angle in turns. + // * x, y - coordinates of the center of the conic gradient in pilels; + // * startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise. + // * startColor - the start color; + // * endColor - the end color; + // * stopPoints - the array of stop points. The Pos field of GradientPoint, in the range from 0 to 1, specifies the angle in turns. SetConicGradientFillStyle(x, y, startAngle float64, startColor, endColor Color, stopPoints []GradientPoint) // SetConicGradientFillStyle sets a conic gradient around a point // to use inside shapes - // x, y - coordinates of the center of the conic gradient in pilels; - // startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise. - // startColor - the start color; - // endColor - the end color; - // stopPoints - the array of stop points. The Pos field of GradientPoint, in the range from 0 to 1, specifies the angle in turns. + // * x, y - coordinates of the center of the conic gradient in pilels; + // * startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise. + // * startColor - the start color; + // * endColor - the end color; + // * stopPoints - the array of stop points. The Pos field of GradientPoint, in the range from 0 to 1, specifies the angle in turns. SetConicGradientStrokeStyle(x, y, startAngle float64, startColor, endColor Color, stopPoints []GradientPoint) // SetImageFillStyle set the image as the filling pattern. - // repeat - indicating how to repeat the pattern's image. Possible values are: - // NoRepeat (0) - neither direction, - // RepeatXY (1) - both directions, - // RepeatX (2) - horizontal only, - // RepeatY (3) - vertical only. + // + // repeat - indicating how to repeat the pattern's image. Possible values are: + // * NoRepeat (0) - neither direction, + // * RepeatXY (1) - both directions, + // * RepeatX (2) - horizontal only, + // * RepeatY (3) - vertical only. SetImageFillStyle(image Image, repeat int) // SetLineWidth the line width, in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. @@ -258,9 +260,9 @@ type Canvas interface { SetTextAlign(align int) // SetShadow sets shadow parameters: - // offsetX, offsetY - the distance that shadows will be offset horizontally and vertically; - // blur - the amount of blur applied to shadows. Must be non-negative; - // color - the color of shadows. + // * offsetX, offsetY - the distance that shadows will be offset horizontally and vertically; + // * blur - the amount of blur applied to shadows. Must be non-negative; + // * color - the color of shadows. SetShadow(offsetX, offsetY, blur float64, color Color) // ResetShadow sets shadow parameters to default values (invisible shadow) @@ -292,10 +294,10 @@ type Canvas interface { FillAndStrokeRoundedRect(x, y, width, height, r float64) // FillEllipse draws a ellipse that is filled according to the current FillStyle. - // x, y - coordinates of the ellipse's center; - // radiusX - the ellipse's major-axis radius. Must be non-negative; - // radiusY - the ellipse's minor-axis radius. Must be non-negative; - // rotation - the rotation of the ellipse, expressed in radians. + // * x, y - coordinates of the ellipse's center; + // * radiusX - the ellipse's major-axis radius. Must be non-negative; + // * radiusY - the ellipse's minor-axis radius. Must be non-negative; + // * rotation - the rotation of the ellipse, expressed in radians. FillEllipse(x, y, radiusX, radiusY, rotation float64) // StrokeRoundedRect draws a ellipse that is stroked (outlined) according diff --git a/checkbox.go b/checkbox.go index cdce746..8328d5b 100644 --- a/checkbox.go +++ b/checkbox.go @@ -10,16 +10,18 @@ import ( // Event occurs when the checkbox becomes checked/unchecked. // // General listener format: -// `func(checkbox rui.Checkbox, checked bool)`. +// +// func(checkbox rui.Checkbox, checked bool) // // where: -// checkbox - Interface of a checkbox which generated this event, -// checked - Checkbox state. +// - checkbox - Interface of a checkbox which generated this event, +// - checked - Checkbox state. // // Allowed listener formats: -// `func(checkbox rui.Checkbox)`, -// `func(checked bool)`, -// `func()`. +// +// func(checkbox rui.Checkbox) +// func(checked bool) +// func() const CheckboxChangedEvent PropertyName = "checkbox-event" // Checkbox represent a Checkbox view diff --git a/color.go b/color.go index cdfdb5f..fcb9249 100644 --- a/color.go +++ b/color.go @@ -19,6 +19,14 @@ func ARGB[T int | uint | int8 | uint8](alpha, red, green, blue T) Color { (Color(blue) & 0xFF) } +// RGB creates Color using red, green and blue components +func RGB[T int | uint | int8 | uint8](red, green, blue T) Color { + return (Color(0xFF) << 24) + + ((Color(red) & 0xFF) << 16) + + ((Color(green) & 0xFF) << 8) + + (Color(blue) & 0xFF) +} + // ARGB - return alpha, red, green and blue components of the color func (color Color) ARGB() (uint8, uint8, uint8, uint8) { return uint8(color >> 24), diff --git a/colorPicker.go b/colorPicker.go index 3a2e07f..b1016f5 100644 --- a/colorPicker.go +++ b/colorPicker.go @@ -12,19 +12,19 @@ const ( // Event generated when color picker value has been changed. // // General listener format: - // `func(picker rui.ColorPicker, newColor, oldColor rui.Color)`. + // 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. + // - 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()`. + // func(picker rui.ColorPicker, newColor rui.Color) + // func(newColor, oldColor rui.Color) + // func(newColor rui.Color) + // func(picker rui.ColorPicker) + // func() ColorChangedEvent PropertyName = "color-changed" // ColorPickerValue is the constant for "color-picker-value" property tag. diff --git a/columnLayout.go b/columnLayout.go index c5bb3e3..9f51cec 100644 --- a/columnLayout.go +++ b/columnLayout.go @@ -8,110 +8,110 @@ import ( const ( // ColumnCount is the constant for "column-count" property tag. // - // Used by `ColumnLayout`. + // 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`. + // 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. + // - 0 or "0" - Use "column-width" to control how many columns will be created. + // - positive value - Тhe number of columns into which the content is divided. ColumnCount PropertyName = "column-count" // ColumnWidth is the constant for "column-width" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Specifies the width of each column. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. ColumnWidth PropertyName = "column-width" // ColumnGap is the constant for "column-gap" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Set the size of the gap (gutter) between columns. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. ColumnGap PropertyName = "column-gap" // ColumnSeparator is the constant for "column-separator" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Specifies the line drawn between columns in a multi-column layout. // - // Supported types: `ColumnSeparatorProperty`, `ViewBorder`. + // Supported types: ColumnSeparatorProperty, ViewBorder. // - // Internal type is `ColumnSeparatorProperty`, other types converted to it during assignment. - // See `ColumnSeparatorProperty` and `ViewBorder` description for more details. + // Internal type is ColumnSeparatorProperty, other types converted to it during assignment. + // See [ColumnSeparatorProperty] and [ViewBorder] description for more details. ColumnSeparator PropertyName = "column-separator" // ColumnSeparatorStyle is the constant for "column-separator-style" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Controls the style of the line drawn between columns in a multi-column layout. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "column-separator-style" // ColumnSeparatorWidth is the constant for "column-separator-width" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Set the width of the line drawn between columns in a multi-column layout. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. ColumnSeparatorWidth PropertyName = "column-separator-width" // ColumnSeparatorColor is the constant for "column-separator-color" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Set the color of the line drawn between columns in a multi-column layout. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. ColumnSeparatorColor PropertyName = "column-separator-color" // 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". + // Used by ColumnLayout. + // Controls how a ColumnLayout's content is balanced when broken into columns. Default value is "balance". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "column-fill" // ColumnSpanAll is the constant for "column-span-all" property tag. // - // Used by `ColumnLayout`. + // 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`. + // columns. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - View will span across all columns. + // - false, 0, "false", "no", "off", or "0" - View will be a part of a column. ColumnSpanAll PropertyName = "column-span-all" ) diff --git a/columnSeparator.go b/columnSeparator.go index 323f858..5de3574 100644 --- a/columnSeparator.go +++ b/columnSeparator.go @@ -58,15 +58,13 @@ func newColumnSeparatorProperty(value any) ColumnSeparatorProperty { return nil } -// NewColumnSeparator creates the new ColumnSeparatorProperty. +// NewColumnSeparatorProperty creates the new ColumnSeparatorProperty. +// // The following properties can be used: -// -// "style" (Style). Determines the line style (int). Valid values: 0 (NoneLine), 1 (SolidLine), 2 (DashedLine), 3 (DottedLine), or 4 (DoubleLine); -// -// "color" (ColorTag). Determines the line color (Color); -// -// "width" (Width). Determines the line thickness (SizeUnit). -func NewColumnSeparator(params Params) ColumnSeparatorProperty { +// - "style" (Style) - Determines the line style (type is int). Valid values: 0 (NoneLine), 1 (SolidLine), 2 (DashedLine), 3 (DottedLine), or 4 (DoubleLine); +// - "color" (ColorTag) - Determines the line color (type is [Color]); +// - "width" (Width) - Determines the line thickness (type is [SizeUnit]). +func NewColumnSeparatorProperty(params Params) ColumnSeparatorProperty { separator := new(columnSeparatorProperty) separator.init() if params != nil { @@ -79,6 +77,20 @@ func NewColumnSeparator(params Params) ColumnSeparatorProperty { return separator } +// NewColumnSeparator creates the new ColumnSeparatorProperty. +// +// Arguments: +// - style - determines the line style. Valid values: 0 [NoneLine], 1 [SolidLine], 2 [DashedLine], 3 [DottedLine], or 4 [DoubleLine]; +// - color - determines the line color; +// - width - determines the line thickness. +func NewColumnSeparator(style int, color Color, width SizeUnit) ColumnSeparatorProperty { + return NewColumnSeparatorProperty(Params{ + Width: width, + Style: style, + ColorTag: color, + }) +} + func (separator *columnSeparatorProperty) init() { separator.dataProperty.init() separator.normalize = normalizeVolumnSeparatorTag diff --git a/dataList.go b/dataList.go index 1e62674..2c1bb11 100644 --- a/dataList.go +++ b/dataList.go @@ -10,99 +10,88 @@ import ( const ( // DataList is the constant for "data-list" property tag. // - // Used by `ColorPicker`, `DatePicker`, `EditView`, `NumberPicker`, `TimePicker`. + // Used by ColorPicker, DatePicker, EditView, NumberPicker, TimePicker. + // + // # Usage in ColorPicker // - // 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`. + // Supported types: []string, string, []fmt.Stringer, []Color, []any containing + // elements of string, fmt.Stringer, int, int8…int64, uint, uint8…uint64. // - // Internal type is `[]string`, other types converted to it during assignment. + // 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. + // - 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. + // - []any - this array must contain only types which were listed in Types section. + // + // # Usage in DatePicker // - // 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`. + // Supported types: []string, string, []fmt.Stringer, []time.Time, []any containing elements of string, fmt.Stringer, time.Time. // - // Internal type is `[]string`, other types converted to it during assignment. + // 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. + // - string - contain single item. + // - []string - an array of items. + // - []fmt.Stringer - an array of objects convertible to a string. + // - []time.Time - an array of Time 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 // - // 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`. + // Supported types: []string, string, []fmt.Stringer, and []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. + // 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. + // - string - contain single item. + // - []string - an array of items. + // - []fmt.Stringer - an array of objects convertible to a string. + // - []any - this array must contain only types which were listed in Types section. + // + // # Usage in NumberPicker // - // 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`. + // Supported types: []string, string, []fmt.Stringer, []float, []int, []bool, []any containing elements + // of string, fmt.Stringer, rune, float32, float64, int, int8…int64, uint, uint8…uint64. // - // Internal type is `[]string`, other types converted to it during assignment. + // 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. + // - 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. + // - []float - converted to []string. + // - []int - 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 // - // 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`. + // Supported types: []string, string, []fmt.Stringer, []time.Time, []any containing elements of string, fmt.Stringer, time.Time. // - // Internal type is `[]string`, other types converted to it during assignment. + // 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. + // - string - contain single item. + // - []string - an array of items. + // - []fmt.Stringer - an array of objects convertible to a string. + // - []time.Time - An array of Time values which will be converted to a string array. + // - []any - this array must contain only types which were listed in Types section. DataList PropertyName = "data-list" ) diff --git a/datePicker.go b/datePicker.go index d36b4e1..bff18c6 100644 --- a/datePicker.go +++ b/datePicker.go @@ -10,103 +10,103 @@ import ( const ( // DateChangedEvent is the constant for "date-changed" property tag. // - // Used by `DatePicker`. + // Used by DatePicker. // Occur when date picker value has been changed. // // General listener format: - // `func(picker rui.DatePicker, newDate, oldDate time.Time)`. + // func(picker rui.DatePicker, newDate time.Time, oldDate time.Time) // // where: - // picker - Interface of a date picker which generated this event, - // newDate - New date value, - // oldDate - Old date value. + // - 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()`. + // func(picker rui.DatePicker, newDate time.Time) + // func(newDate time.Time, oldDate time.Time) + // func(newDate time.Time) + // func(picker rui.DatePicker) + // func() DateChangedEvent PropertyName = "date-changed" // DatePickerMin is the constant for "date-picker-min" property tag. // - // Used by `DatePicker`. + // Used by DatePicker. // Minimum date value. // - // Supported types: `time.Time`, `string`. + // Supported types: time.Time, string. // - // Internal type is `time.Time`, other types converted to it during assignment. + // 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". + // 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 PropertyName = "date-picker-min" // DatePickerMax is the constant for "date-picker-max" property tag. // - // Used by `DatePicker`. + // Used by DatePicker. // Maximum date value. // - // Supported types: `time.Time`, `string`. + // Supported types: time.Time, string. // - // Internal type is `time.Time`, other types converted to it during assignment. + // 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". + // 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 PropertyName = "date-picker-max" // DatePickerStep is the constant for "date-picker-step" property tag. // - // Used by `DatePicker`. + // Used by DatePicker. // Date change step in days. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // >= `0` or >= "0" - Step value in days used to increment or decrement date. + // positive value - Step value in days used to increment or decrement date. DatePickerStep PropertyName = "date-picker-step" // DatePickerValue is the constant for "date-picker-value" property tag. // - // Used by `DatePicker`. + // Used by DatePicker. // Current value. // - // Supported types: `time.Time`, `string`. + // Supported types: time.Time, string. // - // Internal type is `time.Time`, other types converted to it during assignment. + // 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". + // 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 PropertyName = "date-picker-value" dateFormat = "2006-01-02" diff --git a/detailsView.go b/detailsView.go index 646043e..90c4ecc 100644 --- a/detailsView.go +++ b/detailsView.go @@ -6,25 +6,24 @@ import "strings" const ( // Summary is the constant for "summary" property tag. // - // Used by `DetailsView`. + // 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. + // Supported types: + // - string - Summary as a text. + // - View - Summary as a view, in this case it can be quite complex if needed. Summary PropertyName = "summary" // Expanded is the constant for "expanded" property tag. // - // Used by `DetailsView`. - // Controls the content expanded state of the details view. Default value is `false`. + // Used by DetailsView. + // Controls the content expanded state of the details view. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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). + // - true, 1, "true", "yes", "on", or "1" - Content is visible. + // - false, 0, "false", "no", "off", or "0" - Content is collapsed (hidden). Expanded PropertyName = "expanded" ) diff --git a/dropDownList.go b/dropDownList.go index 558fecb..f7fd3e6 100644 --- a/dropDownList.go +++ b/dropDownList.go @@ -7,17 +7,22 @@ import ( // DropDownEvent is the constant for "drop-down-event" property tag. // -// Used by `DropDownList`. +// Used by DropDownList. // Occur when a list item becomes selected. // // General listener format: -// `func(list rui.DropDownList, index int)`. +// +// 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. +// - list - Interface of a drop down list which generated this event, +// - index - Index of a newly selected item. // // Allowed listener formats: +// +// func(index int) +// func(list rui.DropDownList) +// func() const DropDownEvent PropertyName = "drop-down-event" // DropDownList represent a DropDownList view diff --git a/editView.go b/editView.go index d45f559..0b81faa 100644 --- a/editView.go +++ b/editView.go @@ -9,61 +9,61 @@ import ( const ( // EditTextChangedEvent is the constant for "edit-text-changed" property tag. // - // Used by `EditView`. + // Used by EditView. // Occur when edit view text has been changed. // // General listener format: - // `func(editView rui.EditView, newText, oldText string)`. + // func(editView rui.EditView, newText string, oldText string). // // where: - // editView - Interface of an edit view which generated this event, - // newText - New edit view text, - // oldText - Previous edit view text. + // - 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()`. + // - func(editView rui.EditView, newText string) + // - func(newText string, oldText string) + // - func(newText string) + // - func(editView rui.EditView) + // - func() EditTextChangedEvent PropertyName = "edit-text-changed" // EditViewType is the constant for "edit-view-type" property tag. // - // Used by `EditView`. + // Used by EditView. // Type of the text input. Default value is "text". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "edit-view-type" // EditViewPattern is the constant for "edit-view-pattern" property tag. // - // Used by `EditView`. + // Used by EditView. // Regular expression to limit editing of a text. // - // Supported types: `string`. + // Supported types: string. EditViewPattern PropertyName = "edit-view-pattern" // 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`. + // 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`. + // 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. + // - true, 1, "true", "yes", "on", "1" - Enable spell checker for text. + // - false, 0, "false", "no", "off", "0" - Disable spell checker for text. Spellcheck PropertyName = "spellcheck" ) diff --git a/filePicker.go b/filePicker.go index 80553bf..bc2296e 100644 --- a/filePicker.go +++ b/filePicker.go @@ -11,46 +11,46 @@ import ( const ( // FileSelectedEvent is the constant for "file-selected-event" property tag. // - // Used by `FilePicker`. + // Used by FilePicker. // Fired when user selects file(s). // // General listener format: - // `func(picker rui.FilePicker, files []rui.FileInfo)`. + // 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()`. + // func(picker rui.FilePicker) + // func(files []rui.FileInfo) + // func() FileSelectedEvent PropertyName = "file-selected-event" // Accept is the constant for "accept" property tag. // - // Used by `FilePicker`. + // Used by FilePicker. // Set the list of allowed file extensions or MIME types. // - // Supported types: `string`, `[]string`. + // Supported types: string, []string. // - // Internal type is `string`, other types converted to it during assignment. + // 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. + // - string - may contain single value of multiple separated by comma(,). + // - []string - an array of acceptable file extensions or MIME types. Accept PropertyName = "accept" // Multiple is the constant for "multiple" property tag. // - // Used by `FilePicker`. + // Used by FilePicker. // Controls whether multiple files can be selected. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", "1" - Several files can be selected. + // - false, 0, "false", "no", "off", "0" - Only one file can be selected. Multiple PropertyName = "multiple" ) diff --git a/focusEvents.go b/focusEvents.go index 425c599..281e128 100644 --- a/focusEvents.go +++ b/focusEvents.go @@ -6,32 +6,32 @@ import "strings" const ( // FocusEvent is the constant for "focus-event" property tag. // - // Used by `View`. + // Used by View. // Occur when the view takes input focus. // // General listener format: - // `func(View)`. + // func(rui.View). // // where: // view - Interface of a view which generated this event. // // Allowed listener formats: - // `func()`. + // func(). FocusEvent PropertyName = "focus-event" // LostFocusEvent is the constant for "lost-focus-event" property tag. // - // Used by `View`. + // Used by View. // Occur when the View lost input focus. // // General listener format: - // `func(view rui.View)`. + // func(view rui.View). // // where: // view - Interface of a view which generated this event. // // Allowed listener formats: - // `func()`. + // func() LostFocusEvent PropertyName = "lost-focus-event" ) diff --git a/gridLayout.go b/gridLayout.go index fa5299c..bad0a78 100644 --- a/gridLayout.go +++ b/gridLayout.go @@ -9,70 +9,70 @@ import ( const ( // CellVerticalAlign is the constant for "cell-vertical-align" property tag. // - // Used by `GridLayout`, `SvgImageView`. + // Used by GridLayout, SvgImageView. // - // Usage in `GridLayout`: - // Sets the default vertical alignment of `GridLayout` children within the cell they are occupying. + // Usage in GridLayout: + // Sets the default vertical alignment of GridLayout children within the cell they are occupying. // - // Supported types: `int`, `string`. + // 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. + // - 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`: + // Usage in SvgImageView: // Same as "vertical-align". CellVerticalAlign PropertyName = "cell-vertical-align" // CellHorizontalAlign is the constant for "cell-horizontal-align" property tag. // - // Used by `GridLayout`, `SvgImageView`. + // Used by GridLayout, SvgImageView. // - // Usage in `GridLayout`: - // Sets the default horizontal alignment of `GridLayout` children within the occupied cell. + // Usage in GridLayout: + // Sets the default horizontal alignment of GridLayout children within the occupied cell. // - // Supported types: `int`, `string`. + // 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. + // - 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`: + // Usage in SvgImageView: // Same as "horizontal-align". CellHorizontalAlign PropertyName = "cell-horizontal-align" // 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`. + // 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`. + // 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. + // - 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 PropertyName = "cell-vertical-self-align" // 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`. + // 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`. + // 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. + // - 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 PropertyName = "cell-horizontal-self-align" ) diff --git a/imageView.go b/imageView.go index 5eeaaac..9053748 100644 --- a/imageView.go +++ b/imageView.go @@ -9,32 +9,32 @@ import ( const ( // LoadedEvent is the constant for "loaded-event" property tag. // - // Used by `ImageView`. + // Used by ImageView. // Occur when the image has been loaded. // // General listener format: - // `func(image rui.ImageView)`. + // func(image rui.ImageView) // // where: // image - Interface of an image view which generated this event. // // Allowed listener formats: - // `func()`. + // func() LoadedEvent PropertyName = "loaded-event" // ErrorEvent is the constant for "error-event" property tag. // - // Used by `ImageView`. + // Used by ImageView. // Occur when the image loading has been failed. // // General listener format: - // `func(image rui.ImageView)`. + // func(image rui.ImageView) // // where: // image - Interface of an image view which generated this event. // // Allowed listener formats: - // `func()`. + // func() ErrorEvent PropertyName = "error-event" // NoneFit - value of the "object-fit" property of an ImageView. The replaced content is not resized diff --git a/keyEvents.go b/keyEvents.go index 97d6b68..a26419f 100644 --- a/keyEvents.go +++ b/keyEvents.go @@ -6,38 +6,42 @@ import "strings" const ( // KeyDownEvent is the constant for "key-down-event" property tag. // - // Used by `View`. + // Used by View. // Is fired when a key is pressed. // // General listener format: - // `func(view rui.View, event rui.KeyEvent)`. + // + // func(view rui.View, event rui.KeyEvent). // // where: - // view - Interface of a view which generated this event, - // event - Key event. + // - view - Interface of a view which generated this event, + // - event - Key event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.KeyEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.KeyEvent) + // func() KeyDownEvent PropertyName = "key-down-event" // KeyUpEvent is the constant for "key-up-event" property tag. // - // Used by `View`. + // Used by View. // Is fired when a key is released. // // General listener format: - // `func(view rui.View, event rui.KeyEvent)`. + // + // func(view rui.View, event rui.KeyEvent) // // where: - // view - Interface of a view which generated this event, - // event - Key event. + // - view - Interface of a view which generated this event, + // - event - Key event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.KeyEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.KeyEvent) + // func() KeyUpEvent PropertyName = "key-up-event" ) diff --git a/listView.go b/listView.go index 98f8393..8ff9d0a 100644 --- a/listView.go +++ b/listView.go @@ -10,77 +10,86 @@ import ( const ( // ListItemClickedEvent is the constant for "list-item-clicked" property tag. // - // Used by `ListView`. + // Used by ListView. // Occur when the user clicks on an item in the list. // // General listener format: - // `func(list rui.ListView, item int)`. + // + // func(list rui.ListView, item int) // // where: - // list - Interface of a list which generated this event, - // item - An index of an item clicked. + // - 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()`. + // + // func(item int) + // func(list rui.ListView) + // func() ListItemClickedEvent PropertyName = "list-item-clicked" // ListItemSelectedEvent is the constant for "list-item-selected" property tag. // - // Used by `ListView`. + // Used by ListView. // Occur when a list item becomes selected. // // General listener format: - // `func(list rui.ListView, item int)`. + // + // func(list rui.ListView, item int) // // where: - // list - Interface of a list which generated this event, - // item - An index of an item selected. + // - list - Interface of a list which generated this event, + // - item - An index of an item selected. // // Allowed listener formats: + // + // func(item int) + // func(list rui.ListView) + // func() ListItemSelectedEvent PropertyName = "list-item-selected" // ListItemCheckedEvent is the constant for "list-item-checked" property tag. // - // Used by `ListView`. + // Used by ListView. // Occur when a list item checkbox becomes checked or unchecked. // // General listener format: - // `func(list rui.ListView, checkedItems []int)`. + // + // func(list rui.ListView, checkedItems []int). // // where: - // list - Interface of a list which generated this event, - // checkedItems - Array of indices of marked elements. + // - 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()`. + // + // func(checkedItems []int) + // func(list rui.ListView) + // func() ListItemCheckedEvent PropertyName = "list-item-checked" // ListItemStyle is the constant for "list-item-style" property tag. // - // Used by `ListView`. + // Used by ListView. // Defines the style of an unselected item. // - // Supported types: `string`. + // Supported types: string. ListItemStyle PropertyName = "list-item-style" // CurrentStyle is the constant for "current-style" property tag. // - // Used by `ListView`. - // 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`. + // Supported types: string. CurrentStyle PropertyName = "current-style" // CurrentInactiveStyle is the constant for "current-inactive-style" property tag. // - // Used by `ListView`. - // 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`. + // Supported types: string. CurrentInactiveStyle PropertyName = "current-inactive-style" ) diff --git a/mediaPlayer.go b/mediaPlayer.go index 518b7a5..83a5c9a 100644 --- a/mediaPlayer.go +++ b/mediaPlayer.go @@ -11,815 +11,496 @@ import ( const ( // Controls is the constant for "controls" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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`. + // pause/resume playback. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", "1" - The browser will offer controls to allow the user to control audio playback, volume, seeking and pause/resume playback. + // - false, 0, "false", "no", "off", "0" - No controls will be visible to the end user. Controls PropertyName = "controls" // Loop is the constant for "loop" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: - // Controls whether the audio player will play media in a loop. Default value is `false`. + // Controls whether the audio player will play media in a loop. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", "1" - The audio player will automatically seek back to the start upon reaching the end of the audio. + // - false, 0, "false", "no", "off", "0" - Audio player will stop playing when the end of the media file has been reached. Loop PropertyName = "loop" // Muted is the constant for "muted" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: - // Controls whether the audio will be initially silenced. Default value is `false`. + // Controls whether the audio will be initially silenced. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", "1" - Audio will be muted. + // - false, 0, "false", "no", "off", "0" - Audio playing normally. Muted PropertyName = "muted" // Preload is the constant for "preload" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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`. + // 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. + // - 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 PropertyName = "preload" // AbortEvent is the constant for "abort-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() AbortEvent PropertyName = "abort-event" // CanPlayEvent is the constant for "can-play-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() CanPlayEvent PropertyName = "can-play-event" // CanPlayThroughEvent is the constant for "can-play-through-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() CanPlayThroughEvent PropertyName = "can-play-through-event" // CompleteEvent is the constant for "complete-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the rendering of an OfflineAudioContext has been terminated. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() CompleteEvent PropertyName = "complete-event" // DurationChangedEvent is the constant for "duration-changed-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the duration attribute has been updated. // // General listener format: - // `func(player rui.MediaPlayer, duration float64)`. + // + // func(player rui.MediaPlayer, duration float64). // // where: - // player - Interface of a player which generated this event, - // duration - Current duration. + // - 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()`. + // func(player rui.MediaPlayer), + // func(duration float64), + // func() DurationChangedEvent PropertyName = "duration-changed-event" // EmptiedEvent is the constant for "emptied-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() EmptiedEvent PropertyName = "emptied-event" // EndedEvent is the constant for "ended-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() EndedEvent PropertyName = "ended-event" // LoadedDataEvent is the constant for "loaded-data-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() LoadedDataEvent PropertyName = "loaded-data-event" // LoadedMetadataEvent is the constant for "loaded-metadata-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the metadata has been loaded. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() LoadedMetadataEvent PropertyName = "loaded-metadata-event" // LoadStartEvent is the constant for "load-start-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Fired when the browser has started to load a resource. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() LoadStartEvent PropertyName = "load-start-event" // PauseEvent is the constant for "pause-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the playback has been paused. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() PauseEvent PropertyName = "pause-event" // PlayEvent is the constant for "play-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the playback has begun. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() PlayEvent PropertyName = "play-event" // PlayingEvent is the constant for "playing-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() PlayingEvent PropertyName = "playing-event" // ProgressEvent is the constant for "progress-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Fired periodically as the browser loads a resource. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() ProgressEvent PropertyName = "progress-event" // RateChangedEvent is the constant for "rate-changed-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the playback rate has changed. // // General listener format: - // `func(player rui.MediaPlayer, rate float64)`. + // + // func(player rui.MediaPlayer, rate float64). // // where: - // player - Interface of a player which generated this event, - // rate - Playback rate. + // - 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()`. + // func(player rui.MediaPlayer), + // func(rate float64), + // func() RateChangedEvent PropertyName = "rate-changed-event" // SeekedEvent is the constant for "seeked-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when a seek operation completed. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() SeekedEvent PropertyName = "seeked-event" // SeekingEvent is the constant for "seeking-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when a seek operation has began. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() SeekingEvent PropertyName = "seeking-event" // StalledEvent is the constant for "stalled-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() StalledEvent PropertyName = "stalled-event" // SuspendEvent is the constant for "suspend-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the media data loading has been suspended. // // General listener format: - // `func(player rui.MediaPlayer)`. + // + // 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()`. + // func() SuspendEvent PropertyName = "suspend-event" // TimeUpdateEvent is the constant for "time-update-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // func(player rui.MediaPlayer, time float64). // // where: - // player - Interface of a player which generated this event, - // time - Current time. + // - 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()`. + // func(player rui.MediaPlayer), + // func(time float64), + // func() TimeUpdateEvent PropertyName = "time-update-event" // VolumeChangedEvent is the constant for "volume-changed-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // Used by AudioPlayer, VideoPlayer. // - // Usage in `AudioPlayer`: // Occur when the volume has changed. // // General listener format: - // `func(player rui.MediaPlayer, volume float64)`. + // + // func(player rui.MediaPlayer, volume float64). // // where: - // player - Interface of a player which generated this event, - // volume - New volume level. + // - 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()`. + // func(player rui.MediaPlayer), + // func(volume float64), + // func() VolumeChangedEvent PropertyName = "volume-changed-event" // WaitingEvent is the constant for "waiting-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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()`. + // func() WaitingEvent PropertyName = "waiting-event" // PlayerErrorEvent is the constant for "player-error-event" property tag. // - // Used by `AudioPlayer`, `VideoPlayer`. + // 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)`. + // + // 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, + // - 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. + // - 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()`. + // func(code int, message string), + // func(player rui.MediaPlayer), + // func() PlayerErrorEvent PropertyName = "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 e338fca..a184483 100644 --- a/mouseEvents.go +++ b/mouseEvents.go @@ -9,150 +9,166 @@ import ( const ( // ClickEvent is the constant for "click-event" property tag. // - // Used by `View`. + // Used by View. // Occur when the user clicks on the view. // // General listener format: - // `func(view rui.View, event rui.MouseEvent)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() ClickEvent PropertyName = "click-event" // DoubleClickEvent is the constant for "double-click-event" property tag. // - // Used by `View`. + // Used by View. // Occur when the user double clicks on the view. // // General listener format: - // `func(view rui.View, event rui.MouseEvent)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() DoubleClickEvent PropertyName = "double-click-event" // MouseDown is the constant for "mouse-down" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() MouseDown PropertyName = "mouse-down" // MouseUp is the constant for "mouse-up" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() MouseUp PropertyName = "mouse-up" // MouseMove is the constant for "mouse-move" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() MouseMove PropertyName = "mouse-move" // MouseOut is the constant for "mouse-out" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() MouseOut PropertyName = "mouse-out" // MouseOver is the constant for "mouse-over" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() MouseOver PropertyName = "mouse-over" // ContextMenuEvent is the constant for "context-menu-event" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.MouseEvent) // // where: - // view - Interface of a view which generated this event, - // event - Mouse event. + // - view - Interface of a view which generated this event, + // - event - Mouse event. // // Allowed listener formats: - // `func(view rui.View)`, - // `func(event rui.MouseEvent)`, - // `func()`. + // + // func(view rui.View) + // func(event rui.MouseEvent) + // func() ContextMenuEvent PropertyName = "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 5f6fac0..c664bc0 100644 --- a/numberPicker.go +++ b/numberPicker.go @@ -11,84 +11,86 @@ import ( const ( // NumberChangedEvent is the constant for "number-changed" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Set listener(s) that track the change in the entered value. // // General listener format: - // `func(picker rui.NumberPicker, newValue, oldValue float64)`. + // + // func(picker rui.NumberPicker, newValue float64, oldValue float64) // // where: - // picker - Interface of a number picker which generated this event, - // newValue - New value, - // oldValue - Old Value. + // - 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()`. + // + // func(picker rui.NumberPicker, newValue float64) + // func(newValue float64, oldValue float64) + // func(newValue float64) + // func() NumberChangedEvent PropertyName = "number-changed" // NumberPickerType is the constant for "number-picker-type" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Sets the visual representation. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`NumberEditor`) or "editor" - Displayed as an editor. - // `1`(`NumberSlider`) or "slider" - Displayed as a slider. + // - 0 (NumberEditor) or "editor" - Displayed as an editor. + // - 1 (NumberSlider) or "slider" - Displayed as a slider. NumberPickerType PropertyName = "number-picker-type" // NumberPickerMin is the constant for "number-picker-min" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Set the minimum value. The default value is 0. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. NumberPickerMin PropertyName = "number-picker-min" // NumberPickerMax is the constant for "number-picker-max" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Set the maximum value. The default value is 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. NumberPickerMax PropertyName = "number-picker-max" // NumberPickerStep is the constant for "number-picker-step" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Set the value change step. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. NumberPickerStep PropertyName = "number-picker-step" // NumberPickerValue is the constant for "number-picker-value" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Current value. The default value is 0. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. NumberPickerValue PropertyName = "number-picker-value" // NumberPickerValue is the constant for "number-picker-value" property tag. // - // Used by `NumberPicker`. + // Used by NumberPicker. // Precision of displaying fractional part in editor. The default value is 0 (not used). // - // Supported types: `int`, `int8`...`int64`, `uint`, `uint8`...`uint64`, `string`. + // Supported types: int, int8...int64, uint, uint8...uint64, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. NumberPickerPrecision PropertyName = "number-picker-precision" ) diff --git a/outline.go b/outline.go index 160cd99..7ca284e 100644 --- a/outline.go +++ b/outline.go @@ -20,11 +20,10 @@ type outlinePropertyData struct { } // NewOutlineProperty creates the new OutlineProperty. +// // The following properties can be used: -// -// "color" (ColorTag). Determines the line color (Color); -// -// "width" (Width). Determines the line thickness (SizeUnit). +// - "color" (ColorTag) - Determines the line color (Color); +// - "width" (Width) - Determines the line thickness (SizeUnit). func NewOutlineProperty(params Params) OutlineProperty { outline := new(outlinePropertyData) outline.init() diff --git a/path.go b/path.go index 889c293..5e08d82 100644 --- a/path.go +++ b/path.go @@ -11,44 +11,44 @@ type Path interface { // ArcTo adds a circular arc to the current sub-path, using the given control points and radius. // The arc is automatically connected to the path's latest point with a straight line, if necessary. - // x0, y0 - coordinates of the first control point; - // x1, y1 - coordinates of the second control point; - // radius - the arc's radius. Must be non-negative. + // - x0, y0 - coordinates of the first control point; + // - x1, y1 - coordinates of the second control point; + // - radius - the arc's radius. Must be non-negative. ArcTo(x0, y0, x1, y1, radius float64) // Arc adds a circular arc to the current sub-path. - // x, y - coordinates of the arc's center; - // radius - the arc's radius. Must be non-negative; - // startAngle - the angle at which the arc starts, measured clockwise from the positive + // - x, y - coordinates of the arc's center; + // - radius - the arc's radius. Must be non-negative; + // - startAngle - the angle at which the arc starts, measured clockwise from the positive // x-axis and expressed in radians. - // endAngle - the angle at which the arc ends, measured clockwise from the positive + // - endAngle - the angle at which the arc ends, measured clockwise from the positive // x-axis and expressed in radians. - // clockwise - if true, causes the arc to be drawn clockwise between the start and end angles, + // - clockwise - if true, causes the arc to be drawn clockwise between the start and end angles, // otherwise - counter-clockwise Arc(x, y, radius, startAngle, endAngle float64, clockwise bool) // BezierCurveTo adds a cubic Bézier curve to the current sub-path. The starting point is // the latest point in the current path. - // cp0x, cp0y - coordinates of the first control point; - // cp1x, cp1y - coordinates of the second control point; - // x, y - coordinates of the end point. + // - cp0x, cp0y - coordinates of the first control point; + // - cp1x, cp1y - coordinates of the second control point; + // - x, y - coordinates of the end point. BezierCurveTo(cp0x, cp0y, cp1x, cp1y, x, y float64) // QuadraticCurveTo adds a quadratic Bézier curve to the current sub-path. - // cpx, cpy - coordinates of the control point; - // x, y - coordinates of the end point. + // - cpx, cpy - coordinates of the control point; + // - x, y - coordinates of the end point. QuadraticCurveTo(cpx, cpy, x, y float64) // Ellipse adds an elliptical arc to the current sub-path - // x, y - coordinates of the ellipse's center; - // radiusX - the ellipse's major-axis radius. Must be non-negative; - // radiusY - the ellipse's minor-axis radius. Must be non-negative; - // rotation - the rotation of the ellipse, expressed in radians; - // startAngle - the angle at which the ellipse starts, measured clockwise + // - x, y - coordinates of the ellipse's center; + // - radiusX - the ellipse's major-axis radius. Must be non-negative; + // - radiusY - the ellipse's minor-axis radius. Must be non-negative; + // - rotation - the rotation of the ellipse, expressed in radians; + // - startAngle - the angle at which the ellipse starts, measured clockwise // from the positive x-axis and expressed in radians; - // endAngle - the angle at which the ellipse ends, measured clockwise + // - endAngle - the angle at which the ellipse ends, measured clockwise // from the positive x-axis and expressed in radians. - // clockwise - if true, draws the ellipse clockwise, otherwise draws counter-clockwise + // - clockwise - if true, draws the ellipse clockwise, otherwise draws counter-clockwise Ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle float64, clockwise bool) // Close adds a straight line from the current point to the start of the current sub-path. diff --git a/pointerEvents.go b/pointerEvents.go index 3d42cb8..57d226b 100644 --- a/pointerEvents.go +++ b/pointerEvents.go @@ -4,114 +4,126 @@ package rui const ( // PointerDown is the constant for "pointer-down" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.PointerEvent) // // where: - // view - Interface of a view which generated this event, - // event - Pointer event. + // - view - Interface of a view which generated this event, + // - event - Pointer event. // // Allowed listener formats: - // `func(event rui.PointerEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.PointerEvent) + // func(view rui.View) + // func() PointerDown PropertyName = "pointer-down" // PointerUp is the constant for "pointer-up" property tag. // - // Used by `View`. + // Used by View. // Is fired when a pointer is no longer active. // // General listener format: - // `func(view rui.View, event rui.PointerEvent)`. + // + // func(view rui.View, event rui.PointerEvent) // // where: - // view - Interface of a view which generated this event, - // event - Pointer event. + // - view - Interface of a view which generated this event, + // - event - Pointer event. // // Allowed listener formats: - // `func(event rui.PointerEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.PointerEvent) + // func(view rui.View) + // func() PointerUp PropertyName = "pointer-up" // PointerMove is the constant for "pointer-move" property tag. // - // Used by `View`. + // Used by View. // Is fired when a pointer changes coordinates. // // General listener format: - // `func(view rui.View, event rui.PointerEvent)`. + // + // func(view rui.View, event rui.PointerEvent) // // where: - // view - Interface of a view which generated this event, - // event - Pointer event. + // - view - Interface of a view which generated this event, + // - event - Pointer event. // // Allowed listener formats: - // `func(event rui.PointerEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.PointerEvent) + // func(view rui.View) + // func() PointerMove PropertyName = "pointer-move" // PointerCancel is the constant for "pointer-cancel" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.PointerEvent) // // where: - // view - Interface of a view which generated this event, - // event - Pointer event. + // - view - Interface of a view which generated this event, + // - event - Pointer event. // // Allowed listener formats: - // `func(event rui.PointerEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.PointerEvent) + // func(view rui.View) + // func() PointerCancel PropertyName = "pointer-cancel" // PointerOut is the constant for "pointer-out" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.PointerEvent) // // where: - // view - Interface of a view which generated this event, - // event - Pointer event. + // - view - Interface of a view which generated this event, + // - event - Pointer event. // // Allowed listener formats: - // `func(event rui.PointerEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.PointerEvent) + // func(view rui.View) + // func() PointerOut PropertyName = "pointer-out" // PointerOver is the constant for "pointer-over" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.PointerEvent) // // where: - // view - Interface of a view which generated this event, - // event - Pointer event. + // - view - Interface of a view which generated this event, + // - event - Pointer event. // // Allowed listener formats: - // `func(event rui.PointerEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.PointerEvent) + // func(view rui.View) + // func() PointerOver PropertyName = "pointer-over" ) diff --git a/popup.go b/popup.go index 3947d29..be1d6e4 100644 --- a/popup.go +++ b/popup.go @@ -9,201 +9,207 @@ import ( const ( // Title is the constant for "title" property tag. // - // Used by `Popup`, `TabsLayout`. + // Used by Popup, TabsLayout. // - // Usage in `Popup`: + // Usage in Popup: // Define the title. // - // Supported types: `string`. + // Supported types: string. // - // Usage in `TabsLayout`: - // Set the title of the tab. The property is set for the child view of `TabsLayout`. + // Usage in TabsLayout: + // Set the title of the tab. The property is set for the child view of TabsLayout. // - // Supported types: `string`. + // Supported types: string. Title = "title" // TitleStyle is the constant for "title-style" property tag. // - // Used by `Popup`. + // Used by Popup. // Set popup title style. Default title style is "ruiPopupTitle". // - // Supported types: `string`. + // Supported types: string. TitleStyle PropertyName = "title-style" // 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`. + // Used by Popup. + // Controls whether a close button can be added to the popup. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", "1" - Close button will be added to a title bar of a window. + // - false, 0, "false", "no", "off", "0" - Popup without a close button. CloseButton PropertyName = "close-button" // 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`. + // Used by Popup. + // Controls whether popup can be closed by clicking outside of the window. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", "1" - Clicking outside the popup window will automatically call the Dismiss() method. + // - false, 0, "false", "no", "off", "0" - Clicking outside the popup window has no effect. OutsideClose PropertyName = "outside-close" // Buttons is the constant for "buttons" property tag. // - // Used by `Popup`. + // Used by Popup. // Buttons that will be placed at the bottom of the popup. // - // Supported types: `PopupButton`, `[]PopupButton`. + // Supported types: PopupButton, []PopupButton. // - // Internal type is `[]PopupButton`, other types converted to it during assignment. - // See `PopupButton` description for more details. + // Internal type is []PopupButton, other types converted to it during assignment. + // See PopupButton description for more details. Buttons PropertyName = "buttons" // ButtonsAlign is the constant for "buttons-align" property tag. // - // Used by `Popup`. + // Used by Popup. // Set the horizontal alignment of popup buttons. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "buttons-align" // 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. + // 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)`. + // + // func(popup rui.Popup) // // where: // popup - Interface of a popup which generated this event. // // Allowed listener formats: - // `func()`. + // + // func() DismissEvent PropertyName = "dismiss-event" // Arrow is the constant for "arrow" property tag. // - // Used by `Popup`. + // Used by Popup. // Add an arrow to popup. Default value is "none". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "arrow" // ArrowAlign is the constant for "arrow-align" property tag. // - // Used by `Popup`. + // Used by Popup. // Set the horizontal alignment of the popup arrow. Default value is "center". // - // Supported types: `int`, `string`. + // 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. + // - 0 (TopAlign/LeftAlign) or "top" - Top/left alignment. + // - 1 (BottomAlign/RightAlign) or "bottom" - Bottom/right alignment. + // - 2 (CenterAlign) or "center" - Center alignment. ArrowAlign PropertyName = "arrow-align" // ArrowSize is the constant for "arrow-size" property tag. // - // Used by `Popup`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. ArrowSize PropertyName = "arrow-size" // ArrowWidth is the constant for "arrow-width" property tag. // - // Used by `Popup`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. ArrowWidth PropertyName = "arrow-width" // ShowTransform is the constant for "show-transform" property tag. // - // Used by `Popup`. + // Used by Popup. // Specify start translation, scale and rotation over x, y and z axes as well as a distortion // for an animated Popup showing/hidding. // - // Supported types: `TransformProperty`, `string`. + // Supported types: TransformProperty, string. // - // See `TransformProperty` description for more details. + // See TransformProperty description for more details. // // Conversion rules: - // `TransformProperty` - stored as is, no conversion performed. - // `string` - string representation of `Transform` interface. Example: "_{translate-x = 10px, scale-y = 1.1}". + // - TransformProperty - stored as is, no conversion performed. + // - string - string representation of Transform interface. Example: + // + // "_{ translate-x = 10px, scale-y = 1.1}" ShowTransform = "show-transform" // ShowDuration is the constant for "show-duration" property tag. // - // Used by `Popup`. + // Used by Popup. // Sets the length of time in seconds that a Popup show/hide animation takes to complete. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. ShowDuration = "show-duration" // ShowTiming is the constant for "show-timing" property tag. // - // Used by `Popup`. + // Used by Popup. // Set how a Popup show/hide animation progresses through the duration of each cycle. // - // Supported types: `string`. + // 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. + // - "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. + // - "step(n)" (StepTiming(n int) function) - Timing function along stepCount stops along the transition, displaying each stop for equal lengths of time. + // - "cubic-bezier(x1, y1, x2, y2)" (CubicBezierTiming(x1, y1, x2, y2 float64) function) - Cubic-Bezier curve timing function. x1 and x2 must be in the range [0, 1]. ShowTiming = "show-timing" // ShowOpacity is the constant for "show-opacity" property tag. // - // Used by `Popup`. + // Used by Popup. // In [1..0] range sets the start opacity of Popup show animation (the finish animation opacity is 1). // Opacity is the degree to which content behind the view is hidden, and is the opposite of transparency. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. ShowOpacity = "show-opacity" // ArrowOffset is the constant for "arrow-offset" property tag. // - // Used by `Popup`. + // Used by Popup. // Set the offset of the popup arrow. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. ArrowOffset PropertyName = "arrow-offset" // NoneArrow is value of the popup "arrow" property: no arrow diff --git a/popupUtils.go b/popupUtils.go index 10ae910..f00ae47 100644 --- a/popupUtils.go +++ b/popupUtils.go @@ -17,7 +17,9 @@ func ShowMessage(title, text string, session Session) { } // ShowQuestion displays a message with the given title and text and two buttons "Yes" and "No". +// // When the "Yes" button is clicked, the message is closed and the onYes function is called (if it is not nil). +// // When the "No" button is pressed, the message is closed and the onNo function is called (if it is not nil). func ShowQuestion(title, text string, session Session, onYes func(), onNo func()) { textView := NewTextView(session, Params{ @@ -57,6 +59,7 @@ func ShowQuestion(title, text string, session Session, onYes func(), onNo func() } // ShowCancellableQuestion displays a message with the given title and text and three buttons "Yes", "No" and "Cancel". +// // When the "Yes", "No" or "Cancel" button is pressed, the message is closed and the onYes, onNo or onCancel function // (if it is not nil) is called, respectively. func ShowCancellableQuestion(title, text string, session Session, onYes func(), onNo func(), onCancel func()) { diff --git a/progressBar.go b/progressBar.go index 04b3027..d37b23c 100644 --- a/progressBar.go +++ b/progressBar.go @@ -9,22 +9,22 @@ import ( const ( // ProgressBarMax is the constant for "progress-max" property tag. // - // Used by `ProgressBar`. + // Used by ProgressBar. // Maximum value, default is 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. ProgressBarMax PropertyName = "progress-max" // ProgressBarValue is the constant for "progress-value" property tag. // - // Used by `ProgressBar`. + // Used by ProgressBar. // Current value, default is 0. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. ProgressBarValue PropertyName = "progress-value" ) diff --git a/propertyNames.go b/propertyNames.go index 8780e18..b62e9a3 100644 --- a/propertyNames.go +++ b/propertyNames.go @@ -6,2804 +6,2721 @@ type PropertyName string const ( // ID is the constant for "id" property tag. // - // Used by `View`, `Animation`. + // # Used by View, Animation. // - // Usage in `View`: + // Usage in View: // Optional textual identifier for the view. Used to reference view from source code if needed. // - // Supported types: `string`. + // Supported types: string. + // + // # Usage in Animation: // - // Usage in `Animation`: // Specifies the animation identifier. Used only for animation script. // - // Supported types: `string`. + // Supported types: string. ID PropertyName = "id" // Style is the constant for "style" property tag. // - // Used by `ColumnSeparatorProperty`, `View`, `BorderProperty`, `OutlineProperty`. + // Used by ColumnSeparatorProperty, View, BorderProperty, OutlineProperty. + // + // # Usage in ColumnSeparatorProperty: // - // Usage in `ColumnSeparatorProperty`: // Line style. // - // Supported types: `int`, `string`. + // 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. + // - 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: // - // 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`. + // Supported types: string. + // + // # Usage in BorderProperty: // - // Usage in `BorderProperty`: // Border line style. // - // Supported types: `int`, `string`. + // 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. + // - 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: // - // Usage in `OutlineProperty`: // Outline line style. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "style" // StyleDisabled is the constant for "style-disabled" property tag. // - // Used by `View`. + // 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`. + // Supported types: string. StyleDisabled PropertyName = "style-disabled" // 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`. + // Used by ViewsContainer. + // Controls whether the view can receive focus and which style to use. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - View can't receive focus and "style-disabled" style will be used by the view. + // - false, 0, "false", "no", "off", or "0" - View can receive focus and "style" style will be used by the view. Disabled PropertyName = "disabled" // Focusable is the constant for "focusable" property tag. // - // Used by `View`. + // Used by View. // Controls whether view can receive focus. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - View can have a focus. + // - false, 0, "false", "no", "off", or "0" - View can't have a focus. Focusable PropertyName = "focusable" // Semantics is the constant for "semantics" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "semantics" // Visibility is the constant for "visibility" property tag. // - // Used by `View`. + // Used by View. // Specifies the visibility of the view. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "visibility" // ZIndex is the constant for "z-index" property tag. // - // Used by `View`. + // 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`. + // Supported types: int, string. // // Values: - // < `0` or < "0" - Views with lower value will be behind views with higher value. - // >PropertyName = `0` or >PropertyName = "0" - Views with higher value will be on top of views with lower value. + // - negative value - Views with lower value will be behind views with higher value. + // - not negative value - Views with higher value will be on top of views with lower value. ZIndex PropertyName = "z-index" // Opacity is the constant for "opacity" property tag. // - // Used by `View`, `ViewFilter`. + // Used by View, ViewFilter. + // + // # Usage in View: // - // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. + // + // # Usage in ViewFilter: // - // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Opacity PropertyName = "opacity" // Overflow is the constant for "overflow" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "overflow" // Row is the constant for "row" property tag. // - // Used by `View`. - // Row of the view inside the container like `GridLayout`. + // Used by View. + // Row of the view inside the container like GridLayout. // - // Supported types: `Range`, `int`, `string`. + // Supported types: Range, int, string. // - // Internal type is `Range`, other types converted to it during assignment. + // 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". + // - int - set single value(index). + // - string - can contain single integer value(index) or a range of integer values(indices), examples: "0", "0:3". Row PropertyName = "row" // Column is the constant for "column" property tag. // - // Used by `View`. - // Column of the view inside the container like `GridLayout`. + // Used by View. + // Column of the view inside the container like GridLayout. // - // Supported types: `Range`, `int`, `string`. + // Supported types: Range, int, string. // - // Internal type is `Range`, other types converted to it during assignment. + // 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". + // - int - set single value(index). + // - string - can contain single integer value(index) or a range of integer values(indices), examples: "0", "0:3". Column PropertyName = "column" // Left is the constant for "left" property tag. // - // Used by `View`, `BoundsProperty`, `ClipShape`. + // Used by View, BoundsProperty, ClipShape. // - // Usage in `View`: - // Offset from left border of the container. Used only for views placed in an `AbsoluteLayout`. + // # Usage in View: // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Offset from left border of the container. Used only for views placed in an AbsoluteLayout. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // 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: // - // Usage in `BoundsProperty`: // Left bound value. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in ClipShape: // - // Usage in `ClipShape`: // Specifies the left border position of inset clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Left PropertyName = "left" // Right is the constant for "right" property tag. // - // Used by `View`, `BoundsProperty`, `ClipShape`. + // Used by View, BoundsProperty, ClipShape. // - // Usage in `View`: - // Offset from right border of the container. Used only for views placed in an `AbsoluteLayout`. + // # Usage in View: // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Offset from right border of the container. Used only for views placed in an AbsoluteLayout. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // 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: // - // Usage in `BoundsProperty`: // Right bound value. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in ClipShape: // - // Usage in `ClipShape`: // Specifies the right border position of inset clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Right PropertyName = "right" // Top is the constant for "top" property tag. // - // Used by `View`, `BoundsProperty`, `ClipShape`. + // Used by View, BoundsProperty, ClipShape. // - // Usage in `View`: - // Offset from top border of the container. Used only for views placed in an `AbsoluteLayout`. + // # Usage in View: // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Offset from top border of the container. Used only for views placed in an AbsoluteLayout. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // 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: // - // Usage in `BoundsProperty`: // Top bound value. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in ClipShape: // - // Usage in `ClipShape`: // Specifies the top border position of inset clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Top PropertyName = "top" // Bottom is the constant for "bottom" property tag. // - // Used by `View`, `BoundsProperty`, `ClipShape`. + // Used by View, BoundsProperty, ClipShape. // - // Usage in `View`: - // Offset from bottom border of the container. Used only for views placed in an `AbsoluteLayout`. + // # Usage in View: // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Offset from bottom border of the container. Used only for views placed in an AbsoluteLayout. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // 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: // - // Usage in `BoundsProperty`: // Bottom bound value. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in ClipShape: // - // Usage in `ClipShape`: // Specifies the bottom border position of inset clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Bottom PropertyName = "bottom" // Width is the constant for "width" property tag. // - // Used by `ColumnSeparatorProperty`, `View`, `BorderProperty`, `OutlineProperty`. + // Used by ColumnSeparatorProperty, View, BorderProperty, OutlineProperty. + // + // # Usage in ColumnSeparatorProperty: // - // Usage in `ColumnSeparatorProperty`: // Line width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in View: // - // Usage in `View`: // Set a view's width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in BorderProperty: // - // Usage in `BorderProperty`: // Border line width. // - // Supported types: `SizeUnit`, `string`. + // Supported types: SizeUnit, string. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in OutlineProperty: // - // Usage in `OutlineProperty`: // Outline line width. // - // Supported types: `SizeUnit`, `string`. + // Supported types: SizeUnit, string. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Width PropertyName = "width" // Height is the constant for "height" property tag. // - // Used by `View`. + // Used by View. // Set a view's height. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Height PropertyName = "height" // MinWidth is the constant for "min-width" property tag. // - // Used by `View`. + // Used by View. // Set a view's minimal width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MinWidth PropertyName = "min-width" // MinHeight is the constant for "min-height" property tag. // - // Used by `View`. + // Used by View. // Set a view's minimal height. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MinHeight PropertyName = "min-height" // MaxWidth is the constant for "max-width" property tag. // - // Used by `View`. + // Used by View. // Set a view's maximal width. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MaxWidth PropertyName = "max-width" // MaxHeight is the constant for "max-height" property tag. // - // Used by `View`. + // Used by View. // Set a view's maximal height. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MaxHeight PropertyName = "max-height" // Margin is the constant for "margin" property tag. // - // Used by `View`. + // Used by View. // Set the margin area on all four sides of an element. // - // Supported types: `BoundsProperty`, `Bounds`, `SizeUnit`, `float32`, `float64`, `int`, `string`. + // 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. + // 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. + // - 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 PropertyName = "margin" // MarginLeft is the constant for "margin-left" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MarginLeft PropertyName = "margin-left" // MarginRight is the constant for "margin-right" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MarginRight PropertyName = "margin-right" // MarginTop is the constant for "margin-top" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MarginTop PropertyName = "margin-top" // MarginBottom is the constant for "margin-bottom" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. MarginBottom PropertyName = "margin-bottom" // Padding is the constant for "padding" property tag. // - // Used by `View`. + // 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`. + // 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. + // 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. + // - 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 PropertyName = "padding" // PaddingLeft is the constant for "padding-left" property tag. // - // Used by `View`. + // Used by View. // Set the width of the padding area to the left of a view. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. PaddingLeft PropertyName = "padding-left" // PaddingRight is the constant for "padding-right" property tag. // - // Used by `View`. + // Used by View. // Set the width of the padding area to the right of a view. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. PaddingRight PropertyName = "padding-right" // PaddingTop is the constant for "padding-top" property tag. // - // Used by `View`. + // Used by View. // Set the height of the padding area to the top of a view. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. PaddingTop PropertyName = "padding-top" // PaddingBottom is the constant for "padding-bottom" property tag. // - // Used by `View`. + // Used by View. // Set the height of the padding area to the bottom of a view. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. PaddingBottom PropertyName = "padding-bottom" // AccentColor is the constant for "accent-color" property tag. // - // Used by `View`. + // Used by View. // Sets the accent color for UI controls generated by some elements. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. AccentColor PropertyName = "accent-color" // BackgroundColor is the constant for "background-color" property tag. // - // Used by `View`. + // Used by View. // Set the background color of a view. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BackgroundColor PropertyName = "background-color" // Background is the constant for "background" property tag. // - // Used by `View`. + // Used by View. // Set one or more background images and/or gradients for the view. // - // Supported types: `BackgroundElement`, `[]BackgroundElement`, `string`. + // Supported types: BackgroundElement, []BackgroundElement, string. // - // Internal type is `[]BackgroundElement`, other types converted to it during assignment. - // See `BackgroundElement` description for more details. + // 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. + // - string - must contain text representation of background element(s) like in resource files. Background PropertyName = "background" // Mask is the constant for "mask" property tag. // - // Used by `View`. + // Used by View. // Set one or more images and/or gradients as the view mask. // As mask is used only alpha channel of images and/or gradients. // - // Supported types: `BackgroundElement`, `[]BackgroundElement`, `string`. + // Supported types: BackgroundElement, []BackgroundElement, string. // - // Internal type is `[]BackgroundElement`, other types converted to it during assignment. - // See `BackgroundElement` description for more details. + // 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. + // - string - must contain text representation of background element(s) like in resource files. Mask PropertyName = "mask" // Cursor is the constant for "cursor" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "cursor" // Border is the constant for "border" property tag. // - // Used by `View`. + // Used by View. // Set a view's border. It sets the values of a border width, style, and color. // - // Supported types: `BorderProperty`, `ViewBorder`, `ViewBorders`. + // Supported types: BorderProperty, ViewBorder, ViewBorders. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `BorderProperty`, `ViewBorder`, `ViewBorders` description for more details. + // 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`. + // - 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 PropertyName = "border" // BorderLeft is the constant for "border-left" property tag. // - // Used by `View`. + // 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`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder`, `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder, BorderProperty description for more details. BorderLeft PropertyName = "border-left" // BorderRight is the constant for "border-right" property tag. // - // Used by `View`. + // 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`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder`, `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder, BorderProperty description for more details. BorderRight PropertyName = "border-right" // BorderTop is the constant for "border-top" property tag. // - // Used by `View`. + // 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`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder`, `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder, BorderProperty description for more details. BorderTop PropertyName = "border-top" // BorderBottom is the constant for "border-bottom" property tag. // - // Used by `View`. + // 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`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder`, `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder, BorderProperty description for more details. BorderBottom PropertyName = "border-bottom" // BorderStyle is the constant for "border-style" property tag. // - // Used by `View`. + // Used by View. // Set the line style for all four sides of a view's border. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "border-style" // BorderLeftStyle is the constant for "border-left-style" property tag. // - // Used by `View`. + // Used by View. // Set the line style of a view's left border. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "border-left-style" // BorderRightStyle is the constant for "border-right-style" property tag. // - // Used by `View`. + // Used by View. // Set the line style of a view's right border. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "border-right-style" // BorderTopStyle is the constant for "border-top-style" property tag. // - // Used by `View`. + // Used by View. // Set the line style of a view's top border. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "border-top-style" // BorderBottomStyle is the constant for "border-bottom-style" property tag. // - // Used by `View`. + // Used by View. // Sets the line style of a view's bottom border. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "border-bottom-style" // BorderWidth is the constant for "border-width" property tag. // - // Used by `View`. + // Used by View. // Set the line width for all four sides of a view's border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. BorderWidth PropertyName = "border-width" // BorderLeftWidth is the constant for "border-left-width" property tag. // - // Used by `View`. + // Used by View. // Set the line width of a view's left border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. BorderLeftWidth PropertyName = "border-left-width" // BorderRightWidth is the constant for "border-right-width" property tag. // - // Used by `View`. + // Used by View. // Set the line width of a view's right border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. BorderRightWidth PropertyName = "border-right-width" // BorderTopWidth is the constant for "border-top-width" property tag. // - // Used by `View`. + // Used by View. // Set the line width of a view's top border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. BorderTopWidth PropertyName = "border-top-width" // BorderBottomWidth is the constant for "border-bottom-width" property tag. // - // Used by `View`. + // Used by View. // Set the line width of a view's bottom border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. BorderBottomWidth PropertyName = "border-bottom-width" // BorderColor is the constant for "border-color" property tag. // - // Used by `View`. + // Used by View. // Set the line color for all four sides of a view's border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BorderColor PropertyName = "border-color" // BorderLeftColor is the constant for "border-left-color" property tag. // - // Used by `View`. + // Used by View. // Set the line color of a view's left border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BorderLeftColor PropertyName = "border-left-color" // BorderRightColor is the constant for "border-right-color" property tag. // - // Used by `View`. + // Used by View. // Set the line color of a view's right border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BorderRightColor PropertyName = "border-right-color" // BorderTopColor is the constant for "border-top-color" property tag. // - // Used by `View`. + // Used by View. // Set the line color of a view's top border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BorderTopColor PropertyName = "border-top-color" // BorderBottomColor is the constant for "border-bottom-color" property tag. // - // Used by `View`. + // Used by View. // Set the line color of a view's bottom border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. BorderBottomColor PropertyName = "border-bottom-color" // Outline is the constant for "outline" property tag. // - // Used by `View`. + // Used by View. // Set a view's outline. It sets the values of an outline width, style, and color. // - // Supported types: `OutlineProperty`, `ViewOutline`, `ViewBorder`. + // 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. + // Internal type is OutlineProperty, other types converted to it during assignment. + // See OutlineProperty, ViewOutline and ViewBorder description for more details. Outline PropertyName = "outline" // OutlineStyle is the constant for "outline-style" property tag. // - // Used by `View`. + // Used by View. // Set the style of an view's outline. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "outline-style" // OutlineColor is the constant for "outline-color" property tag. // - // Used by `View`. + // Used by View. // Set the color of an view's outline. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. OutlineColor PropertyName = "outline-color" // OutlineWidth is the constant for "outline-width" property tag. // - // Used by `View`. + // Used by View. // Set the width of an view's outline. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. OutlineWidth PropertyName = "outline-width" // OutlineOffset is the constant for "outline-offset" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. OutlineOffset PropertyName = "outline-offset" // Shadow is the constant for "shadow" property tag. // - // Used by `View`. + // 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: `ShadowProperty`, `[]ShadowProperty`, `string`. + // Supported types: ShadowProperty, []ShadowProperty, string. // - // Internal type is `[]ShadowProperty`, other types converted to it during assignment. - // See `ShadowProperty` description for more details. + // Internal type is []ShadowProperty, other types converted to it during assignment. + // See ShadowProperty description for more details. // // Conversion rules: - // `[]ShadowProperty` - stored as is. no conversion performed. - // `ShadowProperty` - converted to `[]ShadowProperty` during assignment. - // `string` - must contain a string representation of `ShadowProperty` + // - []ShadowProperty - stored as is. no conversion performed. + // - ShadowProperty - converted to []ShadowProperty during assignment. + // - string - must contain a string representation of ShadowProperty Shadow PropertyName = "shadow" // FontName is the constant for "font-name" property tag. // - // Used by `View`. + // 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`. + // Supported types: string. FontName PropertyName = "font-name" // TextColor is the constant for "text-color" property tag. // - // Used by `View`. + // 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`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. TextColor PropertyName = "text-color" // TextSize is the constant for "text-size" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. TextSize PropertyName = "text-size" // Italic is the constant for "italic" property tag. // - // Used by `View`. + // 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`. + // value of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Text is displayed in italics. + // - false, 0, "false", "no", "off", or "0" - Normal text. Italic PropertyName = "italic" // SmallCaps is the constant for "small-caps" property tag. // - // Used by `View`. + // 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`. + // not defined, then the value of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Text displayed using small caps. + // - false, 0, "false", "no", "off", or "0" - Normal text display. SmallCaps PropertyName = "small-caps" // Strikethrough is the constant for "strikethrough" property tag. // - // Used by `View`. + // 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`. + // of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Draw line over the text. + // - false, 0, "false", "no", "off", or "0" - Normal text display. Strikethrough PropertyName = "strikethrough" // Overline is the constant for "overline" property tag. // - // Used by `View`. + // 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`. + // defined, then the value of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Overline text. + // - false, 0, "false", "no", "off", or "0" - No overline. Overline PropertyName = "overline" // Underline is the constant for "underline" property tag. // - // Used by `View`. + // 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`. + // of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Draw line below the text. + // - false, 0, "false", "no", "off", or "0" - Normal text display. Underline PropertyName = "underline" // TextLineThickness is the constant for "text-line-thickness" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. TextLineThickness PropertyName = "text-line-thickness" // TextLineStyle is the constant for "text-line-style" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "text-line-style" // TextLineColor is the constant for "text-line-color" property tag. // - // Used by `View`. + // 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`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. TextLineColor PropertyName = "text-line-color" // TextWeight is the constant for "text-weight" property tag. // - // Used by `View`. + // Used by View. // Sets weight of the text. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "text-weight" // TextAlign is the constant for "text-align" property tag. // - // Used by `TableView`, `View`. + // Used by TableView, View. // - // Usage in `TableView`: + // Usage in TableView: // Sets the horizontal alignment of the content inside a table cell. // - // Supported types: `int`, `string`. + // 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. + // - 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`: + // 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`. + // 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. + // - 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 PropertyName = "text-align" // TextIndent is the constant for "text-indent" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. TextIndent PropertyName = "text-indent" // TextShadow is the constant for "text-shadow" property tag. // - // Used by `View`. + // Used by View. // Specify shadow for the text. // - // Supported types: `ShadowProperty`, `[]ShadowProperty`, `string`. + // Supported types: ShadowProperty, []ShadowProperty, string. // - // Internal type is `[]ShadowProperty`, other types converted to it during assignment. - // See `ShadowProperty` description for more details. + // Internal type is []ShadowProperty, other types converted to it during assignment. + // See ShadowProperty description for more details. // // Conversion rules: - // `[]ShadowProperty` - stored as is. no conversion performed. - // `ShadowProperty` - converted to `[]ShadowProperty` during assignment. - // `string` - must contain a string representation of `ShadowProperty` + // - []ShadowProperty - stored as is. no conversion performed. + // - ShadowProperty - converted to []ShadowProperty during assignment. + // - string - must contain a string representation of ShadowProperty TextShadow PropertyName = "text-shadow" // TextWrap is the constant for "text-wrap" property tag. // - // Used by `View`. + // Used by View. // Controls how text inside the view is wrapped. Default value is "wrap". // - // Supported types: `int`, `string`. + // 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). + // - 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 PropertyName = "text-wrap" // TabSize is the constant for "tab-size" property tag. // - // Used by `View`. + // 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`. + // value of the parent view is used. Default value is 8. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // > `0` or > "0" - Number of spaces in tab character. + // - greater than 0 - Number of spaces in tab character. + // - 0 or negative - ignored. TabSize PropertyName = "tab-size" // LetterSpacing is the constant for "letter-spacing" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. LetterSpacing PropertyName = "letter-spacing" // WordSpacing is the constant for "word-spacing" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. WordSpacing PropertyName = "word-spacing" // LineHeight is the constant for "line-height" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. LineHeight PropertyName = "line-height" // WhiteSpace is the constant for "white-space" property tag. // - // Used by `View`. + // 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`. + // 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). + // - 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 some differences. + // + // Differences WhiteSpaceBreakSpaces (5) from WhiteSpacePreWrap(3): + // 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 PropertyName = "white-space" // WordBreak is the constant for "word-break" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "word-break" // TextTransform is the constant for "text-transform" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "text-transform" // TextDirection is the constant for "text-direction" property tag. // - // Used by `ColumnLayout`, `View`. - // - // Usage in `ColumnLayout`: + // Used by View. // 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`. + // 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). + // - 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 PropertyName = "text-direction" // WritingMode is the constant for "writing-mode" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "writing-mode" // VerticalTextOrientation is the constant for "vertical-text-orientation" property tag. // - // Used by `View`. + // 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`. + // Supported types: int, string. // // Values: - // `0`(`MixedTextOrientation`) or "mixed" - Symbols rotated 90° clockwise. - // `1`(`UprightTextOrientation`) or "upright" - Symbols are arranged normally(vertically). + // - 0 (MixedTextOrientation) or "mixed" - Symbols rotated 90° clockwise. + // - 1 (UprightTextOrientation) or "upright" - Symbols are arranged normally(vertically). VerticalTextOrientation PropertyName = "vertical-text-orientation" // TextOverflow is the constant for "text-overflow" property tag. // - // Used by `TextView`. + // Used by TextView. // Sets how hidden overflow content is signaled to users. Default value is "clip". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "text-overflow" // Hint is the constant for "hint" property tag. // - // Used by `EditView`. + // Used by EditView. // Sets a hint to the user of what can be entered in the control. // - // Supported types: `string`. + // Supported types: string. Hint PropertyName = "hint" // MaxLength is the constant for "max-length" property tag. // - // Used by `EditView`. + // Used by EditView. // Sets the maximum number of characters that the user can enter. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // >PropertyName = `0` or >PropertyName = "0" - Maximum number of characters. + // - positive value - Maximum number of characters. + // - 0 or negative value - The maximum number of characters is not limited. MaxLength PropertyName = "max-length" // ReadOnly is the constant for "readonly" property tag. // - // Used by `EditView`. - // Controls whether the user can modify value or not. Default value is `false`. + // Used by EditView. + // Controls whether the user can modify value or not. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - User not able to modify the value. + // - false, 0, "false", "no", "off", or "0" - Value can be modified. ReadOnly PropertyName = "readonly" // Content is the constant for "content" property tag. // - // Used by `Checkbox`, `GridLayout`, `ListLayout`, `Resizable`, `StackLayout`, `SvgImageView`, `TableView`, `TabsLayout`, `ViewsContainer`. + // Used by ViewsContainer, GridLayout, ListLayout, Resizable, StackLayout, SvgImageView, TableView. + // + // # Usage in ViewsContainer: // - // Usage in `Checkbox`: // An array of child views. // - // Supported types: `View`, `[]View`, `string`, `[]string`, `[]any` containing elements of `View` or `string`. + // Supported types: View, []View, string, []string, []any containing elements of View, string. // - // Internal type is `[]View`, other types converted to it during assignment. + // 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. + // - 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. + // # Usage in GridLayout: // - // Supported types: `[]View`, `GridAdapter`, `View`, `string`, `[]string`. + // Defines an array of child views or can be an implementation of GridAdapter interface. // - // Internal type is either `[]View` or `GridAdapter`, other types converted to `[]View` during assignment. + // 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. + // - 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. + // # Usage in ListLayout: // - // Supported types: `[]View`, `ListAdapter`, `View`, `string`, `[]string`. + // Defines an array of child views or can be an implementation of ListAdapter interface. // - // Internal type is either `[]View` or `ListAdapter`, other types converted to `[]View` during assignment. + // 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. + // - 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. + // # Usage in Resizable: // - // Supported types: `View`, `string`. + // Content view to make it resizable or text in this case TextView will be created. // - // Internal type is `View`, other types converted to it during assignment. + // Supported types: View, string. // - // Usage in `StackLayout`: + // 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`. + // Supported types: View, []View, string, []string, []any containing elements of View, string. // - // Internal type is `[]View`, other types converted to it during assignment. + // 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. + // - 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. + // # Usage in SvgImageView: // - // Supported types: `string`. + // 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: // - // Usage in `TableView`: // Defines the content of the table. // - // Supported types: `TableAdapter`, `[][]string`, `[][]any`. + // 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. + // Internal type is TableAdapter, other types converted to it during assignment. + // See TableAdapter description for more details. Content PropertyName = "content" // Items is the constant for "items" property tag. // - // Used by `DropDownList`, `ListView`, `Popup`. + // Used by DropDownList, ListView, Popup. + // + // # Usage in DropDownList: // - // 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`. + // 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. + // 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. + // - 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. + // # Usage in ListView: // - // Supported types: `ListAdapter`, `[]View`, `[]string`, `[]any` containing elements of `View`, `string`, `fmt.Stringer`, - // `float` and `int`. + // List content. Main value is an implementation of ListAdapter interface. // - // Internal type is either `[]View` or `ListAdapter`, other types converted to it during assignment. + // 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`. + // - 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: // - // Usage in `Popup`: // Array of menu items. // - // Supported types: `ListAdapter`, `[]string`. + // Supported types: ListAdapter, []string. // - // Internal type is `ListAdapter` internal implementation, other types converted to it during assignment. + // Internal type is ListAdapter internal implementation, other types converted to it during assignment. Items PropertyName = "items" // DisabledItems is the constant for "disabled-items" property tag. // - // Used by `DropDownList`. + // Used by DropDownList. // An array of disabled(non selectable) items indices. // - // Supported types: `[]int`, `string`, `[]string`, `[]any` containing elements of `string` or `int`. + // Supported types: []int, string, []string, []any containing elements of string or int. // - // Internal type is `[]int`, other types converted to it during assignment. + // 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. + // - []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 PropertyName = "disabled-items" // 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. + // 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`. + // Supported types: []int, string, []string, []any containing elements of string or int. // - // Internal type is `[]int`, other types converted to it during assignment. + // 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. + // - []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 PropertyName = "item-separators" // Current is the constant for "current" property tag. // - // Used by `DropDownList`, `ListView`, `StackLayout`, `TableView`, `TabsLayout`. + // Used by DropDownList, ListView, TableView, TabsLayout. + // + // # Usage in DropDownList: // - // Usage in `DropDownList`: // Current selected item. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `-1` or "-1" - No item has been selected. - // >PropertyName = `0` or >PropertyName = "0" - Index of selected item. + // - negative value - No item has been selected. + // - not negative value - Index of selected item. + // + // # Usage in ListView: // - // Usage in `ListView`: // Set or get index of selected item. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `-1` or "-1" - No item has been selected. - // >PropertyName = `0` or >PropertyName = "0" - Index of selected item. + // - negative value - No item has been selected. + // - not negative value - Index of selected item. // - // Usage in `StackLayout`: - // Set or Index of current(visible) view. + // # Usage in TableView: // - // Supported types: `int`, `string`. - // - // Values: - // `-1` or "-1" - No visible view. - // >PropertyName = `0` or >PropertyName = "0" - Index of visible view. - // - // Usage in `TableView`: // Sets the coordinates of the selected cell/row. // - // Supported types: `CellIndex`, `int`, `string`. + // Supported types: CellIndex, int, string. // - // Internal type is `CellIndex`, other types converted to it during assignment. - // See `CellIndex` description for more details. + // 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. + // - 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: // - // Usage in `TabsLayout`: // Defines index of the current active child view. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `-1` or "-1" - No visible tab. - // >PropertyName = `0` or >PropertyName = "0" - Index of visible tab. + // - negative value - No visible tab. + // - not negative value - Index of visible tab. Current PropertyName = "current" // Type is the constant for "type" property tag. // - // Used by `EditView`, `NumberPicker`. + // Used by EditView, NumberPicker. // - // Usage in `EditView`: - // Same as "edit-view-type". + // Usage in EditView: + // Same as "edit-view-type" [EditViewType]. // - // Usage in `NumberPicker`: - // Same as "number-picker-type". + // Usage in NumberPicker: + // Same as "number-picker-type" [NumberPickerType]. Type PropertyName = "type" // Pattern is the constant for "pattern" property tag. // - // Used by `EditView`. - // Same as "edit-view-pattern". + // Used by EditView. + // Same as "edit-view-pattern" [EditViewPattern]. Pattern PropertyName = "pattern" // 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. + // Used by GridLayout. + // Controls how to place child controls if Row and Column properties were not set for children views. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "grid-auto-flow" // 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 + // 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`. + // 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. + // 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. + // - 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 PropertyName = "cell-width" // 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 + // 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`. + // 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. + // 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. + // - 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 PropertyName = "cell-height" // GridRowGap is the constant for "grid-row-gap" property tag. // - // Used by `GridLayout`. + // Used by GridLayout. // Space between rows. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. GridRowGap PropertyName = "grid-row-gap" // GridColumnGap is the constant for "grid-column-gap" property tag. // - // Used by `GridLayout`. + // Used by GridLayout. // Space between columns. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. GridColumnGap PropertyName = "grid-column-gap" // Source is the constant for "src" property tag. // - // Used by `AudioPlayer`, `ImageView`, `VideoPlayer`. + // Used by AudioPlayer, ImageView, VideoPlayer. + // + // # Usage in AudioPlayer // - // 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`. + // Supported types: string, MediaSource, []MediaSource. // - // Internal type is `[]MediaSource`, other types converted to it during assignment. + // Internal type is []MediaSource, other types converted to it during assignment. + // + // # Usage in ImageView // - // 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`. + // Supported types: string. + // + // # Usage in VideoPlayer // - // 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`. + // Supported types: string, MediaSource, []MediaSource. // - // Internal type is `[]MediaSource`, other types converted to it during assignment. + // Internal type is []MediaSource, other types converted to it during assignment. Source PropertyName = "src" // 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 + // 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`. + // Supported types: string. SrcSet PropertyName = "srcset" // Fit is the constant for "fit" property tag. // - // Used by `ImageView`, `BackgroundElement`. + // Used by ImageView, BackgroundElement. + // + // # Usage in ImageView // - // Usage in `ImageView`: // Defines the image scaling parameters. // - // Supported types: `int`, `string`. + // 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. + // - 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 // - // Usage in `BackgroundElement`: // Used for image background only. Defines the image scaling parameters. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "fit" backgroundFit PropertyName = "background-fit" // 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". + // Used by BackgroundElement. + // Used for image background only. Specifying the repetition of the image. Default value is "no-repeat". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "repeat" // Attachment is the constant for "attachment" property tag. // - // Used by `BackgroundElement`. + // 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`. + // 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. + // - 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 PropertyName = "attachment" // BackgroundClip is the constant for "background-clip" property tag. // - // Used by `View`. + // Used by View. // Determines how the background color and/or background image will be displayed below the box borders. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "background-clip" // BackgroundOrigin is the constant for "background-origin" property tag. // - // Used by `View`. + // Used by View. // Determines the background's origin: from the border start, inside the border, or inside the padding. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`BorderBox`) or "border-box" - The background is positioned relative to the border box. - // `1`(`PaddingBox`) or "padding-box" - The background is positioned relative to the padding box. - // `2`(`ContentBox`) or "content-box" - The background is positioned relative to the content box. + // - 0 (BorderBox) or "border-box" - The background is positioned relative to the border box. + // - 1 (PaddingBox) or "padding-box" - The background is positioned relative to the padding box. + // - 2 (ContentBox) or "content-box" - The background is positioned relative to the content box. BackgroundOrigin PropertyName = "background-origin" // MaskClip is the constant for "mask-clip" property tag. // - // Used by `View`. + // Used by View. // Determines how image/gradient masks will be used below the box borders. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`BorderBox`) or "border-box" - The mask extends to the outer edge of the border. - // `1`(`PaddingBox`) or "padding-box" - The mask extends to the outer edge of the padding. - // `2`(`ContentBox`) or "content-box" - The mask is used inside(clipped) of the content box. + // - 0 (BorderBox) or "border-box" - The mask extends to the outer edge of the border. + // - 1 (PaddingBox) or "padding-box" - The mask extends to the outer edge of the padding. + // - 2 (ContentBox) or "content-box" - The mask is used inside(clipped) of the content box. MaskClip PropertyName = "mask-clip" // MaskOrigin is the constant for "mask-origin" property tag. // - // Used by `View`. + // Used by View. // Determines the mask's origin: from the border start, inside the border, or inside the padding. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`BorderBox`) or "border-box" - The mask is positioned relative to the border box. - // `1`(`PaddingBox`) or "padding-box" - The mask is positioned relative to the padding box. - // `2`(`ContentBox`) or "content-box" - The mask is positioned relative to the content box. + // - 0 (BorderBox) or "border-box" - The mask is positioned relative to the border box. + // - 1 (PaddingBox) or "padding-box" - The mask is positioned relative to the padding box. + // - 2 (ContentBox) or "content-box" - The mask is positioned relative to the content box. MaskOrigin PropertyName = "mask-origin" // Gradient is the constant for "gradient" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Describe gradient stop points. This is a mandatory property while describing background gradients. // - // Supported types: `[]BackgroundGradientPoint`, `[]BackgroundGradientAngle`, `[]GradientPoint`, `[]Color`, `string`. + // 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. + // 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%". + // - []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 PropertyName = "gradient" // 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 + // 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`. + // Supported types: AngleUnit, int, string. // - // See `AngleUnit` description for more details. + // 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. + // - 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 PropertyName = "direction" // Repeating is the constant for "repeating" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Define whether stop points needs to be repeated after the last one. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Gradient will repeat after the last key point. + // - false, 0, "false", "no", "off", or "0" - No repetition of gradient stop points. Value of the last point used will be extrapolated. Repeating PropertyName = "repeating" // From is the constant for "from" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Used for conic gradient only. Start angle position of the gradient. // - // Supported types: `AngleUnit`, `string`, `float`, `int`. + // Supported types: AngleUnit, string, float, int. // - // Internal type is `AngleUnit`, other types converted to it during assignment. - // See `AngleUnit` description for more details. + // Internal type is AngleUnit, other types converted to it during assignment. + // See AngleUnit description for more details. From PropertyName = "from" // RadialGradientRadius is the constant for "radial-gradient-radius" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Define radius of the radial gradient. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. RadialGradientRadius PropertyName = "radial-gradient-radius" // 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". + // Used by BackgroundElement. + // Define shape of the radial gradient. The default is 0 (EllipseGradient or "ellipse". // - // Supported types: `int`, `string`. + // 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. + // - EllipseGradient (0) or "ellipse" - The shape is an axis-aligned ellipse. + // - CircleGradient (1) or "circle" - The shape is a circle with a constant radius. RadialGradientShape PropertyName = "radial-gradient-shape" // Shape is the constant for "shape" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Same as "radial-gradient-shape". Shape PropertyName = "shape" // CenterX is the constant for "center-x" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Used for conic and radial gradients only. Center X point of the gradient. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. CenterX PropertyName = "center-x" // CenterY is the constant for "center-y" property tag. // - // Used by `BackgroundElement`. + // Used by BackgroundElement. // Used for conic and radial gradients only. Center Y point of the gradient. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. CenterY PropertyName = "center-y" // AltText is the constant for "alt-text" property tag. // - // Used by `ImageView`. + // Used by ImageView. // Set a description of the image. // - // Supported types: `string`. + // Supported types: string. AltText PropertyName = "alt-text" altTag PropertyName = "alt" // AvoidBreak is the constant for "avoid-break" property tag. // - // Used by `ColumnLayout`. + // Used by ColumnLayout. // Controls how region breaks should behave inside a generated box. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Avoid any break from being inserted within the principal box. + // - false, 0, "false", "no", "off", or "0" - Allow, but does not force, any break to be inserted within the principal box. AvoidBreak PropertyName = "avoid-break" // ItemWidth is the constant for "item-width" property tag. // - // Used by `ListView`. + // Used by ListView. // Fixed width of list elements. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. ItemWidth PropertyName = "item-width" // ItemHeight is the constant for "item-height" property tag. // - // Used by `ListView`. + // Used by ListView. // Fixed height of list elements. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. ItemHeight PropertyName = "item-height" // ListWrap is the constant for "list-wrap" property tag. // - // Used by `ListLayout`, `ListView`. + // Used by ListLayout, ListView. // - // Usage in `ListLayout`: + // Usage in ListLayout: // Defines the position of elements in case of reaching the border of the container. // - // Supported types: `int`, `string`. + // 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. + // - 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`: + // Usage in ListView: // Defines the position of elements in case of reaching the border of the container. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "list-wrap" // 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`. + // 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`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Text wrapped to the next line. + // - false, 0, "false", "no", "off", or "0" - Do not wrap text. Horizontal scrolling will appear if necessary. EditWrap PropertyName = "edit-wrap" // CaretColor is the constant for "caret-color" property tag. // - // Used by `EditView`, `View`. + // Used by EditView. // - // 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`. + // 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. + // Internal type is Color, other types converted to it during assignment. + // See [Color] description for more details. CaretColor PropertyName = "caret-color" // Min is the constant for "min" property tag. // - // Used by `DatePicker`, `NumberPicker`, `TimePicker`. + // Used by DatePicker, NumberPicker, TimePicker. // - // Usage in `DatePicker`: - // Same as "date-picker-min". + // Usage in DatePicker: + // Same as "date-picker-min" [DatePickerMin]. // - // Usage in `NumberPicker`: - // Same as "number-picker-min". + // Usage in NumberPicker: + // Same as "number-picker-min" [NumberPickerMin]. // - // Usage in `TimePicker`: - // Same as "time-picker-min". + // Usage in TimePicker: + // Same as "time-picker-min" [TimePickerMin]. Min PropertyName = "min" // Max is the constant for "max" property tag. // - // Used by `DatePicker`, `NumberPicker`, `ProgressBar`, `TimePicker`. + // Used by DatePicker, NumberPicker, ProgressBar, TimePicker. // - // Usage in `DatePicker`: - // Same as "date-picker-max". + // Usage in DatePicker: + // Same as "date-picker-max" [DatePickerMax]. // - // Usage in `NumberPicker`: - // Same as "number-picker-max". + // Usage in NumberPicker: + // Same as "number-picker-max" [NumberPickerMax]. // - // Usage in `ProgressBar`: - // Same as "progress-max". + // Usage in ProgressBar: + // Same as "progress-max" [ProgressBarMax]. // - // Usage in `TimePicker`: - // Same as "time-picker-max". + // Usage in TimePicker: + // Same as "time-picker-max" [TimePickerMax]. Max PropertyName = "max" // Step is the constant for "step" property tag. // - // Used by `DatePicker`, `NumberPicker`, `TimePicker`. + // Used by DatePicker, NumberPicker, TimePicker. // - // Usage in `DatePicker`: - // Same as "date-picker-step". + // Usage in DatePicker: + // Same as "date-picker-step" [DatePickerStep]. // - // Usage in `NumberPicker`: - // Same as "number-picker-step". + // Usage in NumberPicker: + // Same as "number-picker-step" [NumberPickerStep]. // - // Usage in `TimePicker`: - // Same as "time-picker-step". + // Usage in TimePicker: + // Same as "time-picker-step" [TimePickerStep]. Step PropertyName = "step" // Value is the constant for "value" property tag. // - // Used by `DatePicker`, `NumberPicker`, `ProgressBar`, `TimePicker`. + // Used by DatePicker, NumberPicker, ProgressBar, TimePicker. // - // Usage in `DatePicker`: - // Same as "date-picker-value". + // Usage in DatePicker: + // Same as "date-picker-value" [DatePickerValue]. // - // Usage in `NumberPicker`: - // Same as "number-picker-value". + // Usage in NumberPicker: + // Same as "number-picker-value" [NumberPickerValue]. // - // Usage in `ProgressBar`: - // Same as "progress-value". + // Usage in ProgressBar: + // Same as "progress-value" [ProgressBarValue]. // - // Usage in `TimePicker`: - // Same as "time-picker-value". + // Usage in TimePicker: + // Same as "time-picker-value" [TimePickerValue]. Value PropertyName = "value" // Orientation is the constant for "orientation" property tag. // - // Used by `ListLayout`, `ListView`, `View`. + // Used by ListLayout, ListView. // - // Usage in `ListLayout`: // Specifies how the children will be positioned relative to each other. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "orientation" // Gap is the constant for "gap" property tag. // - // Used by `GridLayout`, `ListLayout`, `ListView`, `TableView`. + // Used by GridLayout, ListLayout, ListView, TableView. + // + // # Usage in GridLayout // - // Usage in `GridLayout`: // Specify both "grid-column-gap" and "grid-row-gap". // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. + // + // # Usage in ListLayout and ListView // - // Usage in `ListLayout`: // Specify both "list-column-gap" and "list-row-gap". // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // 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". + // # Usage in TableView // - // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. Gap PropertyName = "gap" // ListRowGap is the constant for "list-row-gap" property tag. // - // Used by `ListLayout`, `ListView`. + // Used by ListLayout, ListView. // - // Usage in `ListLayout`: - // Set the distance between the rows of the `ListLayout`. Default value 0px. + // Set the distance between the rows of the ListLayout. Default value 0px. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // 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. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. ListRowGap PropertyName = "list-row-gap" // ListColumnGap is the constant for "list-column-gap" property tag. // - // Used by `ListLayout`, `ListView`. + // Used by ListLayout, ListView. // - // Usage in `ListLayout`: - // Set the distance between the columns of the `ListLayout`. Default value 0px. + // Set the distance between the columns of the ListLayout. Default value 0px. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // 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. + // Internal type is SizeUnit, other types converted to it during assignment. + // See [SizeUnit] description for more details. ListColumnGap PropertyName = "list-column-gap" // Text is the constant for "text" property tag. // - // Used by `EditView`, `TextView`. + // Used by EditView, TextView. // - // Usage in `EditView`: + // Usage in EditView: // Edit view text. // - // Supported types: `string`. + // Supported types: string. // - // Usage in `TextView`: + // Usage in TextView: // Text to display. // - // Supported types: `string`. + // Supported types: string. Text PropertyName = "text" // VerticalAlign is the constant for "vertical-align" property tag. // - // Used by `Checkbox`, `ListLayout`, `ListView`, `Popup`, `SvgImageView`. + // Used by Checkbox, ListLayout, ListView, Popup, SvgImageView. + // + // # Usage in Checkbox // - // Usage in `Checkbox`: // Sets the vertical alignment of the content inside a block element. // - // Supported types: `int`, `string`. + // 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. + // - 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 and ListView // - // Usage in `ListLayout`: // Sets the vertical alignment of the content inside a block element. // - // Supported types: `int`, `string`. + // 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. + // - 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. + // # Usage in Popup // - // 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`. + // 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. + // - 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 // - // Usage in `SvgImageView`: // Sets the vertical alignment of the image relative to its bounds. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`TopAlign`) or "top" - Top alignment. - // `1`(`BottomAlign`) or "bottom" - Bottom alignment. - // `2`(`CenterAlign`) or "center" - Center alignment. + // - 0 (TopAlign) or "top" - Top alignment. + // - 1 (BottomAlign) or "bottom" - Bottom alignment. + // - 2 (CenterAlign) or "center" - Center alignment. VerticalAlign PropertyName = "vertical-align" // HorizontalAlign is the constant for "horizontal-align" property tag. // - // Used by `Checkbox`, `ListLayout`, `ListView`, `Popup`, `SvgImageView`. + // Used by Checkbox, ListLayout, ListView, Popup, SvgImageView. + // + // # Usage in Checkbox // - // Usage in `Checkbox`: // Sets the horizontal alignment of the content inside a block element. // - // Supported types: `int`, `string`. + // 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. + // - 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 and ListView // - // Usage in `ListLayout`: // Sets the horizontal alignment of the content inside a block element. // - // Supported types: `int`, `string`. + // 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. + // - 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. + // # Usage in Popup // - // 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`. + // 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. + // - 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 // - // Usage in `SvgImageView`: // Sets the horizontal alignment of the image relative to its bounds. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`LeftAlign`) or "left" - Left alignment. - // `1`(`RightAlign`) or "right" - Right alignment. - // `2`(`CenterAlign`) or "center" - Center alignment. + // - 0 (LeftAlign) or "left" - Left alignment. + // - 1 (RightAlign) or "right" - Right alignment. + // - 2 (CenterAlign) or "center" - Center alignment. HorizontalAlign PropertyName = "horizontal-align" // ImageVerticalAlign is the constant for "image-vertical-align" property tag. // - // Used by `ImageView`. + // Used by ImageView. // Sets the vertical alignment of the image relative to its bounds. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`TopAlign`) or "top" - Top alignment. - // `1`(`BottomAlign`) or "bottom" - Bottom alignment. - // `2`(`CenterAlign`) or "center" - Center alignment. + // - 0 (TopAlign) or "top" - Top alignment. + // - 1 (BottomAlign) or "bottom" - Bottom alignment. + // - 2 (CenterAlign) or "center" - Center alignment. ImageVerticalAlign PropertyName = "image-vertical-align" // ImageHorizontalAlign is the constant for "image-horizontal-align" property tag. // - // Used by `ImageView`. + // Used by ImageView. // Sets the horizontal alignment of the image relative to its bounds. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`LeftAlign`) or "left" - Left alignment. - // `1`(`RightAlign`) or "right" - Right alignment. - // `2`(`CenterAlign`) or "center" - Center alignment. + // - 0 (LeftAlign) or "left" - Left alignment. + // - 1 (RightAlign) or "right" - Right alignment. + // - 2 (CenterAlign) or "center" - Center alignment. ImageHorizontalAlign PropertyName = "image-horizontal-align" // Checked is the constant for "checked" property tag. // - // Used by `Checkbox`, `ListView`. + // Used by Checkbox, ListView. + // + // # Usage in Checkbox // - // Usage in `Checkbox`: // Current state of the checkbox. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - Checkbox is checked. + // - false, 0, "false", "no", "off", or "0" - Checkbox is unchecked. + // + // # Usage in ListView // - // Usage in `ListView`: // Set or get the list of checked items. Stores array of indices of checked items. // - // Supported types: `[]int`, `int`, `string`. + // Supported types: []int, int, string. // - // Internal type is `[]int`, other types converted to it during assignment. + // 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(`,`). + // - []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 PropertyName = "checked" // ItemVerticalAlign is the constant for "item-vertical-align" property tag. // - // Used by `ListView`. + // Used by ListView. // Sets the vertical alignment of the contents of the list items. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "item-vertical-align" // ItemHorizontalAlign is the constant for "item-horizontal-align" property tag. // - // Used by `ListView`. + // Used by ListView. // Sets the horizontal alignment of the contents of the list items. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "item-horizontal-align" // ItemCheckbox is the constant for "checkbox" property tag. // - // Used by `ListView`. + // Used by ListView. // Style of checkbox used to mark items in a list. Default value is "none". // - // Supported types: `int`, `string`. + // 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: ☑. + // - 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 PropertyName = "checkbox" // CheckboxHorizontalAlign is the constant for "checkbox-horizontal-align" property tag. // - // Used by `Checkbox`, `ListView`. + // Used by Checkbox, ListView. + // + // # Usage in Checkbox // - // Usage in `Checkbox`: // Horizontal alignment of checkbox inside the checkbox container. // - // Supported types: `int`, `string`. + // 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. + // - 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 // - // Usage in `ListView`: // Checkbox horizontal alignment(if enabled by "checkbox" property). // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "checkbox-horizontal-align" // CheckboxVerticalAlign is the constant for "checkbox-vertical-align" property tag. // - // Used by `Checkbox`, `ListView`. + // Used by Checkbox, ListView. + // + // # Usage in Checkbox // - // Usage in `Checkbox`: // Vertical alignment of checkbox inside the checkbox container. // - // Supported types: `int`, `string`. + // 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. + // - 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 // - // Usage in `ListView`: // Checkbox vertical alignment(if enabled by "checkbox" property). // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0`(`TopAlign`) or "top" - Top alignment. - // `1`(`BottomAlign`) or "bottom" - Bottom alignment. - // `2`(`CenterAlign`) or "center" - Center alignment. + // - 0 (TopAlign) or "top" - Top alignment. + // - 1 (BottomAlign) or "bottom" - Bottom alignment. + // - 2 (CenterAlign) or "center" - Center alignment. CheckboxVerticalAlign PropertyName = "checkbox-vertical-align" // NotTranslate is the constant for "not-translate" property tag. // - // Used by `DetailsView`, `TextView`, `View`. + // Used by 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`. + // defined, then the value of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - No need to lookup for text translation in resources. + // - false, 0, "false", "no", "off", or "0" - Lookup for text translation. NotTranslate PropertyName = "not-translate" // Filter is the constant for "filter" property tag. // - // Used by `View`. + // Used by View. // Applies graphical effects to a view, such as blurring, color shifting, changing brightness/contrast, etc. // - // Supported types: `ViewFilter`. + // Supported types: ViewFilter. // - // See `ViewFilter` description for more details. + // See ViewFilter description for more details. Filter PropertyName = "filter" // BackdropFilter is the constant for "backdrop-filter" property tag. // - // Used by `View`. + // Used by View. // Applies graphical effects to the area behind a view, such as blurring, color shifting, changing brightness/contrast, // etc. // - // Supported types: `ViewFilter`. + // Supported types: ViewFilter. // - // See `ViewFilter` description for more details. + // See ViewFilter description for more details. BackdropFilter PropertyName = "backdrop-filter" // Clip is the constant for "clip" property tag. // - // Used by `View`. + // Used by View. // Creates a clipping region that sets what part of a view should be shown. // - // Supported types: `ClipShape`, `string`. + // Supported types: ClipShape, string. // - // Internal type is `ClipShape`, other types converted to it during assignment. - // See `ClipShape` description for more details. + // Internal type is ClipShape, other types converted to it during assignment. + // See ClipShape description for more details. Clip PropertyName = "clip" // Points is the constant for "points" property tag. // - // Used by `ClipShape`. + // 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`. + // Supported types: []SizeUnit, string. Points PropertyName = "points" // ShapeOutside is the constant for "shape-outside" property tag. // - // Used by `View`. + // 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`. + // Supported types: ClipShape, string. // - // Internal type is `ClipShape`, other types converted to it during assignment. - // See `ClipShape` description for more details. + // Internal type is ClipShape, other types converted to it during assignment. + // See ClipShape description for more details. ShapeOutside PropertyName = "shape-outside" // Float is the constant for "float" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "float" // UserData is the constant for "user-data" property tag. // - // Used by `View`. + // Used by View. // Can contain any user data. // - // Supported types: `any`. + // Supported types: any. UserData PropertyName = "user-data" // Resize is the constant for "resize" property tag. // - // Used by `View`. + // Used by View. // Sets whether view is resizable, and if so, in which directions. Default value is "none". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "resize" // UserSelect is the constant for "user-select" property tag. // - // Used by `View`. + // 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`. + // of the parent view is used. Default value is false. // - // Supported types: `bool`, `int`, `string`. + // 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. + // - true, 1, "true", "yes", "on", or "1" - User can select the text. + // - false, 0, "false", "no", "off", or "0" - Text is not selectable. UserSelect PropertyName = "user-select" // Order is the constant for "Order" property tag. // - // Used by `GridLayout`, `ListLayout`, `ListView`, `View`. + // Used by 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. - // >PropertyName = `0` or >PropertyName = "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. - // >PropertyName = `0` or >PropertyName = "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. - // >PropertyName = `0` or >PropertyName = "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 + // Set the order to layout an item in a ViewsContainer container. Items in a container are sorted by // ascending order value and then by their addition to container order. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // < `0` or < "0" - Views with lower value will be at the beginning. - // >PropertyName = `0` or >PropertyName = "0" - Views with higher value will be at the end. + // - negative value - Views with lower value will be at the beginning. + // - not negative value - Views with higher value will be at the end. Order PropertyName = "Order" // BackgroundBlendMode is the constant for "background-blend-mode" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "background-blend-mode" // MixBlendMode is the constant for "mix-blend-mode" property tag. // - // Used by `View`. + // 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`. + // 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. + // - 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 PropertyName = "mix-blend-mode" // TabIndex is the constant for "tabindex" property tag. // - // Used by `View`. + // 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`. + // 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. + // - negative value - View can be selected with the mouse or touch, but does not participate in sequential navigation. + // - 0 - View can be selected and reached using sequential navigation, the order of navigation is determined by the browser(usually in order of addition). + // - positive value - View will be reached(and selected) using sequential navigation, and navigation is performed by ascending "tabindex" value. TabIndex PropertyName = "tabindex" // Tooltip is the constant for "tooltip" property tag. // - // Used by `View`. + // 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`. + // Supported types: string. Tooltip PropertyName = "tooltip" ) diff --git a/propertyValues.go b/propertyValues.go index 47c67c0..7d462c7 100644 --- a/propertyValues.go +++ b/propertyValues.go @@ -149,9 +149,9 @@ const ( WhiteSpacePreLine = 4 // WhiteSpaceBreakSpaces - the behavior is identical to that of WhiteSpacePreWrap, except that: - // * Any sequence of preserved white space always takes up space, including at the end of the line. - // * A line breaking opportunity exists after every preserved white space character, including between white space characters. - // * Such preserved spaces take up space and do not hang, and thus affect the box’s intrinsic sizes (min-content size and max-content size). + // - Any sequence of preserved white space always takes up space, including at the end of the line. + // - A line breaking opportunity exists after every preserved white space character, including between white space characters. + // - Such preserved spaces take up space and do not hang, and thus affect the box’s intrinsic sizes (min-content size and max-content size). WhiteSpaceBreakSpaces = 5 // WordBreakNormal - use the default line break rule. diff --git a/radius.go b/radius.go index 7241a53..1525dff 100644 --- a/radius.go +++ b/radius.go @@ -9,382 +9,382 @@ import ( const ( // Radius is the constant for "radius" property tag. // - // Used by `View`, `BackgroundElement`, `ClipShape`. + // Used by View, BackgroundElement, ClipShape. // - // Usage in `View`: + // Usage in View: // Specifies the corners rounding radius of an element's outer border edge. // - // Supported types: `RadiusProperty`, `SizeUnit`, `SizeFunc`, `BoxRadius`, `string`, `float`, `int`. + // 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. + // 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. + // - 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`: + // Usage in BackgroundElement: // Same as "radial-gradient-radius". // - // Usage in `ClipShape`: + // Usage in ClipShape: // Specifies the radius of the corners or the radius of the cropping area. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. Radius PropertyName = "radius" // RadiusX is the constant for "radius-x" property tag. // - // Used by `View`, `ClipShape`. + // Used by View, ClipShape. // - // Usage in `View`: + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. // - // Usage in `ClipShape`: + // Usage in ClipShape: // Specifies the x-axis corners elliptic rounding radius of the elliptic clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusX PropertyName = "radius-x" // RadiusY is the constant for "radius-y" property tag. // - // Used by `View`, `ClipShape`. + // Used by View, ClipShape. // - // Usage in `View`: + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. // - // Usage in `ClipShape`: + // Usage in ClipShape: // Specifies the y-axis corners elliptic rounding radius of of the elliptic clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusY PropertyName = "radius-y" // RadiusTopLeft is the constant for "radius-top-left" property tag. // - // Used by `View`. + // Used by View. // Specifies the top-left corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusTopLeft PropertyName = "radius-top-left" // RadiusTopLeftX is the constant for "radius-top-left-x" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusTopLeftX PropertyName = "radius-top-left-x" // RadiusTopLeftY is the constant for "radius-top-left-y" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusTopLeftY PropertyName = "radius-top-left-y" // RadiusTopRight is the constant for "radius-top-right" property tag. // - // Used by `View`. + // Used by View. // Specifies the top-right corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusTopRight PropertyName = "radius-top-right" // RadiusTopRightX is the constant for "radius-top-right-x" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusTopRightX PropertyName = "radius-top-right-x" // RadiusTopRightY is the constant for "radius-top-right-y" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusTopRightY PropertyName = "radius-top-right-y" // RadiusBottomLeft is the constant for "radius-bottom-left" property tag. // - // Used by `View`. + // Used by View. // Specifies the bottom-left corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusBottomLeft PropertyName = "radius-bottom-left" // RadiusBottomLeftX is the constant for "radius-bottom-left-x" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusBottomLeftX PropertyName = "radius-bottom-left-x" // RadiusBottomLeftY is the constant for "radius-bottom-left-y" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusBottomLeftY PropertyName = "radius-bottom-left-y" // RadiusBottomRight is the constant for "radius-bottom-right" property tag. // - // Used by `View`. + // Used by View. // Specifies the bottom-right corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusBottomRight PropertyName = "radius-bottom-right" // RadiusBottomRightX is the constant for "radius-bottom-right-x" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusBottomRightX PropertyName = "radius-bottom-right-x" // RadiusBottomRightY is the constant for "radius-bottom-right-y" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. RadiusBottomRightY PropertyName = "radius-bottom-right-y" // X is the constant for "x" property tag. // - // Used by `ClipShape`, `RadiusProperty`. + // Used by ClipShape, RadiusProperty. // - // Usage in `ClipShape`: + // Usage in ClipShape: // Specifies x-axis position of the clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. // - // Usage in `RadiusProperty`: + // Usage in RadiusProperty: // Determines the x-axis elliptic rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. X PropertyName = "x" // Y is the constant for "y" property tag. // - // Used by `ClipShape`, `RadiusProperty`. + // Used by ClipShape, RadiusProperty. // - // Usage in `ClipShape`: + // Usage in ClipShape: // Specifies y-axis position of the clip shape. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. // - // Usage in `RadiusProperty`: + // Usage in RadiusProperty: // Determines the y-axis elliptic rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. Y PropertyName = "y" // TopLeft is the constant for "top-left" property tag. // - // Used by `RadiusProperty`. + // Used by RadiusProperty. // Determines the top-left corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TopLeft PropertyName = "top-left" // TopLeftX is the constant for "top-left-x" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TopLeftX PropertyName = "top-left-x" // TopLeftY is the constant for "top-left-y" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TopLeftY PropertyName = "top-left-y" // TopRight is the constant for "top-right" property tag. // - // Used by `RadiusProperty`. + // Used by RadiusProperty. // Determines the top-right corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TopRight PropertyName = "top-right" // TopRightX is the constant for "top-right-x" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TopRightX PropertyName = "top-right-x" // TopRightY is the constant for "top-right-y" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TopRightY PropertyName = "top-right-y" // BottomLeft is the constant for "bottom-left" property tag. // - // Used by `RadiusProperty`. + // Used by RadiusProperty. // Determines the bottom-left corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BottomLeft PropertyName = "bottom-left" // BottomLeftX is the constant for "bottom-left-x" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BottomLeftX PropertyName = "bottom-left-x" // BottomLeftY is the constant for "bottom-left-y" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BottomLeftY PropertyName = "bottom-left-y" // BottomRight is the constant for "bottom-right" property tag. // - // Used by `RadiusProperty`. + // Used by RadiusProperty. // Determines the bottom-right corner rounding radius of an element's outer border edge. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BottomRight PropertyName = "bottom-right" // BottomRightX is the constant for "bottom-right-x" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BottomRightX PropertyName = "bottom-right-x" // BottomRightY is the constant for "bottom-right-y" property tag. // - // Used by `RadiusProperty`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BottomRightY PropertyName = "bottom-right-y" ) @@ -403,35 +403,22 @@ type radiusPropertyData struct { } // NewRadiusProperty creates the new RadiusProperty +// // The following properties can be used: -// -// "x" (X) - Determines the x-axis elliptic rounding radius of an element's outer border edge. -// -// "y" (Y) - Determines the y-axis corner elliptic rounding radius of an element's outer border edge. -// -// "top-left" (TopLeft) - Determines the top-left corner rounding radius of an element's outer border edge. -// -// "top-left-x" (TopLeftX) - Determines the x-axis top-left corner elliptic rounding radius of an element's outer border edge. -// -// "top-left-y" (TopLeftY) - Determines the y-axis top-left corner elliptic rounding radius of an element's outer border edge. -// -// "top-right" (TopRight) - Determines the top-right corner rounding radius of an element's outer border edge. -// -// "top-right-x" (TopRightX) - Determines the x-axis top-right corner elliptic rounding radius of an element's outer border edge. -// -// "top-right-y" (TopRightY) - Determines the y-axis top-right corner elliptic rounding radius of an element's outer border edge. -// -// "bottom-left" (BottomLeft) - Determines the bottom-left corner rounding radius of an element's outer border edge. -// -// "bottom-left-x" (BottomLeftX) - Determines the x-axis bottom-left corner elliptic rounding radius of an element's outer border edge. -// -// "bottom-left-y" (BottomLeftY) - Determines the y-axis bottom-left corner elliptic rounding radius of an element's outer border edge. -// -// "bottom-right" (BottomRight) - Determines the bottom-right corner rounding radius of an element's outer border edge. -// -// "bottom-right-x" (BottomRightX) - Determines the x-axis bottom-right corner elliptic rounding radius of an element's outer border edge. -// -// "bottom-right-y" (BottomRightY) - Determines the y-axis bottom-right corner elliptic rounding radius of an element's outer border edge. +// - "x" (X) - Determines the x-axis elliptic rounding radius of an element's outer border edge. +// - "y" (Y) - Determines the y-axis corner elliptic rounding radius of an element's outer border edge. +// - "top-left" (TopLeft) - Determines the top-left corner rounding radius of an element's outer border edge. +// - "top-left-x" (TopLeftX) - Determines the x-axis top-left corner elliptic rounding radius of an element's outer border edge. +// - "top-left-y" (TopLeftY) - Determines the y-axis top-left corner elliptic rounding radius of an element's outer border edge. +// - "top-right" (TopRight) - Determines the top-right corner rounding radius of an element's outer border edge. +// - "top-right-x" (TopRightX) - Determines the x-axis top-right corner elliptic rounding radius of an element's outer border edge. +// - "top-right-y" (TopRightY) - Determines the y-axis top-right corner elliptic rounding radius of an element's outer border edge. +// - "bottom-left" (BottomLeft) - Determines the bottom-left corner rounding radius of an element's outer border edge. +// - "bottom-left-x" (BottomLeftX) - Determines the x-axis bottom-left corner elliptic rounding radius of an element's outer border edge. +// - "bottom-left-y" (BottomLeftY) - Determines the y-axis bottom-left corner elliptic rounding radius of an element's outer border edge. +// - "bottom-right" (BottomRight) - Determines the bottom-right corner rounding radius of an element's outer border edge. +// - "bottom-right-x" (BottomRightX) - Determines the x-axis bottom-right corner elliptic rounding radius of an element's outer border edge. +// - "bottom-right-y" (BottomRightY) - Determines the y-axis bottom-right corner elliptic rounding radius of an element's outer border edge. func NewRadiusProperty(params Params) RadiusProperty { result := new(radiusPropertyData) result.init() @@ -447,6 +434,7 @@ func NewRadiusProperty(params Params) RadiusProperty { } // NewRadiusProperty creates the new RadiusProperty which having the same elliptical radii for all angles. +// // Arguments determines the x- and y-axis elliptic rounding radius. if an argument is specified as int or float64, the value is considered to be in pixels func NewEllipticRadius[xType SizeUnit | int | float64, yType SizeUnit | int | float64](x xType, y yType) RadiusProperty { return NewRadiusProperty(Params{ @@ -456,7 +444,9 @@ func NewEllipticRadius[xType SizeUnit | int | float64, yType SizeUnit | int | fl } // NewRadius creates the new RadiusProperty. +// // The arguments specify the radii in a clockwise direction: "top-right", "bottom-right", "bottom-left", and "top-left". +// // if an argument is specified as int or float64, the value is considered to be in pixels func NewRadii[topRightType SizeUnit | int | float64, bottomRightType SizeUnit | int | float64, bottomLeftType SizeUnit | int | float64, topLeftType SizeUnit | int | float64]( topRight topRightType, bottomRight bottomRightType, bottomLeft bottomLeftType, topLeft topLeftType) RadiusProperty { diff --git a/resizable.go b/resizable.go index 0860406..52b0076 100644 --- a/resizable.go +++ b/resizable.go @@ -10,29 +10,29 @@ import ( const ( // Side is the constant for "side" property tag. // - // Used by `Resizable`. + // 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`. + // 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. + // - 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 "resize-border-width" property tag. // - // Used by `Resizable`. + // Used by Resizable. // Specifies the width of the resizing border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // 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 16dfd6b..bae4fbc 100644 --- a/resizeEvent.go +++ b/resizeEvent.go @@ -2,20 +2,22 @@ package rui // ResizeEvent is the constant for "resize-event" property tag. // -// Used by `View`. +// Used by View. // Is fired when the view changes its size. // // General listener format: -// `func(view rui.View, frame rui.Frame)`. +// +// func(view rui.View, frame rui.Frame) // // where: -// view - Interface of a view which generated this event, -// frame - New offset and size of the view's visible area. +// - 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()`. +// +// func(frame rui.Frame) +// func(view rui.View) +// func() const ResizeEvent PropertyName = "resize-event" func (view *viewData) onResize(self View, x, y, width, height float64) { diff --git a/scrollEvent.go b/scrollEvent.go index 5b44845..294538e 100644 --- a/scrollEvent.go +++ b/scrollEvent.go @@ -2,20 +2,22 @@ package rui // ScrollEvent is the constant for "scroll-event" property tag. // -// Used by `View`. +// Used by View. // Is fired when the content of the view is scrolled. // // General listener format: -// `func(view rui.View, frame rui.Frame)`. +// +// func(view rui.View, frame rui.Frame) // // where: -// view - Interface of a view which generated this event, -// frame - New offset and size of the view's visible area. +// - 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()`. +// +// func(frame rui.Frame) +// func(view rui.View) +// func() const ScrollEvent PropertyName = "scroll-event" func (view *viewData) onScroll(self View, x, y, width, height float64) { diff --git a/shadow.go b/shadow.go index 937d45f..ab5ce78 100644 --- a/shadow.go +++ b/shadow.go @@ -9,97 +9,101 @@ import ( const ( // ColorTag is the constant for "color" property tag. // - // Used by `ColumnSeparatorProperty`, `BorderProperty`, `OutlineProperty`, `ShadowProperty`. + // Used by ColumnSeparatorProperty, BorderProperty, OutlineProperty, ShadowProperty. + // + // # Usage in ColumnSeparatorProperty // - // Usage in `ColumnSeparatorProperty`: // Line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. + // + // # Usage in BorderProperty // - // Usage in `BorderProperty`: // Border line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. + // + // # Usage in OutlineProperty // - // Usage in `OutlineProperty`: // Outline line color. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. + // + // # Usage in ShadowProperty // - // Usage in `ShadowProperty`: // Color property of the shadow. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. ColorTag PropertyName = "color" // Inset is the constant for "inset" property tag. // - // Used by `ShadowProperty`. + // Used by ShadowProperty. // 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`. + // 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). + // - true, 1, "true", "yes", "on", "1" - Drop shadow inside the frame(as if the content was depressed inside the box). + // - false, 0, "false", "no", "off", "0" - Shadow is assumed to be a drop shadow(as if the box were raised above the content). Inset PropertyName = "inset" // XOffset is the constant for "x-offset" property tag. // - // Used by `ShadowProperty`. + // Used by ShadowProperty. // Determines the shadow horizontal offset. Negative values place the shadow to the left of the element. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. XOffset PropertyName = "x-offset" // YOffset is the constant for "y-offset" property tag. // - // Used by `ShadowProperty`. + // Used by ShadowProperty. // Determines the shadow vertical offset. Negative values place the shadow above the element. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. YOffset PropertyName = "y-offset" // BlurRadius is the constant for "blur" property tag. // - // Used by `ShadowProperty`. + // Used by ShadowProperty. // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. BlurRadius PropertyName = "blur" // SpreadRadius is the constant for "spread-radius" property tag. // - // Used by `ShadowProperty`. + // Used by ShadowProperty. // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. SpreadRadius PropertyName = "spread-radius" ) @@ -118,14 +122,10 @@ type shadowPropertyData struct { } // NewShadow create the new shadow property for a view. Arguments: -// -// offsetX, offsetY is x and y offset of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// blurRadius is the blur radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// spreadRadius is the spread radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// color is the color of the shadow. +// - offsetX, offsetY is x and y offset of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - blurRadius is the blur radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - spreadRadius is the spread radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - color is the color of the shadow. func NewShadow[xOffsetType SizeUnit | int | float64, yOffsetType SizeUnit | int | float64, blurType SizeUnit | int | float64, spreadType SizeUnit | int | float64]( xOffset xOffsetType, yOffset yOffsetType, blurRadius blurType, spreadRadius spreadType, color Color) ShadowProperty { return NewShadowProperty(Params{ @@ -138,14 +138,10 @@ func NewShadow[xOffsetType SizeUnit | int | float64, yOffsetType SizeUnit | int } // NewInsetShadow create the new inset shadow property for a view. Arguments: -// -// offsetX, offsetY is x and y offset of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// blurRadius is the blur radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// spreadRadius is the spread radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// color is the color of the shadow. +// - offsetX, offsetY is x and y offset of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - blurRadius is the blur radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - spreadRadius is the spread radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - color is the color of the shadow. func NewInsetShadow[xOffsetType SizeUnit | int | float64, yOffsetType SizeUnit | int | float64, blurType SizeUnit | int | float64, spreadType SizeUnit | int | float64]( xOffset xOffsetType, yOffset yOffsetType, blurRadius blurType, spreadRadius spreadType, color Color) ShadowProperty { return NewShadowProperty(Params{ @@ -159,12 +155,9 @@ func NewInsetShadow[xOffsetType SizeUnit | int | float64, yOffsetType SizeUnit | } // NewTextShadow create the new text shadow property. Arguments: -// -// offsetX, offsetY is the x- and y-offset of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// blurRadius is the blur radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); -// -// color is the color of the shadow. +// - offsetX, offsetY is the x- and y-offset of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - blurRadius is the blur radius of the shadow (if the argument is specified as int or float64, the value is considered to be in pixels); +// - color is the color of the shadow. func NewTextShadow[xOffsetType SizeUnit | int | float64, yOffsetType SizeUnit | int | float64, blurType SizeUnit | int | float64]( xOffset xOffsetType, yOffset yOffsetType, blurRadius blurType, color Color) ShadowProperty { return NewShadowProperty(Params{ @@ -176,19 +169,14 @@ func NewTextShadow[xOffsetType SizeUnit | int | float64, yOffsetType SizeUnit | } // NewShadowProperty create the new shadow property for a view. +// // The following properties can be used: -// -// "color" (ColorTag). Determines the color of the shadow (Color); -// -// "x-offset" (XOffset). Determines the shadow horizontal offset (SizeUnit); -// -// "y-offset" (YOffset). Determines the shadow vertical offset (SizeUnit); -// -// "blur" (BlurRadius). Determines the radius of the blur effect (SizeUnit); -// -// "spread-radius" (SpreadRadius). Positive values (SizeUnit) will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink; -// -// "inset" (Inset). Controls (bool) whether to draw shadow inside the frame or outside. +// - "color" (ColorTag). Determines the color of the shadow (Color); +// - "x-offset" (XOffset). Determines the shadow horizontal offset (SizeUnit); +// - "y-offset" (YOffset). Determines the shadow vertical offset (SizeUnit); +// - "blur" (BlurRadius). Determines the radius of the blur effect (SizeUnit); +// - "spread-radius" (SpreadRadius). Positive values (SizeUnit) will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink; +// - "inset" (Inset). Controls (bool) whether to draw shadow inside the frame or outside. func NewShadowProperty(params Params) ShadowProperty { shadow := new(shadowPropertyData) shadow.init() diff --git a/sizeFunc.go b/sizeFunc.go index 8b80666..59fb218 100644 --- a/sizeFunc.go +++ b/sizeFunc.go @@ -7,7 +7,9 @@ import ( ) // SizeFunc describes a function that calculates the SizeUnit size. +// // Used as the value of the SizeUnit properties. +// // "min", "max", "clamp", "sum", "sub", "mul", "div", mod, // "round", "round-up", "round-down" and "round-to-zero" functions are available. type SizeFunc interface { diff --git a/stackLayout.go b/stackLayout.go index 9972bb3..e27ce36 100644 --- a/stackLayout.go +++ b/stackLayout.go @@ -9,239 +9,241 @@ import ( const ( // PushTransform is the constant for "push-transform" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // Specify start translation, scale and rotation over x, y and z axes as well as a distortion // for an animated pushing of a child view. // - // Supported types: `TransformProperty`, `string`. + // Supported types: TransformProperty, string. // - // See `TransformProperty` description for more details. + // See TransformProperty description for more details. // // Conversion rules: - // `TransformProperty` - stored as is, no conversion performed. - // `string` - string representation of `Transform` interface. Example: "_{translate-x = 10px, scale-y = 1.1}". + // - TransformProperty - stored as is, no conversion performed. + // - string - string representation of Transform interface. Example: "_{translate-x = 10px, scale-y = 1.1}". PushTransform = "push-transform" // PushDuration is the constant for "push-duration" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // Sets the length of time in seconds that an push/pop animation takes to complete. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushDuration = "push-duration" // PushTiming is the constant for "push-timing" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // Set how an push/pop animation progresses through the duration of each cycle. // - // Supported types: `string`. + // 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. + // - "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. + // - "step(n)" (StepTiming(n int) function) - Timing function along stepCount stops along the transition, displaying each stop for equal lengths of time. + // - "cubic-bezier(x1, y1, x2, y2)" (CubicBezierTiming(x1, y1, x2, y2 float64) function) - Cubic-Bezier curve timing function. x1 and x2 must be in the range [0, 1]. PushTiming = "push-timing" // MoveToFrontAnimation is the constant for "move-to-front-animation" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // Specifies whether animation is used when calling the MoveToFront/MoveToFrontByID method of StackLayout interface. // - // Supported types: `bool`, `int`, `string`. + // Supported types: bool, int, string. // // Values: - // `true` or `1` or "true", "yes", "on", "1" - animation is used (default value). - // `false` or `0` or "false", "no", "off", "0" - animation is not used. + // - true, 1, "true", "yes", "on", "1" - animation is used (default value). + // - false, 0, "false", "no", "off", "0" - animation is not used. MoveToFrontAnimation = "move-to-front-animation" // PushPerspective is the constant for "push-perspective" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "perspective" property of StackLayout "push-transform" property: // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. PushPerspective PropertyName = "push-perspective" // PushTranslateX is the constant for "push-translate-x" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "translate-x" property of StackLayout "push-transform" property: // x-axis translation value of a 2D/3D translation. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. PushTranslateX PropertyName = "push-translate-x" // PushTranslateY is the constant for "push-translate-y" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "translate-y" property of StackLayout "push-transform" property: // y-axis translation value of a 2D/3D translation. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. PushTranslateY PropertyName = "push-translate-y" // PushTranslateZ is the constant for "push-translate-z" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "translate-z" property of StackLayout "push-transform" property: // z-axis translation value of a 3D translation. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. PushTranslateZ PropertyName = "push-translate-z" // PushScaleX is the constant for "push-scale-x" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "scale-x" property of StackLayout "push-transform" property: // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushScaleX PropertyName = "push-scale-x" // PushScaleY is the constant for "push-scale-y" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "scale-y" property of StackLayout "push-transform" property: // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushScaleY PropertyName = "push-scale-y" // PushScaleZ is the constant for "push-scale-z" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "scale-z" property of StackLayout "push-transform" property: // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushScaleZ PropertyName = "push-scale-z" // PushRotate is the constant for "push-rotate" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "rotate" property of StackLayout "push-transform" property: // Angle of the view rotation. A positive angle denotes a clockwise rotation, a negative angle a counter-clockwise. // - // Supported types: `AngleUnit`, `string`, `float`, `int`. + // 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. + // 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. + // - 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. PushRotate PropertyName = "push-rotate" // PushRotateX is the constant for "push-rotate-x" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "rotate-x" property of StackLayout "push-transform" property: // x-coordinate of the vector denoting the axis of rotation in range 0 to 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushRotateX PropertyName = "push-rotate-x" // PushRotateY is the constant for "push-rotate-y" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "rotate-y" property of StackLayout "push-transform" property: // y-coordinate of the vector denoting the axis of rotation in range 0 to 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushRotateY PropertyName = "push-rotate-y" // PushRotateZ is the constant for "push-rotate-z" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "rotate-z" property of StackLayout "push-transform" property: // z-coordinate of the vector denoting the axis of rotation in range 0 to 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. PushRotateZ PropertyName = "push-rotate-z" // PushSkewX is the constant for "push-skew-x" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "skew-x" property of StackLayout "push-transform" property: // Angle to use to distort the element along the abscissa. The default value is 0. // - // Supported types: `AngleUnit`, `string`, `float`, `int`. + // 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. + // 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. + // - 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. PushSkewX PropertyName = "push-skew-x" // PushSkewY is the constant for "push-skew-y" property tag. // - // Used by `StackLayout`. + // Used by StackLayout. // // Used to access the "skew-y" property of StackLayout "push-transform" property: // Angle to use to distort the element along the ordinate. The default value is 0. // - // Supported types: `AngleUnit`, `string`, `float`, `int`. + // 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. + // 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. + // - 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. PushSkewY PropertyName = "push-skew-y" ) @@ -256,28 +258,36 @@ type StackLayout interface { RemovePeek() View // MoveToFront makes the given View current. + // // The second argument is a function called after the move to front animation ends. + // // Returns true if successful, false otherwise. MoveToFront(view View, onShown ...func(View)) bool // MoveToFrontByID makes the View current by viewID. + // // The second argument is a function called after the move to front animation ends. + // // Returns true if successful, false otherwise. MoveToFrontByID(viewID string, onShown ...func(View)) bool // Push adds a new View to the container and makes it current. + // // It is similar to Append, but the addition is done using an animation effect. + // // The animation type is specified by the second argument and can take the following values: - // * DefaultAnimation (0) - Default animation. For the Push function it is EndToStartAnimation, for Pop - StartToEndAnimation; - // * StartToEndAnimation (1) - Animation from beginning to end. The beginning and the end are determined by the direction of the text output; - // * EndToStartAnimation (2) - End-to-Beginning animation; - // * TopDownAnimation (3) - Top-down animation; - // * BottomUpAnimation (4) - Bottom up animation. + // - DefaultAnimation (0) - Default animation. For the Push function it is EndToStartAnimation, for Pop - StartToEndAnimation; + // - StartToEndAnimation (1) - Animation from beginning to end. The beginning and the end are determined by the direction of the text output; + // - EndToStartAnimation (2) - End-to-Beginning animation; + // - TopDownAnimation (3) - Top-down animation; + // - BottomUpAnimation (4) - Bottom up animation. // The second argument `onPushFinished` is the function to be called when the animation ends. Push(view View, onPushFinished ...func()) // Pop removes the current View from the container using animation. + // // The argument `onPopFinished` is the function to be called when the animation ends. + // // The function will return false if the StackLayout is empty and true if the current item has been removed. Pop(onPopFinished ...func(View)) bool } diff --git a/tableAdapter.go b/tableAdapter.go index 1fdcc65..2d8610c 100644 --- a/tableAdapter.go +++ b/tableAdapter.go @@ -9,19 +9,20 @@ type TableAdapter interface { ColumnCount() int // Cell returns the contents of a table cell. The function can return elements of the following types: - // * string - // * rune - // * float32, float64 - // * integer values: int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 - // * bool - // * rui.Color - // * rui.View - // * fmt.Stringer - // * rui.VerticalTableJoin, rui.HorizontalTableJoin + // - string + // - rune + // - float32, float64 + // - integer values: int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 + // - bool + // - rui.Color + // - rui.View + // - fmt.Stringer + // - rui.VerticalTableJoin, rui.HorizontalTableJoin Cell(row, column int) any } // TableColumnStyle describes the style of [TableView] columns. +// // To set column styles, you must either implement the [TableColumnStyle] interface in the table adapter // or assign its separate implementation to the "column-style" property. type TableColumnStyle interface { @@ -30,6 +31,7 @@ type TableColumnStyle interface { } // TableRowStyle describes the style of [TableView] rows. +// // To set row styles, you must either implement the [TableRowStyle] interface in the table adapter // or assign its separate implementation to the "row-style" property. type TableRowStyle interface { @@ -38,6 +40,7 @@ type TableRowStyle interface { } // TableCellStyle describes the style of [TableView] cells. +// // To set row cells, you must either implement the [TableCellStyle] interface in the table adapter // or assign its separate implementation to the "cell-style" property. type TableCellStyle interface { @@ -46,7 +49,9 @@ type TableCellStyle interface { } // TableAllowCellSelection determines whether [TableView] cell selection is allowed. +// // It is only used if the "selection-mode" property is set to CellSelection (1). +// // To set cell selection allowing, you must either implement the TableAllowCellSelection interface // in the table adapter or assign its separate implementation to the "allow-selection" property. type TableAllowCellSelection interface { @@ -55,7 +60,9 @@ type TableAllowCellSelection interface { } // TableAllowRowSelection determines whether [TableView] row selection is allowed. +// // It is only used if the "selection-mode" property is set to RowSelection (2). +// // To set row selection allowing, you must either implement the TableAllowRowSelection interface // in the table adapter or assign its separate implementation to the "allow-selection" property. type TableAllowRowSelection interface { @@ -65,6 +72,7 @@ type TableAllowRowSelection interface { // SimpleTableAdapter is implementation of [TableAdapter] where the content // defines as [][]any. +// // When you assign [][]any value to the "content" property, it is converted to SimpleTableAdapter type SimpleTableAdapter interface { TableAdapter diff --git a/tableView.go b/tableView.go index ca74885..322f20e 100644 --- a/tableView.go +++ b/tableView.go @@ -10,519 +10,527 @@ import ( const ( // TableVerticalAlign is the constant for "table-vertical-align" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the vertical alignment of the content inside a table cell. // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "table-vertical-align" // 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). + // Used by TableView. + // Sets the number of rows in the table header. The default value is 0 (no header). // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0` or "0" - No header. - // > `0` or > "0" - Number of rows act as a header. + // - 0 or "0" - No header. + // - positive value - Number of rows act as a header. HeadHeight PropertyName = "head-height" // HeadStyle is the constant for "head-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the header style name or description of style properties. // - // Supported types: `string`, `Params`. + // Supported types: string, Params. // - // Internal type is either `string` or `Params`. + // Internal type is either string or Params. // // Conversion rules: - // `string` - must contain style name defined in resources. - // `Params` - must contain style properties. + // - string - must contain style name defined in resources. + // - Params - must contain style properties. HeadStyle PropertyName = "head-style" // 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). + // Used by TableView. + // Sets the number of rows in the table footer. The default value is 0 (no footer). // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // `0` or "0" - No footer. - // > `0` or > "0" - Number of rows act as a footer. + // - 0 or "0" - No footer. + // - positive value - Number of rows act as a footer. FootHeight PropertyName = "foot-height" // FootStyle is the constant for "foot-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the footer style name or description of style properties. // - // Supported types: `string`, `Params`. + // Supported types: string, Params. // - // Internal type is either `string` or `Params`. + // Internal type is either string or Params. // // Conversion rules: - // `string` - must contain style name defined in resources. - // `Params` - must contain style properties. + // - string - must contain style name defined in resources. + // - Params - must contain style properties. FootStyle PropertyName = "foot-style" // RowSpan is the constant for "row-span" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the number of table row to span. Used only when specifying cell parameters in the implementation of - // `TableCellStyle`. + // TableCellStyle. // - // Supported types: `int`, `string`. + // 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. + // - 0 or "0" - No merging will be applied. + // - positive value - Number of rows including current one to be merged together. RowSpan PropertyName = "row-span" // ColumnSpan is the constant for "column-span" property tag. // - // Used by `TableView`. + // 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`. + // implementation of TableCellStyle. // - // Supported types: `int`, `string`. + // 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. + // - 0 or "0" - No merging will be applied. + // - positive value - Number of columns including current one to be merged together. ColumnSpan PropertyName = "column-span" // RowStyle is the constant for "row-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the adapter which specifies styles of each table row. // - // Supported types: `TableRowStyle`, `[]Params`. + // Supported types: TableRowStyle, []Params. // - // Internal type is `TableRowStyle`, other types converted to it during assignment. - // See `TableRowStyle` description for more details. + // Internal type is TableRowStyle, other types converted to it during assignment. + // See TableRowStyle description for more details. RowStyle PropertyName = "row-style" // ColumnStyle is the constant for "column-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the adapter which specifies styles of each table column. // - // Supported types: `TableColumnStyle`, `[]Params`. + // Supported types: TableColumnStyle, []Params. // - // Internal type is `TableColumnStyle`, other types converted to it during assignment. - // See `TableColumnStyle` description for more details. + // Internal type is TableColumnStyle, other types converted to it during assignment. + // See TableColumnStyle description for more details. ColumnStyle PropertyName = "column-style" // CellStyle is the constant for "cell-style" property tag. // - // Used by `TableView`. + // 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. + // TableCellStyle interface. // - // Supported types: `TableCellStyle`. + // Supported types: TableCellStyle. CellStyle PropertyName = "cell-style" // CellPadding is the constant for "cell-padding" property tag. // - // Used by `TableView`. + // 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`. + // 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. + // Internal type is BoundsProperty, other types converted to it during assignment. + // See BoundsProperty, Bounds and SizeUnit description for more details. CellPadding PropertyName = "cell-padding" // CellPaddingLeft is the constant for "cell-padding-left" property tag. // - // Used by `TableView`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellPaddingLeft PropertyName = "cell-padding-left" // CellPaddingRight is the constant for "cell-padding-right" property tag. // - // Used by `TableView`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellPaddingRight PropertyName = "cell-padding-right" // CellPaddingTop is the constant for "cell-padding-top" property tag. // - // Used by `TableView`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellPaddingTop PropertyName = "cell-padding-top" // CellPaddingBottom is the constant for "cell-padding-bottom" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the height of the padding area to the bottom of a cell content. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellPaddingBottom PropertyName = "cell-padding-bottom" // CellBorder is the constant for "cell-border" property tag. // - // Used by `TableView`. + // 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`. + // 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. + // Internal type is BorderProperty, other types converted to it during assignment. + // See BorderProperty, ViewBorder and ViewBorders description for more details. CellBorder PropertyName = "cell-border" // CellBorderLeft is the constant for "cell-border-left" property tag. // - // Used by `TableView`. + // 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. + // of BorderProperty, ViewBorder types or BorderProperty text representation. // - // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder` and `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder and BorderProperty description for more details. CellBorderLeft PropertyName = "cell-border-left" // CellBorderRight is the constant for "cell-border-right" property tag. // - // Used by `TableView`. + // 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. + // value of BorderProperty, ViewBorder types or BorderProperty text representation. // - // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder` and `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder and BorderProperty description for more details. CellBorderRight PropertyName = "cell-border-right" // CellBorderTop is the constant for "cell-border-top" property tag. // - // Used by `TableView`. + // 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. + // of BorderProperty, ViewBorder types or BorderProperty text representation. // - // Supported types: `ViewBorder`, `BorderProperty`, `string`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder` and `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder and BorderProperty description for more details. CellBorderTop PropertyName = "cell-border-top" // CellBorderBottom is the constant for "cell-border-bottom" property tag. // - // Used by `TableView`. + // 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`. + // Supported types: ViewBorder, BorderProperty, string. // - // Internal type is `BorderProperty`, other types converted to it during assignment. - // See `ViewBorder` and `BorderProperty` description for more details. + // Internal type is BorderProperty, other types converted to it during assignment. + // See ViewBorder and BorderProperty description for more details. CellBorderBottom PropertyName = "cell-border-bottom" // CellBorderStyle is the constant for "cell-border-style" property tag. // - // Used by `TableView`. + // 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`. + // 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. + // - 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 PropertyName = "cell-border-style" // CellBorderLeftStyle is the constant for "cell-border-left-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line style of a table cell's left border. Default value is "none". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "cell-border-left-style" // CellBorderRightStyle is the constant for "cell-border-right-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line style of a table cell's right border. Default value is "none". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "cell-border-right-style" // CellBorderTopStyle is the constant for "cell-border-top-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line style of a table cell's top border. Default value is "none". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "cell-border-top-style" // CellBorderBottomStyle is the constant for "cell-border-bottom-style" property tag. // - // Used by `TableView`. + // Used by TableView. // Sets the line style of a table cell's bottom border. Default value is "none". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "cell-border-bottom-style" // CellBorderWidth is the constant for "cell-border-width" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line width for all four sides of a table cell's border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellBorderWidth PropertyName = "cell-border-width" // CellBorderLeftWidth is the constant for "cell-border-left-width" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line width of a table cell's left border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellBorderLeftWidth PropertyName = "cell-border-left-width" // CellBorderRightWidth is the constant for "cell-border-right-width" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line width of a table cell's right border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellBorderRightWidth PropertyName = "cell-border-right-width" // CellBorderTopWidth is the constant for "cell-border-top-width" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line width of a table cell's top border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellBorderTopWidth PropertyName = "cell-border-top-width" // CellBorderBottomWidth is the constant for "cell-border-bottom-width" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line width of a table cell's bottom border. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. CellBorderBottomWidth PropertyName = "cell-border-bottom-width" // CellBorderColor is the constant for "cell-border-color" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line color for all four sides of a table cell's border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. CellBorderColor PropertyName = "cell-border-color" // CellBorderLeftColor is the constant for "cell-border-left-color" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line color of a table cell's left border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. CellBorderLeftColor PropertyName = "cell-border-left-color" // CellBorderRightColor is the constant for "cell-border-right-color" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line color of a table cell's right border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. CellBorderRightColor PropertyName = "cell-border-right-color" // CellBorderTopColor is the constant for "cell-border-top-color" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line color of a table cell's top border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. CellBorderTopColor PropertyName = "cell-border-top-color" // CellBorderBottomColor is the constant for "cell-border-bottom-color" property tag. // - // Used by `TableView`. + // Used by TableView. // Set the line color of a table cell's bottom border. // - // Supported types: `Color`, `string`. + // Supported types: Color, string. // - // Internal type is `Color`, other types converted to it during assignment. - // See `Color` description for more details. + // Internal type is Color, other types converted to it during assignment. + // See Color description for more details. CellBorderBottomColor PropertyName = "cell-border-bottom-color" // SelectionMode is the constant for "selection-mode" property tag. // - // Used by `TableView`. + // Used by TableView. // Sets the mode of the table elements selection. Default value is "none". // - // Supported types: `int`, `string`. + // 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). + // - 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 PropertyName = "selection-mode" // TableCellClickedEvent is the constant for "table-cell-clicked" property tag. // - // Used by `TableView`. + // Used by TableView. // Occur when the user clicks on a table cell. // // General listener format: - // `func(table rui.TableView, row, col int)`. + // + // 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. + // - 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)`. + // + // func(row, col int) TableCellClickedEvent PropertyName = "table-cell-clicked" // TableCellSelectedEvent is the constant for "table-cell-selected" property tag. // - // Used by `TableView`. + // Used by TableView. // Occur when a table cell becomes selected. // // General listener format: - // `func(table rui.TableView, row, col int)`. + // + // 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. + // - 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)`. + // + // func(row, col int) TableCellSelectedEvent PropertyName = "table-cell-selected" // TableRowClickedEvent is the constant for "table-row-clicked" property tag. // - // Used by `TableView`. + // Used by TableView. // Occur when the user clicks on a table row. // // General listener format: - // `func(table rui.TableView, row int)`. + // + // func(table rui.TableView, row int) // // where: - // table - Interface of a table view which generated this event, - // row - Clicked row. + // - table - Interface of a table view which generated this event, + // - row - Clicked row. // // Allowed listener formats: - // `func(row int)`. + // + // func(row int) TableRowClickedEvent PropertyName = "table-row-clicked" // TableRowSelectedEvent is the constant for "table-row-selected" property tag. // - // Used by `TableView`. + // Used by TableView. // Occur when a table row becomes selected. // // General listener format: - // `func(table rui.TableView, row int)`. + // + // func(table rui.TableView, row int) // // where: - // table - Interface of a table view which generated this event, - // row - Selected row. + // - table - Interface of a table view which generated this event, + // - row - Selected row. // // Allowed listener formats: - // `func(row int)`. + // + // func(row int) TableRowSelectedEvent PropertyName = "table-row-selected" // AllowSelection is the constant for "allow-selection" property tag. // - // Used by `TableView`. + // 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. + // implementation of TableAllowCellSelection or TableAllowRowSelection interface. // - // Supported types: `TableAllowCellSelection`, `TableAllowRowSelection`. + // Supported types: TableAllowCellSelection, TableAllowRowSelection. // - // Internal type is either `TableAllowCellSelection`, `TableAllowRowSelection`, see their description for more details. + // Internal type is either TableAllowCellSelection, TableAllowRowSelection, see their description for more details. AllowSelection PropertyName = "allow-selection" ) diff --git a/tabsLayout.go b/tabsLayout.go index 1e00a3e..99de2c7 100644 --- a/tabsLayout.go +++ b/tabsLayout.go @@ -9,104 +9,108 @@ import ( const ( // CurrentTabChangedEvent is the constant for "current-tab-changed" property tag. // - // Used by `TabsLayout`. + // Used by TabsLayout. // Occur when the new tab becomes active. // // General listener format: - // `func(tabsLayout rui.TabsLayout, newTab, oldTab int)`. + // + // 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. + // - 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()`. + // + // func(tabsLayout rui.TabsLayout, newTab int) + // func(newTab, oldTab int) + // func(newTab int) + // func() CurrentTabChangedEvent PropertyName = "current-tab-changed" // Icon is the constant for "icon" property tag. // - // Used by `TabsLayout`. - // Defines the icon name that is displayed in the tab. The property is set for the child view of `TabsLayout`. + // 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`. + // Supported types: string. Icon = "icon" // TabCloseButton is the constant for "tab-close-button" property tag. // - // Used by `TabsLayout`. + // 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`. + // false. // - // Supported types: `bool`, `int`, `string`. + // 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). + // - true, 1, "true", "yes", "on", "1" - Tab(s) has close button. + // - false, 0, "false", "no", "off", "0" - No close button in tab(s). TabCloseButton PropertyName = "tab-close-button" // TabCloseEvent is the constant for "tab-close-event" property tag. // - // Used by `TabsLayout`. + // Used by TabsLayout. // Occurs when the user clicks on the tab close button. // // General listener format: - // `func(tabsLayout rui.TabsLayout, tab int)`. + // + // func(tabsLayout rui.TabsLayout, tab int) // // where: - // tabsLayout - Interface of a tabs layout which generated this event, - // tab - Index of the tab. + // - 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()`. + // + // func(tab int) + // func(tabsLayout rui.TabsLayout) + // func() TabCloseEvent PropertyName = "tab-close-event" // Tabs is the constant for "tabs" property tag. // - // Used by `TabsLayout`. + // Used by TabsLayout. // Sets where the tabs are located. Default value is "top". // - // Supported types: `int`, `string`. + // 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. + // - 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 PropertyName = "tabs" // TabBarStyle is the constant for "tab-bar-style" property tag. // - // Used by `TabsLayout`. + // Used by TabsLayout. // Set the style for the display of the tab bar. The default value is "ruiTabBar". // - // Supported types: `string`. + // Supported types: string. TabBarStyle PropertyName = "tab-bar-style" // TabStyle is the constant for "tab-style" property tag. // - // Used by `TabsLayout`. + // Used by TabsLayout. // Set the style for the display of the tab. The default value is "ruiTab" or "ruiVerticalTab". // - // Supported types: `string`. + // Supported types: string. TabStyle PropertyName = "tab-style" // CurrentTabStyle is the constant for "current-tab-style" property tag. // - // Used by `TabsLayout`. + // Used by TabsLayout. // Set the style for the display of the current(selected) tab. The default value is "ruiCurrentTab" or // "ruiCurrentVerticalTab". // - // Supported types: `string`. + // Supported types: string. CurrentTabStyle PropertyName = "current-tab-style" inactiveTabStyle = "data-inactiveTabStyle" diff --git a/timePicker.go b/timePicker.go index 3652dd5..7db5be1 100644 --- a/timePicker.go +++ b/timePicker.go @@ -10,85 +10,85 @@ import ( const ( // TimeChangedEvent is the constant for "time-changed" property tag. // - // Used by `TimePicker`. + // 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)`. + // func(picker rui.TimePicker, newTime time.Time, oldTime time.Time). // // where: - // picker - Interface of a time picker which generated this event, - // newTime - New time value, - // oldTime - Old time value. + // - 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()`. + // func(picker rui.TimePicker, newTime time.Time), + // func(newTime time.Time, oldTime time.Time), + // func(newTime time.Time), + // func(picker rui.TimePicker), + // func(). TimeChangedEvent PropertyName = "time-changed" // TimePickerMin is the constant for "time-picker-min" property tag. // - // Used by `TimePicker`. + // Used by TimePicker. // The minimum value of the time. // - // Supported types: `time.Time`, `string`. + // Supported types: time.Time, string. // - // Internal type is `time.Time`, other types converted to it during assignment. + // 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". + // 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 PropertyName = "time-picker-min" // TimePickerMax is the constant for "time-picker-max" property tag. // - // Used by `TimePicker`. + // Used by TimePicker. // The maximum value of the time. // - // Supported types: `time.Time`, `string`. + // Supported types: time.Time, string. // - // Internal type is `time.Time`, other types converted to it during assignment. + // 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". + // 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 PropertyName = "time-picker-max" // TimePickerStep is the constant for "time-picker-step" property tag. // - // Used by `TimePicker`. + // Used by TimePicker. // Time step in seconds. // - // Supported types: `int`, `string`. + // Supported types: int, string. // // Values: - // >= `0` or >= "0" - Step value in seconds used to increment or decrement time. + // positive value - Step value in seconds used to increment or decrement time. TimePickerStep PropertyName = "time-picker-step" // TimePickerValue is the constant for "time-picker-value" property tag. // - // Used by `TimePicker`. + // Used by TimePicker. // Current value. // - // Supported types: `time.Time`, `string`. + // Supported types: time.Time, string. // - // Internal type is `time.Time`, other types converted to it during assignment. + // 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". + // 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 PropertyName = "time-picker-value" timeFormat = "15:04:05" diff --git a/touchEvents.go b/touchEvents.go index 93230c2..ccf91b5 100644 --- a/touchEvents.go +++ b/touchEvents.go @@ -8,75 +8,83 @@ import ( const ( // TouchStart is the constant for "touch-start" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.TouchEvent) // // where: - // view - Interface of a view which generated this event, - // event - Touch event. + // - view - Interface of a view which generated this event, + // - event - Touch event. // // Allowed listener formats: - // `func(event rui.TouchEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.TouchEvent) + // func(view rui.View) + // func() TouchStart PropertyName = "touch-start" // TouchEnd is the constant for "touch-end" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.TouchEvent) // // where: - // view - Interface of a view which generated this event, - // event - Touch event. + // - view - Interface of a view which generated this event, + // - event - Touch event. // // Allowed listener formats: - // `func(event rui.TouchEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.TouchEvent) + // func(view rui.View) + // func() TouchEnd PropertyName = "touch-end" // TouchMove is the constant for "touch-move" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.TouchEvent) // // where: - // view - Interface of a view which generated this event, - // event - Touch event. + // - view - Interface of a view which generated this event, + // - event - Touch event. // // Allowed listener formats: - // `func(event rui.TouchEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.TouchEvent) + // func(view rui.View) + // func() TouchMove PropertyName = "touch-move" // TouchCancel is the constant for "touch-cancel" property tag. // - // Used by `View`. + // 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)`. + // + // func(view rui.View, event rui.TouchEvent) // // where: - // view - Interface of a view which generated this event, - // event - Touch event. + // - view - Interface of a view which generated this event, + // - event - Touch event. // // Allowed listener formats: - // `func(event rui.TouchEvent)`, - // `func(view rui.View)`, - // `func()`. + // + // func(event rui.TouchEvent) + // func(view rui.View) + // func() TouchCancel PropertyName = "touch-cancel" ) diff --git a/transform.go b/transform.go index 5ecfa32..8b862fb 100644 --- a/transform.go +++ b/transform.go @@ -10,385 +10,263 @@ import ( const ( // Transform is the constant for "transform" property tag. // - // Used by `View`. + // Used by View. // Specify translation, scale and rotation over x, y and z axes as well as a distortion of a view along x and y axes. // - // Supported types: `TransformProperty`, `string`. + // Supported types: TransformProperty, string. // - // See `TransformProperty` description for more details. + // See TransformProperty description for more details. // // Conversion rules: - // `TransformProperty` - stored as is, no conversion performed. - // `string` - string representation of `TransformProperty` interface. Example: "_{translate-x = 10px, scale-y = 1.1}". + // - TransformProperty - stored as is, no conversion performed. + // - string - string representation of TransformProperty interface. Example: "_{translate-x = 10px, scale-y = 1.1}". Transform PropertyName = "transform" // Perspective is the constant for "perspective" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. Perspective PropertyName = "perspective" // PerspectiveOriginX is the constant for "perspective-origin-x" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. PerspectiveOriginX PropertyName = "perspective-origin-x" // PerspectiveOriginY is the constant for "perspective-origin-y" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. PerspectiveOriginY PropertyName = "perspective-origin-y" // 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`. + // 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`. + // 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. + // - true, 1, "true", "yes", "on", "1" - Back face is visible when turned towards the user. + // - false, 0, "false", "no", "off", "0" - Back face is hidden, effectively making the view invisible when turned away from the user. BackfaceVisible PropertyName = "backface-visibility" // TransformOriginX is the constant for "transform-origin-x" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TransformOriginX PropertyName = "transform-origin-x" // TransformOriginY is the constant for "transform-origin-y" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TransformOriginY PropertyName = "transform-origin-y" // TransformOriginZ is the constant for "transform-origin-z" property tag. // - // Used by `View`. + // 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`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TransformOriginZ PropertyName = "transform-origin-z" // TranslateX is the constant for "translate-x" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // x-axis translation value of a 2D/3D translation. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // 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 `TransformProperty`: - // 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. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TranslateX PropertyName = "translate-x" // TranslateY is the constant for "translate-y" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // 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 `TransformProperty`: // x-axis translation value of a 2D/3D translation. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // Supported types: SizeUnit, SizeFunc, string, float, int. // - // Internal type is `SizeUnit`, other types converted to it during assignment. - // See `SizeUnit` description for more details. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TranslateY PropertyName = "translate-y" // TranslateZ is the constant for "translate-z" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // z-axis translation value of a 3D translation. // - // Supported types: `SizeUnit`, `SizeFunc`, `string`, `float`, `int`. + // 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 `TransformProperty`: - // 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. + // Internal type is SizeUnit, other types converted to it during assignment. + // See SizeUnit description for more details. TranslateZ PropertyName = "translate-z" // ScaleX is the constant for "scale-x" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. - // - // Usage in `TransformProperty`: - // 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. + // Internal type is float, other types converted to it during assignment. ScaleX PropertyName = "scale-x" // ScaleY is the constant for "scale-y" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. - // - // Usage in `TransformProperty`: - // 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. + // Internal type is float, other types converted to it during assignment. ScaleY PropertyName = "scale-y" // ScaleZ is the constant for "scale-z" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. - // - // Usage in `TransformProperty`: - // 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. + // Internal type is float, other types converted to it during assignment. ScaleZ PropertyName = "scale-z" // Rotate is the constant for "rotate" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // 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`. + // 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. + // 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 `TransformProperty`: - // 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. + // - 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 PropertyName = "rotate" // RotateX is the constant for "rotate-x" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // x-coordinate of the vector denoting the axis of rotation in range 0 to 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. - // - // Usage in `TransformProperty`: - // 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. + // Internal type is float, other types converted to it during assignment. RotateX PropertyName = "rotate-x" // RotateY is the constant for "rotate-y" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // y-coordinate of the vector denoting the axis of rotation in range 0 to 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. - // - // Usage in `TransformProperty`: - // 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. + // Internal type is float, other types converted to it during assignment. RotateY PropertyName = "rotate-y" // RotateZ is the constant for "rotate-z" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // z-coordinate of the vector denoting the axis of rotation in range 0 to 1. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. - // - // Usage in `TransformProperty`: - // 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. + // Internal type is float, other types converted to it during assignment. RotateZ PropertyName = "rotate-z" // SkewX is the constant for "skew-x" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // Angle to use to distort the element along the abscissa. The default value is 0. // - // Supported types: `AngleUnit`, `string`, `float`, `int`. + // 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. + // 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 `TransformProperty`: - // 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. + // - 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 PropertyName = "skew-x" // SkewY is the constant for "skew-y" property tag. // - // Used by `View`, `TransformProperty`. + // Used by View, TransformProperty. // - // Usage in `View`: // Angle to use to distort the element along the ordinate. The default value is 0. // - // Supported types: `AngleUnit`, `string`, `float`, `int`. + // 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. + // 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 `TransformProperty`: - // 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. + // - 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 PropertyName = "skew-y" ) // TransformProperty interface specifies view transformation parameters: 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. +// // Valid property tags: Perspective ("perspective"), TranslateX ("translate-x"), TranslateY ("translate-y"), TranslateZ ("translate-z"), // ScaleX ("scale-x"), ScaleY ("scale-y"), ScaleZ ("scale-z"), Rotate ("rotate"), RotateX ("rotate-x"), // RotateY ("rotate-y"), RotateZ ("rotate-z"), SkewX ("skew-x"), and SkewY ("skew-y") @@ -406,6 +284,12 @@ type transformPropertyData struct { } // NewTransform creates a new transform property data and return its interface +// +// The following properties can be used: +// +// Perspective ("perspective"), TranslateX ("translate-x"), TranslateY ("translate-y"), TranslateZ ("translate-z"), +// ScaleX ("scale-x"), ScaleY ("scale-y"), ScaleZ ("scale-z"), Rotate ("rotate"), RotateX ("rotate-x"), +// RotateY ("rotate-y"), RotateZ ("rotate-z"), SkewX ("skew-x"), and SkewY ("skew-y") func NewTransformProperty(params Params) TransformProperty { transform := new(transformPropertyData) transform.init() diff --git a/videoPlayer.go b/videoPlayer.go index f78acdc..1a4bb5f 100644 --- a/videoPlayer.go +++ b/videoPlayer.go @@ -8,32 +8,32 @@ import ( const ( // VideoWidth is the constant for "video-width" property tag. // - // Used by `VideoPlayer`. + // Used by VideoPlayer. // Defines the width of the video's display area in pixels. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // // Values: - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. VideoWidth PropertyName = "video-width" // VideoHeight is the constant for "video-height" property tag. // - // Used by `VideoPlayer`. + // Used by VideoPlayer. // Defines the height of the video's display area in pixels. // - // Supported types: `float`, `int`, `string`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. VideoHeight PropertyName = "video-height" // Poster is the constant for "poster" property tag. // - // Used by `VideoPlayer`. + // 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`. + // Supported types: string. Poster PropertyName = "poster" ) diff --git a/view.go b/view.go index 1131d7b..016f71a 100644 --- a/view.go +++ b/view.go @@ -55,8 +55,8 @@ type View interface { Scroll() Frame // SetParams sets properties with name "tag" of the "rootView" subview. Result: - // * true - all properties were set successful, - // * false - error (incompatible type or invalid format of a string value, see AppLog). + // - true - all properties were set successful, + // - false - error (incompatible type or invalid format of a string value, see AppLog). SetParams(params Params) bool // SetAnimated sets the value (second argument) of the property with name defined by the first argument. diff --git a/viewClip.go b/viewClip.go index ca918e8..c470436 100644 --- a/viewClip.go +++ b/viewClip.go @@ -31,11 +31,11 @@ type polygonClip struct { } // InsetClip creates a rectangle View clipping area. -// top - offset from the top border of a View; -// right - offset from the right border of a View; -// bottom - offset from the bottom border of a View; -// left - offset from the left border of a View; -// radius - corner radius, pass nil if you don't need to round corners +// - top - offset from the top border of a View; +// - right - offset from the right border of a View; +// - bottom - offset from the bottom border of a View; +// - left - offset from the left border of a View; +// - radius - corner radius, pass nil if you don't need to round corners func InsetClip(top, right, bottom, left SizeUnit, radius RadiusProperty) ClipShape { clip := new(insetClip) clip.init() @@ -71,6 +71,7 @@ func EllipseClip(x, y, rx, ry SizeUnit) ClipShape { } // PolygonClip creates a polygon View clipping area. +// // The elements of the function argument can be or text constants, // or the text representation of SizeUnit, or elements of SizeUnit type. func PolygonClip(points []any) ClipShape { diff --git a/viewFilter.go b/viewFilter.go index 96c7bb0..4731b4b 100644 --- a/viewFilter.go +++ b/viewFilter.go @@ -9,122 +9,122 @@ import ( const ( // Blur is the constant for "blur" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Blur PropertyName = "blur" // Brightness is the constant for "brightness" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Brightness PropertyName = "brightness" // Contrast is the constant for "contrast" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Contrast PropertyName = "contrast" // DropShadow is the constant for "drop-shadow" property tag. // - // Used by `ViewFilter`. + // 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 - // `ShadowProperty` interface. + // ShadowProperty interface. // - // Supported types: `[]ShadowProperty`, `ShadowProperty`, `string`. + // Supported types: []ShadowProperty, ShadowProperty, string. // - // Internal type is `[]ShadowProperty`, other types converted to it during assignment. - // See `ShadowProperty` description for more details. + // Internal type is []ShadowProperty, other types converted to it during assignment. + // See ShadowProperty description for more details. // // Conversion rules: - // `[]ShadowProperty` - stored as is, no conversion performed. - // `ShadowProperty` - converted to `[]ShadowProperty`. - // `string` - string representation of `ShadowProperty`. Example: "_{blur = 1em, color = black, spread-radius = 0.5em}". + // - []ShadowProperty - stored as is, no conversion performed. + // - ShadowProperty - converted to []ShadowProperty. + // - string - string representation of ShadowProperty. Example: "_{blur = 1em, color = black, spread-radius = 0.5em}". DropShadow PropertyName = "drop-shadow" // Grayscale is the constant for "grayscale" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Grayscale PropertyName = "grayscale" // HueRotate is the constant for "hue-rotate" property tag. // - // Used by `ViewFilter`. + // 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`. + // 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. + // 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. + // - 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 PropertyName = "hue-rotate" // Invert is the constant for "invert" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float64, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Invert PropertyName = "invert" // Saturate is the constant for "saturate" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Saturate PropertyName = "saturate" // Sepia is the constant for "sepia" property tag. // - // Used by `ViewFilter`. + // 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`. + // Supported types: float, int, string. // - // Internal type is `float`, other types converted to it during assignment. + // Internal type is float, other types converted to it during assignment. Sepia PropertyName = "sepia" ) diff --git a/viewUtils.go b/viewUtils.go index 1a278ba..f3b82fd 100644 --- a/viewUtils.go +++ b/viewUtils.go @@ -1,7 +1,9 @@ package rui // Get returns a value of the property with name "tag" of the "rootView" subview with "viewID" id value. +// // The type of return value depends on the property. +// // If the subview don't exists or the property is not set then nil is returned. // // If the second argument (subviewID) is "" then a listener for the first argument (view) is get @@ -19,10 +21,8 @@ func Get(rootView View, viewID string, tag PropertyName) any { } // Set sets the property with name "tag" of the "rootView" subview with "viewID" id by value. Result: -// -// true - success, -// -// false - error (incompatible type or invalid format of a string value, see AppLog). +// - true - success, +// - false - error (incompatible type or invalid format of a string value, see AppLog). // // If the second argument (subviewID) is "" then a listener for the first argument (view) is set func Set(rootView View, viewID string, tag PropertyName, value any) bool { @@ -39,6 +39,7 @@ func Set(rootView View, viewID string, tag PropertyName, value any) bool { } // SetChangeListener sets a listener for changing a subview property value. +// // If the second argument (subviewID) is "" then a listener for the first argument (view) is set func SetChangeListener(view View, viewID string, tag PropertyName, listener func(View, PropertyName)) { if viewID != "" { @@ -50,8 +51,8 @@ func SetChangeListener(view View, viewID string, tag PropertyName, listener func } // SetParams sets properties with name "tag" of the "rootView" subview. Result: -// true - all properties were set successful, -// false - error (incompatible type or invalid format of a string value, see AppLog). +// - true - all properties were set successful, +// - false - error (incompatible type or invalid format of a string value, see AppLog). func SetParams(rootView View, viewID string, params Params) bool { if viewID != "" { rootView = ViewByID(rootView, viewID)