summaryrefslogtreecommitdiffstats
path: root/doc/ttk_style.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-26 20:13:21 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-26 20:13:21 (GMT)
commitc19dbf2054468ec3004041fef41a4b01a465eb54 (patch)
tree8355bd802491be2c1de242e0598914b0bb36fca5 /doc/ttk_style.n
parent7eb434043e09e028ca9af4dc444bcf3dd63b3c10 (diff)
downloadtk-c19dbf2054468ec3004041fef41a4b01a465eb54.zip
tk-c19dbf2054468ec3004041fef41a4b01a465eb54.tar.gz
tk-c19dbf2054468ec3004041fef41a4b01a465eb54.tar.bz2
* doc/*.1: Revert doc changes that broke
* doc/*.3: `make html` so we can get the release * doc/*.n: out the door.
Diffstat (limited to 'doc/ttk_style.n')
-rw-r--r--doc/ttk_style.n131
1 files changed, 63 insertions, 68 deletions
diff --git a/doc/ttk_style.n b/doc/ttk_style.n
index 20e3a41..81d862e 100644
--- a/doc/ttk_style.n
+++ b/doc/ttk_style.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_style.n,v 1.5 2007/10/24 14:32:59 dkf Exp $
+'\" RCS: @(#) $Id: ttk_style.n,v 1.6 2007/10/26 20:13:23 dgp Exp $
'\"
.so man.macros
.TH ttk_style n 8.5 Tk "Tk Themed Widget"
@@ -15,111 +15,104 @@ ttk_style \- Control overall look and feel of widgets
\fBttk::style\fR \fIoption\fR ?\fIargs\fR?
.BE
-.BS
.SH NOTES
.PP
-This manpage has not been written yet. Please see the Tcl'2004 conference
-presentation, available at
-http://tktable.sourceforge.net/tile/tile-tcl2004.pdf
-.BE
+This manpage has not been written yet.
+Please see the Tcl'2004 conference presentation,
+available at http://tktable.sourceforge.net/tile/tile-tcl2004.pdf
.SH DEFINITIONS
.PP
-Each Ttk widget is assigned a \fIstyle\fR, which specifies the set of elements
-making up the widget and how they are arranged, along with dynamic and default
-settings for element resources. By default, the style name is the same as the
-widget's class; this may be overridden by the \fB\-style\fR option.
+Each widget is assigned a \fIstyle\fR,
+which specifies the set of elements making up the widget
+and how they are arranged, along with dynamic and default
+settings for element resources.
+By default, the style name is the same as the widget's class;
+this may be overridden by the \fB-style\fR option.
.PP
-A \fItheme\fR is a collection of elements and styles which controls the
-overall look and feel of an application.
+A \fItheme\fR is a collection of elements and styles
+which controls the overall look and feel of an application.
.SH DESCRIPTION
The \fBttk::style\fR command takes the following arguments:
.TP
-\fBttk::style configure \fIstyle\fR ?\fI\-option \fR?\fIvalue option value...\fR? ?
-.
+\fBttk::style configure \fIstyle\fR ?\fI-option \fR?\fIvalue option value...\fR? ?
Sets the default value of the specified option(s) in \fIstyle\fR.
.TP
-\fBttk::style map \fIstyle\fR ?\fI\-option\fR { \fIstatespec value\fR } ... ?
-.
-Sets dynamic values of the specified option(s) in \fIstyle\fR. Each
-\fIstatespec / value\fR pair is examined in order; the value corresponding to
-the first matching \fIstatespec\fR is used.
+\fBttk::style map \fIstyle\fR ?\fI-option\fR { \fIstatespec value\fR } ... ?
+Sets dynamic values of the specified option(s) in \fIstyle\fR.
+Each \fIstatespec / value\fR pair is examined in order;
+the value corresponding to the first matching \fIstatespec\fR
+is used.
.TP
-\fBttk::style lookup \fIstyle\fR \fI\-option \fR?\fIstate\fR? ?\fIdefault\fR?
-.
-Returns the value specified for \fI\-option\fR in style \fIstyle\fR in state
-\fIstate\fR, using the standard lookup rules for element options. \fIstate\fR
-is a list of state names; if omitted, it defaults to all bits off (the
-.QW normal
-state). If the \fIdefault\fR argument is present, it is used as a
-fallback value in case no specification for \fI\-option\fR is found.
+\fBttk::style lookup \fIstyle\fR \fI-option \fR?\fIstate \fR?\fIdefault\fR??
+Returns the value specified for \fI-option\fR in style \fIstyle\fR
+in state \fIstate\fR, using the standard lookup rules for element options.
+\fIstate\fR is a list of state names; if omitted,
+it defaults to all bits off (the ``normal'' state).
+If the \fIdefault\fR argument is present, it is used as a fallback
+value in case no specification for \fI-option\fR is found.
.\" Otherwise -- signal error? return empty string? Leave unspecified for now.
.TP
\fBttk::style layout \fIstyle\fR ?\fIlayoutSpec\fR?
-.
-Define the widget layout for style \fIstyle\fR. See "\fBLAYOUTS\fR" below for
-the format of \fIlayoutSpec\fR. If \fIlayoutSpec\fR is omitted, return the
-layout specification for style \fIstyle\fR.
-.TP
+Define the widget layout for style \fIstyle\fR.
+See "\fBLAYOUTS\fR" below for the format of \fIlayoutSpec\fR.
+If \fIlayoutSpec\fR is omitted, return the layout specification
+for style \fIstyle\fR.
+.TP
\fBttk::style element create\fR \fIelementName\fR \fItype\fR ?\fIargs...\fR?
-.
-Creates a new element in the current theme of type \fItype\fR. The only
-built-in element type is \fIimage\fR (see \fIttk_image(n)\fR), although themes
-may define other element types (see \fBTtk_RegisterElementFactory\fR).
+Creates a new element in the current theme of type \fItype\fR.
+The only built-in element type is \fIimage\fR (see \fIimage(n)\fR),
+although themes may define other element types
+(see \fBTtk_RegisterElementFactory\fR).
.TP
\fBttk::style element names\fR
-.
Returns the list of elements defined in the current theme.
.TP
\fBttk::style element options \fIelement\fR
-.
Returns the list of \fIelement\fR's options.
.TP
-\fBttk::style theme create\fR \fIthemeName\fR ?\fB\-parent \fIbasedon\fR? ?\fB\-settings \fIscript...\fR ?
-.
-Creates a new theme. It is an error if \fIthemeName\fR already exists. If
-\fI\-parent\fR is specified, the new theme will inherit styles, elements, and
-layouts from the parent theme \fIbasedon\fB. If \fI\-settings\fR is present,
-\fIscript\fR is evaluated in the context of the new theme as per \fBttk::style
-theme settings\fR.
+\fBttk::style theme create\fR \fIthemeName\fR ?\fB-parent \fIbasedon\fR? ?\fB-settings \fIscript...\fR ?
+Creates a new theme. It is an error if \fIthemeName\fR already exists.
+If \fI-parent\fR is specified, the new theme will inherit
+styles, elements, and layouts from the parent theme \fIbasedon\fB.
+If \fI-settings\fR is present, \fIscript\fR is evaluated in the
+context of the new theme as per \fBttk::style theme settings\fR.
.TP
\fBttk::style theme settings \fIthemeName\fR \fIscript\fR
-.
-Temporarily sets the current theme to \fIthemeName\fR, evaluate \fIscript\fR,
-then restore the previous theme. Typically \fIscript\fR simply defines styles
-and elements, though arbitrary Tcl code may appear.
+Temporarily sets the current theme to \fIthemeName\fR,
+evaluate \fIscript\fR, then restore the previous theme.
+Typically \fIscript\fR simply defines styles and elements,
+though arbitrary Tcl code may appear.
.TP
\fBttk::style theme names\fR
-.
Returns a list of the available themes.
.TP
\fBttk::style theme use\fR \fIthemeName\fR
-.
Sets the current theme to \fIthemeName\fR, and refreshes all widgets.
+
.SH LAYOUTS
-A \fIlayout\fR specifies a list of elements, each followed by one or more
-options specifying how to arrange the element. The layout mechanism uses a
-simplified version of the \fBpack\fR geometry manager: given an initial
-cavity, each element is allocated a parcel. Valid options are:
+A \fIlayout\fR specifies a list of elements, each followed
+by one or more options specifying how to arrange the element.
+The layout mechanism uses a simplified version of the \fBpack\fR
+geometry manager: given an initial cavity,
+each element is allocated a parcel.
+Valid options are:
.TP
-\fB\-side \fIside\fR
-.
-Specifies which side of the cavity to place the element; one of \fBleft\fR,
-\fBright\fR, \fBtop\fR, or \fBbottom\fR. If omitted, the element occupies the
-entire cavity.
+\fB-side \fIside\fR
+Specifies which side of the cavity to place the element;
+one of \fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR.
+If omitted, the element occupies the entire cavity.
.TP
-\fB\-sticky \fI[nswe]\fR
-.
-Specifies where the element is placed inside its allocated parcel. The syntax
-is as in the equivalently-named option to the \fBgrid\fR geometry manager.
+\fB-sticky \fI[nswe]\fR
+Specifies where the element is placed inside its allocated parcel.
.TP
-\fB\-children \fI{ sublayout... }\fR
-.
+\fB-children \fI{ sublayout... }\fR
Specifies a list of elements to place inside the element.
.\" Also: -border, -unit, -expand: may go away.
-.SH EXAMPLE
+.PP
+For example:
.CS
-\fBttk::style\fR layout Horizontal.TScrollbar {
+ttk::style layout Horizontal.TScrollbar {
Scrollbar.trough -children {
Scrollbar.leftarrow -side left
Scrollbar.rightarrow -side right
@@ -127,7 +120,9 @@ Specifies a list of elements to place inside the element.
}
}
.CE
+
.SH "SEE ALSO"
ttk_intro(n), ttk_widget(n), photo(n)
+
.SH KEYWORDS
style, theme, appearance