grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / zune / nlist / nlist_mcc / NList_img2.c
blobbdb53c11264c55d21a5d2b7b6487e71e71818483
1 #if 0 /* unused? */
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
23 $Id$
25 ***************************************************************************/
27 #include <clib/alib_protos.h>
28 #include <proto/muimaster.h>
29 #include <proto/utility.h>
31 #include "private.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);
41 if (data->DoDraw)
42 DoSuperMethodA(cl,obj,(Msg) msg);
44 return(0);
48 static ULONG mNLI2_New(struct IClass *cl,Object *obj,struct opSet *msg)
50 struct NLIData *data;
52 if (!(obj = (Object *)DoSuperMethodA(cl,obj,(Msg) msg)))
53 return(0);
55 data = INST_DATA(cl,obj);
56 data->DoDraw = FALSE;
58 return((ULONG) 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));)
69 switch (tag->ti_Tag)
71 case MUIA_Image_Spec:
72 tag->ti_Tag = TAG_IGNORE;
73 data->DoDraw = TRUE;
74 MUI_Redraw(obj,MADF_DRAWOBJECT);
75 data->DoDraw = FALSE;
76 break;
77 case MUIA_FillArea:
78 case MUIA_Font:
79 case MUIA_Background:
80 tag->ti_Tag = TAG_IGNORE;
81 break;
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));
102 return (NLI2_Class);
106 void NLI2_Delete(void)
108 if (NLI2_Class)
109 MUI_DeleteCustomClass(NLI2_Class);
110 NLI2_Class = NULL;
112 #endif /* 0 */