head	1.4;
access;
symbols
	core-8-5-9:1.4.2.3
	core-8-5-8:1.4.2.2
	macosx-cocoa-merge:1.4
	macosx-cocoa-premerge:1.4
	macosx-carbon-freeze:1.4
	core-8-5-branch:1.4.0.2
	core-8-6-b1:1.4
	core-8-6-a3:1.4
	core-8-6-a2:1.3
	core-8-6-a1:1.2;
locks; strict;
comment	@# @;


1.4
date	2008.09.23.13.36.58;	author dkf;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2008.06.30.22.57.03;	author dkf;	state Exp;
branches;
next	1.2;

1.2
date	2008.04.09.09.28.05;	author patthoyts;	state Exp;
branches;
next	1.1;

1.1
date	2008.04.08.23.30.45;	author patthoyts;	state Exp;
branches;
next	;

1.4.2.1
date	2008.09.23.13.36.58;	author patthoyts;	state dead;
branches;
next	1.4.2.2;

1.4.2.2
date	2009.05.14.00.53.04;	author patthoyts;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2010.08.26.02.06.09;	author hobbs;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Fix [Bug 2118116]
@
text
@'\"
'\" Copyright (c) 2008 Pat Thoyts
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: ttk_vsapi.n,v 1.3 2008/06/30 22:57:03 dkf Exp $
'\" 
.so man.macros
.TH ttk_vsapi n 8.5 Tk "Tk Themed Widget"
.BS
.SH NAME
ttk_vsapi \- Define a Microsoft Visual Styles element
.SH SYNOPSIS
\fBttk::style element create \fIname\fR \fBvsapi\fR \fIclassName\fR \fIpartId\fR ?\fIstateMap\fR? ?\fIoptions\fR?
.BE
.SH DESCRIPTION
.PP
The \fIvsapi\fR element factory creates a new element
in the current theme whose visual appearance is drawn using the
Microsoft Visual Styles API which is reponsible for the themed styles
on Windows XP and Vista. This factory permits any of the Visual
Styles parts to be declared as ttk elements that can then be
included in a style layout to modify the appearance of ttk widgets.
.PP
\fIclassName\fR and \fIpartId\fR are required parameters and specify
the Visual Styles class and part as given in the Microsoft
documentation. The \fIstateMap\fR may be provided to map ttk states to
Visual Styles API states (see \fBSTATE MAP\fR).
.SH "OPTIONS"
.PP
Valid \fIoptions\fR are:
.TP
\fB\-padding\fR \fIpadding\fR
Specify the element's interior padding.
\fIpadding\fR is a list of up to four integers specifying
the left, top, right and bottom padding quantities respectively.
This option may not be mixed with any other options.
.TP
\fB\-margins\fR \fIpadding\fR
Specifies the elements exterior padding.
\fIpadding\fR is a list of up to four integers specifying
the left, top, right and bottom padding quantities respectively.
This option may not be mixed with any other options.
.TP
\fB\-width\fR \fIwidth\fR
Specifies the height for the element. If this option is set then
the Visual Styles API will not be queried for the recommended
size or the part. If this option is set then \fI-height\fR should
also be set. The \fI-width\fR and \fI-height\fR options cannot
be mixed with the \fI-padding\fR or \fI-margins\fR options.
.TP
\fB\-height\fR \fIheight\fR
Specifies the height of the element. See the comments for \fI-width\fR.
.SH "STATE MAP"
.PP
The \fIstateMap\fR parameter is a list of ttk states and the
corresponding Visual Styles API state value.
This permits the element appearence to respond to changes in the
widget state such as becoming active or being pressed. The list should
be as described for the \fBttk::style map\fR command but note that the
last pair in the list should be the default state and is typically and
empty list and 1. Unfortunately all the Visual Styles parts have
different state values and these must be looked up either in the
Microsoft documentation or more likely in the header files. The
original header to use was \fItmschema.h\fR but in more recent
versions of the Windows Development Kit this is \fIvssym32.h\fR.
.PP
If no \fIstateMap\fR parameter is given there is an implicit default
map of {{} 1}
.SH "EXAMPLE"
.PP
Create a correctly themed close button by changing the layout of 
a \fBttk::button\fR(n). This uses the WINDOW part WP_SMALLCLOSEBUTTON
and as documented the states CBS_DISABLED, CBS_HOT, CBS_NORMAL and
CBS_PUSHED are mapped from ttk states.
.CS
ttk::style element create smallclose vsapi WINDOW 19 \\
    {disabled 4 pressed 3 active 2 {} 1}
ttk::style layout CloseButton {CloseButton.smallclose -sticky news}
pack [ttk::button .close -style CloseButton]
.CE
.PP
Change the appearence of a \fBttk::checkbutton\fR(n) to use the
Explorer pin part EBP_HEADERPIN.
.CS
ttk::style element create pin vsapi EXPLORERBAR 3 {
    {pressed !selected} 3
    {active !selected} 2
    {pressed selected} 6
    {active selected} 5
    {selected} 4
    {} 1
}
ttk::style layout Explorer.Pin {Explorer.Pin.pin -sticky news}
pack [ttk::checkbutton .pin -style Explorer.Pin]
.CE
.SH "SEE ALSO"
ttk::intro(n), ttk::widget(n), ttk::style(n), ttk_image(n)
.SH "KEYWORDS"
style, theme, appearance, windows
'\" Local Variables:
'\" mode: nroff
'\" End:
@


1.4.2.1
log
@file ttk_vsapi.n was added on branch core-8-5-branch on 2009-05-14 00:53:04 +0000
@
text
@d1 104
@


1.4.2.2
log
@Backported support for the Vista theme.
This requires the vsapi element engine, the hover state and the theme script definition.
@
text
@a0 97
'\" -*- nroff -*-
'\" Copyright (c) 2008 Pat Thoyts
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id$
'\" 
.so man.macros
.TH ttk_vsapi n 8.5 Tk "Tk Themed Widget"
.BS
.SH NAME
ttk_vsapi \- Define a Microsoft Visual Styles element
.SH SYNOPSIS
\fBttk::style element create \fIname\fR \fBvsapi\fR \fIclassName\fR \fIpartId\fR ?\fIstateMap\fR? ?\fIoptions\fR?
.BE
.SH DESCRIPTION
The \fIvsapi\fR element factory creates a new element
in the current theme whose visual appearance is drawn using the
Microsoft Visual Styles API which is reponsible for the themed styles
on Windows XP and Vista. This factory permits any of the Visual
Styles parts to be declared as ttk elements that can then be
included in a style layout to modify the appearance of ttk widgets.
.PP
\fIclassName\fR and \fIpartId\fR are required parameters and specify
the Visual Styles class and part as given in the Microsoft
documentation. The \fIstateMap\fR may be provided to map ttk states to
Visual Styles API states (see \fBSTATE MAP\fR).
.SH "OPTIONS"
Valid \fIoptions\fR are:
.TP
\fB\-padding\fR \fIpadding\fR
Specify the element's interior padding.
\fIpadding\fR is a list of up to four integers specifying
the left, top, right and bottom padding quantities respectively.
This option may not be mixed with any other options.
.TP
\fB\-margins\fR \fIpadding\fR
Specifies the elements exterior padding.
\fIpadding\fR is a list of up to four integers specifying
the left, top, right and bottom padding quantities respectively.
This option may not be mixed with any other options.
.TP
\fB\-width\fR \fIwidth\fR
Specifies the height for the element. If this option is set then
the Visual Styles API will not be queried for the recommended
size or the part. If this option is set then \fI-height\fR should
also be set. The \fI-width\fR and \fI-height\fR options cannot
be mixed with the \fI-padding\fR or \fI-margins\fR options.
.TP
\fB\-height\fR \fIheight\fR
Specifies the height of the element. See the comments for \fI-width\fR.
.SH "STATE MAP"
The \fIstateMap\fR parameter is a list of ttk states and the
corresponding Visual Styles API state value.
This permits the element appearence to respond to changes in the
widget state such as becoming active or being pressed. The list should
be as described for the \fBttk::style map\fR command but note that the
last pair in the list should be the default state and is typically and
empty list and 1. Unfortunately all the Visual Styles parts have
different state values and these must be looked up either in the
Microsoft documentation or more likely in the header files. The
original header to use was \fItmschema.h\fR but in more recent
versions of the Windows Development Kit this is \fIvssym32.h\fR.
.PP
If no \fIstateMap\fR parameter is given there is an implicit default
map of {{} 1}
.SH "EXAMPLE"
Create a correctly themed close button by changing the layout of 
a \fBttk::button\fR(n). This uses the WINDOW part WP_SMALLCLOSEBUTTON
and as documented the states CBS_DISABLED, CBS_HOT, CBS_NORMAL and
CBS_PUSHED are mapped from ttk states.
.CS
ttk::style element create smallclose vsapi WINDOW 19 \\
    {disabled 4 pressed 3 active 2 {} 1}
ttk::style layout CloseButton {CloseButton.smallclose -sticky news}
pack [ttk::button .close -style CloseButton]
.CE
.PP
Change the appearence of a \fBttk::checkbutton\fR(n) to use the
Explorer pin part EBP_HEADERPIN.
.CS
ttk::style element create pin vsapi EXPLORERBAR 3 {
    {pressed !selected} 3
    {active !selected} 2
    {pressed selected} 6
    {active selected} 5
    {selected} 4
    {} 1
}
ttk::style layout Explorer.Pin {Explorer.Pin.pin -sticky news}
pack [ttk::checkbutton .pin -style Explorer.Pin]
.CE
.SH "SEE ALSO"
ttk::intro(n), ttk::widget(n), ttk::style(n), ttk_image(n)
.SH "KEYWORDS"
style, theme, appearance, windows
@


1.4.2.3
log
@        Major backport of 8.6 Ttk for 8.5.9.  Most changes were only being
        committed to head (8.6), although they could apply for 8.5 as well.
        This re-sync makes future work easier to maintain and adds some
        useful work for 8.5 users. Notable changes:
        - Lots of code cleanup
        - Some bug fixes never backported
        - Addition of ttk::spinbox
        - minor color changes
        - Improved Vista/7 styling
        - Move to tile version 0.8.6 (pseudo-package)
        - ABI and API compatible (even $w identify)
        - minor new features (extended $w identify)
@
text
@d1 1
a1 1
'\"
d7 1
a7 1
'\" RCS: @@(#) $Id: ttk_vsapi.n,v 1.4 2008/09/23 13:36:58 dkf Exp $
a17 1
.PP
a29 1
.PP
a53 1
.PP
a68 1
.PP
a97 3
'\" Local Variables:
'\" mode: nroff
'\" End:
@


1.3
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@d1 1
a1 1
'\" -*- nroff -*-
d7 1
a7 1
'\" RCS: @@(#) $Id: ttk_vsapi.n,v 1.2 2008/04/09 09:28:05 patthoyts Exp $
d102 3
@


1.2
log
@Improved the element factory documentation and cross-links
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: ttk_vsapi.n,v 1.1 2008/04/08 23:30:45 patthoyts Exp $
d18 1
d31 1
d56 1
d72 1
@


1.1
log
@Provide a visual-styles API element engine to permit scripts to create
any available windows xp/vista element. Plus basic tests.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
d10 1
a10 1
.TH ttk::vsapi n 8.5 Tk "Tk Themed Widget"
d13 1
a13 1
ttk::vsapi \- Define a Microsoft Visual Styles element
d15 1
a15 2
\fBttk::style element create \fIname\fR \fBvsapi\fR \fIclassName\fR
\fIpartId\fR ?\fIstateMap\fR? ?\fIoptions\fR?
d35 2
a36 2
the left, top, right and bottom borders respectively. This option
cannot be mixed with any other options.
d39 4
a42 3
Specifies the elements exterior padding. The \fIpadding\fR is as
described for the \fI-padding\fR option. This option may not be mixed
with any other options.
d47 3
a49 3
size. If this option is set then \fI-height\fR should also be set.
The \fI-width\fR and \fI-height\fR options cannot be mixed with
the \fI-padding\fR or \fI-margins\fR options.
d60 5
a64 1
empty list and 1.
d67 1
a67 1
\fIstateMap\fR of {{} 1}
d69 13
a81 2
Change the appearence of a ttk::checkbutton to use the Explorer pin
part.
a82 1
# EXPLORERBAR EBP_HEADERPIN
d95 1
a95 1
ttk::intro(n), ttk::widget(n), ttk::style(n), ttk::image(n)
@

