Under construction ...
NAME
Widget - The Widget base class
COMMAND
Widget::addmap class subclass subpath options
Widget::bwinclude class subclass subpath ?arg...?
Widget::cget path option
Widget::configure path options
Widget::declare class optlist
Widget::destroy path
Widget::generate-doc dir widgetlist
Widget::generate-widget-doc class iscmd file
Widget::hasChanged path option pvalue
Widget::init class path options
Widget::setoption path option value
Widget::subcget path subwidget
Widget::tkinclude class tkwidget subpath ?arg...?



DESCRIPTION

The Widget namespace handle data associated to all BWidget and provide commands to easily define BWidget.
For commands can be used to define a BWidget: tkinclude, bwinclude, declare and addmap. Here is the definition of ComboBox widget:

namespace eval ComboBox {
    # We're using ArrowButton, Entry and LabelFrame
    ArrowButton::use
    Entry::use
    LabelFrame::use

    # Include resources of LabelFrame
    Widget::bwinclude ComboBox LabelFrame .labf \
        rename     {-text -label -justify -labeljustify -width -labelwidth \
                    -anchor -labelanchor -height -labelheight -font -labelfont} \
        initialize {-relief sunken -borderwidth 2}

    # Include resources of Entry
    Widget::bwinclude ComboBox Entry .e \
        remove {-relief -bd -borderwidth -bg -fg}    \
        rename {-text -value -textvariable -variable \
                -foreground -entryfg -background -entrybg}

    # Declare new resources
    Widget::declare ComboBox {
        {-height    TkResource 0  0 listbox}
        {-values    String     "" 0}
        {-modifycmd String     "" 0}
    }

    # Map resources to subwidget
    Widget::addmap ComboBox "" self {-background {}}
    Widget::addmap ComboBox ArrowButton .a \
	{-foreground {} -background {} -disabledforeground {} -state {}}

    proc use {} {}
}



COMMAND
Widget::addmap class subclass subpath options
This command map some resources to subwidget. Mapped resources automatically configure subwidget when widget is configured.
Widget::bwinclude class subclass subpath ?arg...?
This command includes into a new BWidget the resources of another BWidget. Arguments are:
Widget::cget path option
Returns the value of option of BWidget path.
Widget::configure path options
Description text
Widget::declare class optlist
This command declare new resources for a BWidget.
type can be:
TkResource
value of option denotes a resource of a Tk widget. args must be class or {class realoption}. class is the creation command of the Tk widget, e.g. entry. The second form must be used if option has not the same name in Tk widget, but realoption.
If value is empty, it is initialized to the default value of the Tk widget.
BwResource
value of option denotes a resource of a BWidget. args must be class or {class realoption}. class is the name of the namespace of the BWidget, e.g. LabelFrame. The second form must be used if option has not the same name in BWidget, but realoption.
If value is empty, it is initialized to the default value of the BWidget.
Int
value of option is an integer. args can be {?min? ?max?} to force it to be in a range. The test is [expr $option>$min] && [expr $option<$max] so if args is {0 10}, value must be beetween 0 and 10 exclude, if args is {=0 =10} , value must be beetween 0 and 10 include.
Boolean
value of option is a boolean. True values can be 1, true or yes. False values can be 0, false or no. Widget::cget always return 0 or 1.
Enum
value of option is a element of a enumeration. args must be the list of enumeration, e.g. {top left bottom right}.
String
value of option is any uncontrolled string.
Synonym
option is a synonym of option args. value has no effect here.
Widget::destroy path
Description text
Widget::generate-doc dir widgetlist
Description text
Widget::generate-widget-doc class iscmd file
Description text
Widget::hasChanged path option pvalue
Description text
Widget::init class path options
Description text
Widget::setoption path option value
Description text
Widget::subcget path subwidget
Returns the list of all option/value of BWidget path that are mapped to subwidget.
Widget::tkinclude class tkwidget subpath ?arg...?
This command includes into a new BWidget the resources of a Tk widget. Arguments are: