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 <proto/exec.h>
13 #include <proto/graphics.h>
14 #include <proto/utility.h>
15 #include <proto/intuition.h>
16 #include <proto/muimaster.h>
19 #include <proto/alib.h>
22 #include "zunestuff.h"
24 extern struct Library
*MUIMasterBase
;
26 struct MUI_FramesPData
28 Object
*frames_config_string
[16];
31 static IPTR
FramesP_New(struct IClass
*cl
, Object
*obj
, struct opSet
*msg
)
33 struct MUI_FramesPData
*data
;
34 struct MUI_FramesPData d
;
36 obj
= (Object
*) DoSuperNewTags
42 Child
, (IPTR
) VSpace(0),
44 GroupFrameT(_(MSG_CUSTOMFRAMES
)),
45 Child
, (IPTR
) Label("#1"),
46 Child
, (IPTR
) (d
.frames_config_string
[0] = MakePopfile(FALSE
, "#?.config")),
47 Child
, (IPTR
) Label("#2"),
48 Child
, (IPTR
) (d
.frames_config_string
[1] = MakePopfile(FALSE
, "#?.config")),
49 Child
, (IPTR
) Label("#3"),
50 Child
, (IPTR
) (d
.frames_config_string
[2] = MakePopfile(FALSE
, "#?.config")),
51 Child
, (IPTR
) Label("#4"),
52 Child
, (IPTR
) (d
.frames_config_string
[3] = MakePopfile(FALSE
, "#?.config")),
53 Child
, (IPTR
) Label("#5"),
54 Child
, (IPTR
) (d
.frames_config_string
[4] = MakePopfile(FALSE
, "#?.config")),
55 Child
, (IPTR
) Label("#6"),
56 Child
, (IPTR
) (d
.frames_config_string
[5] = MakePopfile(FALSE
, "#?.config")),
57 Child
, (IPTR
) Label("#7"),
58 Child
, (IPTR
) (d
.frames_config_string
[6] = MakePopfile(FALSE
, "#?.config")),
59 Child
, (IPTR
) Label("#8"),
60 Child
, (IPTR
) (d
.frames_config_string
[7] = MakePopfile(FALSE
, "#?.config")),
61 Child
, (IPTR
) Label("#9"),
62 Child
, (IPTR
) (d
.frames_config_string
[8] = MakePopfile(FALSE
, "#?.config")),
63 Child
, (IPTR
) Label("#10"),
64 Child
, (IPTR
) (d
.frames_config_string
[9] = MakePopfile(FALSE
, "#?.config")),
65 Child
, (IPTR
) Label("#11"),
66 Child
, (IPTR
) (d
.frames_config_string
[10] = MakePopfile(FALSE
, "#?.config")),
67 Child
, (IPTR
) Label("#12"),
68 Child
, (IPTR
) (d
.frames_config_string
[11] = MakePopfile(FALSE
, "#?.config")),
69 Child
, (IPTR
) Label("#13"),
70 Child
, (IPTR
) (d
.frames_config_string
[12] = MakePopfile(FALSE
, "#?.config")),
71 Child
, (IPTR
) Label("#14"),
72 Child
, (IPTR
) (d
.frames_config_string
[13] = MakePopfile(FALSE
, "#?.config")),
73 Child
, (IPTR
) Label("#15"),
74 Child
, (IPTR
) (d
.frames_config_string
[14] = MakePopfile(FALSE
, "#?.config")),
75 Child
, (IPTR
) Label("#16"),
76 Child
, (IPTR
) (d
.frames_config_string
[15] = MakePopfile(FALSE
, "#?.config")),
78 Child
, (IPTR
) VSpace(0),
83 TAG_MORE
, (IPTR
) msg
->ops_AttrList
86 if (!obj
) return FALSE
;
88 data
= INST_DATA(cl
, obj
);
95 static IPTR
FramesP_ConfigToGadgets(struct IClass
*cl
, Object
*obj
,
96 struct MUIP_Settingsgroup_ConfigToGadgets
*msg
)
98 struct MUI_FramesPData
*data
= INST_DATA(cl
, obj
);
100 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_1
, data
->frames_config_string
[0]);
101 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_2
, data
->frames_config_string
[1]);
102 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_3
, data
->frames_config_string
[2]);
103 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_4
, data
->frames_config_string
[3]);
104 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_5
, data
->frames_config_string
[4]);
105 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_6
, data
->frames_config_string
[5]);
106 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_7
, data
->frames_config_string
[6]);
107 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_8
, data
->frames_config_string
[7]);
108 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_9
, data
->frames_config_string
[8]);
109 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_10
, data
->frames_config_string
[9]);
110 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_11
, data
->frames_config_string
[10]);
111 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_12
, data
->frames_config_string
[11]);
112 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_13
, data
->frames_config_string
[12]);
113 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_14
, data
->frames_config_string
[13]);
114 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_15
, data
->frames_config_string
[14]);
115 ConfigToString (msg
->configdata
, MUICFG_CustomFrame_16
, data
->frames_config_string
[15]);
121 static IPTR
FramesP_GadgetsToConfig(struct IClass
*cl
, Object
*obj
,
122 struct MUIP_Settingsgroup_GadgetsToConfig
*msg
)
124 struct MUI_FramesPData
*data
= INST_DATA(cl
, obj
);
126 StringToConfig (data
->frames_config_string
[0], msg
->configdata
, MUICFG_CustomFrame_1
);
127 StringToConfig (data
->frames_config_string
[1], msg
->configdata
, MUICFG_CustomFrame_2
);
128 StringToConfig (data
->frames_config_string
[2], msg
->configdata
, MUICFG_CustomFrame_3
);
129 StringToConfig (data
->frames_config_string
[3], msg
->configdata
, MUICFG_CustomFrame_4
);
130 StringToConfig (data
->frames_config_string
[4], msg
->configdata
, MUICFG_CustomFrame_5
);
131 StringToConfig (data
->frames_config_string
[5], msg
->configdata
, MUICFG_CustomFrame_6
);
132 StringToConfig (data
->frames_config_string
[6], msg
->configdata
, MUICFG_CustomFrame_7
);
133 StringToConfig (data
->frames_config_string
[7], msg
->configdata
, MUICFG_CustomFrame_8
);
134 StringToConfig (data
->frames_config_string
[8], msg
->configdata
, MUICFG_CustomFrame_9
);
135 StringToConfig (data
->frames_config_string
[9], msg
->configdata
, MUICFG_CustomFrame_10
);
136 StringToConfig (data
->frames_config_string
[10], msg
->configdata
, MUICFG_CustomFrame_11
);
137 StringToConfig (data
->frames_config_string
[11], msg
->configdata
, MUICFG_CustomFrame_12
);
138 StringToConfig (data
->frames_config_string
[12], msg
->configdata
, MUICFG_CustomFrame_13
);
139 StringToConfig (data
->frames_config_string
[13], msg
->configdata
, MUICFG_CustomFrame_14
);
140 StringToConfig (data
->frames_config_string
[14], msg
->configdata
, MUICFG_CustomFrame_15
);
141 StringToConfig (data
->frames_config_string
[15], msg
->configdata
, MUICFG_CustomFrame_16
);
147 BOOPSI_DISPATCHER(IPTR
, FramesP_Dispatcher
, cl
, obj
, msg
)
149 switch (msg
->MethodID
)
151 case OM_NEW
: return FramesP_New(cl
, obj
, (struct opSet
*)msg
);
152 case MUIM_Settingsgroup_ConfigToGadgets
: return FramesP_ConfigToGadgets(cl
,obj
,(APTR
)msg
);break;
153 case MUIM_Settingsgroup_GadgetsToConfig
: return FramesP_GadgetsToConfig(cl
,obj
,(APTR
)msg
);break;
156 return DoSuperMethodA(cl
, obj
, msg
);
158 BOOPSI_DISPATCHER_END
163 const struct __MUIBuiltinClass _MUIP_Frames_desc
= {
166 sizeof(struct MUI_FramesPData
),
167 (void*)FramesP_Dispatcher