tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / network / stacks / AROSTCP / MUI.MiamiPanel / Classes / muimiamipanel_class_about.c
blobb355d028afaeb4a3c54396344ce43b921d536e82
2 #include <proto/intuition.h>
3 #include <proto/muimaster.h>
4 #include <proto/utility.h>
6 #include <libraries/mui.h>
8 #include "muimiamipanel_intern.h"
9 #include "muimiamipanel_locale.h"
10 #include "muimiamipanel_misc.h"
12 /***********************************************************************/
14 #ifndef MUIA_Window_MenuGadget
15 #define MUIA_Window_MenuGadget 0x8042324E
16 #endif
18 #ifndef MUIA_Window_SnapshotGadget
19 #define MUIA_Window_SnapshotGadget 0x80423C55
20 #endif
22 #ifndef MUIA_Window_ConfigGadget
23 #define MUIA_Window_ConfigGadget 0x8042E262
24 #endif
26 #ifndef MUIA_Window_IconifyGadget
27 #define MUIA_Window_IconifyGadget 0x8042BC26
28 #endif
30 /***********************************************************************/
32 #define MUIButton\
33 TextObject,\
34 ButtonFrame,\
35 MUIA_Background, MUII_ButtonBack,\
36 MUIA_InputMode, MUIV_InputMode_RelVerify,\
37 MUIA_Font, MUIV_Font_Button,\
38 MUIA_ControlChar, 'm',\
39 MUIA_CycleChain, TRUE,\
40 MUIA_Text_Contents, "_MUI",\
41 MUIA_Text_PreParse, MUIX_C,\
42 MUIA_Text_HiCharIdx, '_',\
43 MUIA_Text_SetMax, TRUE
45 #define ThirdPart(stuff, author, url)\
46 Child, ohfixspace(),\
47 Child, otextitem(),\
48 Child, ohfixspace(),\
49 Child, HGroup,\
50 MUIA_Group_HorizSpacing,0,\
51 Child, olabel(stuff, MiamiPanelBaseIntern),\
52 Child, ohfixspace(),\
53 Child, ourlText(url, author, MiamiPanelBaseIntern),\
54 Child, HSpace(0),\
55 End
57 #define ThirdMUI \
58 Child, ohfixspace(),\
59 Child, otextitem(),\
60 Child, ohfixspace(),\
61 Child, HGroup,\
62 MUIA_Group_HorizSpacing,0,\
63 Child, mui = MUIButton, End,\
64 Child, olabel(MSG_About_OfCourse, MiamiPanelBaseIntern),\
65 Child, HSpace(0),\
66 End
68 /***********************************************************************/
70 static struct MiamiPanelBase_intern *MiamiPanelBaseIntern;
72 IPTR MUIPC_About__OM_NEW
74 Class *CLASS, Object *self, struct opSet *message
77 Object *g, *mui;
78 struct TagItem *attrs = message->ops_AttrList;
80 if (self = (Object *)DoSuperNewTags
82 CLASS, self, NULL,
84 MUIA_HelpNode, "WRID",
85 MUIA_Window_ID, MAKE_ID('A','B','O','T'),
86 MUIA_Window_Title, __(MSG_About_WinTitle),
87 MUIA_Window_IconifyGadget, FALSE,
88 MUIA_Window_MenuGadget, FALSE,
89 MUIA_Window_SnapshotGadget, FALSE,
90 MUIA_Window_ConfigGadget, FALSE,
91 MUIA_Window_SizeGadget, FALSE,
93 WindowContents, VGroup,
94 MUIA_Background, MUII_TextBack,
96 Child, TextObject,
97 MUIA_Text_Contents, MUIX_C MUIX_B "MUI.MiamiPanel",
98 End,
100 Child, TextObject,
101 MUIA_Text_Contents, __(MSG_Copyright),
102 MUIA_Text_PreParse, MUIX_C MUIX_B,
103 End,
105 Child, ovfixspace(),
107 Child, obartitle(MSG_About_Information, MiamiPanelBaseIntern),
109 Child, HGroup,
110 Child, HSpace(0),
111 Child, ColGroup(2),
112 /*Child, olabel(MSG_About_Version),
113 Child, LLabel((ULONG)lib_vers),*/
114 Child, olabel(MSG_About_Author, MiamiPanelBaseIntern),
115 Child, ourlText("mailto:"DEF_EMail, DEF_Author, MiamiPanelBaseIntern),
116 Child, olabel(MSG_About_Support, MiamiPanelBaseIntern),
117 Child, ourlText(DEF_HomePage, NULL, MiamiPanelBaseIntern),
118 End,
119 Child, HSpace(0),
120 End,
122 Child, ovfixspace(),
124 Child, obartitle(MSG_About_ThirdParts, MiamiPanelBaseIntern),
126 Child, g = VGroup,
127 MUIA_Group_HorizSpacing, 0,
128 MUIA_Group_Columns, 4,
129 ThirdPart(MSG_About_Busy, "Klaus Melchior"," mailto:kmel@eifel.oche.de"),
130 ThirdPart(MSG_About_Lamp, "Maik Schreiber", "mailto:BLiZZeR@dame.de"),
131 ThirdMUI,
132 End,
133 End,
134 TAG_MORE,attrs))
136 Object *app, *space;
137 UBYTE *tn;
139 if ((tn = __(MSG_About_Translation)) && *tn)
141 Object *sp1, *tti, *sp2 = NULL, *tg; // gcc
143 if ((sp1 = ohfixspace()) &&
144 (tti = otextitem()) &&
145 (sp2 = ohfixspace()) &&
146 (tg= HGroup, Child, Label((ULONG)tn), Child, HSpace(0),End))
148 DoMethod(g, OM_ADDMEMBER, (ULONG)sp1);
149 DoMethod(g, OM_ADDMEMBER, (ULONG)tti);
150 DoMethod(g, OM_ADDMEMBER, (ULONG)sp2);
151 DoMethod(g, OM_ADDMEMBER, (ULONG)tg);
153 else
154 if (sp1)
156 if (tti)
158 if (sp2) MUI_DisposeObject(sp2);
159 MUI_DisposeObject(tti);
161 MUI_DisposeObject(sp1);
165 if (space = ovfixspace()) DoMethod(g, OM_ADDMEMBER, (ULONG)space);
167 if (app = (Object *)GetTagData(MPA_Application, NULL, attrs))
168 DoMethod(mui, MUIM_Notify, MUIA_Pressed, FALSE, (ULONG)app, 2, MUIM_Application_AboutMUI, GetTagData(MUIA_Window_RefWindow, NULL, attrs));
171 return (ULONG)self;
174 /***********************************************************************/
176 BOOPSI_DISPATCHER(IPTR, MUIPC_About_Dispatcher, CLASS, self, message)
178 switch(message->MethodID)
180 case OM_NEW: return MUIPC_About__OM_NEW(CLASS, self, (struct opSet *)message);
181 default: return DoSuperMethodA(CLASS, self, message);
183 return 0;
185 BOOPSI_DISPATCHER_END
187 /***********************************************************************/
189 ULONG
190 MUIPC_About_ClassInit(struct MiamiPanelBase_intern *MiamiPanelBase)
192 MiamiPanelBaseIntern = MiamiPanelBase;
193 return (ULONG)(MiamiPanelBaseIntern->mpb_aboutClass = MUI_CreateCustomClass(NULL, MUIC_Window, NULL, 0, MUIPC_About_Dispatcher));
196 /***********************************************************************/