annotate modules/ReAction_ModuleTemplate/ReAction_ModuleName.lua @ 80:42ec2938d65a

- Added Revision keyword on all .lua files (except ReAction_Action, which is under dev) - Removed ReAction_Paging module stub
author Flick <flickerstreak@gmail.com>
date Tue, 24 Jun 2008 23:47:27 +0000
parents da8ba8783924
children 8119fbe25939
rev   line source
flickerstreak@25 1 --[[
flickerstreak@25 2 ReAction module template
flickerstreak@25 3
flickerstreak@25 4 --]]
flickerstreak@25 5
flickerstreak@25 6 -- local imports
flickerstreak@25 7 local ReAction = ReAction
flickerstreak@25 8 local L = ReAction.L
flickerstreak@25 9 local _G = _G
flickerstreak@25 10
flickerstreak@80 11 --
flickerstreak@80 12 -- remember to set the svn:keywords property on this file to 'Revision'
flickerstreak@80 13 -- ONLY if you use the same repository as ReAction!
flickerstreak@80 14 --
flickerstreak@80 15 ReAction:UpdateRevision("$Revision$")
flickerstreak@77 16
flickerstreak@25 17 -- module declaration
flickerstreak@25 18 local moduleID = "MyModuleName"
flickerstreak@25 19 local module = ReAction:NewModule( moduleID,
flickerstreak@25 20 -- mixins go here
flickerstreak@25 21 )
flickerstreak@25 22
flickerstreak@63 23 -- handlers
flickerstreak@25 24 function module:OnInitialize()
flickerstreak@28 25 self.db = ReAction.db:RegisterNamespace( moduleID
flickerstreak@25 26 {
flickerstreak@28 27 profile = {
flickerstreak@28 28 -- default profile goes here
flickerstreak@28 29 }
flickerstreak@25 30 }
flickerstreak@25 31 )
flickerstreak@28 32
flickerstreak@63 33 -- register some common events
flickerstreak@63 34 ReAction.RegisterCallback(self, "OnCreateBar")
flickerstreak@63 35 ReAction.RegisterCallback(self, "OnDestroyBar")
flickerstreak@63 36 ReAction.RegisterCallback(self, "OnRefreshBar")
flickerstreak@63 37 ReAction.RegisterCallback(self, "OnEraseBar")
flickerstreak@63 38 ReAction.RegisterCallback(self, "OnRenameBar")
flickerstreak@63 39 ReAction.RegisterCallback(self, "OnConfigModeChanged")
flickerstreak@25 40 end
flickerstreak@25 41
flickerstreak@25 42 function module:OnEnable()
flickerstreak@25 43
flickerstreak@25 44 end
flickerstreak@25 45
flickerstreak@25 46 function module:OnDisable()
flickerstreak@25 47
flickerstreak@25 48 end
flickerstreak@25 49
flickerstreak@28 50 -- apply module features and settings to a bar object (see Bar.lua for Bar API)
flickerstreak@63 51 function module:OnCreateBar(event, bar, name)
flickerstreak@25 52
flickerstreak@25 53 end
flickerstreak@25 54
flickerstreak@28 55 -- remove module features and settings from a bar object
flickerstreak@63 56 function module:OnDestroyBar(event, bar, name)
flickerstreak@25 57
flickerstreak@25 58 end
flickerstreak@25 59
flickerstreak@28 60 -- refresh module features and settings on a bar object
flickerstreak@63 61 function module:OnRefreshBar(event, bar, name)
flickerstreak@28 62
flickerstreak@28 63 end
flickerstreak@28 64
flickerstreak@63 65 -- erase any local configuration entries for the supplied bar name
flickerstreak@63 66 function module:OnEraseBar(event, bar, name)
flickerstreak@28 67
flickerstreak@28 68 end
flickerstreak@28 69
flickerstreak@63 70 -- update any local configuration/option entries with the new bar name index
flickerstreak@63 71 function module:OnRenameBar(event, bar, oldName, newName)
flickerstreak@28 72
flickerstreak@28 73 end
flickerstreak@28 74
flickerstreak@63 75 -- update any local display/options based on config mode (true/false)
flickerstreak@63 76 function module:OnConfigModeChanged(event, mode)
flickerstreak@28 77
flickerstreak@28 78 end
flickerstreak@63 79