Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ RubberTile(3W) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

RubberTile(3W)

NAME

RubberTile − a composite widget allowing sophisticated management of other widgets in its boundaries

SYNOPSIS

#include <Xol/OpenLook.h>
#include <Xol/RubberTile.h>
 . . .

ANCESTRY

Core-Composite-Constraint-Manager-RubberTile

DESCRIPTION

The RubberTile is a constraint widget which allows an application to layout its children either vertically or horizontally, and then assign relative weights to each child so that it absorbs a certain percentage of size changes.  If the RubberTile is set with a vertical orientation, then the children will be layed out vertically in columns, each spanning the width of the RubberTile.  If the RubberTile is layed out horizontally, then the children we be placed in a row, each ones height spanning the height of the RubberTile.  The RubberTile resizes its children according to a weight assigned to each child.  If there are three children with weights of 1, 2, and 3, they resize to get 1/6th, 1/3rd, and 1/2 of the available space respectively. 

This widget is very useful when laying out panes in a window.  For example, if an application requires three panes layed out vertically, and the top pane is not to absorb any height changes, however the two lower panes are to each absorb half of the height changes, then the application can do the following: create a RubberTile with XtNorientation set to OL_VERTICAL, then create each child, assigning each the appropriate XtNweight constraint resource value:
 
     top pane ->     XtNweight = 0
     middle pane ->  XtNweight = 1
     bottom pane ->  XtNweight = 1
  top pane’s size change percentage    =  0 / (0 + 1 + 1) = 0%
  middle Pane’s size change percentage =  1 / (0 + 1 + 1) = 50%
  bottom pane’s size change percentage =  1 / (0 + 1 + 1) = 50%
 
RubberTiles do not enforce any weighting on their children when the widget is created, only when it is resized. 

Also note that an individual RubberTile only supports a single dimensional array, vertical or horizontal.  However, an application can produce a two dimensional effect with a matrix of RubberTile widgets.  For example, to create the effect of a 2 × 4 matrix, you could have two top level RubberTiles managing four RubberTiles each. 

RESOURCES

  Table 1 RubberTile Resource Set

Name                   Type           Default       Access
XtNancestorSensitive   Boolean          TRUE           SGI
XtNbackground          Pixel            White          SGI
XtNbackgroundPixmap    Pixmap           (none)         SGI
XtNborderColor         Pixel            Black          SGI
XtNborderPixmap        Pixmap           (none)         SGI
XtNborderWidth         Dimension        0              SGI
XtNconsumeEvent        XtCallbackList   NULL           SGI
XtNdestroyCallback     XtCallbackList   NULL           SGI
XtNheight              Dimension        (calculated)   SGI
XtNmappedWhenManaged   Boolean          TRUE           SGI
XtNorientation         OlDefine         OL_VERTICAL    SGI
XtNsensitive           Boolean          TRUE           SGI
XtNuserData            XtPointer        NULL           SGI
XtNwidth               Dimension        (calculated)   SGI
XtNx                   Position         0              SGI
XtNy                   Position         0              SGI
Access:   S = XtSetValues   G = XtGetValues
            I = init time   O = other access

† see
resources(3W)

XtNorientation

class:XtCOrientation type:OlDefine default:OL_VERTICALaccess:SGI

Action: Determines the orientation of the widget. 

Values: OL_VERTICAL/ The children are created in a single vertical column.  OL_HORIZONTAL/ The children are created in a single horizontal column.

Child Constraints

Each child widget attached to the RubberTile composite widget is constrained by the resources detailed in the following table. In essence, these resources become resources for each child widget and can be set and read just like any other resource defined for the child. 

  Table 2 RubberTile Child Constraining Resources

Name           Type        Default  Access
XtNrefName     String      NULL      SGI
XtNrefWidget   XtPointer   NULL      SGI
XtNspace       Dimension   0         SGI
XtNweight      Dimension   1         SGI

Access:   S = XtSetValues   G = XtGetValues
            I = init time   O = other access

XtNrefName

class:XtCRefName type:String default:NULLaccess:SGI class:XtCRefWidget type:XtPointer default:NULLaccess:SGI class:XtSCpace type:Dimension default:0access:SGI

Action:  The relative weight given to each child when the RubberTile is resized. 

XtNweight

class:XtCWeight type:Dimension default:1access:SGI

Action: The amount of space between the children. 

Version 3.0.1  —  Last change: June 92

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026