|
|
|
|
|
|
<TITLE>tixForm - Geometry manager based on attachment rules</TITLE>
|
<TITLE>tixForm - Geometry manager based on attachment rules</TITLE>
|
<Center><H2>tixForm - Geometry manager based on attachment rules</H2></Center><hr>
|
<Center><H2>tixForm - Geometry manager based on attachment rules</H2></Center><hr>
|
|
|
</pre><H3>SYNOPSIS</H3>
|
</pre><H3>SYNOPSIS</H3>
|
<P>
|
<P>
|
<B>tixForm<I> option arg ?arg ...?</I></B>
|
<B>tixForm<I> option arg ?arg ...?</I></B>
|
</pre><HR>
|
</pre><HR>
|
<P>
|
<P>
|
</pre><H3>DESCRIPTION</H3>
|
</pre><H3>DESCRIPTION</H3>
|
<P>
|
<P>
|
The <B>tixForm</B></I> command is used to communicate with the
|
The <B>tixForm</B></I> command is used to communicate with the
|
<B>tixForm</B></I> Geometry Manager, a geometry manager that arranges the
|
<B>tixForm</B></I> Geometry Manager, a geometry manager that arranges the
|
geometry of the children in a parent window according to attachment
|
geometry of the children in a parent window according to attachment
|
rules. The <B>tixForm</B></I> geometry manager is very flexible and
|
rules. The <B>tixForm</B></I> geometry manager is very flexible and
|
powerful; it can be used to emulate all the existing features of the
|
powerful; it can be used to emulate all the existing features of the
|
Tk packer and placer geometry managers (see <B>pack(n)</B></I>,
|
Tk packer and placer geometry managers (see <B>pack(n)</B></I>,
|
<B>place(n)</B></I>).
|
<B>place(n)</B></I>).
|
The <B>tixForm</B></I> command can have any of several forms,
|
The <B>tixForm</B></I> command can have any of several forms,
|
depending on the <I>option</I></B> argument:
|
depending on the <I>option</I></B> argument:
|
<DL>
|
<DL>
|
<DT> <B>tixForm<I> slave </I></B>?<I>options</I></B>?
|
<DT> <B>tixForm<I> slave </I></B>?<I>options</I></B>?
|
</I></B>
|
</I></B>
|
<DD> If the first argument to <B>tixForm</B></I> is a window name (any value
|
<DD> If the first argument to <B>tixForm</B></I> is a window name (any value
|
<B>tixForm configure</B></I>.
|
<B>tixForm configure</B></I>.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>tixForm check <I>master</I></B>
|
<DT> <B>tixForm check <I>master</I></B>
|
</I></B>
|
</I></B>
|
<DD> This command checks whether there is circular dependency in the
|
<DD> This command checks whether there is circular dependency in the
|
DEPENDENCY</B></I> below). It returns the Boolean value <B>TRUE</B></I> if it
|
DEPENDENCY</B></I> below). It returns the Boolean value <B>TRUE</B></I> if it
|
discover circular dependency and <B>FALSE</B></I> otherwise.
|
discover circular dependency and <B>FALSE</B></I> otherwise.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>tixForm configure<I> slave </I></B>?<I>-option value ...</I></B>?
|
<DT> <B>tixForm configure<I> slave </I></B>?<I>-option value ...</I></B>?
|
</I></B>
|
</I></B>
|
<DD> Sets or adjusts the attachment values of the slave window
|
<DD> Sets or adjusts the attachment values of the slave window
|
according to the <I>-option value</I></B> argument pairs.
|
according to the <I>-option value</I></B> argument pairs.
|
</DL>
|
</DL>
|
<UL>
|
<UL>
|
<DL>
|
<DL>
|
<DT> <B>-b</B></I> <I>attachment</I></B>
|
<DT> <B>-b</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-bottom</B></I> option.
|
<DD> Abbreviation for the <B>-bottom</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-bottom</B></I> <I>attachment</I></B>
|
<DT> <B>-bottom</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies an attachment for the bottom edge of the slave window. The
|
<DD> Specifies an attachment for the bottom edge of the slave window. The
|
attachment must specied according to the section <B>SPECIFYING
|
attachment must specied according to the section <B>SPECIFYING
|
ATTACHMENTS</B></I> below.
|
ATTACHMENTS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-bottomspring</B></I> <I>weight</I></B>
|
<DT> <B>-bottomspring</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the weight of the spring at the bottom edge of the slave
|
<DD> Specifies the weight of the spring at the bottom edge of the slave
|
window. See the section <B>USING SPRINGS</B></I> below.
|
window. See the section <B>USING SPRINGS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-bp</B></I> <I>value</I></B>
|
<DT> <B>-bp</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-padbottom</B></I> option.
|
<DD> Abbreviation for the <B>-padbottom</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-bs</B></I> <I>weight</I></B>
|
<DT> <B>-bs</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-bottomspring</B></I> option.
|
<DD> Abbreviation for the <B>-bottomspring</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-fill</B></I> <I>master</I></B>
|
<DT> <B>-fill</B></I> <I>master</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the fillings when springs are used for this widget. The
|
<DD> Specifies the fillings when springs are used for this widget. The
|
value must be <B>x</B></I>, <B>y</B></I>, <B>both</B></I> or <B>none</B></I>.
|
value must be <B>x</B></I>, <B>y</B></I>, <B>both</B></I> or <B>none</B></I>.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-in</B></I> <I>master</I></B>
|
<DT> <B>-in</B></I> <I>master</I></B>
|
</I></B>
|
</I></B>
|
<DD> Places the slave window into the specified master window. If the slave
|
<DD> Places the slave window into the specified master window. If the slave
|
was originally in another master window, all attachment values with
|
was originally in another master window, all attachment values with
|
respect to the original master window are discarded. Even if the
|
respect to the original master window are discarded. Even if the
|
attachment values are the same as in the original master window, they
|
attachment values are the same as in the original master window, they
|
need to be specified again. The <B>-in</B></I> flag, when needed, must appear
|
need to be specified again. The <B>-in</B></I> flag, when needed, must appear
|
as the first flag after the name of the slave. Otherwise an error is
|
as the first flag after the name of the slave. Otherwise an error is
|
generated.
|
generated.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-l</B></I> <I>attachment</I></B>
|
<DT> <B>-l</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-left</B></I> option.
|
<DD> Abbreviation for the <B>-left</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-left</B></I> <I>attachment</I></B>
|
<DT> <B>-left</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies an attachment for the left edge of the slave window. The
|
<DD> Specifies an attachment for the left edge of the slave window. The
|
attachment must specied according to the section <B>SPECIFYING
|
attachment must specied according to the section <B>SPECIFYING
|
ATTACHMENTS</B></I> below.
|
ATTACHMENTS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-leftspring</B></I> <I>weight</I></B>
|
<DT> <B>-leftspring</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the weight of the spring at the left edge of the slave
|
<DD> Specifies the weight of the spring at the left edge of the slave
|
window. See the section <B>USING SPRINGS</B></I> below.
|
window. See the section <B>USING SPRINGS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-lp</B></I> <I>value</I></B>
|
<DT> <B>-lp</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-padleft</B></I> option.
|
<DD> Abbreviation for the <B>-padleft</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-ls</B></I> <I>weight</I></B>
|
<DT> <B>-ls</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-leftspring</B></I> option.
|
<DD> Abbreviation for the <B>-leftspring</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-padbottom</B></I> <I>value</I></B>
|
<DT> <B>-padbottom</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the amount of external padding to leave on the bottom side
|
<DD> Specifies the amount of external padding to leave on the bottom side
|
of the slave. The <I>value</I></B> may have any of the forms acceptable to
|
of the slave. The <I>value</I></B> may have any of the forms acceptable to
|
<B>Tk_GetPixels(3)</B></I>.
|
<B>Tk_GetPixels(3)</B></I>.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-padleft</B></I> <I>value</I></B>
|
<DT> <B>-padleft</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the amount of external padding to leave on the left side of
|
<DD> Specifies the amount of external padding to leave on the left side of
|
the slave.
|
the slave.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-padright</B></I> <I>value</I></B>
|
<DT> <B>-padright</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the amount of external padding to leave on the right side of
|
<DD> Specifies the amount of external padding to leave on the right side of
|
the slave.
|
the slave.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-padtop</B></I> <I>value</I></B>
|
<DT> <B>-padtop</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the amount of external padding to leave on the top side of
|
<DD> Specifies the amount of external padding to leave on the top side of
|
the slave.
|
the slave.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-padx</B></I> <I>value</I></B>
|
<DT> <B>-padx</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the amount of external padding to leave on both the left and
|
<DD> Specifies the amount of external padding to leave on both the left and
|
the right sides of the slave.
|
the right sides of the slave.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-pady</B></I> <I>value</I></B>
|
<DT> <B>-pady</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the amount of external padding to leave on both the top and
|
<DD> Specifies the amount of external padding to leave on both the top and
|
the bottom sides of the slave.
|
the bottom sides of the slave.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-r</B></I> <I>attachment</I></B>
|
<DT> <B>-r</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-right</B></I> option.
|
<DD> Abbreviation for the <B>-right</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-right</B></I> <I>attachment</I></B>
|
<DT> <B>-right</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies an attachment for the right edge of the slave window. The
|
<DD> Specifies an attachment for the right edge of the slave window. The
|
attachment must specied according to the section <B>SPECIFYING
|
attachment must specied according to the section <B>SPECIFYING
|
ATTACHMENTS</B></I> below.
|
ATTACHMENTS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-rightspring</B></I> <I>weight</I></B>
|
<DT> <B>-rightspring</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the weight of the spring at the right edge of the slave
|
<DD> Specifies the weight of the spring at the right edge of the slave
|
window. See the section <B>USING SPRINGS</B></I> below.
|
window. See the section <B>USING SPRINGS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-rp</B></I> <I>value</I></B>
|
<DT> <B>-rp</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-padright</B></I> option.
|
<DD> Abbreviation for the <B>-padright</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-rs</B></I> <I>weight</I></B>
|
<DT> <B>-rs</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-rightspring</B></I> option.
|
<DD> Abbreviation for the <B>-rightspring</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-t</B></I> <I>attachment</I></B>
|
<DT> <B>-t</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-top</B></I> option.
|
<DD> Abbreviation for the <B>-top</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-top</B></I> <I>attachment</I></B>
|
<DT> <B>-top</B></I> <I>attachment</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies an attachment for the top edge of the slave window. The
|
<DD> Specifies an attachment for the top edge of the slave window. The
|
attachment must specied according to the section <B>SPECIFYING
|
attachment must specied according to the section <B>SPECIFYING
|
ATTACHMENTS</B></I> below.
|
ATTACHMENTS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-topspring</B></I> <I>weight</I></B>
|
<DT> <B>-topspring</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Specifies the weight of the spring at the top edge of the slave
|
<DD> Specifies the weight of the spring at the top edge of the slave
|
window. See the section <B>USING SPRINGS</B></I> below.
|
window. See the section <B>USING SPRINGS</B></I> below.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-tp</B></I> <I>value</I></B>
|
<DT> <B>-tp</B></I> <I>value</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-padtop</B></I> option.
|
<DD> Abbreviation for the <B>-padtop</B></I> option.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>-ts</B></I> <I>weight</I></B>
|
<DT> <B>-ts</B></I> <I>weight</I></B>
|
</I></B>
|
</I></B>
|
<DD> Abbreviation for the <B>-topspring</B></I> option.
|
<DD> Abbreviation for the <B>-topspring</B></I> option.
|
</DL>
|
</DL>
|
</UL>
|
</UL>
|
<DL>
|
<DL>
|
<DT> <B>tixForm forget<I> slave </I></B>?<I>slave ...</I></B>?
|
<DT> <B>tixForm forget<I> slave </I></B>?<I>slave ...</I></B>?
|
</I></B>
|
</I></B>
|
<DD> Removes each of the slaves from its master and unmaps their windows.
|
<DD> Removes each of the slaves from its master and unmaps their windows.
|
The slaves will no longer be managed by tixForm. All attachment values
|
The slaves will no longer be managed by tixForm. All attachment values
|
with respect to their master windows are discarded. If another slave
|
with respect to their master windows are discarded. If another slave
|
is attached to this slave, then the attachment of the other slave will
|
is attached to this slave, then the attachment of the other slave will
|
be changed to grid attachment based on its geometry.
|
be changed to grid attachment based on its geometry.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>tixForm grid <I>master </I></B>?<I>x_size y_size</I></B>?
|
<DT> <B>tixForm grid <I>master </I></B>?<I>x_size y_size</I></B>?
|
</I></B>
|
</I></B>
|
<DD> When <I>x_size</I></B> and <I>y_size</I></B> are given, this command returns the
|
<DD> When <I>x_size</I></B> and <I>y_size</I></B> are given, this command returns the
|
number of grids of the master window in a pair of integers of the form
|
number of grids of the master window in a pair of integers of the form
|
{<I>x_size y_size</I></B>}. When both <I>x_size</I></B> and <I>y_size</I></B> are
|
{<I>x_size y_size</I></B>}. When both <I>x_size</I></B> and <I>y_size</I></B> are
|
given, this command changes the number of horizontal and vertical
|
given, this command changes the number of horizontal and vertical
|
grids on the master window.
|
grids on the master window.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>tixForm info<I> slave</I></B> ?<I>option</I></B>?
|
<DT> <B>tixForm info<I> slave</I></B> ?<I>option</I></B>?
|
</I></B>
|
</I></B>
|
<DD> Queries the attachment options of a slave window. <I>option</I></B> can be
|
<DD> Queries the attachment options of a slave window. <I>option</I></B> can be
|
any of the options accepted by the <B>tixForm configure</B></I> command. If
|
any of the options accepted by the <B>tixForm configure</B></I> command. If
|
<I>option</I></B> is given, only the value of that option is returned.
|
<I>option</I></B> is given, only the value of that option is returned.
|
Otherwise, this command returns a list whose elements are the current
|
Otherwise, this command returns a list whose elements are the current
|
configuration state of the slave given in the same <I>option-value</I></B> form
|
configuration state of the slave given in the same <I>option-value</I></B> form
|
that might be specified to <B>tixForm configure</B></I>. The first two
|
that might be specified to <B>tixForm configure</B></I>. The first two
|
elements in this list list are "<B>-in<I> master</I></B>" where
|
elements in this list list are "<B>-in<I> master</I></B>" where
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>tixForm slaves <I>master</I></B>
|
<DT> <B>tixForm slaves <I>master</I></B>
|
</I></B>
|
</I></B>
|
<DD> Returns a list of all of the slaves for the master window. The order
|
<DD> Returns a list of all of the slaves for the master window. The order
|
of the slaves in the list is the same as their order in the packing
|
of the slaves in the list is the same as their order in the packing
|
order. If master has no slaves then an empty string is returned.
|
order. If master has no slaves then an empty string is returned.
|
</DL>
|
</DL>
|
<P>
|
<P>
|
</pre><H3>SPECIFYING ATTACHMENTS</H3>
|
</pre><H3>SPECIFYING ATTACHMENTS</H3>
|
One can specify an attachment for each side of a slave window managed
|
One can specify an attachment for each side of a slave window managed
|
by tixForm. An attachment is specified in the the form "-<I>side</I></B>
|
by tixForm. An attachment is specified in the the form "-<I>side</I></B>
|
{<I>anchor_point</I></B> <I>offset</I></B>}". -<I>side</I></B> can be one of
|
{<I>anchor_point</I></B> <I>offset</I></B>}". -<I>side</I></B> can be one of
|
<B>-top</B></I>, <B>-bottom</B></I>, <B>-left</B></I> or <B>-right</B></I>.
|
<B>-top</B></I>, <B>-bottom</B></I>, <B>-left</B></I> or <B>-right</B></I>.
|
<P>
|
<P>
|
<I>Offset</I></B> is given in screen units (i.e. any of the forms
|
<I>Offset</I></B> is given in screen units (i.e. any of the forms
|
acceptable to <B>Tk_GetPixels</B></I>). A positive offset indicates
|
acceptable to <B>Tk_GetPixels</B></I>). A positive offset indicates
|
shifting to a position to the right or bottom of an anchor point. A
|
shifting to a position to the right or bottom of an anchor point. A
|
negative offset indicates shifting to a position to the left or top of
|
negative offset indicates shifting to a position to the left or top of
|
an anchor point.
|
an anchor point.
|
<P>
|
<P>
|
<I>Anchor_point</I></B> can be given in one of the
|
<I>Anchor_point</I></B> can be given in one of the
|
following forms:
|
following forms:
|
<UL>
|
<UL>
|
<DL>
|
<DL>
|
<DT> <B>Grid Attachment</B></I>
|
<DT> <B>Grid Attachment</B></I>
|
</I></B>
|
</I></B>
|
<DD> The master window is divided into a number of horizontal and vertical
|
<DD> The master window is divided into a number of horizontal and vertical
|
grids. By default the master window is divided into 100x100 grids; the
|
grids. By default the master window is divided into 100x100 grids; the
|
number of grids can be adjusted by the <B>tixForm grid</B></I> command. A
|
number of grids can be adjusted by the <B>tixForm grid</B></I> command. A
|
grid attachment anchor point is given by a <B>%</B></I> sign followed by an
|
grid attachment anchor point is given by a <B>%</B></I> sign followed by an
|
<B>integer</B></I> value. For example, <B>%0</B></I> spceifies the first grid
|
<B>integer</B></I> value. For example, <B>%0</B></I> spceifies the first grid
|
line (the top or left edge of the master window). <B>%100</B></I> spceifies
|
line (the top or left edge of the master window). <B>%100</B></I> spceifies
|
the last grid line (the bottom or right edge of the master window).
|
the last grid line (the bottom or right edge of the master window).
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>Opposite Side Attachment</B></I>
|
<DT> <B>Opposite Side Attachment</B></I>
|
</I></B>
|
</I></B>
|
<DD> Opposite attachment specifies an anchor point located on the
|
<DD> Opposite attachment specifies an anchor point located on the
|
<B>opposite</B></I> side of another slave widget, which must be managed by
|
<B>opposite</B></I> side of another slave widget, which must be managed by
|
tixForm in the same master window. An opposite attachment anchor point
|
tixForm in the same master window. An opposite attachment anchor point
|
is given by the name of another widget. For example, "tixForm .b -top
|
is given by the name of another widget. For example, "tixForm .b -top
|
{.a 0}" attaches the <B>top</B></I> side of the widget <B>\.b</B></I> to the
|
{.a 0}" attaches the <B>top</B></I> side of the widget <B>\.b</B></I> to the
|
<B>bottom</B></I> of the widget <B>\.a</B></I>.
|
<B>bottom</B></I> of the widget <B>\.a</B></I>.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>Parallel Side Attachment</B></I>
|
<DT> <B>Parallel Side Attachment</B></I>
|
</I></B>
|
</I></B>
|
<DD> Opposite attachment specifies an anchor point located on the
|
<DD> Opposite attachment specifies an anchor point located on the
|
<B>same</B></I> side of another slave widget, which must be managed by
|
<B>same</B></I> side of another slave widget, which must be managed by
|
tixForm in the same master window. An parallel attachment anchor point
|
tixForm in the same master window. An parallel attachment anchor point
|
is given by the sign <B>&</B></I> follwed by the name of another widget.
|
is given by the sign <B>&</B></I> follwed by the name of another widget.
|
For example, "tixForm .b -top {&.a 0}" attaches the <B>top</B></I> side of
|
For example, "tixForm .b -top {&.a 0}" attaches the <B>top</B></I> side of
|
the widget <B>\.b</B></I> to the <B>top</B></I> of the widget <B>\.a</B></I>, making
|
the widget <B>\.b</B></I> to the <B>top</B></I> of the widget <B>\.a</B></I>, making
|
the <B>top</B></I> sides of these two widgets at the same vertical position
|
the <B>top</B></I> sides of these two widgets at the same vertical position
|
in their parent window.
|
in their parent window.
|
</DL>
|
</DL>
|
<DL>
|
<DL>
|
<DT> <B>No Attachment</B></I>
|
<DT> <B>No Attachment</B></I>
|
</I></B>
|
</I></B>
|
<DD> Specifies a side of the slave to be attached to nothing, indicated by
|
<DD> Specifies a side of the slave to be attached to nothing, indicated by
|
the keyword <B>none</B></I>. When the <B>none</B></I> anchor point is given, the
|
the keyword <B>none</B></I>. When the <B>none</B></I> anchor point is given, the
|
offser must be zero.
|
offser must be zero.
|
|
|
When a side of a slave is attached to <B>{none 0}</B></I>, the position
|
When a side of a slave is attached to <B>{none 0}</B></I>, the position
|
of this side is calculated by the position of the other side and the
|
of this side is calculated by the position of the other side and the
|
natural size of the slave. For example, if a the <B>left</B></I> side of a
|
natural size of the slave. For example, if a the <B>left</B></I> side of a
|
widget is attached to <B>{%0 100}</B></I>, its <B>right</B></I> side attached to
|
widget is attached to <B>{%0 100}</B></I>, its <B>right</B></I> side attached to
|
<B>{none 0}</B></I>, and the natural size of the widget is <B>50</B></I> pixels,
|
<B>{none 0}</B></I>, and the natural size of the widget is <B>50</B></I> pixels,
|
the <B>right</B></I> side of the widget will be positioned at pixel <B>{%0
|
the <B>right</B></I> side of the widget will be positioned at pixel <B>{%0
|
149}</B></I>.
|
149}</B></I>.
|
|
|
When both <B>-top</B></I> and <B>-bottom</B></I> are attached to <B>none</B></I>,
|
When both <B>-top</B></I> and <B>-bottom</B></I> are attached to <B>none</B></I>,
|
then by default <B>-top</B></I> will be attached to <B>{%0 0}</B></I>. When both
|
then by default <B>-top</B></I> will be attached to <B>{%0 0}</B></I>. When both
|
<B>-left</B></I> and <B>-right</B></I> are attached to none, then by default
|
<B>-left</B></I> and <B>-right</B></I> are attached to none, then by default
|
<B>-left</B></I> will be attached to <B>{%0 0}</B></I>.
|
<B>-left</B></I> will be attached to <B>{%0 0}</B></I>.
|
</DL>
|
</DL>
|
</UL>
|
</UL>
|
<P>
|
<P>
|
Shifting effects can be achieved by specifying a non-zero offset with
|
Shifting effects can be achieved by specifying a non-zero offset with
|
an anchor point. In the following example, the <B>top</B></I> side of
|
an anchor point. In the following example, the <B>top</B></I> side of
|
widget <B>\.b</B></I> is attached to the <B>bottom</B></I> of <B>\.a</B></I>; hence <B>\.b</B></I>
|
widget <B>\.b</B></I> is attached to the <B>bottom</B></I> of <B>\.a</B></I>; hence <B>\.b</B></I>
|
always appears below <B>\.a</B></I>. Also, the left edge of <B>\.b</B></I>
|
always appears below <B>\.a</B></I>. Also, the left edge of <B>\.b</B></I>
|
is attached to the <B>left</B></I> side of <B>\.a</B></I> with a 10
|
is attached to the <B>left</B></I> side of <B>\.a</B></I> with a 10
|
pixel offest. Therefore, the <B>left</B></I> edge of <B>\.b</B></I> is always
|
pixel offest. Therefore, the <B>left</B></I> edge of <B>\.b</B></I> is always
|
<P>
|
<P>
|
<pre><code><code><code>
|
<pre><code><code><code>
|
tixForm .b -left {.a 10} -top {.a 0}
|
tixForm .b -left {.a 10} -top {.a 0}
|
</code></code></code></pre>
|
</code></code></code></pre>
|
<P>
|
<P>
|
<B>ABBREVIATIONS:</B></I> Certain abbreviations can be made on the
|
<B>ABBREVIATIONS:</B></I> Certain abbreviations can be made on the
|
attachment specifications: First an offset of zero can be omitted.
|
attachment specifications: First an offset of zero can be omitted.
|
Thus, the following two lines are equivalent:
|
Thus, the following two lines are equivalent:
|
<P>
|
<P>
|
<pre><code><code><code>
|
<pre><code><code><code>
|
tixForm .b -top {.a 0} -right {%100 0}
|
tixForm .b -top {.a 0} -right {%100 0}
|
tixForm .b -top {.a} -right {%100}
|
tixForm .b -top {.a} -right {%100}
|
</code></code></code></pre>
|
</code></code></code></pre>
|
<P>
|
<P>
|
Also, because of the way TCL handles lists, when you omit the offset,
|
Also, because of the way TCL handles lists, when you omit the offset,
|
you can also leave out the braces. So you can further simplify the
|
you can also leave out the braces. So you can further simplify the
|
above to:
|
above to:
|
<P>
|
<P>
|
<pre><code><code><code>
|
<pre><code><code><code>
|
tixForm .b -top .a -right %100
|
tixForm .b -top .a -right %100
|
</code></code></code></pre>
|
</code></code></code></pre>
|
<P>
|
<P>
|
In the second case, when the anchor point is omitted, the offset must
|
In the second case, when the anchor point is omitted, the offset must
|
be given. A default anchor point is chosen according to the value of
|
be given. A default anchor point is chosen according to the value of
|
the offset. If the anchor point is <B>0</B></I> or positive, the default
|
the offset. If the anchor point is <B>0</B></I> or positive, the default
|
anchor point %0 is used; thus, "tixForm \.b -top 15" attaches the top
|
anchor point %0 is used; thus, "tixForm \.b -top 15" attaches the top
|
edge of <B>\.b</B></I> to a position 15 pixels below the top edge of the
|
edge of <B>\.b</B></I> to a position 15 pixels below the top edge of the
|
master window. If the anchor point is "<B>-0</B></I>" or negative, the
|
master window. If the anchor point is "<B>-0</B></I>" or negative, the
|
default anchor point <B>%100</B></I> is used; thus, "tixForm \.a -right
|
default anchor point <B>%100</B></I> is used; thus, "tixForm \.a -right
|
-2" attaches the right edge of <B>\.a</B></I> to a position 2 pixels to
|
-2" attaches the right edge of <B>\.a</B></I> to a position 2 pixels to
|
below shows a command with its equivalent abbreviation.
|
below shows a command with its equivalent abbreviation.
|
<P>
|
<P>
|
<pre><code><code><code>
|
<pre><code><code><code>
|
tixForm .b -top {%0 10} -bottom {%100 0}
|
tixForm .b -top {%0 10} -bottom {%100 0}
|
tixForm .b -top 10 -bottom -0
|
tixForm .b -top 10 -bottom -0
|
</code></code></code></pre>
|
</code></code></code></pre>
|
<P>
|
<P>
|
</pre><H3>USING SPRINGS</H3>
|
</pre><H3>USING SPRINGS</H3>
|
To be written.
|
To be written.
|
<P>
|
<P>
|
</pre><H3>ALGORITHM OF TIXFORM</H3>
|
</pre><H3>ALGORITHM OF TIXFORM</H3>
|
TixForm starts with any slave in the list of slaves of the master
|
TixForm starts with any slave in the list of slaves of the master
|
window. Then it tries to determine the position of each side of the
|
window. Then it tries to determine the position of each side of the
|
slave.
|
slave.
|
<P>
|
<P>
|
If the attachment of a side of the slave is grid attachment, the
|
If the attachment of a side of the slave is grid attachment, the
|
position of the side is readily determined.
|
position of the side is readily determined.
|
<P>
|
<P>
|
If the attachment of this side is <B>none</B></I>, then tixForm tries to
|
If the attachment of this side is <B>none</B></I>, then tixForm tries to
|
determine the position of the opposite side first, and then use the
|
determine the position of the opposite side first, and then use the
|
position of the opposite side and the natural size of the slave to
|
position of the opposite side and the natural size of the slave to
|
determine the position of this side.
|
determine the position of this side.
|
<P>
|
<P>
|
If the attachment is opposite or parallel widget attachments, then
|
If the attachment is opposite or parallel widget attachments, then
|
tixForm tries to determine the positions of the other widget first,
|
tixForm tries to determine the positions of the other widget first,
|
and then use the positions of the other widget and the natural size of
|
and then use the positions of the other widget and the natural size of
|
the slave determine the position of this side. This recursive
|
the slave determine the position of this side. This recursive
|
algorithmis carried on until the positions of all slaves are
|
algorithmis carried on until the positions of all slaves are
|
determined.
|
determined.
|
<P>
|
<P>
|
</pre><H3>CIRCULAR DEPENDENCY</H3>
|
</pre><H3>CIRCULAR DEPENDENCY</H3>
|
<P>
|
<P>
|
The algorithm of tixForm will fail if a circular dependency exists in
|
The algorithm of tixForm will fail if a circular dependency exists in
|
the attachments of the slaves. For example:
|
the attachments of the slaves. For example:
|
<P>
|
<P>
|
<pre><code><code><code>
|
<pre><code><code><code>
|
tixForm .c -left .b
|
tixForm .c -left .b
|
tixForm .b -right .c
|
tixForm .b -right .c
|
</code></code></code></pre>
|
</code></code></code></pre>
|
<P>
|
<P>
|
In this example, the position of the left side of <B>.b</B></I> depends on
|
In this example, the position of the left side of <B>.b</B></I> depends on
|
the right side of <B>.c</B></I>, which in turn depends on the left side of <B>.b</B></I>.
|
the right side of <B>.c</B></I>, which in turn depends on the left side of <B>.b</B></I>.
|
<P>
|
<P>
|
When a circular dependency is discovered during the execution of the
|
When a circular dependency is discovered during the execution of the
|
tixForm algorithm, tixForm will generate a background error and the
|
tixForm algorithm, tixForm will generate a background error and the
|
geometry of the slaves are undefined (and will be arbitrary). Notice
|
geometry of the slaves are undefined (and will be arbitrary). Notice
|
that tixForm only executes the algorithm when the specification of the
|
that tixForm only executes the algorithm when the specification of the
|
attachments. Also, unlike the Motif Form manager widget, tixForm
|
attachments. Also, unlike the Motif Form manager widget, tixForm
|
defines circular dependency as "<I>dependency in the same
|
defines circular dependency as "<I>dependency in the same
|
dimension</B></I>". Therefore, the following code fragment will does not
|
dimension</B></I>". Therefore, the following code fragment will does not
|
have circular dependency because the two widgets do not depend on each
|
have circular dependency because the two widgets do not depend on each
|
other in the same dimension (<B>\.b</B></I> depends <B>.c</B></I> in the
|
other in the same dimension (<B>\.b</B></I> depends <B>.c</B></I> in the
|
horizontal dimension and <B>.c</B></I> depends on <B>.b</B></I> in the vertical
|
horizontal dimension and <B>.c</B></I> depends on <B>.b</B></I> in the vertical
|
dimension):
|
dimension):
|
<P>
|
<P>
|
<pre><code><code><code>
|
<pre><code><code><code>
|
tixForm .b -left .c
|
tixForm .b -left .c
|
tixForm .c -top .b
|
tixForm .c -top .b
|
</code></code></code></pre>
|
</code></code></code></pre>
|
<P>
|
<P>
|
</pre><H3>BUGS</H3>
|
</pre><H3>BUGS</H3>
|
<P>
|
<P>
|
Springs have not been fully implemented yet.
|
Springs have not been fully implemented yet.
|
</pre><H3>KEYWORDS</H3>
|
</pre><H3>KEYWORDS</H3>
|
Tix(n), Form, Geometry Management
|
Tix(n), Form, Geometry Management
|
<hr><i>Last modified Sun Jan 19 22:34:27 EST 1997 </i> ---
|
<hr><i>Last modified Sun Jan 19 22:34:27 EST 1997 </i> ---
|
<i>Serial 853731299</i>
|
<i>Serial 853731299</i>
|
|
|