wdsBevelBox

wdsBevelBox

wds

1998 12-05


NAME

wdsBevelBox - general-purpose widget-drawing routine


SYNOPSIS

void wdsBevelBox(EW_Window *root,WDS_Widget *widget,long x,long y,long dx,long dy,long bevel_depth,long state,long force_clear,long stx,long sty,long stsx,long stsy,WDS_String *bevelstring)


wdsBevelBox draws a stylized rectangle, arrow point, or assorted figure from the lower left corner of x,y of size dx,dy in the given root window. The optional widget is used for extra information if not NULL.


The bevel_depth specifies the thickness of the border in pixels, usually. If force_clear is non-zero, the background is cleared.


If bevelstring is not null, the given WDS_String is automatically formatted and drawn inside the region bound by the lower left corner of stx,sty and of size stsx,stsy.


The resulting drawing is dependent on the window's current color settings, which WDS_Widget::BevelBox() gets from the widget's WDS_Look and/or stored in the defaults in the current WDS_Looks.


The style used is the OR'ed sum of the following options. The defined values are given to demonstrate current exclusivity and are subject to change. Applications should never use specific numerical values.



WDS_BEVELBOX_BORDERLESS 0x00000000 No border drawn.
WDS_BEVELBOX_SEAM 0x00000001 Draw an edge where the interior region appears at the same level as the exterior.
WDS_BEVELBOX_RIDGE 0x00000002 Add an elevated flat area inside the angled edges.
WDS_BEVELBOX_IN 0x00000004 Use a recessed effect.
WDS_BEVELBOX_OUT 0x00000008 Use a expressed effect.
WDS_BEVELBOX_GROOVE (WDS_BEVELBOX_SEAM| WDS_BEVELBOX_IN) Use a recessed crease.
WDS_BEVELBOX_BORDER (WDS_BEVELBOX_SEAM| WDS_BEVELBOX_OUT) Use an expressed lip.
WDS_BEVELBOX_RIDGED (WDS_BEVELBOX_BORDER| WDS_BEVELBOX_RIDGE) Use an expressed lip with a flat ridge.
WDS_BEVELBOX_MOAT (WDS_BEVELBOX_GROOVE| WDS_BEVELBOX_RIDGE) Use an recessed crease with a flat moat (reverse of WDS_BEVELBOX_RIDGED).
WDS_BEVELBOX_SMOOTH 0x00000010 Use half-lighting for a rounded effect.
WDS_BEVELBOX_ROUND 0x00000020 Round corners. Currently implemented as a diagonal corner clip, so this only produces desirable appearance in limited cases.
WDS_BEVELBOX_OMIT_RIGHT 0x00000040
WDS_BEVELBOX_OMIT_LEFT 0x00000080
WDS_BEVELBOX_OMIT_TOP 0x00000100
WDS_BEVELBOX_OMIT_BOTTOM 0x00000200
Omit specific edge(s) from the drawing.

WDS_BEVELBOX_POINT 0x00000400 Use an triangluar arrow-point instead of a rectangle. By default, the arrow points to the right.
WDS_BEVELBOX_POINT_VERTICAL 0x00000800 Modify the pointer to point vertically, up by default.
WDS_BEVELBOX_POINT_BACK 0x00001000 Reverse the direction to left or down, instead of right or up.
WDS_BEVELBOX_POINT_RIGHT (WDS_BEVELBOX_POINT) Right arrow-point.
WDS_BEVELBOX_POINT_LEFT (WDS_BEVELBOX_POINT| WDS_BEVELBOX_POINT_BACK) Left arrow-point.
WDS_BEVELBOX_POINT_UP (WDS_BEVELBOX_POINT| WDS_BEVELBOX_POINT_VERTICAL) Upward arrow-point.
WDS_BEVELBOX_POINT_DOWN (WDS_BEVELBOX_POINT| WDS_BEVELBOX_POINT_VERTICAL| WDS_BEVELBOX_POINT_BACK) Downward arrow-point.
WDS_BEVELBOX_ANGLE_45 0x00002000 Constrain diagonal lines to 45-degree angles.
WDS_BEVELBOX_POINT_45 (WDS_BEVELBOX_POINT| WDS_BEVELBOX_ANGLE_45) An arrow point with 45-degree angles.
WDS_BEVELBOX_LABEL_LEFT 0x00004000 Draw the labels along the left inner edge instead of centered.
WDS_BEVELBOX_ELLIPTICAL 0x00008000 Draw using elliptical arcs instead of rectangles.
WDS_BEVELBOX_CHECKMARK 0x00010000
WDS_BEVELBOX_PLUSMARK 0x00020000
WDS_BEVELBOX_MINUSMARK 0x00030000
WDS_BEVELBOX_MARK_MASK 0x00030000
These are special figures, a check, plus sign, and minus sign. When any these are set, nearly all the other flags described above are ignored.


FILES

wds/bevel.h Bevel box header file


SEE ALSO

WDS_intro(3), WDS_Look(3)


NOTES

Since the interface changes often, it may be better utilized through an object, maybe something like WDS_BevelBox::Draw().


The arguments should probably be replaced with a single class argument, say WDS_BevelData.