-
Notifications
You must be signed in to change notification settings - Fork 0
MUI_Textdata
Usually all text displayed in a MUI GUI is limited to ISO-8859-1 encoded texts as this is the Amiga standard text encoding. Before Textdata class was added it was very hard to let MUI handle text strings with other encodings like UTF8, which are quite popular on other systems. Using Textdata class works around this problem, at least for simple text label objects. Textdata objects convert a given string with a specific encoding to the system's default chartset using the conversion functions of codesets.library.
Attribute | Version | ISG | Type |
---|---|---|---|
MUIA_Textdata_Contents | V21 | I.G | CONST_STRPTR |
MUIA_Textdata_Encoding | V21 | I.G | ULONG |
MUIA_Textdata_SourceBytes | V21 | I.. | LONG |
MUIA_Textdata_SourceEncoding | V21 | I.. | ULONG |
Method | Version |
---|---|
MUIM_Textdata_Convert | V21 |
MUIA_Textdata_Contents -- V21 [I.G], CONST_STRPTR
, 0x80420c3f
Define the object's text contents. MUI's Text class will convert this string to whatever encoding it requires before it is finally displayed on the screen using the MUIM_Textdata_Convert method.
There are some macros defined for convenience to cover the most common encodings:
- Textdata(): a string encoded with the system's default encoding
- ATextdata(): a ISO-8859-1 encoded string
- LTextdata(): a UCS-2/UTF-16 encoded string
- UTextdata(): a UTF-8 encoded string
MUIA_Textdata_Encoding -- V21 [I.G], ULONG
, 0x8042c587
This attribute specifies the contents' encoding. It must be one of the MIB numbers included in the mui.h header file.
Defaults to the system's default charset.
MUIA_Textdata_SourceBytes -- V21 [I..], LONG
, 0x804242c0
MUIA_Textdata_SourceEncoding -- V21 [I..], ULONG
, 0x80426d1a
MUIM_Textdata_Convert -- V21, 0x80425988
DoMethod(obj, MUIM_Textdata_Convert, ULONG encoding);
This method converts the initially specified content string to the given encoding.
ULONG encoding
destination encoding
A pointer to the converted string or NULL on failure. This string is strictly read-only.
Copyright © 1992-2006 by Stefan Stuntz Copyright © 2006-2021 by Thore Böckelmann, Jens Maus |
MUI for AmigaOS Homepage MUI for AmigaOS Wiki |
Updated: 11-Oct-2021 |