cohtml.Net.ITextTransformationManager
Implement this interface to support text transformations. The class is used when the text-transform proeperty is used. Most languages require Unicode support to implement casing and cohtml delegates this work to the embedder. OS-specific APIs in Win32, Mac OS X and cross-platform libraries like ICU can implement the required functionality. An instance must be optionally set in SystemSettings. THIS CLASS MUST BE THREAD-SAFE as it WILL be called from different threads
Inherits from SystemIDisposable
Public Classes
Name | |
---|---|
class | TransformationResult |
Public Types
Name | |
---|---|
enum class | CaseOperation { Uppercase, Lowercase, Capitalize} The type of text transformation that is required Examples: Uppercase -> “my text” becomes “MY TEXT”, each character is uppercase Lowercase -> “My Text” becomes “my text”, each character is lowercase Capitalize -> “my text” becomes “My Text”, each first character of each word is uppercase. |
Public Functions
Name | |
---|---|
virtual void | Dispose() |
ITextTransformationManager() | |
virtual bool | CaseMapCharacters(ITextTransformationManager.CaseOperation operation, string utf8Text, uint bytesCount, string transformed, uint transformedBytesCount) Called when a text needs casing transformations. |
virtual bool | CaseMapCharacters(ITextTransformationManager.CaseOperation operation, string utf8Text, uint bytesCount, ITextTransformationManager.TransformationResult transformed) Called when a text needs casing transformations. |
delegate bool | SwigDelegateITextTransformationManager_0(int operation, string utf8Text, uint bytesCount, string transformed, uint transformedBytesCount, global.System.IntPtr swigId) |
delegate bool | SwigDelegateITextTransformationManager_1(int operation, string utf8Text, uint bytesCount, global.System.IntPtr transformed, global.System.IntPtr swigId) |
Protected Attributes
Name | |
---|---|
bool | swigCMemOwn |
Public Types Documentation
enum CaseOperation
Enumerator | Value | Description |
---|---|---|
Uppercase | ||
Lowercase | ||
Capitalize |
The type of text transformation that is required Examples: Uppercase -> “my text” becomes “MY TEXT”, each character is uppercase Lowercase -> “My Text” becomes “my text”, each character is lowercase Capitalize -> “my text” becomes “My Text”, each first character of each word is uppercase.
Public Functions Documentation
function Dispose
virtual void Dispose()
function ITextTransformationManager
ITextTransformationManager()
function CaseMapCharacters
virtual bool CaseMapCharacters(
ITextTransformationManager.CaseOperation operation,
string utf8Text,
uint bytesCount,
string transformed,
uint transformedBytesCount
)
Called when a text needs casing transformations.
Parameters:
- operation The operation required by the function
- utf8Text The text in UTF-8 format to be case-transformed
- bytesCount The length in bytes of the text to be transformed
- transformed Output buffer where the changed text must be put - should be in UTF-8
- transformedBytesCount The size in bytes of the output buffer. The size is very conservative and should accomodate the new string.
Return: Returns if the transformation was successfull.
function CaseMapCharacters
virtual bool CaseMapCharacters(
ITextTransformationManager.CaseOperation operation,
string utf8Text,
uint bytesCount,
ITextTransformationManager.TransformationResult transformed
)
Called when a text needs casing transformations.
Parameters:
- operation The operation required by the function
- utf8Text The text in UTF-8 format to be case-transformed
- bytesCount The length in bytes of the text to be transformed
- transformed Output buffer where the changed text must be put - should be in UTF-8
Return: Returns if the transformation was successfull.
function SwigDelegateITextTransformationManager_0
delegate bool SwigDelegateITextTransformationManager_0(
int operation,
string utf8Text,
uint bytesCount,
string transformed,
uint transformedBytesCount,
global.System.IntPtr swigId
)
function SwigDelegateITextTransformationManager_1
delegate bool SwigDelegateITextTransformationManager_1(
int operation,
string utf8Text,
uint bytesCount,
global.System.IntPtr transformed,
global.System.IntPtr swigId
)
Protected Attributes Documentation
variable swigCMemOwn
bool swigCMemOwn;