Skip to content
SiteEmail

cohtml.Net.ITextTransformationManager

Implement this interface to support text transformations. The class is used when the text-transform property 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

Inherited by cohtml.DefaultTextTransformManager

Name
classTransformationResult
Name
enum classCaseOperation { 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.
Name
virtual voidDispose()
ITextTransformationManager()
virtual boolCaseMapCharacters(ITextTransformationManager.CaseOperation operation, string utf8Text, uint bytesCount, ITextTransformationManager.TransformationResult transformed)
Called when a text needs casing transformations.
delegate boolSwigDelegateITextTransformationManager_0(int operation, string utf8Text, uint bytesCount, global.System.IntPtr transformed, global.System.IntPtr swigId)
Name
boolswigCMemOwn
EnumeratorValueDescription
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.

virtual void Dispose()
ITextTransformationManager()
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 successful.

function SwigDelegateITextTransformationManager_0

Section titled “function SwigDelegateITextTransformationManager_0”
delegate bool SwigDelegateITextTransformationManager_0(
int operation,
string utf8Text,
uint bytesCount,
global.System.IntPtr transformed,
global.System.IntPtr swigId
)
bool swigCMemOwn;