/* ***************************************************************************
# Compiled by:
#
src/lib/tk/src/tk.sublib Compatibility Mode for tk3.0 vs. tk2.1
$Date: 2001/03/30 13:39:18 $
$Revision: 3.0 $
Author: bu (Last modification by $Author: 2cxl $)
(C) 1996, Bremen Institute for Safe Systems, Universitaet Bremen
************************************************************************** */
package tk_21 /* :
api
my AnnoText: Null_Or( Int * Int ) * String * List( Text_Item ) -> Live_Text
my Button: Widget_ID * List( Packing_Hint ) * List( Trait ) * List( Event_Callback ) -> Widget
my CIcon: Canvas_Item_ID * Coordinate * IconKind * List( Trait ) * List( Event_Callback )
-> Canvas_Item
my CLine: Canvas_Item_ID * List( Coordinate ) * List( Trait ) * List( Event_Callback ) -> Canvas_Item
my COval: Canvas_Item_ID * Coordinate * Coordinate * List( Trait ) * List( Event_Callback )
-> Canvas_Item
my CPoly: Canvas_Item_ID * List( Coordinate ) * List( Trait ) * List( Event_Callback ) -> Canvas_Item
my CRectangle: Canvas_Item_ID * Coordinate * Coordinate * List( Trait ) * List( Event_Callback )
-> Canvas_Item
my CTag: Canvas_Item_ID * List( Canvas_Item_ID ) -> Canvas_Item
my CWidget: Canvas_Item_ID * Coordinate * Widget_ID * List( Widget ) * List( Trait )
* List( Trait ) * List( Event_Callback )
-> Canvas_Item
my Canvas: Widget_ID * Scrollbars_At * List( Canvas_Item ) * List( Packing_Hint ) * List( Trait )
* List( Event_Callback ) -> Widget
my CheckButton: Widget_ID * List( Packing_Hint ) * List( Trait ) * List( Event_Callback )
-> Widget
my Entry: Widget_ID * List( Packing_Hint ) * List( Trait ) * List( Event_Callback ) -> Widget
my Frame: Widget_ID * List( Widget ) * List( Packing_Hint ) * List( Trait ) * List( Event_Callback )
-> Widget
my Label: Widget_ID * List( Packing_Hint ) * List( Trait ) * List( Event_Callback ) -> Widget
my LIST_BOX: Widget_ID * Scrollbars_At * List( Packing_Hint ) * List( Trait )
* List( Event_Callback )
-> Widget
my MenuButton: Widget_ID * Bool * List( Menu_Item ) * List( Packing_Hint ) * List( Trait )
* List( Event_Callback )
-> Widget
my MESSAGE: Widget_ID * List( Packing_Hint ) * List( Trait ) * List( Event_Callback ) -> Widget
my Popup: Widget_ID * Bool * List( Menu_Item ) -> Widget
my RadioButton: Widget_ID * List( Packing_Hint ) * List( Trait ) * List( Event_Callback )
-> Widget
my TEXT_ITEM_TAG: Text_Item_ID * (Mark * Mark) List * List( Trait ) * List( Event_Callback )
-> Text_Item
my TAWidget: Text_Item_ID * Mark * Widget_ID * List( Widget ) * List( Trait )
* List( Trait ) * List( Event_Callback )
-> Text_Item
my TEXT_WIDGET: Widget_ID * Scrollbars_At * Live_Text * List( Packing_Hint ) * List( Trait )
* List( Event_Callback )
-> Widget
end */
{
# Constructors
fun crectangle (cid, c1, c2, cl, bl) =
tk::CANVAS_RECTANGLE { citem_id=>cid, coord1=>c1,
coord2=>c2, traits=>cl, event_callbacks=>bl };
fun coval (cid, c1, c2, cl, bl) =
tk::CANVAS_OVAL { citem_id=>cid, coord1=>c1,
coord2=>c2, traits=>cl, event_callbacks=>bl };
fun cline (cid, c, cl, bl) =
tk::CANVAS_LINE { citem_id=>cid, coords=>c, traits=>cl, event_callbacks=>bl };
fun cpoly (cid, c, cl, bl) =
tk::CANVAS_POLYGON { citem_id=>cid, coords=>c, traits=>cl, event_callbacks=>bl };
fun cicon (cid, c, icon, cl, bl) =
tk::CANVAS_ICON { citem_id=>cid, coord=>c, icon_variety=>icon,
traits=>cl, event_callbacks=>bl };
fun cwidget (cid, c, wid, widgs, cl1, cl2, bl) =
tk::CANVAS_WIDGET { citem_id=>cid, coord=>c,
subwidgets=>tk::PACKED widgs,
traits=>cl2, event_callbacks=>bl };
fun ctag (cid, cids) = tk::CANVAS_TAG { citem_id=>cid, citem_ids=>cids };
fun anno_text (p, st, ann) = tk::LIVE_TEXT { len=>p, str=>st, text_items=>ann };
fun tatag (ann, m, cl, bl) =
tk::TEXT_ITEM_TAG { text_item_id=>ann, marks=>m, traits=>cl, event_callbacks=>bl };
fun tawidget (ann, m, wid, widgs, cl1, cl2, bl)=
tk::TEXT_ITEM_WIDGET { text_item_id=>ann, mark=>m,
subwidgets=>tk::PACKED widgs,
traits=>cl2, event_callbacks=>bl };
fun frame (wid, wl, pl, cl, bl)
=
tk::FRAME { widget_id=>wid, subwidgets=>tk::PACKED wl, packing_hints=>pl,
traits=>cl, event_callbacks =>bl };
fun message (wid, pl, cl, bl) =
tk::MESSAGE { widget_id=>wid, packing_hints=>pl,
traits=>cl, event_callbacks =>bl };
fun label (wid, pl, cl, bl)
=
tk::LABEL {
widget_id=>wid,
packing_hints=>pl,
traits=>cl,
event_callbacks =>bl
};
fun listbox (wid, st, pl, cl, bl) =
tk::LIST_BOX { widget_id=>wid, scrollbars=>st, packing_hints=>pl,
traits=>cl, event_callbacks =>bl };
fun button (wid, pl, cl, bl)
=
tk::BUTTON { widget_id=>wid, packing_hints=>pl,
traits=>cl, event_callbacks =>bl };
fun radio_button (wid, pl, cl, bl) =
tk::RADIO_BUTTON { widget_id=>wid, packing_hints=>pl,
traits=>cl, event_callbacks =>bl };
fun check_button (wid, pl, cl, bl) =
tk::CHECK_BUTTON { widget_id=>wid, packing_hints=>pl,
traits=>cl, event_callbacks =>bl };
fun menu_button (wid, yn, mit, pl, cl, bl) =
tk::MENU_BUTTON { widget_id=>wid, mitems=>mit, packing_hints=>pl,
traits=>tk::TEAR_OFF yn . cl, event_callbacks=>bl };
fun entry (wid, pl, cl, bl)
=
tk::TEXT_ENTRY { widget_id=>wid, packing_hints=>pl, traits=>cl, event_callbacks =>bl };
fun text_wid (wid, st, annot, pl, cl, bl) =
tk::TEXT_WIDGET { widget_id=>wid, scrollbars=>st, live_text=>annot,
packing_hints=>pl, traits=>cl, event_callbacks =>bl };
fun canvas (wid, st, cit, pl, cl, bl)
=
tk::CANVAS { widget_id=>wid, scrollbars=>st, citems=>cit,
packing_hints=>pl, traits=>cl, event_callbacks =>bl };
fun popup (wid, yn, mit)
=
tk::POPUP {
widget_id => wid,
mitems => mit,
traits => [tk::TEAR_OFF yn] };
replace_text_wid_text = tk::replace_livetext;
clear_text_wid_text = tk::clear_livetext;
};