wiki:Documentation/API/MUI_Textdata

Textdata.mui

Super class

Notify.mui

Background

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.

Attributes

Attribute Version ISG Type
MUIA_Textdata_Contents V21I.GCONST_STRPTR
MUIA_Textdata_Encoding V21I.GULONG
MUIA_Textdata_SourceBytes V21I..LONG
MUIA_Textdata_SourceEncoding V21I..ULONG


Methods

Method Version
MUIM_Textdata_Convert V21


MUIA_Textdata_Contents

NAME

MUIA_Textdata_Contents — V21 [I.G], CONST_STRPTR, 0x80420c3f

FUNCTION

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

SEE ALSO

MUIA_Text_Contents

MUIA_Textdata_Encoding

NAME

MUIA_Textdata_Encoding — V21 [I.G], ULONG, 0x8042c587

FUNCTION

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.

SEE ALSO

MUIA_Textdata_Contents

MUIA_Textdata_SourceBytes

NAME

MUIA_Textdata_SourceBytes — V21 [I..], LONG, 0x804242c0

FUNCTION

SEE ALSO

MUIA_Textdata_Contents

MUIA_Textdata_SourceEncoding

NAME

MUIA_Textdata_SourceEncoding — V21 [I..], ULONG, 0x80426d1a

FUNCTION

SEE ALSO

MUIA_Textdata_Contents

MUIM_Textdata_Convert

NAME

MUIM_Textdata_Convert — V21, 0x80425988

SYNOPSIS

DoMethod(obj, MUIM_Textdata_Convert, ULONG encoding);

FUNCTION

This method converts the initially specified content string to the given encoding.

INPUTS

ULONG encoding
destination encoding

RESULT

A pointer to the converted string or NULL on failure. This string is strictly read-only.

SEE ALSO

MUIA_Textdata_Contents


Copyright © 1992-2006 by Stefan Stuntz
Copyright © 2006-2017 by Thore Böckelmann, Jens Maus

MUI for AmigaOS - MUI-Autodocs

Updated: 13-Jul-2017

Last modified 5 months ago Last modified on Mar 27, 2017, 4:10:08 PM