#include <customgui_kerning.h>
The CustomDataType that contains an array of Kerning objects.
- Note
- Has to be created with Alloc() and destroyed with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
◆ KerningData()
◆ ~KerningData()
◆ Alloc()
◆ Free()
Destructs KerningData objects allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.
- Parameters
-
[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.
- Parameters
-
[in] | index | The index of the Kerning object. |
- Returns
- The Kerning object for index.
◆ CalculateKerning()
Calculates the actual Kerning for index.
- Note
- All offsets and scale of the previous array elements will be taken into account.
- Parameters
-
[in] | index | The index of the Kerning object. |
[in] | s | Pass a string to consider line breaks. |
- Returns
- The Kerning object for index.
◆ SetKerning() [1/3]
Sets the Kerning data for index.
- Parameters
-
[in] | index | The index of the Kerning object. |
[in] | kerning | The Kerning data to set. |
[in] | combine | If false, existing Kerning data will be overwritten with new one. If true, both will be combined. |
- Returns
- True if successful.
◆ SetKerning() [2/3]
Sets Kerning values for a range of indices.
- Parameters
-
[in] | index_start | The range start index. |
[in] | index_end | The range end index. |
[in] | kerning | The Kerning data to set. |
[in] | combine | If false, existing Kerning datasets will be overwritten with new one. If true, they will be combined. |
- Returns
- true if successful, otherwise false.
◆ SetKerning() [3/3]
Sets KerningTriState values for a range of indices.
- Parameters
-
[in] | index_start | The range start index. |
[in] | index_end | The range end index. |
[in] | tristate | The Kerning TriState. |
- Returns
- true if successful, otherwise false.
◆ ResetKerning() [1/2]
void ResetKerning |
( |
Int32 |
index | ) |
|
Resets Kerning data for index to default values.
- Parameters
-
[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.
- Parameters
-
[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. |
- Returns
- true if successful, otherwise false.
◆ Init() [2/2]
Initializes Kerning data array with length count.
- Parameters
-
[in] | count | The length of the Kerning data array. |
[in] | preserve | true to keep existing Kerning data. false for default values in all elements. |
- Returns
- true if successful, otherwise false.
◆ GetCount()
Gets the length of Kerning data array.
- Returns
- The Kerning data array's length.
◆ Clear()
Clears all Kerning data. Length is reset to 0.
◆ CopyTo()
Copies the KerningData object to another one.
- Parameters
-
[in] | pDest | The pointer to the destination KerningData object. |
- Returns
- true if successful, otherwise false.
◆ GetString()
Retrieves the string that the KerningData has been initialized with.
- Returns
- The string.
◆ SetSelectionStart()
void SetSelectionStart |
( |
Int32 |
start | ) |
|
Sets the index of the selection start.
- Parameters
-
[in] | start | The index of the selection start: 0 <= start < GetString() .GetLength() |
◆ GetSelectionStart()
Int32 GetSelectionStart |
( |
| ) |
const |
Gets the index of the selection start.
- Returns
- The index of the selection start.
◆ SetSelectionEnd()
void SetSelectionEnd |
( |
Int32 |
end | ) |
|
Sets the index of the selection end.
- Parameters
-
[in] | end | The index of the selection end: 0 <= end < GetString() .GetLength() |
◆ GetSelectionEnd()
Int32 GetSelectionEnd |
( |
| ) |
const |
Gets the index of the selection end.
- Returns
- The index of the selection end.
◆ SetSelection()
Sets the indexes of the selection start and end.
- Parameters
-
[in] | start | The index of the selection start. |
[in] | end | The index of the selection end. |
◆ GetSelectionLength()
Int32 GetSelectionLength |
( |
| ) |
const |
◆ GetEditmode()
Bool GetEditmode |
( |
| ) |
const |
Gets the edit mode state.
- Returns
- true if edit mode is enabled, otherwise false.
◆ SetEditmode()
void SetEditmode |
( |
Bool |
editmode | ) |
|
Sets the edit mode state.
- Parameters
-
[in] | editmode | true to enable edit mode, otherwise false. |