WIKIDPAD_PLUGIN = (("MenuFunctions",1),)

# ListPublicMembers.py: Lists all public members of WikidPad's objects wiki and editor
# Version 1.0
# Install: Put the source into "WikidPad/user_extensions/ListPublicMembers.py" and restart WikidPad.
# Made from a script posted by markandgoals to WikidPad Dev-Maling list

def describeMenuItems(wiki):
	return ((listPublicMembersPlugin, "listPublicMembers\t", "listPublicMembers"),)

def listPublicMembersPlugin(wiki, evt):
	editor=wiki.getActiveEditor()
	editor.GotoPos(editor.GetLength())
	globals=['wiki','editor']
	
	for var in globals:
		editor.AddText("++"+var+": "+str(eval(var).__doc__)+"\n")
		editor.AddText("<<\n")
		for subvar in dir(eval(var)):
			editor.AddText(subvar+", ")
			
		editor.AddText("\n>>\n")