Callins
-------

- cmd_ANYTHING(args) return dontLetLobbyHandleIt : boolean
	ANYTHING can be anything you want, then when typing "/ANYTHING args" in the lobby the function will be trigerred
- in_PROTOCOLCMD(args) return newArgs
	PROTOCOLCMD can be any of the incoming protocol command : SAID, SAIDEX ...
	see the protocol documentation for more information
- out_PROTOCOLCMD(args) return newArgs
	PROTOCOLCMD can be any of the outgoing protocol command : SAY, SAYEX ...
	see the protocol documentation for more information
- onLoggedIn
- onDisconnect
- onLogin
- onConnected
- onClose
- onSettingsChanged
- onGroupsChanged
- onMapsReloaded
- onReplaysReloaded
- onModsReloaded
- onURLClick(channel,url) return dontLetLobbyHandleIt : boolean
- onChatDblClick(channel,charPos,line) return dontLetLobbyHandleIt : boolean
- onStartSpring(args) return newArgs : string
- onDownloadModStart(formName,modHash,modName)
- onDownloadMapStart(formName,mapHash,mapName)


Callback class
--------------

callout :

- Disconnect
- ExitLobby
- GetBattles
- GetGroups
- SetGroups(dict)
	The group 'Users' can be a User dict with user names as keys (like the one returned by GetGroups), or a user name list.
- GetMaps
- GetMods
- GetMyUser
- GetUsers
- GetReplays
- GetCurrentBattle
- GetServers
- SetServers(dict)
- HandleProtocol(data)
- SendProtocol(data)
- LoadScripts
- PerformConnected
- PerformDisconnected
- ReloadScript(scriptname)
- ReloadScripts
- ShowDebugWindow
- SocketConnect(ip,port)
- HostBattle(nbPlayers, RankLimit, ModName, Description, Password, UDPHostPort, NatTraversal) return true if success
- JoinBattle(BattleId)
- HostReplay(replayFile, nbPlayers, RankLimit, Description, Password, UDPHostPort, NatTraversal) return true if success
- LeaveBattle
- StartBattle
- ChangeMap(mapName)

GUI Class
---------

menuName = [HostBattle, Help, HelpWiki, HelpDownload, BattleItem (returning the BattleId), PlayerItem (Returning the Player Name), PlayerItemModeration (Returning the Player Name), BattlePlayerItem (Returning the Player Name), BattleMinimap, BattleAdmin, BattleAdminBalance, BattleAdminRankLimit, BattleLadder, ReplayItem (Returning the Replay index)] 

- AddItemToMenu(menuName/SubmenuId,caption,callbackModuleName,callbackFunctionName,argsTuple,name) return itemId
	The selected item id is returned as first argument added to the argsTuple.
	
- AddSubmenuToMenu(menuName/SubmenuId,caption) return SubmenuId
- AddSeparatorToMenu(menuName/SubmenuId) return SeparatorId
- SetMenuItemState(id,checked,enabled)
- RemoveFromMenu(id)
	Id can be an itemId or a SubmenuId or a SeparatorId.
	
- DisplayNotification(title, msg, argsTuple, onClickModuleName, onClickFunctionName, displayTime)
- DisplaySimpleNotification(title, msg, displayTime)
	displayTime in ms
- GetControlProperties(controlName,controlClassTypePropertyPath)
- SetControlProperties(controlName,controlClassTypePropertyPath, properties)
- AddControl(name, parent, className)
	classname = [TTntScrollBox, TSpTBXDock, TSpTBXMultiDock, TSpTBXToolbar, TSpTBXDockablePanel, TSpTBXTabSet, TSpTBXTabControl, TSpTBXStatusBar, TSpTBXLabel, TSpTBXCheckBox, TSpTBXRadioButton, TSpTBXProgressBar, TSpTBXTrackBar, TSpTBXSplitter, TSpTBXPanel, TSpTBXGroupBox, TSpTBXRadioGroup, TSpTBXEdit,TSpTBXSpinEdit, TSpTBXComboBox,TSpTBXListBox, TSpTBXCheckListBox, TExRichEdit, TImage32, TWebBrowserWrapper]
- DeleteControl(name)	
- AddTab(caption, name, TabsPanelName)
- AddForm(name, caption, borderStyle (0->5))
- GetColors
- GetRichEditList
- AddToRichEdit(textbox, msg, color)
- AddDropDownButton(caption, buttonName, menuName, parent)
	Adds a button with a drop down menu. You can handle the menu with the AddItemToMenu etc functions with 'Parent.menuName' for menu id. If the drop down menu contains only one item, then clicking on the button will execute that item and no menu will be displayed.
- StackLayoutChanges(True/False)
	Save layout changes (add control, change control properties) in the CustomizeGUI editor stack. (So saving new profiles will include theses changes)
- AddPlayerIconType(name, iconsDict)
	iconsDict = icons = {0:'filepath.bmp/jpg/png', 'Name':'Rank1', 'MaskColor':16777215}, 1:{'File':'filepath.bmp/jpg/png', 'Name':'Rank2', 'MaskColor':16777215} ...}
- SetPlayerIconId(playerNick,iconTypeName,iconId)
- AddEvent(control, event, callbackModuleName, callbackFunctionName)
	event = 'OnClick' ...
- SetBattleVisible(battleId, visible)
	allow a script to hide a battle even if the filters show it


TODO :
------

callout :

- SetColors ?
- GetFilters 
- GetPresetList
- GetHightlightList
- SetHighlightlist
- GetBattleSettings
- SetBattleSettings(startPos, gameEndCond, LimitDGun, GhostedBuildings, DiminishMM, LockGameSpeed, StartMetal, StartEnergy, MaxUnits)

LowPriority
- SetPerformList
- GetPerformList
- GetIgnoreList
- SetIgnoreList
- SetSkin
- GetSkinList

callin :

- onMenuPopup(menuName)