Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
XmtLayoutBox(3)		   Library Functions Manual	       XmtLayoutBox(3)

       XmtLayoutBox  - the row or column gadget	used within the	XmtLayout wid-

       Include File:
	      #include _Xmt/LayoutG.h_

	      XmtCreateLayoutBox(), XmtLayoutCol(), XmtLayoutRow()

       Class Name:

       Class Pointer:

       Class Hierarchy:
	      RectObj -> XmtLayoutGadget -> XmtLayoutBox

       The XmtLayoutBox	widget is a gadget designed to be used with  the  Xmt-
       Layout  widget  which  organizes	other children of the Layout into rows
       and columns. The	Layout widget organizes	its children into nested  rows
       and  columns; the LayoutBox acts	as a ``container'' to group items in a
       row or column together. Note that the LayoutBox is not a	composite wid-
       get  like  the  XmRowColumn widget. Layout items	within a row or	column
       are siblings of the LayoutBox, not children of it. The LayoutBox	serves
       as a placeholder	for grouping items-children of an Layout widget	can be
       placed within a particular LayoutBox gadget by setting the XmtNlayoutIn
       constraint  resource to point to	the LayoutBox.	The LayoutBox does not
       have any	visual appearance of its own, but as a	child  of  the	Layout
       widget,	it  can	 have a	caption	or frame automatically provided	by the
       widget.	Also, the LayoutBox can	specify	the way	the items it  contains
       will  be	 spaced,  and can specify that the items it contains should be
       made the	same width or height.


       XmtLayoutBox inherits the resources of the RectObj and  XmtLayoutGadget
       classes,	and defines the	following new resources:

       |Name		 | Type			 | Class	    | Access | Default		  |
       |XmtNbackground	 | XtRPixel		 | XtCBackground    | CSG    | unspecified	  |
       |XmtNequal	 | XtRBoolean		 | XmtCEqual	    | CSG    | (XtPointer)False	  |
       |XmtNitemStretch	 | XtRDimension		 | XmtCItemStretch  | CSG    | 1		  |
       |XmtNorientation	 | XmROrientation	 | XmCOrientation   | CSG    | XmHORIZONTAL	  |
       |XmtNspace	 | XtRDimension		 | XmtCSpace	    | CSG    | 0		  |
       |XmtNspaceStretch | XtRDimension		 | XmtCSpaceStretch | CSG    | 1		  |
       |XmtNspaceType	 | XtRXmtLayoutSpaceType | XmtCSpaceType    | CSG    | XmtLayoutSpaceNone |
	      The  color  to  use  for the background of the row or column. If
	      specified, the LayoutBox will fill itself	with this color	before
	      any captions, frames or other decorations	are drawn. If no color
	      is specified, the	LayoutBox will take  no	 special  action,  and
	      will have	the same background color as its parent	Layout widget.

	      Whether  items  in  a row	should have equal widths or items in a
	      column should have equal heights.	If this	 resource  is  set  to
	      True,  and  the LayoutBox	is configured as a row,	then any items
	      in that widget (except for separator or space gadgets) will have
	      their widths adjusted so that they are all as wide as the	widest
	      item. Similarly, items in	a column will have their  heights  ad-
	      justed so	that they are as high as the highest item. If this re-
	      source is	False (the default), then no special  action  will  be
	      taken to adjust the width	or height of items in rows or columns.
	      Setting this resource is often useful for	button	boxes  at  the
	      bottom of	dialogs	in which each button should be as wide as each
	      of the others. Note that this  resource  adjusts	the  width  of
	      items  in	 a  row. The height of items in	a row is controlled by
	      the XmtNlayoutJustification constraint resource of each item. By
	      default,	items in a row are all have a justification of XmtLay-
	      outFilled, which means that they will all	be  forced  to	be  as
	      high  as	the  row is, which implies that	they will all have the
	      same height.

	      If XmtNspaceType is not XmtLayoutSpaceNone, this resource,  with
	      XmtNspaceStretch	specifies  the	relative  stretchiness	of the
	      items in this row	or column to the spaces	automatically inserted
	      between  those  items. If	XmtNitemStretch	is 2, for example, and
	      XmtNspaceStretch is 1, then the items of the row will do	2/3rds
	      of  the  stretching,  and	the spaces between them	will do	1/3 of
	      the stretching.  If this resource	is zero, then  the  spaces  do
	      all the stretching, and the items	stay a fixed width.

	      Whether this LayoutBox should be a row or	a column.  If this re-
	      source is	XmHORIZONTAL (the default), then the LayoutBox will be
	      a	row. If	it is XmVERTICAL, then the LayoutBox will be a column.

	      If XmtNspaceType is not XmtLayoutSpaceNone, this resource	speci-
	      fies the amount of space (in pixels) that	will be	 inserted  be-
	      tween items in the Layout	Box when computing the natural size of
	      the box.

	      If XmtNspaceType is not XmtLayoutSpaceNone, this resource,  with
	      XmtNitemStretch specifies	the relative stretchiness of the items
	      in this row or column and	the spaces that	are  inserted  between
	      those  items.  If	 XmtNspaceStretch  is 2, for example, and Xmt-
	      NitemStretch is 1, then the spaces are twice as stretchy as  the
	      items  and will do 2/3rds	of the stretching. If XmtNspaceStretch
	      is 0, and	XmtNitemStretch	is not zero, then the spaces will  re-
	      main a fixed size, and the items will do all the stretching.

	      The model	the LayoutBox uses to space its	children along its ma-
	      jor dimension (i.e. horizontally in rows,	and vertically in col-
	      umns.)  The  default  is XmtLayoutSpaceNone which	specifies that
	      items are	laid out left-to-right or top-to-bottom	with no	 extra
	      space  inserted  between	them.  Other  legal values are XmtLay-
	      outSpaceEven, XmtLayoutSpaceLREven, XmtLayoutSpaceInterval,  and
	      XmtLayoutSpace  LCR.  See	Chapter	19, The	Layout Widget: The De-
	      tails, for an explanation	of these spacing models,  and  of  the
	      XmtLayout	layout scheme in general.

       Chapter 19, The Layout Widget: The Details, XmtCreateLayoutBox(),
       XmtCreateLayoutCol(), XmtCreateLayoutRow(), XmtLayout, XmtLayoutPixmap,
       XmtLayoutSeparator, XmtLayoutSpace, XmtLayoutString.

Xmt				  Motif	Tools		       XmtLayoutBox(3)


Want to link to this manual page? Use this URL:

home | help