2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
7 #include <proto/exec.h>
8 #include <proto/graphics.h>
9 #include <intuition/classusr.h>
10 #include <intuition/imageclass.h>
11 #include <intuition/screens.h>
12 #include "gadtools_intern.h"
14 /*********************************************************************
17 #include <proto/gadtools.h>
18 #include <libraries/gadtools.h>
19 #include <graphics/rastport.h>
20 #include <utility/tagitem.h>
22 AROS_LH6(void, DrawBevelBoxA
,
25 AROS_LHA(struct RastPort
*, rport
, A0
),
26 AROS_LHA(WORD
, left
, D0
),
27 AROS_LHA(WORD
, top
, D1
),
28 AROS_LHA(WORD
, width
, D2
),
29 AROS_LHA(WORD
, height
, D3
),
30 AROS_LHA(struct TagItem
*, taglist
, A1
),
33 struct Library
*, GadToolsBase
, 20, GadTools
)
36 DrawBevelBoxA() does just that. It draws a bevelled box.
39 rport - rastport, in which the box should be drawn
40 left - left edge of the box
41 top - top edge of the box
42 width - width of the box
43 height - height og the box
44 taglist - additional tags
49 Boxes drawn with DrawBevelBox() aren't refreshed automatically.
50 You have to refresh them yourself.
51 DrawBevelBoxA() might modify the rastport to guarantee fast drawing.
63 ***************************************************************************/
67 struct VisualInfo
*vi
;
68 struct TagItem tags
[5];
70 vi
= (struct VisualInfo
*) GetTagData(GT_VisualInfo
, (IPTR
) NULL
, taglist
);
74 tags
[0].ti_Tag
= IA_Width
;
75 tags
[0].ti_Data
= width
;
76 tags
[1].ti_Tag
= IA_Height
;
77 tags
[1].ti_Data
= height
;
78 tags
[2].ti_Tag
= IA_Recessed
;
79 tags
[2].ti_Data
= GetTagData(GTBB_Recessed
, FALSE
, taglist
);
80 tags
[3].ti_Tag
= IA_FrameType
;
81 tags
[3].ti_Data
= GetTagData(GTBB_FrameType
, BBFT_BUTTON
, taglist
);
82 tags
[4].ti_Tag
= TAG_DONE
;
84 if (rport
->Layer
) LockLayerRom(rport
->Layer
);
85 ObtainSemaphore(>B(GadToolsBase
)->bevelsema
);
86 SetAttrsA(GTB(GadToolsBase
)->bevel
, tags
);
87 DrawImageState(rport
, GTB(GadToolsBase
)->bevel
,
89 IDS_NORMAL
, vi
->vi_dri
);
90 ReleaseSemaphore(>B(GadToolsBase
)->bevelsema
);
91 if (rport
->Layer
) UnlockLayerRom(rport
->Layer
);