#!/usr/bin/mumps

##################################################################################
#+ Copyright (C) 2022 by Kevin C. O'Kane
#+
#+ Kevin C. O'Kane, Ph.D.
#+ Professor Emeritus
#+ Computer Science Department
#+ University of Northern Iowa
#+ Cedar Falls, IA 50614-0507
#+ kc.okane@gmail.com
#+ http://www.cs.uni.edu/~okane
#+
#+ This program is free software; you can redistribute it and/or modify
#+ it under the terms of the GNU General Public License as published by
#+ the Free Software Foundation; either version 2 of the License, or
#+ (at your option) any later version.
#+
#+ This program is distributed in the hope that it will be useful,
#+ but WITHOUT ANY WARRANTY; without even the implied warranty of
#+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#+ GNU General Public License for more details.
#+
#+ You should have received a copy of the GNU General Public License
#+ along with this program; if not, write to the Free Software
#+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#+
#+	August 25, 2022
##################################################################################

	write "on.loadTree.clicked.cpp",!

	set %=$z~mdh~tree~store~clear(treeStore)

	set x=""

	for  do
	. set x=$o(^clstr(x))
	. if x="" break;

	. set tmp="cluster "_x

	. set y=""
	. set y=$o(^clstr(x,y))
	. set %=$z~mdh~tree~level~add(treeStore,1,tmp,^title(y))

	. set y=""
	. for  do
	.. set y=$o(^clstr(x,y))
	.. if y="" break
	.. set %=$z~mdh~tree~level~add(treeStore,1,y,^title(y))
