![]() |
MHEG5
22.11.0
|
Implement the MHEG5 Text Class 36 Text Class Defines attributes and behaviour of pieces of textual information. Base class: Visible Subclasses: EntryField, HyperText Status: Concrete class. More...
#include "mh5text.h"
#include "mh5entryfield.h"
#include "mh5object.h"
#include "mh5variable.h"
#include "mh5display.h"
#include "mh5memory.h"
#include "mh5application.h"
#include "mh5profile.h"
#include "mh5debug.h"
#include <stdlib.h>
#include <string.h>
#include "mh5drawtext.h"
#include "mg_api.h"
Macros | |
#define | UNICODE_BOM_LITTLE_ENDIAN 0xFFFE |
#define | UNICODE_BOM_BIG_ENDIAN 0xFEFF |
Functions | |
void | MHEG5textInit (MHEG5Text *text) |
Initialise a text object with default values. More... | |
void | MHEG5textFree (MHEG5Text *text) |
Free off all memory associated with the specified object, including any exchanged attributes and internal data. The data holding the object itself is not freed. More... | |
MHEG5Text * | MHEG5textClone (MHEG5Text *source) |
Copy a text object with original values. More... | |
void | MHEG5textPrepare (MHEG5Text *text) |
Apply the preparation behaviour of the text class Apply the preparation behaviour of the text class. As this class has no own preparation behaviour this function just invokes the preparation behaviour from the base class. More... | |
void | MHEG5textActivate (MHEG5Text *text) |
Apply the activation behaviour of the text class. As this class has no own activation behaviour this function just invokes the activation behaviour from the base class. More... | |
void | MHEG5textDeactivate (MHEG5Text *text) |
Apply the deactivation behaviour of the text class. As this class has no own deactivation behaviour this function just invokes the deactivation behaviour from the base class. More... | |
void | MHEG5textDestruct (MHEG5Text *text) |
Destruct a text object. More... | |
void | MHEG5textRedraw (MHEG5Text *text) |
MHEG5ErrorCode | MHEG5getTextContent (MHEG5Root *target, MHEG5GList *params) |
The effect of this action is to transfer the data of the content attribute of the text to the variable. Implementation of the GetTextContent (Target, TextContentVar) action of the text class. NOTE : There is a difference, depending on the type of the TextContentVar and the type of the content which can be either included or referenced. Please refer to the MHEG5 standard. More... | |
MHEG5ErrorCode | MHEG5getTextData (MHEG5Root *target, MHEG5GList *params) |
Set the Variable referenced by TextDataVar to the value of the TextData attribute. Implementation of the GetTextData (Target, TextDataVar) action of the text class. More... | |
MHEG5ErrorCode | MHEG5setFontAttributes (MHEG5Root *target, MHEG5GList *params) |
The effect of this action is to set the FontAttributes to the given attributes. Implementation of the MHEG5setFontAttributes (Target, NewFontAttributes) action of the text class. More... | |
MHEG5ErrorCode | MHEG5setTextColour (MHEG5Root *target, MHEG5GList *params) |
The effect of this action is to set the TextColour to the given colour. Implementation of the MHEG5setTextColour (Target, NewTextColour) action of the text class. More... | |
MHEG5ErrorCode | MHEG5setBackgroundColour (MHEG5Root *target, MHEG5GList *params) |
The effect of this action is to set the BackgroundColour to the given colour. Implementation of the MHEG5setBackgroundColour (Target, NewBackgroundColour) action of the text class. More... | |
MHEG5ErrorCode | MHEG5setFontRef (MHEG5Root *target, MHEG5GList *params) |
The effect of this action is to change the character font used to preset a text. Implementation of the MHEG5setFontRef (Target, NewFont) action of the text class. More... | |
void | MHEG5textUtf8Content (MHEG5Text *text, unsigned char *data, int len) |
Adapt new content for Text objects. Content is encoded using UTF8 - this is converted to 16 bit unicode. More... | |
void | MHEG5textUtf16Content (MHEG5Text *text, unsigned char *data, int len) |
Content for Text objects is encoded using UTF16. More... | |
void | MHEG5textContentUnadapt (MHEG5Text *text, MHEG5Byte **utf8Data, MHEG5Int *utf8Len) |
Undo the adaption of content for Text objects. Adapted content is stored as 16 bit unicode - this is converted back to UTF8. More... | |
void | MHEG5textContentUnadaptUTF16 (MHEG5Text *text, MHEG5Byte **utf16Data, MHEG5Int *utf16Len) |
Undo the adaption of content for Text objects. Adapted content is stored as 16 bit unicode - this is converted back to its original format. More... | |
void | MHEG5textClearTextData (MHEG5Text *text) |
Clear text data. More... | |
Implement the MHEG5 Text Class 36 Text Class Defines attributes and behaviour of pieces of textual information. Base class: Visible Subclasses: EntryField, HyperText Status: Concrete class.
MHEG5ErrorCode MHEG5getTextContent | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
The effect of this action is to transfer the data of the content attribute of the text to the variable. Implementation of the GetTextContent (Target, TextContentVar) action of the text class. NOTE
: There is a difference, depending on the type of the TextContentVar and the type of the content which can be either included or referenced. Please refer to the MHEG5 standard.
MHEG5Root | *target |
MHEG5GList | *params |
MHEG5ErrorCode MHEG5getTextData | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
Set the Variable referenced by TextDataVar
to the value of the TextData
attribute. Implementation of the GetTextData (Target, TextDataVar) action of the text class.
MHEG5Root | *target |
MHEG5GList | *params |
MHEG5ErrorCode MHEG5setBackgroundColour | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
The effect of this action is to set the BackgroundColour to the given colour. Implementation of the MHEG5setBackgroundColour (Target, NewBackgroundColour) action of the text class.
MHEG5Root | *target |
MHEG5GList | *params |
MHEG5ErrorCode MHEG5setFontAttributes | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
The effect of this action is to set the FontAttributes to the given attributes. Implementation of the MHEG5setFontAttributes (Target, NewFontAttributes) action of the text class.
MHEG5Root | *target |
MHEG5GList | *params |
MHEG5ErrorCode MHEG5setFontRef | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
The effect of this action is to change the character font used to preset a text. Implementation of the MHEG5setFontRef (Target, NewFont) action of the text class.
MHEG5String | sourceGID |
MHEG5Int | sourceID |
MHEG5GList | *params |
MHEG5ErrorCode MHEG5setTextColour | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
The effect of this action is to set the TextColour to the given colour. Implementation of the MHEG5setTextColour (Target, NewTextColour) action of the text class.
MHEG5Root | *target |
MHEG5GList | *params |
void MHEG5textActivate | ( | MHEG5Text * | text | ) |
Apply the activation behaviour of the text class. As this class has no own activation behaviour this function just invokes the activation behaviour from the base class.
MHEG5Text | *text |
void MHEG5textClearTextData | ( | MHEG5Text * | text | ) |
Clear text data.
text | Text object that content is for. |
void MHEG5textContentUnadapt | ( | MHEG5Text * | text, |
MHEG5Byte ** | utf8Data, | ||
MHEG5Int * | utf8Len | ||
) |
Undo the adaption of content for Text objects. Adapted content is stored as 16 bit unicode - this is converted back to UTF8.
text | Text object that content is for. |
utf8Data | Unadapted content (UTF8 encoded). |
utf8Len | Length of the unadapted content in bytes. |
void MHEG5textContentUnadaptUTF16 | ( | MHEG5Text * | text, |
MHEG5Byte ** | utf16Data, | ||
MHEG5Int * | utf16Len | ||
) |
Undo the adaption of content for Text objects. Adapted content is stored as 16 bit unicode - this is converted back to its original format.
text | Text object that content is for. |
utf16Data | Unadapted content (UTF16 encoded). |
utf16Len | Length of the unadapted content in bytes. |
void MHEG5textDeactivate | ( | MHEG5Text * | text | ) |
Apply the deactivation behaviour of the text class. As this class has no own deactivation behaviour this function just invokes the deactivation behaviour from the base class.
MHEG5Text | *text |
void MHEG5textDestruct | ( | MHEG5Text * | text | ) |
void MHEG5textFree | ( | MHEG5Text * | text | ) |
Free off all memory associated with the specified object, including any exchanged attributes and internal data. The data holding the object itself is not freed.
text | Pointer to object to free. |
void MHEG5textInit | ( | MHEG5Text * | text | ) |
Initialise a text object with default values.
<Function description>="">
text | Pointer to object to initialise. |
void MHEG5textPrepare | ( | MHEG5Text * | text | ) |
Apply the preparation behaviour of the text class Apply the preparation behaviour of the text class. As this class has no own preparation behaviour this function just invokes the preparation behaviour from the base class.
MHEG5Text | *text |
void MHEG5textUtf16Content | ( | MHEG5Text * | text, |
unsigned char * | data, | ||
int | len | ||
) |
Content for Text objects is encoded using UTF16.
text | Text object that content is for. |
data | New content (UTF16 encoded). |
len | Length of the new content in bytes. |
void MHEG5textUtf8Content | ( | MHEG5Text * | text, |
unsigned char * | data, | ||
int | len | ||
) |
Adapt new content for Text objects. Content is encoded using UTF8 - this is converted to 16 bit unicode.
text | Text object that content is for. |
data | New content (UTF8 encoded). |
len | Length of the new content in bytes. |