Graph content

Hi all!
I try to write an interface to analyse some curves.
This involves selecting and deleting some curves from a graph window.
This is done by doing an right click and selecting “Remove Foo#3”.
This uses internally the function “RemoveFromGraph Foo#3”.
So my question is:
Is there a possibility to get a list/array with the remaining curves in the graph after deleting some?
If somebody could point me to some example code I would be very grateful.
I am using Igor 6.2.2.2 on Windows 7.
Thanks a lot in advance!
The following may be of use to you, depending on what exactly you are doing:
TraceNameList
WaveRefIndexed
XWaveRefFromTrace
TraceNameToWaveRef
Here is a useful example from the Manual (p. IV-175):
"This example uses a wave reference function to operate on the waves displayed in a graph:"
Function SmoothWavesInGraph()
    String list = TraceNameList("", ";", 1)
    String traceName
    Variable index = 0
    do
        traceName = StringFromList(index, list)
        if (strlen(traceName) == 0)
            break // No more traces.
        endif
        WAVE w = TraceNameToWaveRef("", traceName)
        Smooth 5, w
        index += 1
    while(1)
End