summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-18 20:34:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-18 20:34:07 (GMT)
commitd9d72a5c6333378bfc446491736461be56eef54b (patch)
tree27c630ccd382d29ce3f8f6c4b83c4eccd31f46cb
parentd5c84fca14512e2a541d3c8e5b49a00f87818a05 (diff)
downloadtk-d9d72a5c6333378bfc446491736461be56eef54b.zip
tk-d9d72a5c6333378bfc446491736461be56eef54b.tar.gz
tk-d9d72a5c6333378bfc446491736461be56eef54b.tar.bz2
Document user1-user3 ttk widget states
-rw-r--r--doc/ttk_widget.n74
1 files changed, 37 insertions, 37 deletions
diff --git a/doc/ttk_widget.n b/doc/ttk_widget.n
index 9b34259..f21135d 100644
--- a/doc/ttk_widget.n
+++ b/doc/ttk_widget.n
@@ -114,12 +114,12 @@ If fewer than four elements are specified,
\fIbottom\fR defaults to \fItop\fR,
\fIright\fR defaults to \fIleft\fR, and
\fItop\fR defaults to \fIleft\fR.
-In other words, a list of three numbers specify the left, vertical, and right padding;
-a list of two numbers specify the horizontal and the vertical padding;
+In other words, a list of three numbers specify the left, vertical, and right
+padding; a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
.OP \-text text Text
-Specifies a text string to be displayed inside the widget
-(unless overridden by \fB\-textvariable\fR).
+Specifies a text string to be displayed inside the widget (unless overridden
+by \fB\-textvariable\fR for the widgets supporting this option).
.OP \-textvariable textVariable Variable
Specifies the name of a global variable whose value will be used
in place of the \fB\-text\fR resource.
@@ -144,11 +144,13 @@ setting it changes the widget state,
but the \fBstate\fR widget command
does not affect the \fB\-state\fR option.
.SH COMMANDS
+.\" METHOD: cget
.TP
\fIpathName \fBcget \fIoption\fR
.
Returns the current value of the configuration option given
by \fIoption\fR.
+.\" METHOD: configure
.TP
\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
@@ -165,6 +167,7 @@ and current value.
.\" Note: Ttk widgets don't use TK_OPTION_SYNONYM.
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR.
+.\" METHOD: identify
.TP
\fIpathName \fBidentify element \fIx y\fR
.
@@ -172,7 +175,9 @@ Returns the name of the element under the point given
by \fIx\fR and \fIy\fR, or an empty string if the point does
not lie within any element.
\fIx\fR and \fIy\fR are pixel coordinates relative to the widget.
-Some widgets accept other \fBidentify\fR subcommands.
+Some widgets accept other \fBidentify\fR subcommands described
+in these widgets documentation.
+.\" METHOD: instate
.TP
\fIpathName \fBinstate \fIstatespec\fR ?\fIscript\fR?
.
@@ -183,6 +188,7 @@ If \fIscript\fR is specified, equivalent to
.CS
if {[\fIpathName\fR instate \fIstateSpec\fR]} \fIscript\fR
.CE
+.\" METHOD: state
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
.
@@ -200,14 +206,17 @@ will restore \fIpathName\fR to the original state.
If \fIstateSpec\fR is not specified,
returns a list of the currently-enabled state flags.
.RE
+.\" METHOD: xview
.TP
\fIpathName \fBxview \fIargs\fR
+.
This command is used to query and change the horizontal position of the
content in the widget's window. It can take any of the following
forms:
.RS
.TP
\fIpathName \fBxview\fR
+.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the horizontal span that is visible in the window.
@@ -217,16 +226,19 @@ in the window, and 40% of the content is off-screen to the right.
These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
option.
.TP
-\fIpathName \fBxview\fR \fIindex\fR
+\fIpathName \fBxview\fI index\fR
+.
Adjusts the view in the window so that the content given by \fIindex\fR
is displayed at the left edge of the window.
.TP
\fIpathName \fBxview moveto\fI fraction\fR
+.
Adjusts the view in the window so that the character \fIfraction\fR of the
way through the content appears at the left edge of the window.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fBxview scroll \fInumber what\fR
+.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
@@ -239,14 +251,17 @@ If \fInumber\fR is negative then characters farther to the left
become visible; if it is positive then characters farther to the right
become visible.
.RE
+.\" METHOD: yview
.TP
\fIpathName \fByview \fIargs\fR
+.
This command is used to query and change the vertical position of the
content in the widget's window. It can take any of the following
forms:
.RS
.TP
\fIpathName \fByview\fR
+.
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the vertical span that is visible in the window.
@@ -256,16 +271,19 @@ in the window, and 40% of the content is off-screen to the bottom.
These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
option.
.TP
-\fIpathName \fByview\fR \fIindex\fR
+\fIpathName \fByview\fI index\fR
+.
Adjusts the view in the window so that the content given by \fIindex\fR
is displayed at the top edge of the window.
.TP
\fIpathName \fByview moveto\fI fraction\fR
+.
Adjusts the view in the window so that the item \fIfraction\fR of the
way through the content appears at the top edge of the window.
\fIFraction\fR must be a fraction between 0 and 1.
.TP
\fIpathName \fByview scroll \fInumber what\fR
+.
This command shifts the view in the window up or down according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
@@ -281,9 +299,7 @@ become visible.
.SH "WIDGET STATES"
The widget state is a bitmap of independent state flags.
Widget state flags include:
-.TP
-\fBactive\fR
-.
+.IP \fBactive\fR
The mouse cursor is over the widget
and pressing a mouse button will cause some action to occur. (aka
.QW prelight
@@ -291,66 +307,50 @@ and pressing a mouse button will cause some action to occur. (aka
.QW hot
(Windows),
.QW hover ).
-.TP
-\fBdisabled\fR
-.
+.IP \fBdisabled\fR
Widget is disabled under program control (aka
.QW unavailable ,
.QW inactive ).
-.TP
-\fBfocus\fR
-.
+.IP \fBfocus\fR
Widget has keyboard focus.
-.TP
-\fBpressed\fR
-.
+.IP \fBpressed\fR
Widget is being pressed (aka
.QW armed
in Motif).
-.TP
-\fBselected\fR
-.
+.IP \fBselected\fR
.QW On ,
.QW true ,
or
.QW current
for things like checkbuttons and radiobuttons.
-.TP
-\fBbackground\fR
-.
+.IP \fBbackground\fR
Windows and the Mac have a notion of an
.QW active
or foreground window.
The \fBbackground\fR state is set for widgets in a background window,
and cleared for those in the foreground window.
-.TP
-\fBreadonly\fR
-.
+.IP \fBreadonly\fR
Widget should not allow user modification.
-.TP
-\fBalternate\fR
-.
+.IP \fBalternate\fR
A widget-specific alternate display format.
For example, used for checkbuttons and radiobuttons in the
.QW tristate
or
.QW mixed
state, and for buttons with \fB\-default active\fR.
-.TP
-\fBinvalid\fR
-.
+.IP \fBinvalid\fR
The widget's value is invalid.
(Potential uses: scale widget value out of bounds,
entry widget value failed validation.)
-.TP
-\fBhover\fR
-.
+.IP \fBhover\fR
The mouse cursor is within the widget.
This is similar to the \fBactive\fP state;
it is used in some themes for widgets that
provide distinct visual feedback for
the active widget in addition to the active element
within the widget.
+.IP \fBuser1\fR-\fBuser3\fR
+Freely usable for other purposes
.PP
A \fIstate specification\fR or \fIstateSpec\fR is a list
of state names, optionally prefixed with an exclamation point (!)