OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tcl8.6.12 / pkgs / itcl4.2.2 / doc / itclcomponent.n
diff --git a/util/src/TclTk/tcl8.6.12/pkgs/itcl4.2.2/doc/itclcomponent.n b/util/src/TclTk/tcl8.6.12/pkgs/itcl4.2.2/doc/itclcomponent.n
new file mode 100644 (file)
index 0000000..be1c8ff
--- /dev/null
@@ -0,0 +1,46 @@
+'\"
+'\" Copyright (c) 2008 Arnulf Wiedemann
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+.TH component n 4.0 itcl "[incr\ Tcl]"
+.so man.macros
+.BS
+'\" Note:  do not modify the .SH NAME line immediately below!
+.SH NAME
+itcl::component \- define components for extendedclass, widget or widgetadaptor
+.PP
+Parts of this description are "borrowed" from Tcl extension [snit], as the functionality is mostly identical.
+.SH WARNING!
+This is new functionality in [incr Tcl] where the API can still change!!
+.SH SYNOPSIS
+.nf
+\fBpublic component \fIcomp\fR ?\fB-inherit\fR?
+\fBprotected component \fIcomp\fR ?\fB-inherit\fR?
+\fBprivate component \fIcomp\fR ?\fB-inherit\fR?
+.fi
+.BE
+
+.SH DESCRIPTION
+.PP
+The \fBcomponent\fR command is used inside an \fB[incr\ Tcl]\fR
+extendedclass/widget/widgetadaptor definition to define components.
+.PP
+Explicitly declares a component called comp, and automatically defines
+the component's instance variable.
+.PP
+If the \fI-inherit\fR option is specified then all unknown methods
+and options will be delegated to this component. The name -inherit
+implies that instances of this new type inherit, in a sense,
+the methods and options of the component. That is,
+-inherit yes is equivalent to:
+.PP
+.CS
+component mycomp
+delegate option * to mycomp
+delegate method * to mycomp
+.CE
+
+.SH KEYWORDS
+component, widget, widgetadaptor, extendedclass