## three-d.api
# Compiled by:
#
src/lib/x-kit/widget/xkit-widget.sublib### "Aim for brevity while avoiding jargon."
###
### -- E.J. Dijkstra
# This api is implemented in:
#
#
src/lib/x-kit/widget/old/lib/three-d.pkg#
stipulate
package g2d= geometry2d; # geometry2d is from
src/lib/std/2d/geometry2d.pkg package xc = xclient; # xclient is from
src/lib/x-kit/xclient/xclient.pkgherein
api Three_D {
Relief = FLAT
| RAISED | SUNKEN | GROOVE | RIDGE;
draw_box # Draw a picture-frame of 'width' in 'relief'. Interior is untouched.
:
xc::Drawable
->
{ box: g2d::Box, # 'box' gives the outer contour for the picture-frame.
width: Int, # Inner contour is this many pixels inside of outer contour.
relief: Relief
}
->
widget_base::Shades
->
Void;
draw_filled_box # Same as draw_box except we fill the interior of the box in shades.base.
:
xc::Drawable
->
{ box: g2d::Box,
width: Int,
relief: Relief
}
->
widget_base::Shades
->
Void;
draw_round_box
:
xc::Drawable
->
{ box: g2d::Box,
width: Int,
c_wid: Int,
c_ht: Int,
relief: Relief
}
->
widget_base::Shades
->
Void;
draw_poly
:
xc::Drawable
->
{ pts: List( g2d::Point ),
width: Int,
relief: Relief
}
->
widget_base::Shades
->
Void;
# The above are the primary entrypoints;
# The below are mainly support fns for the above.
draw3drect # Used by draw_box for FLAT, RAISED and SUNKEN.
:
xc::Drawable
->
(g2d::Box, Int)
->
{ top: xc::Pen,
bottom: xc::Pen
}
->
Void;
draw3drect2 # Used by draw_box for GROOVE and RIDGE.
:
xc::Drawable
->
(g2d::Box, Int)
->
{ top: xc::Pen,
bottom: xc::Pen
}
->
Void;
draw3dpoly # Used by draw_poly for FLAT, RAISED and SUNKEN.
:
xc::Drawable
->
(List( g2d::Point ), Int)
->
{ top: xc::Pen,
bottom: xc::Pen
}
->
Void;
draw3dpoly2 # Used by draw_poly for GROOVE and RIDGE.
:
xc::Drawable
->
(List( g2d::Point ), Int)
->
{ top: xc::Pen,
bottom: xc::Pen
}
->
Void;
draw3dround_box # Used by draw_round_box for FLAT, RAISED and SUNKEN.
:
xc::Drawable
->
{ box: g2d::Box,
width: Int,
c_wid: Int,
c_ht: Int
}
->
{ top: xc::Pen,
bottom: xc::Pen
}
->
Void;
draw3dround_box2 # Used by draw_round_box for GROOVE and RIDGE.
:
xc::Drawable
->
{ box: g2d::Box,
width: Int,
c_wid: Int,
c_ht: Int
}
->
{ top: xc::Pen,
bottom: xc::Pen
}
->
Void;
};
end;
## COPYRIGHT (c) 1994 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.