PreviousUpNext

15.3.726  src/lib/x-kit/widget/old/wrapper/background.api

## background.pkg
#
# NB: This widget is largely obsolete, as each
#     widget supports its own background now. XXX BUGGO FIXME
#
# Specify the default background color for the
# widgets in a subtree of the widget tree.
#
# This is the color used by the X clearArea and
# clearDrawable operations.
#
# All widgets in the widget subtree below the
# widget inherit this background color, unless
# or until overridden by another Background
# widget.

# Compiled by:
#     src/lib/x-kit/widget/xkit-widget.sublib


# This api is implemented in:
#
#     src/lib/x-kit/widget/old/wrapper/background.pkg

stipulate
    package wg =  widget;                               # Widget                is from   src/lib/x-kit/widget/old/basic/widget.api
    package xc =  xclient;                              # xclient               is from   src/lib/x-kit/xclient/xclient.pkg
herein

    api Background {

        Background;

        background
            :
            (wg::Root_Window, wg::View, List(wg::Arg))
            ->
            wg::Widget
            ->
            Background;

        make_background
            :
            { color:   Null_Or( xc::Rgb ),                      # New background color. Defaults to white if not specified.
              widget:  wg::Widget                               # Affected widget-tree.
            }
            -> Background;

        as_widget:  Background -> 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.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext