grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / zune / nlist / nlist_mcc / NList_grp.c
blobf691e437547fd1ed94f6032dd18c618c35bd0514
1 /***************************************************************************
3 NList.mcc - New List MUI Custom Class
4 Registered MUI class, Serial Number: 1d51 0x9d510030 to 0x9d5100A0
5 0x9d5100C0 to 0x9d5100FF
7 Copyright (C) 1996-2001 by Gilles Masson
8 Copyright (C) 2001-2014 NList Open Source Team
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 NList classes Support Site: http://www.sf.net/projects/nlist-classes
22 $Id$
24 ***************************************************************************/
26 #include <clib/alib_protos.h>
27 #include <proto/muimaster.h>
28 #include <proto/intuition.h>
30 #include "private.h"
32 #include "NList_grp.h"
34 struct MUI_CustomClass *NGR_Class = NULL;
36 static IPTR mNGR_New(struct IClass *cl,Object *obj,struct opSet *msg)
38 struct NGRData *data;
40 if (!(obj = (Object *)DoSuperMethodA(cl,obj,(Msg) msg)))
41 return(0);
43 data = INST_DATA(cl,obj);
44 data->DoDraw = FALSE;
46 return((IPTR) obj);
49 static IPTR mNGR_AskMinMax(struct IClass *cl,Object *obj,struct MUIP_AskMinMax *msg)
51 DoSuperMethodA(cl,obj,(Msg) msg);
53 // do not overwrite the sizes given by our superclass but add our own sizes instead
54 msg->MinMaxInfo->MinWidth += 2;
55 msg->MinMaxInfo->DefWidth += 20;
56 msg->MinMaxInfo->MaxWidth += MUI_MAXMAX;
57 msg->MinMaxInfo->MinHeight += 3;
58 msg->MinMaxInfo->DefHeight += 20+100;
59 msg->MinMaxInfo->MaxHeight += MUI_MAXMAX;
61 return(0);
64 DISPATCHER(NGR_Dispatcher)
66 switch (msg->MethodID)
68 case OM_NEW : return (mNGR_New(cl,obj,(APTR)msg));
69 case MUIM_AskMinMax : return (mNGR_AskMinMax(cl,obj,(APTR)msg));
70 case OM_SET : return (0);
71 case MUIM_Draw : return (0);
72 case MUIM_HandleInput : return (0);
73 case MUIM_NoNotifySet : return (0);
75 return(DoSuperMethodA(cl,obj,msg));
78 struct MUI_CustomClass *NGR_Create(void)
80 NGR_Class = MUI_CreateCustomClass(NULL, (STRPTR)MUIC_Group, NULL, sizeof(struct NGRData), ENTRY(NGR_Dispatcher));
82 return (NGR_Class);
86 void NGR_Delete(void)
88 if (NGR_Class)
89 MUI_DeleteCustomClass(NGR_Class);
90 NGR_Class = NULL;