const virtual class vaseGui::Insets

sys::Obj
  vaseGui::Insets

@Js
@Serializable { simple=true }

Insets represent a number of pixels around the edge of a rectangle.

bottom

const Int bottom

Bottom side spacing

defVal

const static Insets defVal := ...

Default instance 0, 0, 0, 0.

equals

virtual override Bool equals(Obj? obj)

Return if obj is same Insets value.

fromStr

static Insets? fromStr(Str s, Bool checked := true)

Parse from comma or space separated string using CSS format:

  • "top"
  • "top, right" (implies bottom = top, left = right)
  • "top, right, bottom" (implies left = right)
  • "top, right, bottom, left"
hash

virtual override Int hash()

Return hash of top, right, bottom, left.

left

const Int left

Left side spacing

make

new make(Int top, Int? right := null, Int? bottom := null, Int? left := null)

Construct with top, and optional right, bottom, left. If one side is not specified, it is reflected from the opposite side:

Insets(5)     => Insets(5,5,5,5)
Insets(5,6)   => Insets(5,6,5,6)
Insets(5,6,7) => Insets(5,6,7,6)

const Int right

Right side spacing

toSize

Size toSize()

Return right+left, top+bottom

toStr

virtual override Str toStr()

If all four sides are equal return "len" otherwise return "top,right,bottom,left".

top

const Int top

Top side spacing