OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [generic/] [scrolledcanvas.itk] - Diff between revs 578 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 578 Rev 1765
#
#
# Scrolledcanvas
# Scrolledcanvas
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Implements horizontal and vertical scrollbars around a canvas childsite
# Implements horizontal and vertical scrollbars around a canvas childsite
# Includes options to control display of scrollbars.  The standard
# Includes options to control display of scrollbars.  The standard
# canvas options and methods are supported.
# canvas options and methods are supported.
#
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
#  AUTHOR: Mark Ulferts                        mulferts@austin.dsccc.com
#  AUTHOR: Mark Ulferts                        mulferts@austin.dsccc.com
#
#
#  @(#) $Id: scrolledcanvas.itk,v 1.1.1.1 2002-01-16 10:24:50 markom Exp $
#  @(#) $Id: scrolledcanvas.itk,v 1.1.1.1 2002-01-16 10:24:50 markom Exp $
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
#            Copyright (c) 1995 DSC Technologies Corporation
#            Copyright (c) 1995 DSC Technologies Corporation
# ======================================================================
# ======================================================================
# Permission to use, copy, modify, distribute and license this software
# Permission to use, copy, modify, distribute and license this software
# and its documentation for any purpose, and without fee or written
# and its documentation for any purpose, and without fee or written
# agreement with DSC, is hereby granted, provided that the above copyright
# agreement with DSC, is hereby granted, provided that the above copyright
# notice appears in all copies and that both the copyright notice and
# notice appears in all copies and that both the copyright notice and
# warranty disclaimer below appear in supporting documentation, and that
# warranty disclaimer below appear in supporting documentation, and that
# the names of DSC Technologies Corporation or DSC Communications
# the names of DSC Technologies Corporation or DSC Communications
# Corporation not be used in advertising or publicity pertaining to the
# Corporation not be used in advertising or publicity pertaining to the
# software without specific, written prior permission.
# software without specific, written prior permission.
#
#
# DSC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
# DSC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND NON-
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND NON-
# INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE
# INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE
# AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,
# AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. IN NO EVENT SHALL
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. IN NO EVENT SHALL
# DSC BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
# DSC BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
# SOFTWARE.
# ======================================================================
# ======================================================================
#
#
# Usual options.
# Usual options.
#
#
itk::usual Scrolledcanvas {
itk::usual Scrolledcanvas {
    keep -activebackground -activerelief -background -borderwidth -cursor \
    keep -activebackground -activerelief -background -borderwidth -cursor \
         -elementborderwidth -foreground -highlightcolor -highlightthickness \
         -elementborderwidth -foreground -highlightcolor -highlightthickness \
         -insertbackground -insertborderwidth -insertofftime -insertontime \
         -insertbackground -insertborderwidth -insertofftime -insertontime \
         -insertwidth -jump -labelfont -selectbackground -selectborderwidth \
         -insertwidth -jump -labelfont -selectbackground -selectborderwidth \
         -selectforeground -textbackground -troughcolor
         -selectforeground -textbackground -troughcolor
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
#                            SCROLLEDCANVAS
#                            SCROLLEDCANVAS
# ------------------------------------------------------------------
# ------------------------------------------------------------------
class iwidgets::Scrolledcanvas {
class iwidgets::Scrolledcanvas {
    inherit iwidgets::Scrolledwidget
    inherit iwidgets::Scrolledwidget
    constructor {args} {}
    constructor {args} {}
    destructor {}
    destructor {}
    itk_option define -autoresize autoResize AutoResize 1
    itk_option define -autoresize autoResize AutoResize 1
    itk_option define -automargin autoMargin AutoMargin 0
    itk_option define -automargin autoMargin AutoMargin 0
    public method childsite {}
    public method childsite {}
    public method justify {direction}
    public method justify {direction}
    public method addtag {args}
    public method addtag {args}
    public method bbox {args}
    public method bbox {args}
    public method bind {args}
    public method bind {args}
    public method canvasx {args}
    public method canvasx {args}
    public method canvasy {args}
    public method canvasy {args}
    public method coords {args}
    public method coords {args}
    public method create {args}
    public method create {args}
    public method dchars {args}
    public method dchars {args}
    public method delete {args}
    public method delete {args}
    public method dtag {args}
    public method dtag {args}
    public method find {args}
    public method find {args}
    public method focus {args}
    public method focus {args}
    public method gettags {args}
    public method gettags {args}
    public method icursor {args}
    public method icursor {args}
    public method index {args}
    public method index {args}
    public method insert {args}
    public method insert {args}
    public method itemconfigure {args}
    public method itemconfigure {args}
    public method itemcget {args}
    public method itemcget {args}
    public method lower {args}
    public method lower {args}
    public method move {args}
    public method move {args}
    public method postscript {args}
    public method postscript {args}
    public method raise {args}
    public method raise {args}
    public method scale {args}
    public method scale {args}
    public method scan {args}
    public method scan {args}
    public method select {args}
    public method select {args}
    public method type {args}
    public method type {args}
    public method xview {args}
    public method xview {args}
    public method yview {args}
    public method yview {args}
}
}
#
#
# Provide a lowercased access method for the Scrolledcanvas class.
# Provide a lowercased access method for the Scrolledcanvas class.
#
#
proc ::iwidgets::scrolledcanvas {pathName args} {
proc ::iwidgets::scrolledcanvas {pathName args} {
    uplevel ::iwidgets::Scrolledcanvas $pathName $args
    uplevel ::iwidgets::Scrolledcanvas $pathName $args
}
}
#
#
# Use option database to override default resources of base classes.
# Use option database to override default resources of base classes.
#
#
option add *Scrolledcanvas.width 200 widgetDefault
option add *Scrolledcanvas.width 200 widgetDefault
option add *Scrolledcanvas.height 230 widgetDefault
option add *Scrolledcanvas.height 230 widgetDefault
option add *Scrolledcanvas.labelPos n widgetDefault
option add *Scrolledcanvas.labelPos n widgetDefault
# ------------------------------------------------------------------
# ------------------------------------------------------------------
#                        CONSTRUCTOR
#                        CONSTRUCTOR
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::constructor {args} {
body iwidgets::Scrolledcanvas::constructor {args} {
    #
    #
    # Create a clipping frame which will provide the border for
    # Create a clipping frame which will provide the border for
    # relief display.
    # relief display.
    #
    #
    itk_component add clipper {
    itk_component add clipper {
        frame $itk_interior.clipper
        frame $itk_interior.clipper
    } {
    } {
        usual
        usual
        keep -borderwidth -relief -highlightthickness -highlightcolor
        keep -borderwidth -relief -highlightthickness -highlightcolor
        rename -highlightbackground -background background Background
        rename -highlightbackground -background background Background
    }
    }
    grid $itk_component(clipper) -row 1 -column 1 -sticky nsew
    grid $itk_component(clipper) -row 1 -column 1 -sticky nsew
    grid rowconfigure $_interior 1 -weight 1
    grid rowconfigure $_interior 1 -weight 1
    grid columnconfigure $_interior 1 -weight 1
    grid columnconfigure $_interior 1 -weight 1
    #
    #
    # Create a canvas to scroll
    # Create a canvas to scroll
    #
    #
    itk_component add canvas {
    itk_component add canvas {
        canvas $itk_component(clipper).canvas \
        canvas $itk_component(clipper).canvas \
                -height 1.0 -width 1.0 \
                -height 1.0 -width 1.0 \
                -scrollregion "0 0 1 1" \
                -scrollregion "0 0 1 1" \
                -xscrollcommand \
                -xscrollcommand \
                [code $this _scrollWidget $itk_interior.horizsb] \
                [code $this _scrollWidget $itk_interior.horizsb] \
                -yscrollcommand \
                -yscrollcommand \
                [code $this _scrollWidget $itk_interior.vertsb]
                [code $this _scrollWidget $itk_interior.vertsb]
    } {
    } {
        usual
        usual
        ignore -highlightthickness -highlightcolor
        ignore -highlightthickness -highlightcolor
        keep -closeenough -confine -scrollregion
        keep -closeenough -confine -scrollregion
        keep -xscrollincrement -yscrollincrement
        keep -xscrollincrement -yscrollincrement
        rename -background -textbackground textBackground Background
        rename -background -textbackground textBackground Background
    }
    }
    grid $itk_component(canvas) -row 0 -column 0 -sticky nsew
    grid $itk_component(canvas) -row 0 -column 0 -sticky nsew
    grid rowconfigure $itk_component(clipper) 0 -weight 1
    grid rowconfigure $itk_component(clipper) 0 -weight 1
    grid columnconfigure $itk_component(clipper) 0 -weight 1
    grid columnconfigure $itk_component(clipper) 0 -weight 1
    #
    #
    # Configure the command on the vertical scroll bar in the base class.
    # Configure the command on the vertical scroll bar in the base class.
    #
    #
    $itk_component(vertsb) configure \
    $itk_component(vertsb) configure \
        -command [code $itk_component(canvas) yview]
        -command [code $itk_component(canvas) yview]
    #
    #
    # Configure the command on the horizontal scroll bar in the base class.
    # Configure the command on the horizontal scroll bar in the base class.
    #
    #
    $itk_component(horizsb) configure \
    $itk_component(horizsb) configure \
                -command [code $itk_component(canvas) xview]
                -command [code $itk_component(canvas) xview]
    #
    #
    # Initialize the widget based on the command line options.
    # Initialize the widget based on the command line options.
    #
    #
    eval itk_initialize $args
    eval itk_initialize $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
#                           DESTURCTOR
#                           DESTURCTOR
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::destructor {} {
body iwidgets::Scrolledcanvas::destructor {} {
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
#                             OPTIONS
#                             OPTIONS
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# OPTION: -autoresize
# OPTION: -autoresize
#
#
# Automatically adjusts the scrolled region to be the bounding
# Automatically adjusts the scrolled region to be the bounding
# box covering all the items in the canvas following the execution
# box covering all the items in the canvas following the execution
# of any method which creates or destroys items.  Thus, as new
# of any method which creates or destroys items.  Thus, as new
# items are added, the scrollbars adjust accordingly.
# items are added, the scrollbars adjust accordingly.
# ------------------------------------------------------------------
# ------------------------------------------------------------------
configbody iwidgets::Scrolledcanvas::autoresize {
configbody iwidgets::Scrolledcanvas::autoresize {
    if {$itk_option(-autoresize)} {
    if {$itk_option(-autoresize)} {
        set bbox [$itk_component(canvas) bbox all]
        set bbox [$itk_component(canvas) bbox all]
        if {$bbox != {}} {
        if {$bbox != {}} {
            set marg $itk_option(-automargin)
            set marg $itk_option(-automargin)
            set bbox [lreplace $bbox 0 0 [expr [lindex $bbox 0] - $marg]]
            set bbox [lreplace $bbox 0 0 [expr [lindex $bbox 0] - $marg]]
            set bbox [lreplace $bbox 1 1 [expr [lindex $bbox 1] - $marg]]
            set bbox [lreplace $bbox 1 1 [expr [lindex $bbox 1] - $marg]]
            set bbox [lreplace $bbox 2 2 [expr [lindex $bbox 2] + $marg]]
            set bbox [lreplace $bbox 2 2 [expr [lindex $bbox 2] + $marg]]
            set bbox [lreplace $bbox 3 3 [expr [lindex $bbox 3] + $marg]]
            set bbox [lreplace $bbox 3 3 [expr [lindex $bbox 3] + $marg]]
        }
        }
        $itk_component(canvas) configure -scrollregion $bbox
        $itk_component(canvas) configure -scrollregion $bbox
    }
    }
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
#                            METHODS
#                            METHODS
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: childsite
# METHOD: childsite
#
#
# Returns the path name of the child site widget.
# Returns the path name of the child site widget.
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::childsite {} {
body iwidgets::Scrolledcanvas::childsite {} {
    return $itk_component(canvas)
    return $itk_component(canvas)
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: justify
# METHOD: justify
#
#
# Justifies the canvas scrolled region in one of four directions: top,
# Justifies the canvas scrolled region in one of four directions: top,
# bottom, left, or right.
# bottom, left, or right.
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::justify {direction} {
body iwidgets::Scrolledcanvas::justify {direction} {
    if {[winfo ismapped $itk_component(canvas)]} {
    if {[winfo ismapped $itk_component(canvas)]} {
        update idletasks
        update idletasks
        switch $direction {
        switch $direction {
            left {
            left {
                $itk_component(canvas) xview moveto 0
                $itk_component(canvas) xview moveto 0
            }
            }
            right {
            right {
                $itk_component(canvas) xview moveto 1
                $itk_component(canvas) xview moveto 1
            }
            }
            top {
            top {
                $itk_component(canvas) yview moveto 0
                $itk_component(canvas) yview moveto 0
            }
            }
            bottom {
            bottom {
                $itk_component(canvas) yview moveto 1
                $itk_component(canvas) yview moveto 1
            }
            }
            default {
            default {
                error "bad justify argument \"$direction\": should be\
                error "bad justify argument \"$direction\": should be\
                        left, right, top, or bottom"
                        left, right, top, or bottom"
            }
            }
        }
        }
    }
    }
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# CANVAS METHODS:
# CANVAS METHODS:
#
#
# The following methods are thin wraps of standard canvas methods.
# The following methods are thin wraps of standard canvas methods.
# Consult the Tk canvas man pages for functionallity and argument
# Consult the Tk canvas man pages for functionallity and argument
# documentation
# documentation
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: addtag tag searchSpec ?arg arg ...?
# METHOD: addtag tag searchSpec ?arg arg ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::addtag {args} {
body iwidgets::Scrolledcanvas::addtag {args} {
    return [eval $itk_component(canvas) addtag $args]
    return [eval $itk_component(canvas) addtag $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: bbox tagOrId ?tagOrId tagOrId ...?
# METHOD: bbox tagOrId ?tagOrId tagOrId ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::bbox {args} {
body iwidgets::Scrolledcanvas::bbox {args} {
    return [eval $itk_component(canvas) bbox $args]
    return [eval $itk_component(canvas) bbox $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: bind tagOrId ?sequence? ?command?
# METHOD: bind tagOrId ?sequence? ?command?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::bind {args} {
body iwidgets::Scrolledcanvas::bind {args} {
    return [eval $itk_component(canvas) bind $args]
    return [eval $itk_component(canvas) bind $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: canvasx screenx ?gridspacing?
# METHOD: canvasx screenx ?gridspacing?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::canvasx {args} {
body iwidgets::Scrolledcanvas::canvasx {args} {
    return [eval $itk_component(canvas) canvasx $args]
    return [eval $itk_component(canvas) canvasx $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: canvasy screeny ?gridspacing?
# METHOD: canvasy screeny ?gridspacing?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::canvasy {args} {
body iwidgets::Scrolledcanvas::canvasy {args} {
    return [eval $itk_component(canvas) canvasy $args]
    return [eval $itk_component(canvas) canvasy $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: coords tagOrId ?x0 y0 ...?
# METHOD: coords tagOrId ?x0 y0 ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::coords {args} {
body iwidgets::Scrolledcanvas::coords {args} {
    return [eval $itk_component(canvas) coords $args]
    return [eval $itk_component(canvas) coords $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: create type x y ?x y ...? ?option value ...?
# METHOD: create type x y ?x y ...? ?option value ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::create {args} {
body iwidgets::Scrolledcanvas::create {args} {
    set retval [eval $itk_component(canvas) create $args]
    set retval [eval $itk_component(canvas) create $args]
    configure -autoresize $itk_option(-autoresize)
    configure -autoresize $itk_option(-autoresize)
    return $retval
    return $retval
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: dchars  tagOrId first ?last?
# METHOD: dchars  tagOrId first ?last?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::dchars {args} {
body iwidgets::Scrolledcanvas::dchars {args} {
    return [eval $itk_component(canvas) dchars $args]
    return [eval $itk_component(canvas) dchars $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: delete tagOrId ?tagOrId tagOrId ...?
# METHOD: delete tagOrId ?tagOrId tagOrId ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::delete {args} {
body iwidgets::Scrolledcanvas::delete {args} {
    set retval [eval $itk_component(canvas) delete $args]
    set retval [eval $itk_component(canvas) delete $args]
    configure -autoresize $itk_option(-autoresize)
    configure -autoresize $itk_option(-autoresize)
    return $retval
    return $retval
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: dtag tagOrId ?tagToDelete?
# METHOD: dtag tagOrId ?tagToDelete?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::dtag {args} {
body iwidgets::Scrolledcanvas::dtag {args} {
    eval $itk_component(canvas) dtag $args
    eval $itk_component(canvas) dtag $args
    configure -autoresize $itk_option(-autoresize)
    configure -autoresize $itk_option(-autoresize)
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: find searchCommand ?arg arg ...?
# METHOD: find searchCommand ?arg arg ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::find {args} {
body iwidgets::Scrolledcanvas::find {args} {
    return [eval $itk_component(canvas) find $args]
    return [eval $itk_component(canvas) find $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: focus ?tagOrId?
# METHOD: focus ?tagOrId?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::focus {args} {
body iwidgets::Scrolledcanvas::focus {args} {
    return [eval $itk_component(canvas) focus $args]
    return [eval $itk_component(canvas) focus $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: gettags tagOrId
# METHOD: gettags tagOrId
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::gettags {args} {
body iwidgets::Scrolledcanvas::gettags {args} {
    return [eval $itk_component(canvas) gettags $args]
    return [eval $itk_component(canvas) gettags $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: icursor tagOrId index
# METHOD: icursor tagOrId index
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::icursor {args} {
body iwidgets::Scrolledcanvas::icursor {args} {
    eval $itk_component(canvas) icursor $args
    eval $itk_component(canvas) icursor $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: index tagOrId index
# METHOD: index tagOrId index
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::index {args} {
body iwidgets::Scrolledcanvas::index {args} {
    return [eval $itk_component(canvas) index $args]
    return [eval $itk_component(canvas) index $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: insert tagOrId beforeThis string
# METHOD: insert tagOrId beforeThis string
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::insert {args} {
body iwidgets::Scrolledcanvas::insert {args} {
    eval $itk_component(canvas) insert $args
    eval $itk_component(canvas) insert $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: itemconfigure tagOrId ?option? ?value? ?option value ...?
# METHOD: itemconfigure tagOrId ?option? ?value? ?option value ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::itemconfigure {args} {
body iwidgets::Scrolledcanvas::itemconfigure {args} {
    set retval [eval $itk_component(canvas) itemconfigure $args]
    set retval [eval $itk_component(canvas) itemconfigure $args]
    configure -autoresize $itk_option(-autoresize)
    configure -autoresize $itk_option(-autoresize)
    return $retval
    return $retval
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: itemcget tagOrId ?option?
# METHOD: itemcget tagOrId ?option?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::itemcget {args} {
body iwidgets::Scrolledcanvas::itemcget {args} {
    set retval [eval $itk_component(canvas) itemcget $args]
    set retval [eval $itk_component(canvas) itemcget $args]
    return $retval
    return $retval
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: lower tagOrId ?belowThis?
# METHOD: lower tagOrId ?belowThis?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::lower {args} {
body iwidgets::Scrolledcanvas::lower {args} {
    eval $itk_component(canvas) lower $args
    eval $itk_component(canvas) lower $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: move tagOrId xAmount yAmount
# METHOD: move tagOrId xAmount yAmount
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::move {args} {
body iwidgets::Scrolledcanvas::move {args} {
    eval $itk_component(canvas) move $args
    eval $itk_component(canvas) move $args
    configure -autoresize $itk_option(-autoresize)
    configure -autoresize $itk_option(-autoresize)
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: postscript ?option value ...?
# METHOD: postscript ?option value ...?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::postscript {args} {
body iwidgets::Scrolledcanvas::postscript {args} {
    #
    #
    # Make sure the fontmap is in scope.
    # Make sure the fontmap is in scope.
    #
    #
    set fontmap ""
    set fontmap ""
    regexp -- {-fontmap +([^ ]+)} $args all fontmap
    regexp -- {-fontmap +([^ ]+)} $args all fontmap
    if {$fontmap != ""} {
    if {$fontmap != ""} {
        global $fontmap
        global $fontmap
    }
    }
    return [eval $itk_component(canvas) postscript $args]
    return [eval $itk_component(canvas) postscript $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: raise tagOrId ?aboveThis?
# METHOD: raise tagOrId ?aboveThis?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::raise {args} {
body iwidgets::Scrolledcanvas::raise {args} {
    eval $itk_component(canvas) raise $args
    eval $itk_component(canvas) raise $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: scale tagOrId xOrigin yOrigin xScale yScale
# METHOD: scale tagOrId xOrigin yOrigin xScale yScale
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::scale {args} {
body iwidgets::Scrolledcanvas::scale {args} {
    eval $itk_component(canvas) scale $args
    eval $itk_component(canvas) scale $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: scan option args
# METHOD: scan option args
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::scan {args} {
body iwidgets::Scrolledcanvas::scan {args} {
    eval $itk_component(canvas) scan $args
    eval $itk_component(canvas) scan $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: select option ?tagOrId arg?
# METHOD: select option ?tagOrId arg?
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::select {args} {
body iwidgets::Scrolledcanvas::select {args} {
    eval $itk_component(canvas) select $args
    eval $itk_component(canvas) select $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: type tagOrId
# METHOD: type tagOrId
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::type {args} {
body iwidgets::Scrolledcanvas::type {args} {
    return [eval $itk_component(canvas) type $args]
    return [eval $itk_component(canvas) type $args]
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: xview index
# METHOD: xview index
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::xview {args} {
body iwidgets::Scrolledcanvas::xview {args} {
    eval $itk_component(canvas) xview $args
    eval $itk_component(canvas) xview $args
}
}
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: yview index
# METHOD: yview index
# ------------------------------------------------------------------
# ------------------------------------------------------------------
body iwidgets::Scrolledcanvas::yview {args} {
body iwidgets::Scrolledcanvas::yview {args} {
    eval $itk_component(canvas) yview $args
    eval $itk_component(canvas) yview $args
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.