2 Copyright (C) 2013-2016, The AROS Development Team.
6 #include <aros/debug.h>
8 #define MUIMASTER_YES_INLINE_STDARG
10 #include <proto/alib.h>
11 #include <proto/exec.h>
12 #include <proto/muimaster.h>
13 #include <proto/utility.h>
14 #include <proto/intuition.h>
16 #include <exec/memory.h>
17 #include <libraries/mui.h>
18 #include <zune/customclasses.h>
19 #include <mui/NFloattext_mcc.h>
20 #include <utility/tagitem.h>
21 #include <utility/hooks.h>
32 extern OOP_AttrBase HiddATABusAB
;
34 /*** Instance Data **********************************************************/
40 static inline void SetCheckState(Object
*img
, OOP_Object
*dev
, ULONG attr
)
42 LONG state
= OOP_GET(dev
, attr
) ? IDS_SELECTED
: IDS_NORMAL
;
44 SET(img
, MUIA_Image_State
, state
);
47 static Object
*ATAWindow__OM_NEW(Class
*cl
, Object
*self
, struct opSet
*msg
)
49 OOP_Object
*dev
= (OOP_Object
*)GetTagData(MUIA_PropertyWin_Object
, 0, msg
->ops_AttrList
);
50 LONG ioalt
= OOP_GET(dev
, aHidd_ATABus_UseIOAlt
) ? IDS_SELECTED
: IDS_NORMAL
;
51 LONG pio32
= OOP_GET(dev
, aHidd_ATABus_Use32Bit
) ? IDS_SELECTED
: IDS_NORMAL
;
52 LONG use80wire
= OOP_GET(dev
, aHidd_ATABus_Use80Wire
) ? IDS_SELECTED
: IDS_NORMAL
;
53 LONG dma
= OOP_GET(dev
, aHidd_ATABus_UseDMA
) ? IDS_SELECTED
: IDS_NORMAL
;
55 return (Object
*) DoSuperNewTags
58 MUIA_Window_Title
, __(MSG_ATA_PROPERTIES
),
59 MUIA_Window_ID
, MAKE_ID('A', 'T', 'A', 'P'),
60 WindowContents
, (IPTR
)(VGroup
,
61 Child
, (IPTR
)(DevicePageObject
,
62 MUIA_PropertyWin_Object
, (IPTR
)dev
,
64 Child
, (IPTR
)(ColGroup(3),
65 MUIA_FrameTitle
, __(MSG_ATA
),
67 MUIA_Background
, MUII_GroupBack
,
68 Child
, (IPTR
)Label(_(MSG_USE_IOALT
)),
69 Child
, (IPTR
)(ImageObject
,
70 MUIA_Image_Spec
, MUII_CheckMark
,
71 MUIA_Image_State
, ioalt
,
74 MUIA_Background
, MUII_TextBack
,
76 Child
, (IPTR
)HSpace(0),
77 Child
, (IPTR
)Label(_(MSG_USE_32BIT
)),
78 Child
, (IPTR
)(ImageObject
,
79 MUIA_Image_Spec
, MUII_CheckMark
,
80 MUIA_Image_State
, pio32
,
83 MUIA_Background
, MUII_TextBack
,
85 Child
, (IPTR
)HSpace(0),
86 Child
, (IPTR
)Label(_(MSG_USE_80WIRE
)),
87 Child
, (IPTR
)(ImageObject
,
88 MUIA_Image_Spec
, MUII_CheckMark
,
89 MUIA_Image_State
, use80wire
,
92 MUIA_Background
, MUII_TextBack
,
94 Child
, (IPTR
)HSpace(0),
95 Child
, (IPTR
)Label(_(MSG_USE_DMA
)),
96 Child
, (IPTR
)(ImageObject
,
97 MUIA_Image_Spec
, MUII_CheckMark
,
98 MUIA_Image_State
, dma
,
101 MUIA_Background
, MUII_TextBack
,
103 Child
, (IPTR
)HSpace(0),
110 /*** Setup ******************************************************************/
113 ATAWindow
, NULL
, MUIC_Window
, NULL
,
114 OM_NEW
, struct opSet
*