home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / Microline3.0 / XmL / TreeP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.1 KB  |  126 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /*
  20.  * The following source code is part of the Microline Widget Library.
  21.  * The Microline widget library is made available to Mozilla developers
  22.  * under the Netscape Public License (NPL) by Neuron Data.  To learn
  23.  * more about Neuron Data, please visit the Neuron Data Home Page at
  24.  * http://www.neurondata.com.
  25.  */
  26.  
  27.  
  28. #ifndef XmLTreePH
  29. #define XmLTreePH
  30.  
  31. #include <Xm/XmP.h>
  32. #ifndef MOTIF11
  33. #include <Xm/ManagerP.h>
  34. #include <Xm/DrawP.h>
  35. #endif
  36.  
  37. #include "Tree.h"
  38. #include "GridP.h"
  39.  
  40. /* row value mask for get/set values */
  41. #define RVML XmLGridRowValueMaskLen
  42. #define XmLTreeRowLevel      (1L << (RVML))
  43. #define XmLTreeRowExpands    (1L << (RVML + 1))
  44. #define XmLTreeRowIsExpanded (1L << (RVML + 2))
  45.  
  46. typedef struct _XmLTreeRowPart
  47.     {
  48.     Boolean expands;
  49.     int level;
  50.     Boolean hasChildren, hasSiblings, isExpanded;
  51.     Dimension stringWidth;
  52.     Boolean stringWidthValid;
  53.     } XmLTreeRowPart;
  54.  
  55. struct _XmLTreeRowRec
  56.     {
  57.     XmLGridRowPart grid;
  58.     XmLTreeRowPart tree;
  59.     };
  60.  
  61. typedef struct _XmLTreePart
  62.     {
  63.     /* resources */
  64.     Dimension levelSpacing;
  65.     Pixel lineColor, pmColor;
  66.     XtCallbackList collapseCallback, expandCallback;
  67.  
  68.     /* private data */
  69.     char *linesData;
  70.     int linesSize, linesMaxLevel;
  71.     int recalcTreeWidth;
  72.  
  73.     char defaultPixmapsCreated;
  74.     Pixel pixColors[4];
  75.     Pixmap filePixmask, folderPixmask, folderOpenPixmask;
  76.     Pixmap filePixmap, folderPixmap, folderOpenPixmap;
  77.  
  78.     /* row resources */
  79.     int rowLevel;
  80.     Boolean rowExpands, rowIsExpanded;
  81.  
  82.     /* Causes the tree to NOT render any pixmaps */
  83.     Boolean ignorePixmaps;
  84.     } XmLTreePart;
  85.  
  86. typedef struct _XmLTreeRec
  87.     {
  88.     CorePart core;
  89.     CompositePart composite;
  90.     ConstraintPart constraint;
  91.     XmManagerPart manager;
  92.     XmLGridPart grid;
  93.     XmLTreePart tree;
  94.     } XmLTreeRec;
  95.  
  96. typedef struct _XmLTreeClassPart
  97.     {
  98.     int unused;
  99.     } XmLTreeClassPart;
  100.  
  101. typedef struct _XmLTreeClassRec
  102.     {
  103.     CoreClassPart core_class;
  104.     CompositeClassPart composite_class;
  105.     ConstraintClassPart constraint_class;
  106.     XmManagerClassPart manager_class;
  107.     XmLGridClassPart grid_class;
  108.     XmLTreeClassPart tree_class;
  109.     } XmLTreeClassRec;
  110.  
  111. extern XmLTreeClassRec xmlTreeClassRec;
  112.  
  113. typedef struct _XmLTreeConstraintPart
  114.     {
  115.     int unused;
  116.     } XmLTreeConstraintPart;
  117.  
  118. typedef struct _XmLTreeConstraintRec
  119.     {
  120.     XmManagerConstraintPart manager;
  121.     XmLGridConstraintPart grid;
  122.     XmLTreeConstraintPart tree;
  123.     } XmLTreeConstraintRec, *XmLTreeConstraintPtr;
  124.  
  125. #endif 
  126.