⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toplevel.n

📁 这是一个Linux下的集成开发环境
💻 N
字号:
'\"'\" Copyright (c) 1993-1998  Lucent Technologies, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" RCS: $Id: Toplevel.n,v 1.1 2003/02/05 10:53:58 mdejong Exp $'\".so man.macros.TH Toplevel n 3.0 itk "[incr\ Tk]".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEToplevel \- base class for mega-widgets in a top-level window.SH "INHERITANCE"itk::Archetype <- itk::Toplevel.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBbackground\fR	\fBcursor\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName:   \fBtitle\fRClass:  \fBTitle\fRCommand-Line Switch:    \fB-title\fR.fi.IPSets the title that the window manager displays in the title barabove the window.  The default title is the null string..BE.SH DESCRIPTION.PPThe \fBToplevel\fR class inherits everything from the \fBArchetype\fRclass, and adds a Tk toplevel called the "hull" component to representthe body of the mega-widget.  The window class name for the hullis set to the most-specific class name for the mega-widget.The protected variable \fBitk_interior\fR contains the windowpath name for the "hull" component.  Derived classes specializethis widget by packing other widget components into the hull..PPSince the hull for the \fBToplevel\fR class is implemented witha Tk toplevel, mega-widgets in the \fBToplevel\fR class havetheir own toplevel window.  This class is used to create dialogboxes and other pop-up windows..SH "COMPONENTS".LP.nfName:	\fBhull\fRClass:	\fBToplevel\fR.fi.IPThe "hull" component acts as the body for the entire mega-widget.Other components are packed into the hull to further specializethe widget..SH EXAMPLE.PPThe following example implements a \fBMessageInfo\fRmega-widget.  It creates a pop-up message that theuser can dismiss by pushing the "Dismiss" button..CSoption add *MessageInfo.title "Notice" widgetDefaultclass 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    }}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".CE.SH KEYWORDSitk, Archetype, Widget, mega-widget

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -