Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
brlcad / usr / brlcad / share / tclscripts / rtwizard / lib / FeedbackDialog.itk
Size: Mime:
#              F E E D B A C K D I A L O G . I T K
# BRL-CAD
#
# Copyright (c) 2004-2016 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this file; see the file named COPYING for more
# information.
#
###

#
# Required packages
#
package require Itcl
package require Itk
package require Iwidgets

namespace eval RtWizard {

    package provide FeedbackDialog 1.0

    ::itcl::class FeedbackDialog {
	inherit ::iwidgets::Shell

	public {
	    constructor {args} {}
	    method inform {comment steps}
	}
    }

    itcl::body FeedbackDialog::constructor {args} {
	set cs [$this childsite]

	itk_component add fb {
	    iwidgets::feedback $cs.fb \
		-barcolor "#9999cc" \
		-steps 100 \
		-labelpos n
	}

	pack $itk_component(fb) -fill x -expand 1
	eval itk_initialize $args
	$this center
    }

    itcl::body FeedbackDialog::inform { comment steps } {
	$itk_component(fb) configure \
	    -labeltext $comment
	$itk_component(fb) step $steps
	update idletasks
    }
}


# Local Variables:
# mode: Tcl
# tab-width: 8
# c-basic-offset: 4
# tcl-indent-level: 4
# indent-tabs-mode: t
# End:
# ex: shiftwidth=4 tabstop=8