cheetah-grid
Preparing search index...
TYPES
GridCanvasHelperAPI
Interface GridCanvasHelperAPI
interface
GridCanvasHelperAPI
{
theme
:
RequiredThemeDefine
;
buildCheckBoxInline
(
check
:
boolean
,
context
:
CellContext
,
option
:
{
animElapsedTime
?:
number
;
borderColor
?:
ColorPropertyDefine
;
checkBgColor
?:
ColorPropertyDefine
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
}
,
)
:
InlineAPI
;
button
(
caption
:
string
,
context
:
CellContext
,
option
:
{
bgColor
?:
ColorPropertyDefine
;
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
shadow
?:
{
blur
?:
number
;
color
?:
string
;
offset
?:
{
x
?:
number
;
y
?:
number
}
;
offsetX
?:
number
;
offsetY
?:
number
;
}
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
,
)
:
void
;
checkbox
(
check
:
boolean
,
context
:
CellContext
,
option
:
{
animElapsedTime
?:
number
;
borderColor
?:
ColorPropertyDefine
;
checkBgColor
?:
ColorPropertyDefine
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
}
,
)
:
void
;
drawBorderWithClip
(
context
:
CellContext
,
draw
:
(
ctx
:
CanvasRenderingContext2D
)
=>
void
,
)
:
void
;
drawWithClip
(
context
:
CellContext
,
draw
:
(
ctx
:
CanvasRenderingContext2D
)
=>
void
,
)
:
void
;
fillRectWithState
(
rect
:
RectProps
,
context
:
CellContext
,
option
:
{
fillColor
?:
ColorPropertyDefine
}
,
)
:
void
;
getColor
(
color
:
ColorPropertyDefine
,
col
:
number
,
row
:
number
,
ctx
:
CanvasRenderingContext2D
,
)
:
string
|
CanvasGradient
|
CanvasPattern
;
getColor
(
color
:
ColorsPropertyDefine
,
col
:
number
,
row
:
number
,
ctx
:
CanvasRenderingContext2D
,
)
:
ColorsDef
;
getStyleProperty
<
T
>
(
style
:
T
|
(
(
args
:
StylePropertyFunctionArg
)
=>
T
)
,
col
:
number
,
row
:
number
,
ctx
:
CanvasRenderingContext2D
,
)
:
T
;
multilineText
(
lines
:
string
[]
,
context
:
CellContext
,
option
:
{
autoWrapText
?:
boolean
;
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
lineClamp
?:
LineClamp
;
lineHeight
?:
string
|
number
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
,
)
:
void
;
radioButton
(
check
:
boolean
,
context
:
CellContext
,
option
:
{
animElapsedTime
?:
number
;
checkBgColor
?:
ColorPropertyDefine
;
checkBorderColor
?:
ColorPropertyDefine
;
checkColor
?:
ColorPropertyDefine
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
uncheckBorderColor
?:
ColorPropertyDefine
;
}
,
)
:
void
;
testFontLoad
(
font
:
undefined
|
string
,
value
:
string
,
context
:
CellContext
,
)
:
boolean
;
text
(
text
:
string
|
(
string
|
InlineAPI
)
[]
,
context
:
CellContext
,
option
:
{
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
,
)
:
void
;
toBoxPixelArray
(
value
:
string
|
number
|
(
string
|
number
)
[]
,
context
:
CellContext
,
font
:
undefined
|
string
,
)
:
[
number
,
number
,
number
,
number
]
;
}
Index
Properties
theme
Methods
build
Check
Box
Inline
button
checkbox
draw
Border
With
Clip
draw
With
Clip
fill
Rect
With
State
get
Color
get
Style
Property
multiline
Text
radio
Button
test
Font
Load
text
to
Box
Pixel
Array
Properties
theme
theme
:
RequiredThemeDefine
Methods
build
Check
Box
Inline
buildCheckBoxInline
(
check
:
boolean
,
context
:
CellContext
,
option
:
{
animElapsedTime
?:
number
;
borderColor
?:
ColorPropertyDefine
;
checkBgColor
?:
ColorPropertyDefine
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
}
,
)
:
InlineAPI
Parameters
check
:
boolean
context
:
CellContext
option
:
{
animElapsedTime
?:
number
;
borderColor
?:
ColorPropertyDefine
;
checkBgColor
?:
ColorPropertyDefine
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
}
Returns
InlineAPI
button
button
(
caption
:
string
,
context
:
CellContext
,
option
:
{
bgColor
?:
ColorPropertyDefine
;
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
shadow
?:
{
blur
?:
number
;
color
?:
string
;
offset
?:
{
x
?:
number
;
y
?:
number
}
;
offsetX
?:
number
;
offsetY
?:
number
;
}
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
,
)
:
void
Parameters
caption
:
string
context
:
CellContext
option
:
{
bgColor
?:
ColorPropertyDefine
;
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
shadow
?:
{
blur
?:
number
;
color
?:
string
;
offset
?:
{
x
?:
number
;
y
?:
number
}
;
offsetX
?:
number
;
offsetY
?:
number
;
}
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
Returns
void
checkbox
checkbox
(
check
:
boolean
,
context
:
CellContext
,
option
:
{
animElapsedTime
?:
number
;
borderColor
?:
ColorPropertyDefine
;
checkBgColor
?:
ColorPropertyDefine
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
}
,
)
:
void
Parameters
check
:
boolean
context
:
CellContext
option
:
{
animElapsedTime
?:
number
;
borderColor
?:
ColorPropertyDefine
;
checkBgColor
?:
ColorPropertyDefine
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
}
Returns
void
draw
Border
With
Clip
drawBorderWithClip
(
context
:
CellContext
,
draw
:
(
ctx
:
CanvasRenderingContext2D
)
=>
void
,
)
:
void
Parameters
context
:
CellContext
draw
:
(
ctx
:
CanvasRenderingContext2D
)
=>
void
Returns
void
draw
With
Clip
drawWithClip
(
context
:
CellContext
,
draw
:
(
ctx
:
CanvasRenderingContext2D
)
=>
void
,
)
:
void
Parameters
context
:
CellContext
draw
:
(
ctx
:
CanvasRenderingContext2D
)
=>
void
Returns
void
fill
Rect
With
State
fillRectWithState
(
rect
:
RectProps
,
context
:
CellContext
,
option
:
{
fillColor
?:
ColorPropertyDefine
}
,
)
:
void
Parameters
rect
:
RectProps
context
:
CellContext
option
:
{
fillColor
?:
ColorPropertyDefine
}
Returns
void
get
Color
getColor
(
color
:
ColorPropertyDefine
,
col
:
number
,
row
:
number
,
ctx
:
CanvasRenderingContext2D
,
)
:
string
|
CanvasGradient
|
CanvasPattern
Parameters
color
:
ColorPropertyDefine
col
:
number
row
:
number
ctx
:
CanvasRenderingContext2D
Returns
string
|
CanvasGradient
|
CanvasPattern
getColor
(
color
:
ColorsPropertyDefine
,
col
:
number
,
row
:
number
,
ctx
:
CanvasRenderingContext2D
,
)
:
ColorsDef
Parameters
color
:
ColorsPropertyDefine
col
:
number
row
:
number
ctx
:
CanvasRenderingContext2D
Returns
ColorsDef
get
Style
Property
getStyleProperty
<
T
>
(
style
:
T
|
(
(
args
:
StylePropertyFunctionArg
)
=>
T
)
,
col
:
number
,
row
:
number
,
ctx
:
CanvasRenderingContext2D
,
)
:
T
Type Parameters
T
Parameters
style
:
T
|
(
(
args
:
StylePropertyFunctionArg
)
=>
T
)
col
:
number
row
:
number
ctx
:
CanvasRenderingContext2D
Returns
T
multiline
Text
multilineText
(
lines
:
string
[]
,
context
:
CellContext
,
option
:
{
autoWrapText
?:
boolean
;
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
lineClamp
?:
LineClamp
;
lineHeight
?:
string
|
number
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
,
)
:
void
Parameters
lines
:
string
[]
context
:
CellContext
option
:
{
autoWrapText
?:
boolean
;
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
lineClamp
?:
LineClamp
;
lineHeight
?:
string
|
number
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
Returns
void
radio
Button
radioButton
(
check
:
boolean
,
context
:
CellContext
,
option
:
{
animElapsedTime
?:
number
;
checkBgColor
?:
ColorPropertyDefine
;
checkBorderColor
?:
ColorPropertyDefine
;
checkColor
?:
ColorPropertyDefine
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
uncheckBorderColor
?:
ColorPropertyDefine
;
}
,
)
:
void
Parameters
check
:
boolean
context
:
CellContext
option
:
{
animElapsedTime
?:
number
;
checkBgColor
?:
ColorPropertyDefine
;
checkBorderColor
?:
ColorPropertyDefine
;
checkColor
?:
ColorPropertyDefine
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
uncheckBgColor
?:
ColorPropertyDefine
;
uncheckBorderColor
?:
ColorPropertyDefine
;
}
Returns
void
test
Font
Load
testFontLoad
(
font
:
undefined
|
string
,
value
:
string
,
context
:
CellContext
,
)
:
boolean
Parameters
font
:
undefined
|
string
value
:
string
context
:
CellContext
Returns
boolean
text
text
(
text
:
string
|
(
string
|
InlineAPI
)
[]
,
context
:
CellContext
,
option
:
{
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
,
)
:
void
Parameters
text
:
string
|
(
string
|
InlineAPI
)
[]
context
:
CellContext
option
:
{
color
?:
ColorPropertyDefine
;
font
?:
FontPropertyDefine
;
icons
?:
SimpleColumnIconOption
[]
;
offset
?:
number
;
padding
?:
string
|
number
|
(
string
|
number
)
[]
;
textAlign
?:
CanvasTextAlign
;
textBaseline
?:
CanvasTextBaseline
;
textOverflow
?:
string
;
}
Returns
void
to
Box
Pixel
Array
toBoxPixelArray
(
value
:
string
|
number
|
(
string
|
number
)
[]
,
context
:
CellContext
,
font
:
undefined
|
string
,
)
:
[
number
,
number
,
number
,
number
]
Parameters
value
:
string
|
number
|
(
string
|
number
)
[]
context
:
CellContext
font
:
undefined
|
string
Returns
[
number
,
number
,
number
,
number
]
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Properties
theme
Methods
build
Check
Box
Inline
button
checkbox
draw
Border
With
Clip
draw
With
Clip
fill
Rect
With
State
get
Color
get
Style
Property
multiline
Text
radio
Button
test
Font
Load
text
to
Box
Pixel
Array
cheetah-grid
Loading...