-
首页
-
C4D R23.110 C++ SDK
KerningData Class Reference
#include <customgui_kerning.h>
详细描述
The
CustomDataType
that contains an array of
Kerning
对象。
-
注意
-
Has to be created with
Alloc()
and destroyed with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
构造函数 & 析构函数文档编制
◆
KerningData()
Constructor.
◆
~KerningData()
Destructor.
成员函数文档编制
◆
Alloc()
Allocates a
KerningData
object. Destroy the allocated
KerningData
object with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated
KerningData
object, or
nullptr
if the allocation failed.
◆
Free()
Destructs
KerningData
objects allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
pData
|
The
KerningData
object to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
GetKerning()
Retrieves the
Kerning
object with the settings at
index
.
-
参数
-
[in]
|
index
|
The index of the
Kerning
对象。
|
-
返回
-
The
Kerning
object for
index
.
◆
CalculateKerning()
Calculates the actual
Kerning
for
index
.
-
注意
-
All offsets and scale of the previous array elements will be taken into account.
-
参数
-
[in]
|
index
|
The index of the
Kerning
对象。
|
[in]
|
s
|
Pass a string to consider line breaks.
|
-
返回
-
The
Kerning
object for
index
.
◆
SetKerning()
[1/3]
设置
Kerning
data for
index
.
-
参数
-
[in]
|
index
|
The index of the
Kerning
对象。
|
[in]
|
kerning
|
The
Kerning
data to set.
|
[in]
|
combine
|
若
false
, existing
Kerning
data will be overwritten with new one. If
true
, both will be combined.
|
-
返回
-
True if successful.
◆
SetKerning()
[2/3]
Sets
Kerning
values for a range of indices.
-
参数
-
[in]
|
index_start
|
The range start index.
|
[in]
|
index_end
|
The range end index.
|
[in]
|
kerning
|
The
Kerning
data to set.
|
[in]
|
combine
|
若
false
, existing
Kerning
datasets will be overwritten with new one. If
true
, they will be combined.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SetKerning()
[3/3]
Sets
KerningTriState
values for a range of indices.
-
参数
-
[in]
|
index_start
|
The range start index.
|
[in]
|
index_end
|
The range end index.
|
[in]
|
tristate
|
The
Kerning
TriState
.
|
-
返回
-
true
if successful, otherwise
false
.
◆
ResetKerning()
[1/2]
void ResetKerning
|
(
|
Int32
|
index
|
)
|
|
Resets
Kerning
data for
index
to default values.
-
参数
-
[in]
|
index
|
The index of the
Kerning
data to reset.
|
◆
ResetKerning()
[2/2]
Resets all
Kerning
data objects in array to default values (count is preserved).
◆
Init()
[1/2]
Initializes
Kerning
data array with length of string
s
.
-
参数
-
[in]
|
s
|
The length of the
Kerning
data array will be set to length of
s
.
|
[in]
|
preserve
|
true
to keep existing
Kerning
data.
false
for default values in all elements.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Init()
[2/2]
Initializes
Kerning
data array with length
count
.
-
参数
-
[in]
|
count
|
The length of the
Kerning
data array.
|
[in]
|
preserve
|
true
to keep existing
Kerning
data.
false
for default values in all elements.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetCount()
Gets the length of
Kerning
data array.
-
返回
-
The
Kerning
data array's length.
◆
Clear()
Clears all
Kerning
data. Length is reset to
0
.
◆
CopyTo()
Copies the
KerningData
object to another one.
-
参数
-
[in]
|
pDest
|
The pointer to the destination
KerningData
对象。
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetString()
Retrieves the string that the
KerningData
has been initialized with.
-
返回
-
The string.
◆
SetSelectionStart()
void SetSelectionStart
|
(
|
Int32
|
start
|
)
|
|
Sets the index of the selection start.
-
参数
-
[in]
|
start
|
The index of the selection start:
0
<=
start
<
GetString()
.GetLength()
|
◆
GetSelectionStart()
Int32
GetSelectionStart
|
(
|
|
)
|
const
|
Gets the index of the selection start.
-
返回
-
The index of the selection start.
◆
SetSelectionEnd()
void SetSelectionEnd
|
(
|
Int32
|
end
|
)
|
|
Sets the index of the selection end.
-
参数
-
[in]
|
end
|
The index of the selection end:
0
<=
end
<
GetString()
.GetLength()
|
◆
GetSelectionEnd()
Int32
GetSelectionEnd
|
(
|
|
)
|
const
|
Gets the index of the selection end.
-
返回
-
The index of the selection end.
◆
SetSelection()
Sets the indexes of the selection start and end.
-
参数
-
[in]
|
start
|
The index of the selection start.
|
[in]
|
end
|
The index of the selection end.
|
◆
GetSelectionLength()
Int32
GetSelectionLength
|
(
|
|
)
|
const
|
Gets the length of the selection (
GetSelectionEnd()
-
GetSelectionStart()
).
-
返回
-
The selection's length.
◆
GetEditmode()
Bool
GetEditmode
|
(
|
|
)
|
const
|
Gets the edit mode state.
-
返回
-
true
if edit mode is enabled, otherwise
false
.
◆
SetEditmode()
void SetEditmode
|
(
|
Bool
|
editmode
|
)
|
|
Sets the edit mode state.
-
参数
-
[in]
|
editmode
|
true
to enable edit mode, otherwise
false
.
|