2 Copyright 2002-2006, The AROS Development Team. All rights reserved.
7 #include <graphics/gfx.h>
8 #include <graphics/view.h>
9 #include <clib/alib_protos.h>
10 #include <libraries/asl.h>
11 #include <libraries/mui.h>
12 #include <mui/Rawimage_mcc.h>
13 #include <proto/exec.h>
14 #include <proto/graphics.h>
15 #include <proto/utility.h>
16 #include <proto/intuition.h>
17 #include <proto/muimaster.h>
20 #include <proto/alib.h>
23 #include "zunestuff.h"
25 extern struct Library
*MUIMasterBase
;
27 struct MUI_FramesPData
29 Object
*frames_config_string
[16];
32 static IPTR
FramesP_New(struct IClass
*cl
, Object
*obj
, struct opSet
*msg
)
34 struct MUI_FramesPData
*data
;
35 struct MUI_FramesPData d
;
37 obj
= (Object
*) DoSuperNewTags
43 Child
, (IPTR
) VSpace(0),
45 GroupFrameT(_(MSG_CUSTOMFRAMES
)),
46 Child
, (IPTR
) Label("#1"),
47 Child
, (IPTR
) (d
.frames_config_string
[0] = MakePopfile(FALSE
, "#?.config")),
48 Child
, (IPTR
) Label("#2"),
49 Child
, (IPTR
) (d
.frames_config_string
[1] = MakePopfile(FALSE
, "#?.config")),
50 Child
, (IPTR
) Label("#3"),
51 Child
, (IPTR
) (d
.frames_config_string
[2] = MakePopfile(FALSE
, "#?.config")),
52 Child
, (IPTR
) Label("#4"),
53 Child
, (IPTR
) (d
.frames_config_string
[3] = MakePopfile(FALSE
, "#?.config")),
54 Child
, (IPTR
) Label("#5"),
55 Child
, (IPTR
) (d
.frames_config_string
[4] = MakePopfile(FALSE
, "#?.config")),
56 Child
, (IPTR
) Label("#6"),
57 Child
, (IPTR
) (d
.frames_config_string
[5] = MakePopfile(FALSE
, "#?.config")),
58 Child
, (IPTR
) Label("#7"),
59 Child
, (IPTR
) (d
.frames_config_string
[6] = MakePopfile(FALSE
, "#?.config")),
60 Child
, (IPTR
) Label("#8"),
61 Child
, (IPTR
) (d
.frames_config_string
[7] = MakePopfile(FALSE
, "#?.config")),
62 Child
, (IPTR
) Label("#9"),
63 Child
, (IPTR
) (d
.frames_config_string
[8] = MakePopfile(FALSE
, "#?.config")),
64 Child
, (IPTR
) Label("#10"),
65 Child
, (IPTR
) (d
.frames_config_string
[9] = MakePopfile(FALSE
, "#?.config")),
66 Child
, (IPTR
) Label("#11"),
67 Child
, (IPTR
) (d
.frames_config_string
[10] = MakePopfile(FALSE
, "#?.config")),
68 Child
, (IPTR
) Label("#12"),
69 Child
, (IPTR
) (d
.frames_config_string
[11] = MakePopfile(FALSE
, "#?.config")),
70 Child
, (IPTR
) Label("#13"),
71 Child
, (IPTR
) (d
.frames_config_string
[12] = MakePopfile(FALSE
, "#?.config")),
72 Child
, (IPTR
) Label("#14"),
73 Child
, (IPTR
) (d
.frames_config_string
[13] = MakePopfile(FALSE
, "#?.config")),
74 Child
, (IPTR
) Label("#15"),
75 Child
, (IPTR
) (d
.frames_config_string
[14] = MakePopfile(FALSE
, "#?.config")),
76 Child
, (IPTR
) Label("#16"),
77 Child
, (IPTR
) (d
.frames_config_string
[15] = MakePopfile(FALSE
, "#?.config")),
79 Child
, (IPTR
) VSpace(0),
84 TAG_MORE
, (IPTR
) msg
->ops_AttrList
87 if (!obj
) return FALSE
;
89 data
= INST_DATA(cl
, obj
);
96 static IPTR
FramesP_ConfigToGadgets(struct IClass
*cl
, Object
*obj
,
97 struct MUIP_Settingsgroup_ConfigToGadgets
*msg
)
99 struct MUI_FramesPData
*data
= INST_DATA(cl
, obj
);
101 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_1
, data
->frames_config_string
[0]);
102 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_2
, data
->frames_config_string
[1]);
103 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_3
, data
->frames_config_string
[2]);
104 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_4
, data
->frames_config_string
[3]);
105 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_5
, data
->frames_config_string
[4]);
106 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_6
, data
->frames_config_string
[5]);
107 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_7
, data
->frames_config_string
[6]);
108 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_8
, data
->frames_config_string
[7]);
109 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_9
, data
->frames_config_string
[8]);
110 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_10
, data
->frames_config_string
[9]);
111 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_11
, data
->frames_config_string
[10]);
112 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_12
, data
->frames_config_string
[11]);
113 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_13
, data
->frames_config_string
[12]);
114 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_14
, data
->frames_config_string
[13]);
115 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_15
, data
->frames_config_string
[14]);
116 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_16
, data
->frames_config_string
[15]);
122 static IPTR
FramesP_GadgetsToConfig(struct IClass
*cl
, Object
*obj
,
123 struct MUIP_Settingsgroup_GadgetsToConfig
*msg
)
125 struct MUI_FramesPData
*data
= INST_DATA(cl
, obj
);
127 StringToConfig (data
->frames_config_string
[0], msg
->configdata
, MUICFG_CustomFrame_1
);
128 StringToConfig (data
->frames_config_string
[1], msg
->configdata
, MUICFG_CustomFrame_2
);
129 StringToConfig (data
->frames_config_string
[2], msg
->configdata
, MUICFG_CustomFrame_3
);
130 StringToConfig (data
->frames_config_string
[3], msg
->configdata
, MUICFG_CustomFrame_4
);
131 StringToConfig (data
->frames_config_string
[4], msg
->configdata
, MUICFG_CustomFrame_5
);
132 StringToConfig (data
->frames_config_string
[5], msg
->configdata
, MUICFG_CustomFrame_6
);
133 StringToConfig (data
->frames_config_string
[6], msg
->configdata
, MUICFG_CustomFrame_7
);
134 StringToConfig (data
->frames_config_string
[7], msg
->configdata
, MUICFG_CustomFrame_8
);
135 StringToConfig (data
->frames_config_string
[8], msg
->configdata
, MUICFG_CustomFrame_9
);
136 StringToConfig (data
->frames_config_string
[9], msg
->configdata
, MUICFG_CustomFrame_10
);
137 StringToConfig (data
->frames_config_string
[10], msg
->configdata
, MUICFG_CustomFrame_11
);
138 StringToConfig (data
->frames_config_string
[11], msg
->configdata
, MUICFG_CustomFrame_12
);
139 StringToConfig (data
->frames_config_string
[12], msg
->configdata
, MUICFG_CustomFrame_13
);
140 StringToConfig (data
->frames_config_string
[13], msg
->configdata
, MUICFG_CustomFrame_14
);
141 StringToConfig (data
->frames_config_string
[14], msg
->configdata
, MUICFG_CustomFrame_15
);
142 StringToConfig (data
->frames_config_string
[15], msg
->configdata
, MUICFG_CustomFrame_16
);
148 BOOPSI_DISPATCHER(IPTR
, FramesP_Dispatcher
, cl
, obj
, msg
)
150 switch (msg
->MethodID
)
152 case OM_NEW
: return FramesP_New(cl
, obj
, (struct opSet
*)msg
);
153 case MUIM_Settingsgroup_ConfigToGadgets
: return FramesP_ConfigToGadgets(cl
,obj
,(APTR
)msg
);break;
154 case MUIM_Settingsgroup_GadgetsToConfig
: return FramesP_GadgetsToConfig(cl
,obj
,(APTR
)msg
);break;
157 return DoSuperMethodA(cl
, obj
, msg
);
159 BOOPSI_DISPATCHER_END
164 const struct __MUIBuiltinClass _MUIP_Frames_desc
= {
167 sizeof(struct MUI_FramesPData
),
168 (void*)FramesP_Dispatcher
172 static const UBYTE icon32
[] =
174 0x00, 0x00, 0x00, 0x18, // width
175 0x00, 0x00, 0x00, 0x13, // height
177 0x00, 0x00, 0x00, 0x9d, // number of bytes
179 0x42, 0x5a, 0x68, 0x39, 0x31, 0x41, 0x59, 0x26, 0x53, 0x59, 0x22, 0x90,
180 0x25, 0x2a, 0x00, 0x02, 0xd1, 0x9d, 0xf2, 0x82, 0x00, 0x00, 0x04, 0x00,
181 0x48, 0x00, 0x20, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x01, 0x00, 0x42,
182 0x40, 0x00, 0x00, 0xb0, 0x00, 0xdb, 0x5a, 0x84, 0x29, 0x14, 0x64, 0xda,
183 0x98, 0x4d, 0x52, 0x80, 0x00, 0x29, 0x29, 0x4d, 0x02, 0x3d, 0x3b, 0xa4,
184 0xe1, 0x0d, 0x07, 0x2b, 0x66, 0xa7, 0x82, 0x96, 0x3a, 0x18, 0xaf, 0x2a,
185 0x32, 0x2b, 0x8a, 0x2b, 0x07, 0x30, 0xc1, 0x75, 0x0b, 0x09, 0xdc, 0x4f,
186 0x55, 0x0e, 0xea, 0x87, 0x81, 0x47, 0x7d, 0xdb, 0x56, 0xd1, 0xf3, 0x72,
187 0x37, 0x39, 0xbf, 0xe0, 0xb0, 0x83, 0x5c, 0x75, 0x9a, 0xe0, 0x1e, 0x10,
188 0x78, 0x94, 0x16, 0xed, 0xa8, 0x62, 0xc0, 0x51, 0x6f, 0x87, 0x51, 0xb3,
189 0xe5, 0xef, 0xa4, 0xe0, 0xde, 0xe3, 0x33, 0x4d, 0xcc, 0xba, 0xe8, 0x8f,
190 0x23, 0x0c, 0x93, 0x21, 0x09, 0x85, 0xee, 0x7a, 0xeb, 0x04, 0x4b, 0xf0,
191 0x87, 0x68, 0x7a, 0x2e, 0xe4, 0x8a, 0x70, 0xa1, 0x20, 0x45, 0x20, 0x4a,
196 Object
*framesclass_get_icon(void)
198 return RawimageObject
,
199 MUIA_Rawimage_Data
, icon32
,