head	1.5;
access;
symbols
	core-8-5-9:1.4.2.1
	core-8-5-8:1.4
	macosx-cocoa-merge:1.5
	macosx-cocoa-premerge:1.5
	macosx-carbon-freeze:1.5
	core-8-5-7:1.4
	core-8-5-6:1.4
	core-8-6-b1:1.5
	core-8-6-a3:1.5
	core-8-5-5:1.4
	core-8-6-a2:1.5
	core-8-5-4:1.4
	core-8-5-3:1.4
	core-8-6-a1:1.4
	core-8-5-branch:1.4.0.2
	core-8-5-2:1.4
	core-8-5-1:1.4
	core-8-5-0:1.4
	core-8-5-b3:1.3
	core-8-5-b2:1.2
	core-8-5-b1:1.2
	core-stablilizer-merge:1.2
	core-stabilizer-branch:1.2.0.2
	core-stabilizer-merge:1.4
	core-8-5-a6:1.2;
locks; strict;
comment	@.\" @;


1.5
date	2008.06.30.22.57.03;	author dkf;	state Exp;
branches;
next	1.4;

1.4
date	2007.12.13.15.23.44;	author dgp;	state Exp;
branches
	1.4.2.1;
next	1.3;

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

1.2
date	2006.11.15.13.29.17;	author dkf;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2006.10.31.01.42.25;	author hobbs;	state Exp;
branches;
next	;

1.2.2.1
date	2007.11.01.16.37.16;	author dgp;	state Exp;
branches;
next	;

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


desc
@@


1.5
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@'\"
'\" Copyright (c) 2004 Joe English
'\"
'\" RCS: @@(#) $Id: ttk_Geometry.3,v 1.4 2007/12/13 15:23:44 dgp Exp $
'\" 
.so man.macros
.TH Geometry 3 8.5 Tk "Tk Themed Widget"
.BS
.SH NAME
Ttk_MakeBox, Ttk_PadBox, Ttk_ExpandBox, Ttk_PackBox, Ttk_StickBox, Ttk_PlaceBox, Ttk_BoxContains, Ttk_MakePadding, Ttk_UniformPadding, Ttk_AddPadding, Ttk_RelievePadding, Ttk_GetPaddingFromObj, Ttk_GetBorderFromObj, Ttk_GetStickyFromObj \- Tk themed geometry utilities
.SH SYNOPSIS
.nf
\fB#include <tkTheme.h>\fR

Ttk_Box
\fBTtk_MakeBox\fR(int \fIx\fR, int \fIy\fR, int \fIwidth\fR, int \fIheight\fR);

Ttk_Box
\fBTtk_PadBox\fR(Ttk_Box \fIparcel\fR, Ttk_Padding \fIpadding\fR);

Ttk_Box
\fBTtk_ExpandBox\fR(Ttk_Box \fIparcel\fR, Ttk_Padding \fIpadding\fR);

Ttk_Box
\fBTtk_PackBox\fR(Ttk_Box *\fIcavity\fR, int \fIwidth\fR, int \fIheight\fR, Ttk_Side \fIside\fR);

Ttk_Box
\fBTtk_StickBox\fR(Ttk_Box \fIparcel\fR, int \fIwidth\fR, int \fIheight\fR, unsigned \fIsticky\fR);

Ttk_Box
\fBTtk_PlaceBox\fR(Ttk_Box *\fIcavity\fR, int \fIwidth\fR, int \fIheight\fR, Ttk_Side \fIside\fR, unsigned \fIsticky\fR);

Ttk_Box
\fBTtk_AnchorBox\fR(Ttk_Box \fIparcel\fR, int \fIwidth\fR, int \fIheight\fR, Tk_Anchor \fIanchor\fR);

Ttk_Padding
\fBTtk_MakePadding\fR(short \fIleft\fR, short \fItop\fR, short \fIright\fR, short \fIbottom\fR);

Ttk_Padding
\fBTtk_UniformPadding\fR(short \fIborder\fR);

Ttk_Padding
\fBTtk_AddPadding\fR(Ttk_Padding \fIpadding1\fR, Ttk_Padding \fIpadding2\fR;

Ttk_Padding
\fBTtk_RelievePadding\fR(Ttk_Padding \fIpadding\fR, int \fIrelief\fR);

int
\fBTtk_BoxContains\fR(Ttk_Box \fIbox\fR, int \fIx\fR, int \fIy\fR);

int
\fBTtk_GetPaddingFromObj\fR(Tcl_Interp *\fIinterp\fR, Tk_Window \fItkwin\fR, Tcl_Obj *\fIobjPtr\fR, Ttk_Padding *\fIpadding_rtn\fR);

int
\fBTtk_GetBorderFromObj\fR(Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIobjPtr\fR, Ttk_Padding *\fIpadding_rtn\fR);

int
\fBTtk_GetStickyFromObj\fR(Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIobjPtr\fR, int *\fIsticky_rtn\fR);
.fi
.SH ARGUMENTS
.AP Tk_Anchor anchor in
One of the symbolic constants \fBTK_ANCHOR_N\fR, \fBTK_ANCHOR_NE\fR,
etc.  See \fITk_GetAnchorFromObj(3)\fR.
.AP "Ttk_Box *" cavity in/out
A rectangular region from which a parcel is allocated.
.AP short border in
Extra padding (in pixels) to add uniformly to each side of a region.
.AP short bottom in
Extra padding (in pixels) to add to the bottom of a region.
.AP Ttk_Box box in
.AP "Ttk_Box *" box_rtn out
Specifies a rectangular region.
.AP int height in
The height in pixels of a region.
.AP "Tcl_Interp *" interp in
Used to store error messages.
.AP int left in
Extra padding (in pixels) to add to the left side of a region.
.AP "Tcl_Obj *" objPtr in
String value contains a symbolic name 
to be converted to an enumerated value or bitmask.
Internal rep may be be modified to cache corresponding value.
.AP Ttk_Padding padding in
.AP "Ttk_Padding *" padding_rtn out
Extra padding to add on the inside of a region.
.AP Ttk_Box parcel in
A rectangular region, allocated from a cavity.
.AP int relief in
One of the standard Tk relief options 
(TK_RELIEF_RAISED, TK_RELIEF_SUNKEN, etc.).  
See \fBTk_GetReliefFromObj\fR.
.AP short right in
Extra padding (in pixles) to add to the right side of a region.
.AP Ttk_Side side in
One of \fBTTK_SIDE_LEFT\fR, \fBTTK_SIDE_TOP\fR, 
\fBTTK_SIDE_RIGHT\fR, or \fBTTK_SIDE_BOTTOM\fR.
.AP unsigned sticky in
A bitmask containing one or more of the bits
\fBTTK_STICK_W\fR (west, or left), 
\fBTTK_STICK_E\fR (east, or right, 
\fBTTK_STICK_N\fR (north, or top), and
\fBTTK_STICK_S\fR (south, or bottom).
\fBTTK_FILL_X\fR is defined as a synonym for (TTK_STICK_W|TTK_STICK_E),
\fBTTK_FILL_Y\fR is a synonym for (TTK_STICK_N|TTK_STICK_S),
and  \fBTTK_FILL_BOTH\fR and \fBTTK_STICK_ALL\fR
are synonyms for (TTK_FILL_X|TTK_FILL_Y).
See also: \fIgrid(n)\fR.
.AP Tk_Window tkwin in
Window whose screen geometry determines 
the conversion between absolute units and pixels.
.AP short top in
Extra padding at the top of a region.
.AP int width in
The width in pixels of a region.
.AP int x in
X coordinate of upper-left corner of region.
.AP int y in
Y coordinate of upper-left corner of region.
.BE
.SH "BOXES"
.PP
The \fBTtk_Box\fR structure represents a rectangular region of a window:
.CS
typedef struct {
    int \fIx\fR;
    int \fIy\fR;
    int \fIwidth\fR;
    int \fIheight\fR;
} \fBTtk_Box\fR;
.CE
All coordinates are relative to the window.
.PP
\fBTtk_MakeBox\fR is a convenience routine that contsructs
a \fBTtk_Box\fR structure representing a region \fIwidth\fR pixels
wide, \fIheight\fR pixels tall, at the specified \fIx, y\fR coordinates.
.PP
\fBTtk_PadBox\fR returns a new box located inside the specified \fIparcel\fR,
shrunken according to the left, top, right, and bottom margins
specified by \fIpadding\fR.
.PP
\fBTtk_ExpandBox\fR is the inverse of \fBTtk_PadBox\fR:
it returns a new box surrounding the specified \fIparcel\fR,
expanded  according to the left, top, right, and bottom margins
specified by \fIpadding\fR.
.PP
\fBTtk_PackBox\fR allocates a parcel \fIwidth\fR by \fIheight\fR
pixels wide on the specified \fIside\fR of the \fIcavity\fR,
and shrinks the \fIcavity\fR accordingly.
.PP
\fBTtk_StickBox\fR places a box with the requested \fIwidth\fR
and \fIheight\fR inside the \fIparcel\fR according to the
\fIsticky\fR bits.
.PP
\fBTtk_PlaceBox\fR combines \fBTtk_PackBox\fR and \fBTtk_StickBox\fR:
it allocates a parcel on the specified \fIside\fR of the \fIcavity\fR,
places a box of the requested size inside the parcel according to \fIsticky\fR,
and shrinks the \fIcavity\fR.
.PP
\fBTtk_AnchorBox\fR places a box with the requested \fIwidth\fR
and \fIheight\fR inside the \fIparcel\fR according to the
specified \fIanchor\fR option.
.PP
\fBTtk_BoxContains\fR tests if the specified \fIx, y\fR coordinate
lies within the rectangular region \fIbox\fR.
.SH "PADDDING"
.PP
The \fBTtk_Padding\fR structure is used to represent
borders, internal padding, and external margins:
.CS
typedef struct {
    short \fIleft\fR;
    short \fItop\fR;
    short \fIright\fR;
    short \fIbottom\fR;
} \fBTtk_Padding\fR;
.CE
.PP
\fBTtk_MakePadding\fR is a convenience routine that contsructs
a \fBTtk_Padding\fR structure with the specified left, top, right, and bottom
components.
.PP
\fBTtk_UniformPadding\fR constructs a \fBTtk_Padding\fR structure
with all components equal to the specified \fIborder\fR.
.PP
\fBTtk_AddPadding\fR adds two \fBTtk_Padding\fRs together
and returns a combined padding containing the sum of the
individual padding components.
.PP
\fBTtk_RelievePadding\fR 
adds an extra 2 pixels of padding to \fIpadding\fR
according to the specified \fIrelief\fR.
If \fIrelief\fR is \fBTK_RELIEF_SUNKEN\fR, 
adds two pixels at the top and left
so the inner region is shifted down and to the left.
If it is \fBTK_RELIEF_RAISED\fR, adds two pixels
at the bottom and right so 
the inner region is shifted up and to the right.
Otherwise, adds 1 pixel on all sides.
This is typically used in element geometry procedures to simulate a
.QW pressed-in
look for pushbuttons.
.SH "CONVERSION ROUTINES"
.PP
\fBTtk_GetPaddingFromObj\fR converts the string in \fIobjPtr\fR
to a \fBTtk_Padding\fR structure.
The string representation is a list of 
up to four length specifications 
.QW "\fIleft top right bottom\fR" .
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.
See \fBTk_GetPixelsFromObj(3)\fR for the syntax of length specifications.
.PP
\fBTtk_GetBorderFromObj\fR is the same as \fBTtk_GetPaddingFromObj\fR
except that the lengths are specified as integers 
(i.e., resolution-dependant values like \fI3m\fR are not allowed).
.PP
\fBTtk_GetStickyFromObj\fR converts the string in \fIobjPtr\fR
to a \fIsticky\fR bitmask.  The string contains zero or more
of the characters \fBn\fR, \fBs\fR, \fBe\fR, or \fBw\fR.
.SH "SEE ALSO"
Tk_GetReliefFromObj(3), Tk_GetPixelsFromObj(3), Tk_GetAnchorFromObj(3)
.SH "KEYWORDS"
geometry, padding, margins, box, region, sticky, relief
@


1.4
log
@merge stable branch onto HEAD
@
text
@d4 1
a4 1
'\" RCS: @@(#) $Id: ttk_Geometry.3,v 1.2.2.1 2007/11/01 16:37:16 dgp Exp $
d45 1
a45 1
Ttk_Padding 
a59 1

a119 1

d121 2
a122 1
The \fBTtk_Box\fR structure represents a rectangular region of a window: 
d124 6
a129 6
typedef struct 	{
    int x;
    int y;
    int width;
    int height;
} Ttk_Box;
d138 1
a138 1
shrunken according to the left, top, right, and bottom margins 
d143 1
a143 1
expanded  according to the left, top, right, and bottom margins 
d151 1
a151 1
and \fIheight\fR inside the \fIparcel\fR according to the 
d166 2
a167 1
The \fBTtk_Padding\fR structure is used to represent 
d171 5
a175 5
    short left;
    short top;
    short right;
    short bottom;
} Ttk_Padding;
d177 1
a177 1
.PP 
d180 1
a180 1
components.  
d203 1
@


1.4.2.1
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
@d4 1
a4 1
'\" RCS: @@(#) $Id: ttk_Geometry.3,v 1.5 2008/06/30 22:57:03 dkf Exp $
d45 1
a45 1
Ttk_Padding
d60 1
d121 1
d123 1
a123 2
.PP
The \fBTtk_Box\fR structure represents a rectangular region of a window:
d125 6
a130 6
typedef struct {
    int \fIx\fR;
    int \fIy\fR;
    int \fIwidth\fR;
    int \fIheight\fR;
} \fBTtk_Box\fR;
d139 1
a139 1
shrunken according to the left, top, right, and bottom margins
d144 1
a144 1
expanded  according to the left, top, right, and bottom margins
d152 1
a152 1
and \fIheight\fR inside the \fIparcel\fR according to the
d167 1
a167 2
.PP
The \fBTtk_Padding\fR structure is used to represent
d171 5
a175 5
    short \fIleft\fR;
    short \fItop\fR;
    short \fIright\fR;
    short \fIbottom\fR;
} \fBTtk_Padding\fR;
d177 1
a177 1
.PP
d180 1
a180 1
components.
a202 1
.PP
@


1.3
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d4 1
a4 1
'\" RCS: @@(#) $Id: ttk_Geometry.3,v 1.2 2006/11/15 13:29:17 dkf Exp $
@


1.2
log
@Convert \fP to \fR so that man-page scrapers have an easier time.
@
text
@d4 1
a4 1
'\" RCS: @@(#) $Id: ttk_Geometry.3,v 1.1 2006/10/31 01:42:25 hobbs Exp $
d199 3
a201 3
This is typically used in element geometry procedures to simulate 
a "pressed-in" look for pushbuttons.

d207 1
a207 1
\fI"left top right bottom"\fR.  
a220 1

a222 1

@


1.2.2.1
log
@merge updates from HEAD
@
text
@d4 1
a4 1
'\" RCS: @@(#) $Id: ttk_Geometry.3,v 1.2 2006/11/15 13:29:17 dkf Exp $
d199 3
a201 3
This is typically used in element geometry procedures to simulate a
.QW pressed-in
look for pushbuttons.
d207 1
a207 1
.QW "\fIleft top right bottom\fR" .
d221 1
d224 1
@


1.1
log
@	* doc/ttk_Geometry.3, doc/ttk_Theme.3, doc/ttk_button.n:
	* doc/ttk_checkbutton.n, doc/ttk_combobox.n, doc/ttk_dialog.n:
	* doc/ttk_entry.n, doc/ttk_frame.n, doc/ttk_image.n:
	* doc/ttk_intro.n, doc/ttk_label.n, doc/ttk_labelframe.n:
	* doc/ttk_menubutton.n, doc/ttk_notebook.n, doc/ttk_panedwindow.n:
	* doc/ttk_progressbar.n, doc/ttk_radiobutton.n, doc/ttk_scrollbar.n:
	* doc/ttk_separator.n, doc/ttk_sizegrip.n, doc/ttk_style.n:
	* doc/ttk_treeview.n, doc/ttk_widget.n,:
	* generic/ttk/ttk.decls, generic/ttk/ttkBlink.c:
	* generic/ttk/ttkButton.c, generic/ttk/ttkCache.c:
	* generic/ttk/ttkClamTheme.c, generic/ttk/ttkClassicTheme.c:
	* generic/ttk/ttkDecls.h, generic/ttk/ttkDefaultTheme.c:
	* generic/ttk/ttkElements.c, generic/ttk/ttkEntry.c:
	* generic/ttk/ttkFrame.c, generic/ttk/ttkImage.c:
	* generic/ttk/ttkInit.c, generic/ttk/ttkLabel.c:
	* generic/ttk/ttkLayout.c, generic/ttk/ttkManager.c:
	* generic/ttk/ttkManager.h, generic/ttk/ttkNotebook.c:
	* generic/ttk/ttkPanedwindow.c, generic/ttk/ttkProgress.c:
	* generic/ttk/ttkScale.c, generic/ttk/ttkScroll.c:
	* generic/ttk/ttkScrollbar.c, generic/ttk/ttkSeparator.c:
	* generic/ttk/ttkSquare.c, generic/ttk/ttkState.c:
	* generic/ttk/ttkStubInit.c, generic/ttk/ttkStubLib.c:
	* generic/ttk/ttkTagSet.c, generic/ttk/ttkTheme.c:
	* generic/ttk/ttkTheme.h, generic/ttk/ttkThemeInt.h:
	* generic/ttk/ttkTrace.c, generic/ttk/ttkTrack.c:
	* generic/ttk/ttkTreeview.c, generic/ttk/ttkWidget.c:
	* generic/ttk/ttkWidget.h:
	* library/demos/ttk_demo.tcl, library/demos/ttk_iconlib.tcl:
	* library/demos/ttk_repeater.tcl:
	* library/ttk/altTheme.tcl, library/ttk/aquaTheme.tcl:
	* library/ttk/button.tcl, library/ttk/clamTheme.tcl:
	* library/ttk/classicTheme.tcl, library/ttk/combobox.tcl:
	* library/ttk/cursors.tcl, library/ttk/defaults.tcl:
	* library/ttk/dialog.tcl, library/ttk/entry.tcl:
	* library/ttk/fonts.tcl, library/ttk/icons.tcl:
	* library/ttk/keynav.tcl, library/ttk/menubutton.tcl:
	* library/ttk/notebook.tcl, library/ttk/panedwindow.tcl:
	* library/ttk/progress.tcl, library/ttk/scale.tcl:
	* library/ttk/scrollbar.tcl, library/ttk/sizegrip.tcl:
	* library/ttk/treeview.tcl, library/ttk/ttk.tcl:
	* library/ttk/utils.tcl, library/ttk/winTheme.tcl:
	* library/ttk/xpTheme.tcl:
	* macosx/ttkMacOSXTheme.c:
	* tests/ttk/all.tcl, tests/ttk/bwidget.test, tests/ttk/combobox.test:
	* tests/ttk/entry.test, tests/ttk/image.test:
	* tests/ttk/labelframe.test, tests/ttk/layout.test:
	* tests/ttk/misc.test, tests/ttk/notebook.test:
	* tests/ttk/panedwindow.test, tests/ttk/progressbar.test:
	* tests/ttk/scrollbar.test, tests/ttk/treetags.test:
	* tests/ttk/treeview.test, tests/ttk/ttk.test, tests/ttk/validate.test:
	* win/ttkWinMonitor.c, win/ttkWinTheme.c, win/ttkWinXPTheme.c:
	First import of Ttk themed Tk widgets as branched from tile 0.7.8

	* generic/tkInt.h, generic/tkWindow.c: add Ttk_Init call, copy
	tk classic widgets to ::tk namespace.
	* library/tk.tcl: add source of ttk/ttk.tcl, define $::ttk::library.
	* unix/Makefile.in, win/Makefile.in: add Ttk build bits
	* win/configure, win/configure.in: check for uxtheme.h (XP theme).
@
text
@d4 1
a4 1
'\" RCS: @@(#) $Id: Geometry.3,v 1.7 2004/12/11 00:36:36 jenglish Exp $
d142 1
a142 1
\fBTtk_ExpandBox\fR is the inverse of \fBTtk_PadBox\fP:
d155 4
a158 4
\fBTtk_PlaceBox\fP combines \fBTtk_PackBox\fP and \fBTtk_StickBox\fP:
it allocates a parcel on the specified \fIside\fP of the \fIcavity\fP,
places a box of the requested size inside the parcel according to \fIsticky\fP,
and shrinks the \fIcavity\fP.
d214 1
a214 1
\fBTtk_GetBorderFromObj\fR is the same as \fBTtk_GetPaddingFromObj\fP
d216 1
a216 1
(i.e., resolution-dependant values like \fI3m\fP are not allowed).
@

