StyleBoxFlat

package
v0.0.0-...-2b43b64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package StyleBoxFlat provides methods for working with StyleBoxFlat object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsStyleBoxFlat() Instance
}

type Corner

type Corner int
const (
	/*Top-left corner.*/
	CornerTopLeft Corner = 0
	/*Top-right corner.*/
	CornerTopRight Corner = 1
	/*Bottom-right corner.*/
	CornerBottomRight Corner = 2
	/*Bottom-left corner.*/
	CornerBottomLeft Corner = 3
)

type Instance

type Instance [1]gdclass.StyleBoxFlat

By configuring various properties of this style box, you can achieve many common looks without the need of a texture. This includes optionally rounded borders, antialiasing, shadows, and skew. Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. [b]Example:[/b] [codeblock lang=text] height = 30 corner_radius_top_left = 50 corner_radius_bottom_left = 100 [/codeblock] The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result: [codeblock lang=text] corner_radius_top_left: 10 corner_radius_bottom_left: 20 [/codeblock]

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AntiAliasing

func (self Instance) AntiAliasing() bool

func (Instance) AntiAliasingSize

func (self Instance) AntiAliasingSize() Float.X

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsStyleBox

func (self Instance) AsStyleBox() StyleBox.Instance

func (Instance) AsStyleBoxFlat

func (self Instance) AsStyleBoxFlat() Instance

func (Instance) BgColor

func (self Instance) BgColor() Color.RGBA

func (Instance) BorderBlend

func (self Instance) BorderBlend() bool

func (Instance) BorderColor

func (self Instance) BorderColor() Color.RGBA

func (Instance) BorderWidthBottom

func (self Instance) BorderWidthBottom() int

func (Instance) BorderWidthLeft

func (self Instance) BorderWidthLeft() int

func (Instance) BorderWidthRight

func (self Instance) BorderWidthRight() int

func (Instance) BorderWidthTop

func (self Instance) BorderWidthTop() int

func (Instance) CornerDetail

func (self Instance) CornerDetail() int

func (Instance) CornerRadiusBottomLeft

func (self Instance) CornerRadiusBottomLeft() int

func (Instance) CornerRadiusBottomRight

func (self Instance) CornerRadiusBottomRight() int

func (Instance) CornerRadiusTopLeft

func (self Instance) CornerRadiusTopLeft() int

func (Instance) CornerRadiusTopRight

func (self Instance) CornerRadiusTopRight() int

func (Instance) DrawCenter

func (self Instance) DrawCenter() bool

func (Instance) ExpandMarginBottom

func (self Instance) ExpandMarginBottom() Float.X

func (Instance) ExpandMarginLeft

func (self Instance) ExpandMarginLeft() Float.X

func (Instance) ExpandMarginRight

func (self Instance) ExpandMarginRight() Float.X

func (Instance) ExpandMarginTop

func (self Instance) ExpandMarginTop() Float.X

func (Instance) GetBorderWidthMin

func (self Instance) GetBorderWidthMin() int

Returns the smallest border width out of all four borders.

func (Instance) SetAntiAliasing

func (self Instance) SetAntiAliasing(value bool)

func (Instance) SetAntiAliasingSize

func (self Instance) SetAntiAliasingSize(value Float.X)

func (Instance) SetBgColor

func (self Instance) SetBgColor(value Color.RGBA)

func (Instance) SetBorderBlend

func (self Instance) SetBorderBlend(value bool)

func (Instance) SetBorderColor

func (self Instance) SetBorderColor(value Color.RGBA)

func (Instance) SetBorderWidthAll

func (self Instance) SetBorderWidthAll(width int)

Sets the border width to [param width] pixels for all sides.

func (Instance) SetBorderWidthBottom

func (self Instance) SetBorderWidthBottom(value int)

func (Instance) SetBorderWidthLeft

func (self Instance) SetBorderWidthLeft(value int)

func (Instance) SetBorderWidthRight

func (self Instance) SetBorderWidthRight(value int)

func (Instance) SetBorderWidthTop

func (self Instance) SetBorderWidthTop(value int)

func (Instance) SetCornerDetail

func (self Instance) SetCornerDetail(value int)

func (Instance) SetCornerRadiusAll

func (self Instance) SetCornerRadiusAll(radius int)

Sets the corner radius to [param radius] pixels for all corners.

func (Instance) SetCornerRadiusBottomLeft

func (self Instance) SetCornerRadiusBottomLeft(value int)

func (Instance) SetCornerRadiusBottomRight

func (self Instance) SetCornerRadiusBottomRight(value int)

func (Instance) SetCornerRadiusTopLeft

func (self Instance) SetCornerRadiusTopLeft(value int)

func (Instance) SetCornerRadiusTopRight

func (self Instance) SetCornerRadiusTopRight(value int)

func (Instance) SetDrawCenter

func (self Instance) SetDrawCenter(value bool)

func (Instance) SetExpandMarginAll

func (self Instance) SetExpandMarginAll(size Float.X)

Sets the expand margin to [param size] pixels for all sides.

func (Instance) SetExpandMarginBottom

func (self Instance) SetExpandMarginBottom(value Float.X)

func (Instance) SetExpandMarginLeft

func (self Instance) SetExpandMarginLeft(value Float.X)

func (Instance) SetExpandMarginRight

func (self Instance) SetExpandMarginRight(value Float.X)

func (Instance) SetExpandMarginTop

func (self Instance) SetExpandMarginTop(value Float.X)

func (Instance) SetShadowColor

func (self Instance) SetShadowColor(value Color.RGBA)

func (Instance) SetShadowOffset

func (self Instance) SetShadowOffset(value Vector2.XY)

func (Instance) SetShadowSize

func (self Instance) SetShadowSize(value int)

func (Instance) SetSkew

func (self Instance) SetSkew(value Vector2.XY)

func (Instance) ShadowColor

func (self Instance) ShadowColor() Color.RGBA

func (Instance) ShadowOffset

func (self Instance) ShadowOffset() Vector2.XY

func (Instance) ShadowSize

func (self Instance) ShadowSize() int

func (Instance) Skew

func (self Instance) Skew() Vector2.XY

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Side

type Side int
const (
	/*Left side, usually used for [Control] or [StyleBox]-derived classes.*/
	SideLeft Side = 0
	/*Top side, usually used for [Control] or [StyleBox]-derived classes.*/
	SideTop Side = 1
	/*Right side, usually used for [Control] or [StyleBox]-derived classes.*/
	SideRight Side = 2
	/*Bottom side, usually used for [Control] or [StyleBox]-derived classes.*/
	SideBottom Side = 3
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL