Total.registerForHide
From WoWWiki
This article is a part of the documentation of the Eclipse function library
--[[
registerForHide ( {reglist} )
Registers a frame to be hidden. This is the main function for interfacing with Total.
The function will register the frame, as well as a chat command, and a GUI
option if you provide it the info it needs to do so.
Args:
reglist - the table of options, some options will be listed more than once to show when they
are needed, but only set them once
{
Data required to register a frame for hiding:
(string) name - The name of this configuration, should be the name of the frame to autohide
if you aren't passing frames
Optional data for hiding:
(bool) show - If this is true, then the frame will be shown when the option is enabled,
instead of hidden, and hidden when disabled, instead of shown
(bool) enabled - If this is true, then the option will be enabled by default
(string or table) frames - The name of the frame to hide, or a list of frames to to hide,
if not specified, name is used.
{
(string or table) - Each entry can be either a string with the name of the frame, or
a table specifying a range of frames. If you pass the table
specifying the range it will take the name and tack on a number
at the end based on min, and max. Ex, {name="PartyFrame", min=1,
max=4} will register "PartyFrame1" though "PartyFrame4"
Alternative Ex, {name="Party%dFrame", min=1, max=4} will register
"Party1Frame" though "Party4Frame"
{
(string) name - The base name of this set of frames to to hide. If this contains
a format character such as %d, it will be replaced with the frame
number, otherwise the frame number will be added to the end.
(number) min - The lowest number frame to start with
(number) max - The highest number of frame to end with
}
}
Data required to register a slash command:
(string or table) slashcom - The slash command, Ex. "framename", or this can be a list of
commands Ex. {"framename", "fname", "fn"}
Optional slash command data:
(string) slashname - The name to display for this option when printing status from a slash
command change, defaults to uiname
(string) slashhelp - Message to show next to the slash command when help is printed, if not
passed then this is generated from uiname, or name if uiname isn't
available.
Data required to register a UI option:
(string) uiname - The name to display for the option in the UI, defaults to slashname
or
(string) uilabel - The label to display for the option in the UI, if this isn't passed, it
it is then generated based on uiname.
Optional data for the UI:
(string) uidesc - The description to display for the option in the UI
(number) uidiff - The difficulty of the option in the UI
(string) uisec - The section to put the option in, if not passed, will put it in VisibilityOptions
(string) uiseclabel - The name of the section to put the option in, only pointful if putting
into a new section.
(string) uisecdesc - The description of the section to put the option in, only pointful if
putting into a new section.
(number) uisecdiff - The difficulty of the section to put the option in, only pointful if
putting into a new section.
(string) uisep - The separator to put the option behind, if not passed, will put it behind
an Autohide separator.
(string) uiseplabel - The name of the separator to put the option behind, only pointful if
putting behind a new separator.
(string) uisepdesc - The description of the separator to put the option behind, only
pointful if putting behind a new section.
(number) uisepdiff - The difficulty of the separator to put the option in, only pointful if
putting into a new separator.
The following options are provided as convience wrappers to Eclipses SetFrame function
See Eclipse.SetFrame for further details:
(table) reqs - A table of requirements. The frame(s) will only show if all requirements
are met.
(boolean) manual - Should Eclipse have full control of the frames hiding/showing
(table) state - The default state of the frame
(function) onupdate - the OnUpdate function for the frame, if it needs called while hidden
]]--
