diff options
author | jenglish <jenglish@flightlab.com> | 2006-12-09 20:53:34 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2006-12-09 20:53:34 (GMT) |
commit | aa6a6357d7817246ce156df37f80d09099c4a432 (patch) | |
tree | 7942f315ad17189194fd68ddf9fbae2a126b28ab /doc | |
parent | 4d019dc6fa1bb6b988c93a610ad077d776b5574e (diff) | |
download | tk-aa6a6357d7817246ce156df37f80d09099c4a432.zip tk-aa6a6357d7817246ce156df37f80d09099c4a432.tar.gz tk-aa6a6357d7817246ce156df37f80d09099c4a432.tar.bz2 |
Merged duplicate functionality between image element factory,
image element, and -image option processing. Image element
factory now takes an imageSpec argument instead of a separate
image name and -map option.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ttk_image.n | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/doc/ttk_image.n b/doc/ttk_image.n index bcda678..30c6698 100644 --- a/doc/ttk_image.n +++ b/doc/ttk_image.n @@ -1,6 +1,6 @@ '\" '\" Copyright (c) 2004 Joe English -'\" $Id: ttk_image.n,v 1.3 2006/11/16 13:25:11 dkf Exp $ +'\" $Id: ttk_image.n,v 1.4 2006/12/09 20:53:35 jenglish Exp $ '\" .so man.macros .TH ttk_image n 8.5 Tk "Tk Themed Widget" @@ -8,12 +8,17 @@ .SH NAME ttk_image \- Define an element based on an image .SH SYNOPSIS -\fBttk::style create element \fIname\fR \fBimage\fR \fIimageName\fR ?\fIoptions\fR? +\fBttk::style element create \fIname\fR \fBimage\fR \fIimageSpec\fR ?\fIoptions\fR? .BE .SH DESCRIPTION The \fIimage\fR element factory creates a new element in the current theme whose visual appearance is determined -by a Tk image. +by Tk images. +\fIimageSpec\fP is a list of one or more elements. +The first element is the default image name. +The rest of the list is a sequence of \fIstatespec / value\fR +pairs specifying other images to use when the element is +in a particular state or combination of states. .SH OPTIONS Valid \fIoptions\fR are: .TP @@ -26,16 +31,6 @@ See \fBIMAGE STRETCHING\fR, below. Specifies a minimum height for the element. If less than zero, the base image's height is used as a default. .TP -\fB-map { \fIstatespec\fR \fIimage\fR.. } -Specifies auxilliary images to use in different states. -Each \fIstatespec\fR is a list of state names optionally -prefixed by an exclamation point, as in \fBttk::style map\fR. -Each \fIimageName\fR is the name of a Tk image -defined with \fBimage create ...\fR. -When the element is displayed, each \fIstatespec\fR is -tested in order, and the \fIimage\fR corresponding to -the first matching \fIstatespec\fR is used. -If none match, the base \fIimageName\fR is used. .TP \fB-padding\fR \fIpadding\fR Specifies the element's interior padding. Defaults to @@ -62,10 +57,12 @@ left and right edges (which may be tiled vertically), and the central area (which may be tiled in both directions). .SH "EXAMPLE" .CS -set button(normal) [image create photo -file button.png] -set button(pressed) [image create photo -file button-pressed.png] -ttk::style element create Button.button \fBimage\fR $button(normal) \e - -border {2 4} -map [list pressed $button(pressed)] -sticky nswe +set img1 [image create photo -file button.png] +set img2 [image create photo -file button-pressed.png] +set img3 [image create photo -file button-active.png] +style element create Button.button image \e + [list $img1 pressed $img2 active $img3] \e + -border {2 4} -sticky we .CE .SH "SEE ALSO" image(n), photo(n) |