2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
6 #define MUIMASTER_YES_INLINE_STDARG
9 #include <aros/debug.h>
11 #include <exec/memory.h>
12 #include <clib/alib_protos.h>
13 #include <proto/exec.h>
14 #include <proto/dos.h>
15 #include <proto/intuition.h>
16 #include <proto/utility.h>
17 #include <proto/muimaster.h>
22 #include "muimaster_intern.h"
24 #include "support_classes.h"
25 #include "floattext_private.h"
27 extern struct Library
*MUIMasterBase
;
29 IPTR
Floattext__OM_NEW(struct IClass
*cl
, Object
*obj
, struct opSet
*msg
)
31 obj
= (Object
*)DoSuperMethodA(cl
, obj
, (Msg
)msg
);
35 struct Floattext_DATA
*data
= INST_DATA(cl
, obj
);
38 if ((tag
= FindTagItem(MUIA_Floattext_Text
, msg
->ops_AttrList
)))
39 data
->text
= (char *)tag
->ti_Data
;
44 DoMethod(obj
, MUIM_List_InsertSingle
, data
->text
, MUIV_List_Insert_Top
);
50 IPTR
Floattext__OM_DISPOSE(struct IClass
*cl
, Object
*obj
, struct opSet
*msg
)
52 return DoSuperMethodA(cl
, obj
, (Msg
)msg
);
55 IPTR
Floattext__OM_GET(struct IClass
*cl
, Object
*obj
, struct opSet
*msg
)
57 return DoSuperMethodA(cl
, obj
, (Msg
)msg
);
60 IPTR
Floattext__OM_SET(struct IClass
*cl
, Object
*obj
, struct opSet
*msg
)
62 struct Floattext_DATA
*data
= INST_DATA(cl
, obj
);
64 const struct TagItem
*tags
;
65 const struct TagItem
*tag
;
67 for (tags
= msg
->ops_AttrList
; (tag
= NextTagItem(&tags
)); )
71 case MUIA_Floattext_Text
:
72 DoMethod(obj
, MUIM_List_Clear
, NULL
);
73 //if (data->text) free
74 data
->text
= (char *)tag
->ti_Data
;
76 DoMethod(obj
, MUIM_List_InsertSingle
, data
->text
, MUIV_List_Insert_Top
);
81 return DoSuperMethodA(cl
, obj
, (Msg
)msg
);
84 #if ZUNE_BUILTIN_FLOATTEXT
85 BOOPSI_DISPATCHER(IPTR
, Floattext_Dispatcher
, cl
, obj
, msg
)
87 struct opSet
* omsg
= (struct opSet
*)msg
;
89 switch (msg
->MethodID
)
91 case OM_NEW
: return Floattext__OM_NEW(cl
, obj
, omsg
);
92 case OM_DISPOSE
: return Floattext__OM_DISPOSE(cl
, obj
, omsg
);
93 case OM_GET
: return Floattext__OM_GET(cl
, obj
, omsg
);
94 case OM_SET
: return Floattext__OM_SET(cl
, obj
, omsg
);
96 default: return DoSuperMethodA(cl
, obj
, msg
);
101 const struct __MUIBuiltinClass _MUI_Floattext_desc
=
105 sizeof(struct Floattext_DATA
),
106 (void*)Floattext_Dispatcher
108 #endif /* ZUNE_BUILTIN_FLOATTEXT */