2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
9 /*****************************************************************************
12 #include <proto/intuition.h>
14 AROS_LH2(void, HelpControl
,
17 AROS_LHA(struct Window
*, window
, A0
),
18 AROS_LHA(ULONG
, flags
, D0
),
21 struct IntuitionBase
*, IntuitionBase
, 138, Intuition
)
24 Turn on or off Gadget-Help for your window. Gadget-Help will also be
25 changed for all members of the same help-group to make
26 multiple-windows apps behave well.
29 window - The window to affect. All windows of the same help-group
30 will be affected as well.
31 flags - HC_GADGETHELP or zero for turning help on or off.
37 The WA_HelpGroup and WA_HelpGroupWindow tags are relevant to this
49 *****************************************************************************/
57 ASSERT_VALID_PTR(window
);
63 if (flags
& HC_GADGETHELP
)
65 setmask
|= HELPF_GADGETHELP
;
69 clearmask
|= HELPF_GADGETHELP
;
72 #define CHANGEHELPFLAGS(x) ( IW(x)->helpflags = (IW(x)->helpflags | setmask) & ~clearmask )
74 CHANGEHELPFLAGS(window
);
76 if (IW(window
)->helpflags
& HELPF_ISHELPGROUP
)
78 struct Screen
*scr
= IntuitionBase
->FirstScreen
;
80 for(; scr
; scr
= scr
->NextScreen
)
82 struct Window
*win
= scr
->FirstWindow
;
84 for(; win
; win
= win
->NextWindow
)
86 if ( (IW(win
)->helpflags
& HELPF_ISHELPGROUP
) &&
87 (IW(win
)->helpgroup
== IW(window
)->helpgroup
) )