.\" The contents of this file are subject to the Netscape Public .\" License Version 1.1 (the "License"); you may not use this file .\" except in compliance with the License. You may obtain a copy of .\" the License at http://www.mozilla.org/NPL/ .\" .\" Software distributed under the License is distributed on an "AS .\" IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or .\" implied. See the License for the specific language governing .\" rights and limitations under the License. .\" .\" The Original Code is mozilla.org code. .\" .\" The Initial Developer of the Original Code is Netscape .\" Communications Corporation. Portions created by Netscape are .\" Copyright (C) 1998 Netscape Communications Corporation. All .\" Rights Reserved. .\" .\" Contributor(s): .\" .\" .\" .\" .\" The following source code is part of the Microline Widget Library. .\" The Microline widget library is made available to Mozilla developers .\" under the Netscape Public License (NPL) by Neuron Data. To learn .\" more about Neuron Data, please visit the Neuron Data Home Page at .\" http://www.neurondata.com. .\" .\" .TH XmLTree 3X "R1" "XML1" "XML" .SH NAME XmLTree .SH SYNOPSIS #include .LP .SH 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. .SS Class Information Tree inherits from XmLGrid, XmManager, Constraint, Composite and Core. Its class pointer is xmlTreeWidgetClass. Its class name is XmLTree. .SS 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. .nf .ft B Name Class Type Default Access .ft P XmNconnectingLineColor XmCConnectingLineColor Pixel Dynamic CSG XmNlevelSpacing XmCLevelSpacing Dimension 11 CSG XmNplusMinusColor XmCPlusMinusColor Pixel Dynamic CSG .fi .IP 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. .IP XmNlevelSpacing The indent in pixels for each level in the Tree. .IP 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. .SS 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. .nf .ft B Name Class Type Default Access .ft P XmNrowExpands XmCRowExpands Boolean False SG XmNrowIsExpanded XmCRowIsExpanded Boolean True SG XmNrowLevel XmCRowLevel int 0 SG .fi .IP XmNrowExpands True if the row may expand (it is a parent) and False otherwise. .IP 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. .IP XmNrowLevel The level of the row in the Tree. .SS Callback Resources Tree defines the following callback resources. .nf .ft B Callback Reasons Called When .ft P 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 .fi .SS 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. .nf .ft B Reason Values Set .ft P XmCR_COLLAPSE_ROW event, rowType, row XmCR_EXPAND_ROW event, rowType, row .ni .SS Inherited Resources Tree inherits the resources shown below. .nf .ft B Resource From Resource From .ft P 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 .fi .SS Inherited Row/Column/Cell Resources Tree inherits the row/column and cell resources shown below. .nf .ft B Resource From Resource From .ft P 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 .fi .SH "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)