mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Tree_Item.cxx
Fl_Tree_Item *Fl_Tree_Item::prev() {
  Fl_Tree_Item *p=parent();		// start with parent
  if ( ! p ) return(0);			// hit root? done
  int t = p->find_child(this);		// find our position in parent's children[] array
  if ( --t == -1 ) {	 		// are we first child?
    return(p);				// return immediate parent
  }
  p = p->child(t);			// take parent's previous child
  while ( p->has_children() ) {		// has children?
    p = p->child(p->children()-1);	// take last child
  }
  return(p);
}
/// Return the previous item in the tree.
///
/// This method can be used to walk the tree backwards.
/// For an example of how to use this method, see Fl_Tree::last().
/// 
/// \returns the previous item in the tree, or 0 if there's no item above this one (hit the root).
///
Return the previous item in the tree.
This method can be used to walk the tree backwards.
For an example of how to use this method, see Fl_Tree::last().

\returns the previous item in the tree, or 0 if there's no item above this one (hit the root).
Return the previous item in the tree . This method can be used to walk the tree backwards . For an example of how to use this method see Fl_Tree :: last () . \ returns the previous item in the tree or 0 if there ' s no item above this one ( hit the root ) .
Fl_Tree_Item *Fl_Tree_Item::prev() {
  Fl_Tree_Item *p=parent();		
  if ( ! p ) return(0);			
  int t = p->find_child(this);		
  if ( --t == -1 ) {	 		
    return(p);				
  }
  p = p->child(t);			
  while ( p->has_children() ) {		
    p = p->child(p->children()-1);	
  }
  return(p);
}
Fl_Tree_Item * Fl_Tree_Item :: prev ( ) { Fl_Tree_Item * p = parent ( ) ; if ( ! p ) return ( 0 ) ; int t = p -> find_child ( this ) ; if ( -- t == -1 ) { return ( p ) ; } p = p -> child ( t ) ; while ( p -> has_children ( ) ) { p = p -> child ( p -> children ( ) - 1 ) ; } return ( p ) ; }
Return the previous item in the tree.
Return the previous item in the tree .
// start with parent // hit root? done // find our position in parent's children[] array // are we first child? // return immediate parent // take parent's previous child // has children? // take last child