XmLTree(3X)

NAME
XmLTree

SYNOPSIS
#include <XmL/Tree.h>

DESCRIPTION
A Tree is a subclass of the Grid widget which displays a hierarchical tree with a Pixmap, XmString, connecting lines and possibly an expand/collapse graphic in the cells of its first column. Each row in the Tree has a position and level which is used to determine its relationship to other rows in the Tree. Rows may be expanded or collapsed by clicking on an expand/collapse graphic or by activating a row with the keyboard. The Tree inherits all the abilities of the Grid widget, allowing it to contain multiple columns and rows of varying types, heading and fixed rows and columns, interactive row and column resizing, cell borders, etc.

  Class Information
Tree inherits from XmLGrid, XmManager, Constraint, Composite and Core. Its class pointer is xmlTreeWidgetClass. Its class name is XmLTree.

  New Resources
The Tree resources defined below affect its overall layout and appearance. Definitions of resources affecting rows, columns and cells follow the Tree resource definitions.
Name                     Class
 Type                     Default                Access
XmNconnectingLineColor   XmCConnectingLineColor
 Pixel                    Dynamic                CSG
XmNlevelSpacing          XmCLevelSpacing
 Dimension                11                     CSG
XmNplusMinusColor        XmCPlusMinusColor
 Pixel                    Dynamic                CSG

XmNconnectingLineColor
    The color of the line which is drawn connecting parents, children and siblings in the first column of the Tree. This values defaults to the foreground color of the Tree.

XmNlevelSpacing
    The indent in pixels for each level in the Tree.

XmNplusMinusColor
    The color of the plus and minus expand/collapse graphics drawn next to parent nodes which may be expanded. This value defaults to the foreground color of the Tree.

  Row/Column/Cell Resources
Tree defines the resources in the table below affecting rows. In addition to these row resources, the Tree inherits all the row, column and cell resources which exist in the Grid.
Name                      Class
Type                       Default               Access
XmNrowExpands             XmCRowExpands
 Boolean                   False                 SG
XmNrowIsExpanded          XmCRowIsExpanded
 Boolean                   True                  SG
XmNrowLevel               XmCRowLevel
 int                       0                     SG

XmNrowExpands
    True if the row may expand (it is a parent) and False otherwise.

XmNrowIsExpanded
    True if the row is currently expanded and False otherwise. If this resource is set to False, the Tree will hide all children of this row. Children of this row are determined to be all rows which are of a level greater than this row's until we find the next row which is of this row's level or less (a sibling or parent of this row). Rows are hidden by setting their XmNrowHeight to 0. If this resource is set to True, the Tree will show all children of this row. Rows are shown by setting their XmNrowHeight to 1. The value of this resource has no meaning if XmNrowExpands is False.

XmNrowLevel
    The level of the row in the Tree.

  Callback Resources
Tree defines the following callback resources.
Callback               Reasons               Called When
XmNcollapseCallback    XmCR_COLLAPSE_ROW     Row is collapsed by activate
                                             or by clicking on collapse
                                             graphic
XmNexpandCallback      XmCR_EXPAND_ROW       Row is expanded by activate
                                             or by clicking on expand
                                             graphic

  Callback Structure
Each callback function is passed a pointer to a XmLGridCallbackStruct structure. See the XmLGrid's Callback Structure section for the full structure definition. The following table shows which values are set for which callback reasons. Elements not set will have undefined values.
Reason                Values Set
XmCR_COLLAPSE_ROW     event, rowType, row
XmCR_EXPAND_ROW       event, rowType, row

  Inherited Resources
Tree inherits the resources shown below.
Resource                 From       Resource                   From
XmNaccelerators          Core       XmNimmediateDraw           Grid
XmNallowColumnHide       Grid       XmNinitialResourcePersist  Core
XmNallowColumnResize     Grid       XmNinsertPosition          Composite
XmNallowDragSelected     Grid       XmNlayoutFrozen            Grid
XmNallowDrop             Grid       XmNleftFixedCount          Grid
XmNallowRowHide          Grid       XmNleftFixedMargin         Grid
XmNallowRowResize        Grid       XmNmappedWhenManaged       Core
XmNancestorSensitive     Core       XmNnavagationType          Manager
XmNautoSelect            Grid       XmNnumChildren             Composite
XmNbackground            Core       XmNrightFixedCount         Grid
XmNbackgroundPixmap      Core       XmNrightFixedMargin        Grid
XmNblankBackground       Grid       XmNrows                    Grid
XmNborderColor           Core       XmNscreen                  Core
XmNborderPixmap          Core       XmNscrollBarMargin         Grid
XmNborderWidth           Core       XmNscrollColumn            Grid
XmNbottomFixedCount      Grid       XmNscrollRow               Grid
XmNbottomFixedMargin     Grid       XmNselectBackground        Grid
XmNbottomShadowColor     Manager    XmNselectForeground        Grid
XmNbottomShadowPixmap    Manager    XmNselectionPolicy         Grid
XmNchildren              Composite  XmNsensitive               Core
XmNcolormap              Core       XmNshadowRegions           Grid
XmNcolumns               Grid       XmNshadowThicknses         Manager
XmNdebugLevel            Grid       XmNshadowType              Grid
XmNdepth                 Core       XmNsimpleHeadings          Grid
XmNdestroyCallback       Core       XmNsimpleWidths            Grid
XmNeditTranslations      Grid       XmNstringDirection         Manager
XmNfontList              Grid       XmNtextWidget              Grid
XmNfooterColumns         Grid       XmNtopFixedCount           Grid
XmNfooterRows            Grid       XmNtopFixedMargin          Grid
XmNforeground            Manager    XmNtopShadowColor          Manager
XmNglobalPixmapHeight    Grid       XmNtopShadowPixmap         Manager
XmNglobalPixmapWidth     Grid       XmNtranslations            Core
XmNheadingColumns        Grid       XmNtraversalOn             Manager
XmNheadingRows           Grid       XmNtraverseTranslations    Grid
XmNheight                Core       XmNunitType                Manager
XmNhelpCallback          Manager    XmNuseAverageFontWidth     Grid
XmNhiddenColumns         Grid       XmNuserData                Manager
XmNhiddenRows            Grid       XmNverticalScrollBar       Grid
XmNhighlightColor        Manager    XmNverticalSizePolicy      Grid
XmNhighlightThickness    Grid       XmNvisibleColumns          Grid
XmNhighlightPixmap       Manager    XmNvisibleRows             Grid
XmNhighlightRowMode      Grid       XmNvsbDisplayPolicy        Grid
XmNhorizontalScrollBar   Grid       XmNwidth                   Core
XmNhorizontalSizePolicy  Grid       XmNx                       Core
XmNhsbDisplayPolicy      Grid       XmNy                       Core

  Inherited Row/Column/Cell Resources
Tree inherits the row/column and cell resources shown below.
Resource                   From     Resource               From
XmNcellAlignment           Grid     XmNcellTopBorderColor  Grid
XmNcellBackground          Grid     XmNcellTopBorderType   Grid
XmNcellBottomBorderColor   Grid     XmNcellType            Grid
XmNcellBottomBorderType    Grid     XmNcellUserData        Grid
XmNcellColumnSpan          Grid     XmNcolumn              Grid
XmNcellDefaults            Grid     XmNcolumnPtr           Grid
XmNcellEditable            Grid     XmNcolumnRangeEnd      Grid
XmNcellFontList            Grid     XmNcolumnRangeStart    Grid
XmNcellForeground          Grid     XmNcolumnSizePolicy    Grid
XmNcellLeftBorderColor     Grid     XmNcolumnStep          Grid
XmNcellLeftBorderType      Grid     XmNcolumnType          Grid
XmNcellMarginBottom        Grid     XmNcolumnWidth         Grid
XmNcellMarginLeft          Grid     XmNcolumnUserData      Grid
XmNcellMarginRight         Grid     XmNrow                 Grid
XmNcellMarginTop           Grid     XmNrowHeight           Grid
XmNcellPixmap              Grid     XmNrowPtr              Grid
XmNcellPixmapMask          Grid     XmNrowRangeEnd         Grid
XmNcellRightBorderColor    Grid     XmNrowRangeStart       Grid
XmNcellRightBorderType     Grid     XmNrowSizePolicy       Grid
XmNcellRowSpan             Grid     XmNrowStep             Grid
XmNcellString              Grid     XmNrowType             Grid

SEE ALSO
XmLTreeAddRow(3X) XmLTreeAddRows(3X) XmLGridAddColumns(3X) XmLGridColumnIsVisible(3X) XmLGridDeleteAllColumns(3X) XmLGridDeleteAllRows(3X) XmLGridDeleteColumns(3X) XmLGridDeleteRows(3X) XmLGridDeselectAllCells(3X) XmLGridDeselectAllColumns(3X) XmLGridDeselectAllRows(3X) XmLGridDeselectCell(3X) XmLGridDeselectColumn(3X) XmLGridDeselectRow(3X) XmLGridEditBegin(3X) XmLGridEditCancel(3X) XmLGridEditComplete(3X) XmLGridGetColumn(3X) XmLGridGetFocus(3X) XmLGridGetRow(3X) XmLGridGetSelectedCellCount(3X) XmLGridGetSelectedCells(3X) XmLGridGetSelectedColumnCount(3X) XmLGridGetSelectedColumns(3X) XmLGridGetSelectedRow(3X) XmLGridGetSelectedRowCount(3X) XmLGridGetSelectedRows(3X) XmLGridMoveColumns(3X) XmLGridMoveRows(3X) XmLGridRead(3X) XmLGridReadPos(3X) XmLGridRedrawAll(3X) XmLGridRedrawCell(3X) XmLGridRedrawColumn(3X) XmLGridRedrawRow(3X) XmLGridReorderColumns(3X) XmLGridReorderRows(3X) XmLGridRowColumnToXY(3X) XmLGridRowlsVisible(3X) XmLGridSelectAllCells(3X) XmLGridSelectAllColumns(3X) XmLGridSelectAllRows(3X) XmLGridSelectCell(3X) XmLGridSelectColumn(3X) XmLGridSelectRow(3X) XmLGridSetFocus(3X) XmLGridSetStrings(3X) XmLGridSetStringsPos(3X) XmLGridWrite(3X) XmLGridWritePos(3X) XmLGridXYToRowColumn(3X)