revert 213 commits (to 56092) from the last month. 10 still need work to resolve...
[AROS.git] / workbench / libs / muimaster / textengine.h
blobd27d16b0e05335f23eceac8d22e6a230f9a3995f
1 /*
2 Copyright © 1999, David Le Corfec.
3 Copyright © 2002-2018, The AROS Development Team.
4 All rights reserved.
6 $Id$
7 */
9 #ifndef _MUI_TEXTENGINE_H__
10 #define _MUI_TEXTENGINE_H__
12 /* This is the clone of the MUI text engine, used by the Text class
13 * and all class needing to draw text strings.
17 struct MUI_ImageSpec_intern;
19 typedef struct ZTextChunk {
20 struct MinNode node; /* embedded node */
21 char *str;
22 CONST_STRPTR spec;
23 struct MUI_ImageSpec_intern *image;
24 Object *obj; /* Area subclass, see List_CreateImage */
25 struct MUI_AlphaData *alpha_data;
26 LONG dripen;
27 LONG pen;
28 UBYTE style; /* FSF_UNDERLINED, FSF_BOLD, ... */
29 WORD cwidth;
30 WORD cheight;
31 } ZTextChunk;
33 typedef struct ZTextLine {
34 struct MinNode node; /* embedded node */
35 UBYTE align; /* ZTL_CENTER, ZTL_RIGHT, ZTL_LEFT */
36 struct MinList chunklist;
37 WORD lwidth;
38 WORD lheight;
39 } ZTextLine;
41 struct ZText {
42 WORD width; /* store calculated bounds - read only ! */
43 WORD height;
45 /* private */
46 struct MinList lines;
49 typedef struct ZText ZText;
51 /* zune_text_new argtypes */
52 enum {
53 ZTEXT_ARG_NONE,
54 ZTEXT_ARG_HICHAR, /* following arg is the HiChar */
55 ZTEXT_ARG_HICHARIDX, /* following arg is the HiCharIdx */
58 ZText *zune_text_new (CONST_STRPTR preparse, CONST_STRPTR content,
59 int argtype, TEXT arg);
60 void zune_text_destroy (ZText *text);
61 void zune_text_get_bounds (ZText *text, Object *obj);
62 void zune_text_draw (ZText *text, Object *obj, WORD left, WORD right,
63 WORD top);
65 #endif