2 /***************************************************************************
4 NList.mcc - New List MUI Custom Class
5 Registered MUI class, Serial Number: 1d51 0x9d510030 to 0x9d5100A0
6 0x9d5100C0 to 0x9d5100FF
8 Copyright (C) 1996-2001 by Gilles Masson
9 Copyright (C) 2001-2014 NList Open Source Team
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 NList classes Support Site: http://www.sf.net/projects/nlist-classes
25 ***************************************************************************/
27 #include <clib/alib_protos.h>
28 #include <proto/muimaster.h>
29 #include <proto/utility.h>
33 #include "NList_img.h"
34 #include "NList_img2.h"
36 struct MUI_CustomClass
*NLI2_Class
= NULL
;
38 static ULONG
mNLI2_Draw(struct IClass
*cl
,Object
*obj
,struct MUIP_Draw
*msg
)
40 struct NLIData
*data
= INST_DATA(cl
,obj
);
42 DoSuperMethodA(cl
,obj
,(Msg
) msg
);
48 static ULONG
mNLI2_New(struct IClass
*cl
,Object
*obj
,struct opSet
*msg
)
52 if (!(obj
= (Object
*)DoSuperMethodA(cl
,obj
,(Msg
) msg
)))
55 data
= INST_DATA(cl
,obj
);
62 static ULONG
mNLI2_Set(struct IClass
*cl
,Object
*obj
,Msg msg
)
64 struct NLIData
*data
= INST_DATA(cl
,obj
);
65 struct TagItem
*tags
,*tag
;
67 for (tags
=((struct opSet
*)msg
)->ops_AttrList
;(tag
=(struct TagItem
*) NextTagItem(&tags
));)
72 tag
->ti_Tag
= TAG_IGNORE
;
74 MUI_Redraw(obj
,MADF_DRAWOBJECT
);
80 tag
->ti_Tag
= TAG_IGNORE
;
84 return (DoSuperMethodA(cl
,obj
,msg
));
87 DISPATCHER(NLI2_Dispatcher
)
89 switch (msg
->MethodID
)
91 case OM_NEW
: return ( mNLI2_New(cl
,obj
,(APTR
)msg
));
92 case OM_SET
: return ( mNLI2_Set(cl
,obj
,(APTR
)msg
));
93 case MUIM_Draw
: return ( mNLI2_Draw(cl
,obj
,(APTR
)msg
));
95 return(DoSuperMethodA(cl
,obj
,msg
));
97 extern DISPATCHERPROTO(NLI_Dispatcher
);
98 struct MUI_CustomClass
*NLI2_Create(void)
100 NLI2_Class
= MUI_CreateCustomClass(NULL
, MUIC_Image
, NULL
, sizeof(struct NLIData
), ENTRY(NLI_Dispatcher
));
101 //NLI2_Class = MUI_CreateCustomClass(NULL, MUIC_Image, NULL, sizeof(struct NLIData), ENTRY(NLI2_Dispatcher));
106 void NLI2_Delete(void)
109 MUI_DeleteCustomClass(NLI2_Class
);