TitanPanel.lua
TitanPanel.lua Contains the basic routines of Titan. All the event handler routines, initialization routines, Titan menu routines, and select plugin handler routines.
TitanPanel_ResetToDefault Give the user a 'are you sure'. If the user accepts then reset current toon back to default Titan settings.
Inputs None
Outputs None
Notes - Even if the user was using global profiles they will not when this is done.
TitanPanel_SaveCustomProfile The user wants to save a custom Titan profile. Show the user the dialog boxes to make it happen.
Inputs None
Outputs None
Notes - The profile is written to the Titan saved variables. A reload of the UI is needed to ensure the profile is written to disk for the user to load later.
TitanSetPanelFont Set or change the font and font size of text on the Titan bar. This affects ALL plugins.
Inputs fontname - The text name of the font to use. Defaults to Titan default if none given. fontsize - The size of the font to use. Defaults to Titan default if none given.
Outputs None
Notes - Each registered plugin will have its font updated. Then all plugins will be refreshed to show the new font.
TitanPanel_CreateABar Helper to create the Titan bar passed in.
Inputs frame - The frame name (string) of the Titan bar to create
Outputs None
Notes - This also creates the hider bar in case the user want to use auto hide.
TitanPanel_PlayerEnteringWorld Do all the setup needed when a user logs in / reload UI / enter or leave an instance.
Inputs None
Outputs None
Notes - This is called after the 'player entering world' event is fired by Blizz. - This is also used when a LDB plugin is created after Titan runs the 'player entering world' code.
TitanPanelBarButton_OnClick Handle the button clicks on any Titan bar.
Inputs self - expected to be a Titan bar button - which mouse button was clicked
Outputs None
Notes - This only reacts to the right or left mouse click without modifiers. - Used in the set script for the Titan display and hider frames
TitanPanel_ParseSlashCmd Helper to parse the user commands.
Inputs cmd - user string from the command 'window'
Outputs words - table of 'words' the user typed in
Notes - each 'word' in words table is made lower case for comparison simplicity
handle_slash_help Helper to tell the user the relevant Titan commands.
Inputs cmd - string 'all' | 'reset' | 'gui'
Outputs None
Notes - Depending on cmd put to chat the appropriate help
handle_reset_cmds Helper to execute the various reset commands from the user.
Inputs cmd_list - A table containing the list of 'words' the user typed in
Outputs None
handle_giu_cmds Helper to execute the gui related commands from the user.
Inputs cmd_list - A table containing the list of 'words' the user typed in
Outputs None
handle_profile_cmds Helper to execute the profile related commands from the user.
Inputs cmd_list - A table containing the list of 'words' the user typed in
Outputs None
handle_help_cmds Helper to execute the help commands from the user.
Inputs cmd_list - A table containing the list of 'words' the user typed in
Outputs None
TitanPanel_RegisterSlashCmd Helper to parse and execute all the Titan slash commands from the user.
Inputs cmd - The command (string) the user typed in
Outputs None
TitanPanel_ClearAllBarTextures Clear the current texture from all Titan bars.
Inputs None
Outputs None
TitanPanel_CreateBarTextures Create empty texture frames for all Titan bars.
Inputs None
Outputs None
TitanPanel_SetTexture Set texture frames for the given Titan bar with the user chosen texture (bar graphic).
Inputs frame - expected to be a Titan bar name (string) position - not used
Outputs None
Notes - Assumes "TexturePath" contains the user selected texture.
TitanPanelBarButton_OnLeave On leaving the display check if we have to hide the Titan bar. A timer is used - when it expires the bar is hid.
Inputs self - expected to be a Titan bar
Outputs None
TitanPanelBarButton_OnEnter No code - this is a place holder for the XML template.
Inputs self - expected to be a Titan bar
Outputs None
TitanPanelBarButtonHider_OnLeave No code - this is a place holder for the XML template.
Inputs self - expected to be a Titan bar
Outputs None
TitanPanelBarButtonHider_OnEnter On entering the hider check if we need to show the display bar.
Inputs self - expected to be a Titan hider bar
Outputs None
Notes - No action is taken if the user is on combat.
TitanPanelBarButton_ToggleAlign Align the buttons per the user's new choice.
Inputs align - left or center
Outputs None
TitanPanelBarButton_ToggleAutoHide Toggle the auto hide of the given Titan bar per the user's new choice.
Inputs frame - expected to be a Titan bar
Outputs None
TitanPanelBarButton_ToggleScreenAdjust Toggle whether Titan adjusts 'top' frames around Titan bars per the user's new choice.
Inputs None
Notes - Another addon can tell Titan to NOT adjust some or all frames.
TitanPanelBarButton_ToggleAuxScreenAdjust Toggle whether Titan adjusts 'bottom' frames around Titan bars per the user's new choice.
Inputs None
Outputs None
Notes - Another addon can tell Titan to NOT adjust some or all frames.
TitanPanelBarButton_ForceLDBLaunchersRight Force all plugins created from LDB addons, visible or not, to be on the right side of the Titan bar. Any visible plugin will be forced to the right side on the same bar it is currently on.
Inputs None
Outputs None
TitanAnchors Helper to create the 'anchor' frames used by other addons that need to adjust so Titan can be visible. The anchor frames are adjusted depending on which Titan bars the user selects to show.
Inputs None
Outputs None
Notes - TitanPanelTopAnchor - the frame at the bottom of the top bar(s) shown. - TitanPanelBottomAnchor - the frame at the top of the bottom bar(s) shown.
TitanPanelBarButton_DisplayBarsWanted Show all the Titan bars the user has selected.
Inputs None
Outputs None
TitanPanelBarButton_Show Show / hide the given Titan bar based on the user selection.
Inputs frame - expected to be a Titan bar name (string)
Outputs None
Notes - Hide moves rather than just 'not shown'. Otherwise the buttons will stay visible defeating the purpose of hide.
TitanPanelBarButton_Hide Hide the given Titan bar based on the user selection.
Inputs frame - expected to be a Titan bar name (string)
Outputs None
Notes - Hide moves rather than just 'not shown'. Otherwise the buttons will stay visible defeating the purpose of hide. - Also moves the hider bar if auto hide is not selected.
TitanPanel_InitPanelBarButton Set the scale, texture (graphic), and transparancy of all the Titan bars based on the user selection.
Inputs None
Outputs None
TitanPanel_InitPanelButtons Show all user selected plugins on the Titan bar(s) then justify per the user selection.
Inputs None
Outputs None
TitanPanel_ReOrder Reorder all the shown all user selected plugins on the Titan bar(s). Typically used after a button has been removed / hidden.
Inputs index - the index of the plugin removed so the list can be updated
Outputs None
TitanPanel_RemoveButton Remove a plugin then show all the shown all user selected plugins on the Titan bar(s).
Inputs id - the plugin name (string)
Outputs None
Notes - This cancels all timers of name "TitanPanel"..id as a safeguard to destroy any active plugin timers based on a fixed naming convention : TitanPanel..id, eg. "TitanPanelClock" this prevents "rogue" timers being left behind by lack of an OnHide check
TitanPanel_GetButtonNumber Get the index of the given plugin from the Titan plugin list.
Inputs id - the plugin name (string)
Outputs index of the plugin in the Titan plugin list or the end of the list. The routine returns +1 if not found so it is 'safe' to update / add to the Location
TitanPanel_RefreshPanelButtons Update / refresh each plugin from the Titan plugin list. Used when a Titan option is changed that effects all plugins.
Inputs None
Outputs None
TitanPanelButton_Justify Justify the plugins on each Titan bar. Used when the user changes the 'center' option on a Titan bar.
Inputs None
Outputs None
TitanPanel_SetScale Set the scale of each plugin and each Titan bar.
Inputs None
Outputs None
TitanPanelRightClickMenu_BarOnClick Show / hide a plugin. Used by the Titan (right click) menu.
Inputs checked - true (show) or false (hide) value - the plugin id
Outputs None
TitanPanel_MainMenu Show main Titan (right click) menu.
Inputs None
Outputs None
TitanPanel_ServerSettingsMenu Show list of servers / custom submenu off Profiles/Manage from the Titan (right click) menu.
Inputs None
Outputs None
TitanPanel_PlayerSettingsMenu Show list of toons submenu off Profiles/Manage/<server or custom> from the Titan (right click) menu.
Inputs None
Outputs None
Notes - There are 2 level 3 menus possible 1) Under profiles, then value could be the server of a saved toon 2) Under plugins value could be the options of a plugin
TitanPanel_SettingsSelectionMenu Show save / load submenu off Profiles/Manage/<server or custom>/<profile> from the Titan (right click) menu.
Inputs None
Outputs None
TitanPanel_BuildOtherPluginsMenu Show the submenu with list of plugin off the category from the Titan (right click) menu.
Inputs None
Outputs None
TitanPanelRightClickMenu_PrepareBarMenu This is the controller to show the proper level of the Titan (right click) menu.
Inputs self - expected to be the Titan bar that was right clicked
Outputs None
TitanPanel_IsPluginShown Determine if the given plugin is shown on a Titan bar. The Titan bar could be not shown or on auto hide and the plugin will still be 'shown'.
Inputs id - plugin name (string)
Outputs index of the plugin or nil
TitanPanel_GetPluginSide Determine if the given plugin is or would be on right or left of a Titan bar. This returns right or left regardless of whether the plugin is 'shown'.
Inputs id - plugin name (string)
Outputs "Right" or "Left"
TitanPanel_LoadError *deprecated* Display a 'loading' error. Does not appear to be used.
Inputs ErrorMsg - message to display
Outputs None
|