## scrolled-widget.api
#
# Automatically attach scrollbars to a given widget.
#
# Compare with:
# Widget_With_Scrollbars, designed to be harder to use but more flexible:
#
src/lib/x-kit/widget/old/layout/widget-with-scrollbars.api#
# See also:
# Viewport, which provides a window onto a larger widget,
# typically panned using scrollbars:
#
src/lib/x-kit/widget/old/layout/viewport.api# Compiled by:
#
src/lib/x-kit/widget/xkit-widget.sublib# TODO:
# granularity XXX BUGGO FIXME
stipulate
package wg = widget; # widget is from
src/lib/x-kit/widget/old/basic/widget.pkg package xc = xclient; # xclient is from
src/lib/x-kit/xclient/xclient.pkgherein
api Scrolled_Widget {
Scrolled_Widget;
scrolled_widget
:
(wg::Root_Window, wg::View, List(wg::Arg))
->
wg::Widget
->
Scrolled_Widget;
# Create a Scrolled_Widget instance.
#
# smooth_scrolling:
# If TRUE, attempt to redraw scrolled_widget
# continually while it is being scrolled. This
# is cool if scrolled_widget redraws quickly
# enough but awful if it does not. If FALSE,
# redraw only when the mouse is released on
# the scrollbar.
#
# color:
# Passed to the scrollbar creation functions.
#
# horizontal_scrollbar:
# vertical_scrollbar:
# If NULL, no scrollbar will be created for this dimension.
#
make_scrolled_widget
:
{ scrolled_widget: wg::Widget,
smooth_scrolling: Bool,
#
color: Null_Or ( xc::Rgb ),
horizontal_scrollbar: Null_Or { top: Bool },
vertical_scrollbar: Null_Or { left: Bool }
}
->
Scrolled_Widget;
as_widget: Scrolled_Widget -> wg::Widget;
};
end;
## COPYRIGHT (c) 1994 by AT&T Bell Laboratories See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.