dFeeds = CreateList() ;defaultFeeds
InsertItem(dFeeds, {id="PowerPC" , name="PowerPC", isNode=True, parent="Root"})
InsertItem(dFeeds, {
id="https://www.powerpc-notebook.org/en/feed/",
name="GNU/Linux Open Hardware PowerPC notebook Feed",
isNode=False, parent="PowerPC"})
InsertItem(dFeeds, {
id="https://www.powerpc-notebook.org/en/comments/feed/",
name="GNU/Linux Open Hardware PowerPC notebook Comments Feed",
isNode=False, parent="PowerPC"})
;<link rel="alternate" type="application/rss+xml" title="GNU/Linux Open Hardware PowerPC notebook » Feed" href="https://www.powerpc-notebook.org/en/feed/" />
;<link rel="alternate" type="application/rss+xml" title="GNU/Linux Open Hardware PowerPC notebook » Comments Feed" href="https://www.powerpc-notebook.org/en/comments/feed/" />
InsertItem(dFeeds, {id="Amiga" , name="Amiga", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id="" , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;InsertItem(dFeeds, {id= , name="John Doe", isNode=True, parent="Root"})
;name, isNode, id, parent
/*
Function p_InsertNode(i, t, listtree$)
Local flags$ = IIf(t.isNode, "List", "")
DebugPrint(i, t.id)
mui.DoMethod(listtree$, "Insert", t.name, t.id, t.parent, "Tail", flags$)
EndFunction
*/
Function p_FillListTree(listtree$, treetable)
mui.Set(listtree$, "Quiet", True)
;č ForEach začíná od 1 a teprve na konci se vrací k 0
;ForEach(treetable, p_InsertNode, listtree$)
For _i, t In IPairs(treetable)
mui.DoMethod(listtree$, "Insert",
t.name, t.id, t.parent, "Tail", IIf(t.isNode, "List", ""))
Next
mui.Set(listtree$, "Quiet", False)
EndFunction
Function p_DumpFeedTree(listtree$)
cFeeds = CreateList() ;currentFeeds
p_DumpListTree(listtree$, cFeeds, "Root", "Root")
Return(cFeeds)
EndFunction
;č tohle musí být rekurzivní
Function p_DumpListTree(listtree$, tabletree, nodeid, muiid)
Local isFound, t = mui.DoMethod(listtree$, "GetEntry", muiid, "Head", "")
While isFound
InsertItem(tabletree, {id=t.id, name=t.name, isNode=t.node, parent=nodeid})
If t.Node = True Then p_DumpListTree(listtree$, tabletree, t.id, t.muiid)
isFound, t = mui.DoMethod(listtree$, "GetEntry", t.muiid, "Next", "")
Wend
EndFunction