2 #include <proto/intuition.h>
3 #include <proto/muimaster.h>
4 #include <proto/utility.h>
5 #include <proto/icon.h>
7 #include <libraries/mui.h>
8 #include <libraries/gadtools.h>
10 #include "muimiamipanel_intern.h"
11 #include "muimiamipanel_locale.h"
12 #include "muimiamipanel_misc.h"
13 #include "muimiamipanel_iffprefs.h"
14 #include "muimiamipanel_commands.h"
16 #include <mui/BWin_mcc.h>
17 #include <mui/TheBar_mcc.h>
19 #include "Classes/muimiamipanel_classes.h"
21 /***********************************************************************/
23 struct MiamiPanelAppClass_DATA
31 struct DiskObject
*icon
;
33 struct MPS_Prefs prefs
;
36 /***********************************************************************/
38 static ULONG AppMenuIDs
[] =
64 static struct NewMenu appMenu
[] =
66 MTITLE(MSG_Menu_Project
),
67 MITEM(MSG_Menu_About
),
68 MITEM(MSG_Menu_AboutMUI
),
74 MTITLE(MSG_Menu_Miami
),
75 MITEM(MSG_Menu_Miami_Show
),
76 MITEM(MSG_Menu_Miami_Hide
),
78 MITEM(MSG_Menu_Miami_Quit
),
80 MTITLE(MSG_Menu_Prefs
),
84 MITEM(MSG_Menu_Restore
),
85 MITEM(MSG_Menu_LastSaved
),
92 static UBYTE
*usedClasses
[] =
102 static struct MiamiPanelBase_intern
*MiamiPanelBaseIntern
;
104 IPTR MUIPC_App__OM_NEW
106 Class
*CLASS
, Object
*self
, struct opSet
*message
109 struct MiamiPanelAppClass_DATA temp
;
110 struct TagItem
*attrs
= message
->ops_AttrList
;
113 memset(&temp
,0,sizeof(temp
));
115 if (!loadIFFPrefs(MPV_LoadPrefs_Env
|MPV_LoadPrefs_FallBack
, &temp
.prefs
, MiamiPanelBaseIntern
))
117 temp
.prefs
.layout
= DEF_Layout
;
118 temp
.prefs
.flags
= DEF_Flags
;
119 temp
.prefs
.barLayout
= DEF_TBLayout
;
120 temp
.prefs
.viewMode
= DEF_TBVMode
;
121 temp
.prefs
.labelPos
= DEF_TBLPos
;
122 temp
.prefs
.btflags
= DEF_TBFlags
;
125 if (self
= (Object
*)DoSuperNewTags
129 MUIA_Application_Title
, DEF_Base
,
130 MUIA_Application_Author
, DEF_Author
,
131 /* MUIA_Application_Version, lib_vers, */
132 MUIA_Application_Copyright
, __(MSG_Copyright
),
133 MUIA_Application_Description
, __(MSG_Description
),
134 MUIA_Application_Base
, DEF_Base
,
135 MUIA_Application_HelpFile
, DEF_Guide
,
136 MUIA_Application_UseCommodities
, FALSE
,
137 MUIA_Application_SingleTask
, TRUE
,
138 MUIA_Application_Menustrip
, strip
= MUI_MakeObject(MUIO_MenustripNM
, (ULONG
)appMenu
, MUIO_MenustripNM_CommandKeyCheck
),
139 MUIA_Application_UsedClasses
, usedClasses
,
141 SubWindow
, temp
.win
= (temp
.prefs
.flags
& MPV_Flags_BWin
) ?
143 MUIA_ObjectID
, MAKE_ID('M','A','I','N'),
144 MUIA_Window_ID
, MAKE_ID('M','A','I','N'),
145 MUIA_Window_Title
, __(MSG_Window_Title
),
146 MUIA_HelpNode
, "GUI",
147 MUIA_BWin_Save
, MUIV_BWin_Save_All
,
148 MUIA_BWin_Borders
, temp
.prefs
.flags
& MPV_Flags_BWinBorders
,
149 WindowContents
, temp
.root
= VGroup
,
151 Child
, (IPTR
)NewObject(MiamiPanelBaseIntern
->mpb_mgroupClass
->mcc_Class
, NULL
,
152 MPA_Prefs
, &temp
.prefs
,
153 MPA_Show
, GetTagData(MPA_Show
, 0, message
->ops_AttrList
),
158 MUIA_ObjectID
, MAKE_ID('M','A','I','N'),
159 MUIA_Window_ID
, MAKE_ID('M','A','I','N'),
160 MUIA_HelpNode
, "GUI",
161 MUIA_Window_Title
, __(MSG_Window_Title
),
162 MUIA_Window_UseRightBorderScroller
, TRUE
,
163 MUIA_Window_SizeRight
, TRUE
,
164 //MUIA_Window_Backdrop, TRUE,
166 WindowContents
, temp
.root
= VGroup
,
168 Child
, (IPTR
)NewObject(MiamiPanelBaseIntern
->mpb_mgroupClass
->mcc_Class
, NULL
,
169 MPA_Prefs
, &temp
.prefs
,
170 MPA_Show
, GetTagData(MPA_Show
, 0, message
->ops_AttrList
),
176 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
179 CopyMem(&temp
,data
,sizeof(struct MiamiPanelAppClass_DATA
));
181 NEWLIST(&data
->prefs
.iflist
);
182 moveMinList(&data
->prefs
.iflist
, &temp
.prefs
.iflist
, MiamiPanelBaseIntern
);
184 if (data
->icon
= GetDiskObject(DEF_Icon
))
185 SetSuperAttrs(CLASS
, self
, MUIA_Application_DiskObject
,data
->icon
,TAG_DONE
);
186 /* Load MUI preferences */
187 DoSuperMethod(CLASS
,self
,MUIM_Application_Load
,(ULONG
)MUIV_Application_Load_ENV
);
190 DoMethod(temp
.win
,MUIM_Notify
,MUIA_Window_CloseRequest
,MUIV_EveryTime
,(ULONG
)self
,1,MPM_Quit
);
193 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_About
),MUIM_Notify
,
194 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,1,MPM_About
);
196 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_AboutMUI
),MUIM_Notify
,
197 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MUIM_Application_AboutMUI
,(ULONG
)temp
.win
);
199 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Hide
),MUIM_Notify
,
200 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,3,MUIM_Set
,MUIA_Application_Iconified
,TRUE
);
202 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Quit
),MUIM_Notify
,
203 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,1,MPM_Quit
);
205 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Edit
),MUIM_Notify
,
206 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,1,MPM_Prefs
);
208 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_MUI
),MUIM_Notify
,
209 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MUIM_Application_OpenConfigWindow
,0);
211 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Save
),MUIM_Notify
,
212 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Save
,TRUE
);
214 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Use
),MUIM_Notify
,
215 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Save
,FALSE
);
217 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Restore
),MUIM_Notify
,
218 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Load
,FALSE
);
220 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_LastSaved
),MUIM_Notify
,
221 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Load
,TRUE
);
223 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Miami_Show
),MUIM_Notify
,
224 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Miami
,MPV_Miami_Show
);
226 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Miami_Hide
),MUIM_Notify
,
227 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Miami
,MPV_Miami_Hide
);
229 DoMethod((Object
*)DoMethod(strip
,MUIM_FindUData
,MSG_Menu_Miami_Quit
),MUIM_Notify
,
230 MUIA_Menuitem_Trigger
,MUIV_EveryTime
,(ULONG
)self
,2,MPM_Miami
,MPV_Miami_Quit
);
232 DoSuperMethod(CLASS
,self
,MUIM_Notify
,MUIA_Application_MenuHelp
,MUIV_EveryTime
,MUIV_Notify_Self
,
233 5,MUIM_Application_ShowHelp
,(ULONG
)temp
.win
,(ULONG
)DEF_Guide
,(ULONG
)"Menus",0);
235 /* Set root preferences */
236 set(data
->root
,MPA_Prefs
,&temp
.prefs
);
238 /* Try to open win */
239 if (!openWindow(self
, temp
.win
, MiamiPanelBaseIntern
))
241 CoerceMethod(CLASS
, self
, OM_DISPOSE
);
249 /***********************************************************************/
251 ULONG MUIPC_App__OM_DISPOSE
253 Class
*CLASS
, Object
*self
, Msg message
256 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
258 freeIFList(&data
->prefs
, MiamiPanelBaseIntern
);
259 if (data
->icon
) FreeDiskObject(data
->icon
);
261 return DoSuperMethodA(CLASS
,self
,message
);
264 /***********************************************************************/
266 static ULONG MUIPC_App__OM_GET
268 Class
*CLASS
, Object
*self
, struct opGet
*message
271 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
273 switch (message
->opg_AttrID
)
275 case MPA_Prefs
: *message
->opg_Storage
= (ULONG
)&data
->prefs
; return TRUE
;
276 default: return DoSuperMethodA(CLASS
,self
,(Msg
)message
);
280 /***********************************************************************/
282 static ULONG MUIPC_App__OM_SET
284 Class
*CLASS
, Object
*self
, struct opSet
*message
287 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
288 struct MPS_Prefs
*prefs
= NULL
;
289 struct TagItem
*tag
, *ticonify
= NULL
; // gcc
290 struct TagItem
*tstate
;
291 ULONG close
= FALSE
, oneWay
= FALSE
, noIfList
= FALSE
;
293 for (tstate
= message
->ops_AttrList
; tag
= NextTagItem(&tstate
); )
295 ULONG tidata
= tag
->ti_Data
;
308 prefs
= PREFS(tidata
);
311 case MUIA_Application_Iconified
:
317 set(data
->root
,MPA_Bar
,tidata
);
327 ULONG bwin
, bwinBorders
;
329 bwin
= prefs
->flags
& MPV_Flags_BWin
;
330 bwinBorders
= prefs
->flags
& MPV_Flags_BWinBorders
;
332 if (!BOOLSAME(bwin
,data
->prefs
.flags
& MPV_Flags_BWin
) || !BOOLSAME(bwinBorders
,data
->prefs
.flags
& MPV_Flags_BWinBorders
))
334 set(data
->win
,MUIA_Window_Open
,FALSE
);
335 DoSuperMethod(CLASS
,self
,MUIM_Application_PushMethod
,(ULONG
)self
,1,MPM_Rebuild
);
338 freeIFList(&data
->prefs
, MiamiPanelBaseIntern
);
339 CopyMem(prefs
,&data
->prefs
,sizeof(data
->prefs
));
340 NEWLIST(&data
->prefs
.iflist
);
341 if (noIfList
) DoMethod(data
->root
,MPM_MGroup_GrabIFList
);
342 else moveMinList(&data
->prefs
.iflist
,&prefs
->iflist
, MiamiPanelBaseIntern
);
344 for (get(self
,MUIA_Application_WindowList
,&l
), mstate
= (Object
*)l
->lh_Head
; win
= NextObject(&mstate
); )
345 if (!oneWay
|| (win
!=data
->wprefs
)) set(win
,MPA_Prefs
,&data
->prefs
);
347 set(data
->root
,MPA_Prefs
,&data
->prefs
);
350 if (close
&& !(data
->prefs
.flags
& MPV_Flags_Iconify
))
352 ticonify
->ti_Tag
= TAG_IGNORE
;
353 DoSuperMethod(CLASS
,self
,MUIM_Application_PushMethod
,(ULONG
)self
,1,MPM_Quit
);
356 return DoSuperMethodA(CLASS
,self
,(Msg
)message
);
359 /***********************************************************************/
361 static ULONG MUIPC_App__MUIM_Application_AboutMUI
363 Class
*CLASS
, Object
*self
, Msg message
366 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
368 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, TRUE
, TAG_DONE
);
372 if (data
->aboutMUI
= AboutmuiObject
,
373 MUIA_Aboutmui_Application
, self
,
374 MUIA_Window_RefWindow
, data
->win
,
375 MUIA_HelpNode
, "MUI",
377 DoMethod(data
->aboutMUI
,MUIM_Notify
,MUIA_Window_CloseRequest
,TRUE
,(ULONG
)self
,5,
378 MUIM_Application_PushMethod
,(ULONG
)self
,2,MPM_DisposeWin
,(ULONG
)data
->aboutMUI
);
381 openWindow(self
, data
->aboutMUI
, MiamiPanelBaseIntern
);
383 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, FALSE
, TAG_DONE
);
388 /***********************************************************************/
390 static ULONG MUIPC_App__MUIM_Application_OpenConfigWindow
392 Class
*CLASS
, Object
*self
, Msg message
397 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, TRUE
, TAG_DONE
);
398 res
= DoSuperMethodA(CLASS
,self
,message
);
399 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, FALSE
, TAG_DONE
);
404 /***********************************************************************/
406 static ULONG MUIPC_App__MPM_Rebuild
408 Class
*CLASS
, Object
*self
, Msg message
411 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
412 Object
*owin
= data
->win
, *nwin
, *sp
= NULL
; // gcc
413 ULONG bwin
= data
->prefs
.flags
& MPV_Flags_BWin
;
416 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, TRUE
, TAG_DONE
);
418 set(owin
,MUIA_Window_Open
,FALSE
);
419 set(owin
,WindowContents
,NULL
);
423 MUIA_ObjectID
, MAKE_ID('M','A','I','N'),
424 MUIA_Window_ID
, MAKE_ID('M','A','I','N'),
425 MUIA_Window_Title
, __(MSG_Window_Title
),
426 MUIA_HelpNode
, "GUI",
427 MUIA_BWin_Save
, MUIV_BWin_Save_All
,
428 MUIA_BWin_Borders
, data
->prefs
.flags
& MPV_Flags_BWinBorders
,
432 MUIA_ObjectID
, MAKE_ID('M','A','I','N'),
433 MUIA_Window_ID
, MAKE_ID('M','A','I','N'),
434 MUIA_HelpNode
, "GUI",
435 MUIA_Window_Title
, __(MSG_Window_Title
),
436 MUIA_Window_UseRightBorderScroller
, TRUE
,
437 MUIA_Window_SizeRight
, TRUE
,
438 WindowContents
, sp
= HSpace(0),
443 DoSuperMethod(CLASS
,self
,OM_REMMEMBER
,(ULONG
)owin
);
444 MUI_DisposeObject(owin
);
445 DoSuperMethod(CLASS
,self
,OM_ADDMEMBER
,(ULONG
)(data
->win
= nwin
));
446 DoMethod(nwin
,MUIM_Notify
,MUIA_Window_CloseRequest
,MUIV_EveryTime
,(ULONG
)self
,1,MPM_Quit
);
450 set(nwin
,WindowContents
,NULL
);
451 MUI_DisposeObject(sp
);
456 if (bwin
) data
->prefs
.flags
&= ~MPV_Flags_BWin
;
457 else data
->prefs
.flags
|= MPV_Flags_BWin
;
458 if (data
->wprefs
) set(data
->wprefs
,MPA_Prefs
,&data
->prefs
);
463 set(data
->win
,WindowContents
,data
->root
);
465 if (!openWindow(self
, data
->win
, MiamiPanelBaseIntern
)) DoSuperMethod(CLASS
,self
,MUIM_Application_PushMethod
,(ULONG
)self
,1,MPM_Quit
);
466 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, FALSE
, TAG_DONE
);
471 /***********************************************************************/
473 static ULONG MUIPC_App__MPM_Quit
475 Class
*CLASS
, Object
*self
, Msg message
478 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
480 set(data
->win
,MUIA_Window_Open
,FALSE
);
481 if (data
->about
) set(data
->about
,MUIA_Window_Open
,FALSE
);
482 if (data
->wprefs
) set(data
->wprefs
,MUIA_Window_Open
,FALSE
);
484 MiamiPanelFun(MiamiPanelBaseIntern
, MIAMIPANELV_CallBack_Code_ClosePanel
);
489 /***********************************************************************/
492 MUIPC_App__MPM_DisposeWin(struct IClass
*CLASS
,Object
*self
,struct MPP_DisposeWin
*message
)
494 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
495 Object
*win
= message
->win
;
497 set(win
,MUIA_Window_Open
,FALSE
);
498 DoSuperMethod(CLASS
,self
,OM_REMMEMBER
,(ULONG
)win
);
499 MUI_DisposeObject(win
);
501 if (win
==data
->about
) data
->about
= NULL
;
502 else if (win
==data
->wprefs
) data
->wprefs
= NULL
;
503 else if (win
==data
->aboutMUI
) data
->aboutMUI
= NULL
;
508 /***********************************************************************/
510 static ULONG MUIPC_App__MPM_About
512 Class
*CLASS
, Object
*self
, Msg message
515 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
517 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, TRUE
, TAG_DONE
);
521 ObtainSemaphore(&MiamiPanelBaseIntern
->mpb_libSem
);
523 if (MiamiPanelBaseIntern
->mpb_aboutClass
|| MUIPC_About_ClassInit(MiamiPanelBaseIntern
))
525 if (data
->about
= NewObject(MiamiPanelBaseIntern
->mpb_aboutClass
->mcc_Class
,
527 MPA_Application
, self
,
528 MUIA_Window_RefWindow
, data
->win
,
531 DoSuperMethod(CLASS
,self
,OM_ADDMEMBER
,(ULONG
)data
->about
);
533 DoMethod(data
->about
,MUIM_Notify
,MUIA_Window_CloseRequest
,TRUE
,(ULONG
)self
,5,
534 MUIM_Application_PushMethod
,(ULONG
)self
,2,MPM_DisposeWin
,(ULONG
)data
->about
);
538 ReleaseSemaphore(&MiamiPanelBaseIntern
->mpb_libSem
);
541 openWindow(self
, data
->about
, MiamiPanelBaseIntern
);
543 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, FALSE
, TAG_DONE
);
548 /***********************************************************************/
550 static ULONG MUIPC_App__MPM_Prefs
552 Class
*CLASS
, Object
*self
, Msg message
555 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
557 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, TRUE
, TAG_DONE
);
561 ObtainSemaphore(&MiamiPanelBaseIntern
->mpb_libSem
);
563 if (MiamiPanelBaseIntern
->mpb_prefsClass
|| MUIPC_Prefs_ClassInit(MiamiPanelBaseIntern
))
565 if (data
->wprefs
= NewObject(MiamiPanelBaseIntern
->mpb_prefsClass
->mcc_Class
,
567 MPA_Prefs
, &data
->prefs
,
569 DoSuperMethod(CLASS
,self
,OM_ADDMEMBER
,(ULONG
)data
->wprefs
);
572 ReleaseSemaphore(&MiamiPanelBaseIntern
->mpb_libSem
);
575 openWindow(self
, data
->wprefs
, MiamiPanelBaseIntern
);
577 SetSuperAttrs(CLASS
, self
, MUIA_Application_Sleep
, FALSE
, TAG_DONE
);
582 /***********************************************************************/
585 MUIPC_App__MPM_Save(struct IClass
*CLASS
,Object
*self
,struct MPP_Save
*message
)
587 struct MiamiPanelAppClass_DATA
*data
= INST_DATA(CLASS
,self
);
589 DoMethod(data
->root
,MPM_MGroup_GrabIFList
);
593 saveIFFPrefs(DEF_ENVARCFILE
, &data
->prefs
, MiamiPanelBaseIntern
);
594 DoSuperMethod(CLASS
,self
,MUIM_Application_Save
,(ULONG
)MUIV_Application_Save_ENVARC
);
597 saveIFFPrefs(DEF_ENVFILE
, &data
->prefs
, MiamiPanelBaseIntern
);
598 DoSuperMethod(CLASS
,self
,MUIM_Application_Save
,(ULONG
)MUIV_Application_Save_ENV
);
600 DoMethod(data
->win
,MUIM_Window_Snapshot
,1);
605 /***********************************************************************/
608 MUIPC_App__MPM_Load(struct IClass
*CLASS
, Object
*self
,struct MPP_Load
*message
)
610 struct MPS_Prefs prefs
;
613 if (message
->envarc
) pres
= loadIFFPrefs(MPV_LoadPrefs_EnvArc
, &prefs
, MiamiPanelBaseIntern
);
614 else pres
= loadIFFPrefs(MPV_LoadPrefs_Env
, &prefs
, MiamiPanelBaseIntern
);
616 res
= DoSuperMethod(CLASS
,self
,MUIM_Application_Load
,(ULONG
)(message
->envarc
? MUIV_Application_Load_ENVARC
: MUIV_Application_Load_ENV
));
618 if (pres
) set(self
,MPA_Prefs
,&prefs
);
624 /***********************************************************************/
627 MUIPC_App__MPM_Miami(struct IClass
*CLASS
,Object
*self
,struct MPP_Miami
*message
)
629 ULONG cmd
= 0; // gcc
633 case MPV_Miami_Show
: cmd
= MIAMIPANELV_CallBack_Code_ShowMainGUI
; break;
634 case MPV_Miami_Hide
: cmd
= MIAMIPANELV_CallBack_Code_HideMainGUI
; break;
635 case MPV_Miami_Quit
: cmd
= MIAMIPANELV_CallBack_Code_QuitMiami
; break;
638 MiamiPanelFun(MiamiPanelBaseIntern
, cmd
);
643 /***********************************************************************/
645 BOOPSI_DISPATCHER(IPTR
, MUIPC_App_Dispatcher
, CLASS
, self
, message
)
647 switch(message
->MethodID
)
649 case OM_NEW
: return MUIPC_App__OM_NEW(CLASS
,self
,(APTR
)message
);
650 case OM_GET
: return MUIPC_App__OM_GET(CLASS
,self
,(APTR
)message
);
651 case OM_SET
: return MUIPC_App__OM_SET(CLASS
,self
,(APTR
)message
);
652 case OM_DISPOSE
: return MUIPC_App__OM_DISPOSE(CLASS
,self
,(APTR
)message
);
654 case MUIM_Application_AboutMUI
: return MUIPC_App__MUIM_Application_AboutMUI(CLASS
,self
,(APTR
)message
);
655 case MUIM_Application_OpenConfigWindow
: return MUIPC_App__MUIM_Application_OpenConfigWindow(CLASS
,self
,(APTR
)message
);
657 case MPM_Rebuild
: return MUIPC_App__MPM_Rebuild(CLASS
,self
,(APTR
)message
);
658 case MPM_Quit
: return MUIPC_App__MPM_Quit(CLASS
,self
,(APTR
)message
);
659 case MPM_DisposeWin
: return MUIPC_App__MPM_DisposeWin(CLASS
,self
,(APTR
)message
);
660 case MPM_About
: return MUIPC_App__MPM_About(CLASS
,self
,(APTR
)message
);
661 case MPM_Prefs
: return MUIPC_App__MPM_Prefs(CLASS
,self
,(APTR
)message
);
662 case MPM_Save
: return MUIPC_App__MPM_Save(CLASS
,self
,(APTR
)message
);
663 case MPM_Load
: return MUIPC_App__MPM_Load(CLASS
,self
,(APTR
)message
);
664 case MPM_Miami
: return MUIPC_App__MPM_Miami(CLASS
,self
,(APTR
)message
);
666 default: return DoSuperMethodA(CLASS
,self
,message
);
670 BOOPSI_DISPATCHER_END
672 /***********************************************************************/
675 MUIPC_App_ClassInit(struct MiamiPanelBase_intern
*MiamiPanelBase
)
677 MiamiPanelBaseIntern
= MiamiPanelBase
;
678 if ((MiamiPanelBaseIntern
->mpb_appClass
= MUI_CreateCustomClass(NULL
, MUIC_Application
, NULL
, sizeof(struct MiamiPanelAppClass_DATA
), MUIPC_App_Dispatcher
)))
680 localizeMenus(appMenu
,AppMenuIDs
);
688 /***********************************************************************/