Re: GtkCTree: Getting all top-level nodes?



On Fri, 07 Sep 2001 06:20:37 +0000 (GMT), M Razhov said:

 How do I enumerate all top-level nodes in a GtkCTree?
 For example, if I had a tree with nodes 1 and 2, stemming
 from root (no parent), and 1 had two children, 1.1 and 1.2,
 like this:
   |
   +--1
   |  +--1.1
   |  +--1.2
   |
   +--2
 I would like to programmatically ask the CTree about its
 root nodes and get 1 and 2.  (I suspect this may be non-
 trivial and possibly require ugly code, I'm just looking
 to do it).

Shouldn't you get the first toplevel node and then get the
next one by getting its sibling and itterate through
each sibling (ignoring childs)?

-- 
--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
.__                          ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]