Toplevel - base class for mega-widgets in a top-level window
itk::Archetype <- itk::Toplevel
background cursor See the "options" manual entry for details on the standard options.
Name: title Class: Title Command-Line Switch: -title Sets the title that the window manager displays in the title bar above the window. The default title is the null string. _________________________________________________________________
The Toplevel class inherits everything from the Archetype class, and adds a Tk toplevel called the "hull" component to represent the body of the mega-widget. The window class name for the hull is set to the most-specific class name for the mega-widget. The protected variable itk_interior contains the window path name for the "hull" component. Derived classes specialize this widget by packing other widget components into the hull. Since the hull for the Toplevel class is implemented with a Tk toplevel, mega-widgets in the Toplevel class have their own toplevel window. This class is used to create dialog boxes and other pop-up windows.
Name: hull Class: Toplevel The "hull" component acts as the body for the entire mega- widget. Other components are packed into the hull to further specialize the widget.
The following example implements a MessageInfo mega-widget. It creates a pop-up message that the user can dismiss by pushing the "Dismiss" button. option add *MessageInfo.title "Notice" widgetDefault itcl::class MessageInfo { inherit itk::Toplevel constructor {args} { itk_component add dismiss { button $itk_interior.dismiss -text "Dismiss" -command "destroy $itk_component(hull)" } pack $itk_component(dismiss) -side bottom -pady 4 itk_component add separator { frame $itk_interior.sep -height 2 -borderwidth 1 -relief sunken } pack $itk_component(separator) -side bottom -fill x -padx 4 itk_component add icon { label $itk_interior.icon -bitmap info } pack $itk_component(icon) -side left -padx 8 -pady 8 itk_component add infoFrame { frame $itk_interior.info } pack $itk_component(infoFrame) -side left -expand yes -fill both -padx 4 -pady 4 itk_component add message { label $itk_interior.mesg -width 20 } { usual rename -text -message message Text } pack $itk_component(message) -expand yes -fill both eval itk_initialize $args after idle [code $this centerOnScreen] } protected method centerOnScreen {} { update idletasks set wd [winfo reqwidth $itk_component(hull)] set ht [winfo reqheight $itk_component(hull)] set x [expr ([winfo screenwidth $itk_component(hull)]-$wd)/2] set y [expr ([winfo screenheight $itk_component(hull)]-$ht)/2] wm geometry $itk_component(hull) +$x+$y } } itk::usual MessageInfo { keep -background -cursor -foreground -font keep -activebackground -activeforeground -disabledforeground keep -highlightcolor -highlightthickness } # # EXAMPLE: Create a notice window: # MessageInfo .m -message "File not found:\n/usr/local/bin/foo"
itk, Archetype, Widget, mega-widget
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.