PitBull Unit Frames 4.0

PitBull4.del(t)

Delete a table, clearing it and putting it back into the queue

Parameters

t

Return value

nil

Usage

local t = PitBull4.new()
	t = del(t)


PitBull4.new()

Return a table

Return value

a blank table

Usage

local t = PitBull4.new()


PitBull4:CallMethodOnModules(method_name, ...)

Call a given method on all modules if those modules have the method.
This will iterate over disabled modules.

Parameters

method_name
name of the method
...
arguments that will pass in to the module


PitBull4:CheckGUIDForUnitID(unit, is_pet)

Check the GUID of the given UnitID and send that info to all frames for that UnitID

Parameters

unit
the UnitID to check
is_pet
pass true if calling from UNIT_PET

Usage

PitBull4:CheckGUIDForUnitID("player")


PitBull4:CheckWackyFramesForGUIDUpdate()

Iterate over all wacky frames, and call their respective :UpdateGUID methods.

Usage

PitBull4:CheckWackyFramesForGUIDUpdate()


PitBull4:GetState()

Get the current state that the player is in.
This will return one of "solo", "party", "raid", "raid10", "raid15", "raid20", "raid25", or "raid40". Setting config mode does override this.

Return value

the state of the player.

Usage

local state = PitBull4:GetState()


PitBull4:IterateFrames(also_hidden)

Iterate over all frames.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

also_hidden
also return frames that are hidden

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFrames() do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateFrames(true) do
    doSomethingWith(frame)
end


PitBull4:IterateFramesForClassification(classification, also_hidden)

Iterate over all frames with the given classification.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

classification
the classification to check
also_hidden
also return frames that are hidden

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForClassification("player") do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateFramesForClassification("party", true) do
    doSomethingWith(frame)
end


PitBull4:IterateFramesForGUID(guid)

Iterate over all frames with the given GUID

Parameters

guid
the GUID to check. can be nil, which will cause no frames to return.

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForGUID("0x0000000000071278") do
    doSomethingWith(frame)
end


PitBull4:IterateFramesForGUIDs(...)

Iterate over all frames with the given GUIDs

Parameters

...
the GUIDs to check. Can be nil.

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForGUIDs(UnitGUID) do
    doSomethingWith(frame)
end


PitBull4:IterateFramesForLayout(layout, also_hidden)

Iterate over all frames with the given layout.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

layout
the layout to check
also_hidden
also return frames that are hidden

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForLayout("Normal") do
    frame:UpdateLayout()
end
for frame in PitBull4:IterateFramesForLayout("Normal", true) do
    frame:UpdateLayout()
end


PitBull4:IterateFramesForName(name, server)

Iterate over all frames with the given name

Parameters

name
the name to check. can be nil, which will cause no frames to return.
server
the name of the realm, can be nil, which will cause only the name to be matched.

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForName("Someguy") do
    doSomethingWith(frame)
end


PitBull4:IterateFramesForUnitID(unit, also_hidden, dont_include_wacky)

Iterate over all frames with the given unit ID This iterates over only shown frames unless also_hidden is passed in.

Parameters

unit
the UnitID of the unit in question
also_hidden
also return frames that are hidden
dont_include_wacky
don't include wacky frames that are the same unit

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForUnitID("player") do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateFramesForUnitID("party1", true) do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateFramesForUnitID("party1", false, true) do
    doSomethingWith(frame)
end


PitBull4:IterateFramesForUnitIDs(...)

Iterate over all shown frames with the given UnitIDs.
To iterate over hidden frames as well, pass in true as the last argument.

Parameters

...
a tuple of UnitIDs.

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateFramesForUnitIDs("player", "target", "pet") do
    somethingAwesome(frame)
end
for frame in PitBull4:IterateFramesForUnitIDs("player", "target", "pet", true) do
    somethingAwesome(frame)
end


PitBull4:IterateHeaders(also_unused)

Iterate over all headers.

Parameters

also_unused
also return headers unused by the current profile.

Return value

iterator which returns headers

Usage

for header in PitBull4:IterateHeaders()
    doSomethingWith(header)
end


PitBull4:IterateHeadersForLayout(layout, also_hidden)

Iterate over all headers with the given layout.

Parameters

layout
the layout to check
also_hidden

Return value

iterator which returns headers

Usage

for header in PitBull4:IterateHeadersForLayout("Normal") do
    header:RefreshLayout()
end


PitBull4:IterateHeadersForName(name)

Iterate over all headers with the given name.

Parameters

name
the name to check

Return value

iterator which returns zero or one header

Usage

for header in PitBull4:IterateHeadersForName("Party pets")
    doSomethingWith(header)
end


PitBull4:IterateHeadersForSuperUnitGroup(super_unit_group)

Iterate over all headers with the given super-classification.

Parameters

super_unit_group
the super-unit group to check. This can be "party" or "raid"

Return value

iterator which returns headers

Usage

for header in PitBull4:IterateHeadersForSuperUnitGroup("party")
    doSomethingWith(header)
end


PitBull4:IterateHeadersForUnitGroup(unit_group)

Iterate over all headers with the given classification.

Parameters

unit_group
the unit group to check

Return value

iterator which returns headers

Usage

for header in PitBull4:IterateHeadersForUnitGroup("party")
    doSomethingWith(header)
end


PitBull4:IterateLoadOnDemandModules()

Return a iterator of addon ID, addon name that are modules that PitBull4 can load.
module_name is the same as name without the "PitBull4_" prefix.

Return value

an iterator which returns id, name, module_name

Usage

for i, name, module_name in PitBull4:IterateLoadOnDemandModules() do
	    print(i, name, module_name)
	end


PitBull4:IterateMemberFrames(also_hidden)

Iterate over all member frames.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

also_hidden
also return frames that are hidden

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateNonWackyFrames() do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateNonWackyFrames(true) do
    doSomethingWith(frame)
end


PitBull4:IterateNonWackyFrames(also_hidden, only_non_wacky)

Iterate over all non-wacky frames.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

also_hidden
also return frames that are hidden
only_non_wacky

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateNonWackyFrames() do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateNonWackyFrames(true) do
    doSomethingWith(frame)
end


PitBull4:IterateSingletonFrames(also_hidden)

Iterate over all singleton frames.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

also_hidden
also return frames that are hidden

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateSingletonFrames() do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateSingletonFrames(true) do
    doSomethingWith(frame)
end


PitBull4:IterateWackyFrames(also_hidden)

Iterate over all wacky frames.
This iterates over only shown frames unless also_hidden is passed in.

Parameters

also_hidden
also return frames that are hidden

Return value

iterator which returns frames

Usage

for frame in PitBull4:IterateWackyFrames() do
    doSomethingWith(frame)
end
for frame in PitBull4:IterateWackyFrames(true) do
    doSomethingWith(frame)
end


PitBull4:LoadAndEnableModule(id)

Load the module with the given id and enable it

Parameters

id


PitBull4:LoadModules()

Load Load-on-demand modules if they are enabled and exist.

Usage

PitBull4:LoadModules()


PitBull4:OutOfCombatWrapper(func)

Wrap the given function so that any call to it will be piped through PitBull4:RunOnLeaveCombat.

Parameters

func
function to call

Return value

the wrapped function

Usage

myFunc = PitBull4:OutOfCombatWrapper(func)
MyNamespace.MyMethod = PitBull4:OutOfCombatWrapper(MyNamespace.MyMethod)


PitBull4:RunOnLeaveCombat(func, ...)

Call a function if out of combat or schedule to run once combat ends.
If current out of combat, the function provided will be called without delay.

Parameters

func
function to call
...
arguments to pass into func

Usage

PitBull4:RunOnLeaveCombat(someSecureFunction)
PitBull4:RunOnLeaveCombat(someSecureFunction, "player")
PitBull4:RunOnLeaveCombat(frame.SetAttribute, frame, "key", "value")


PitBull4:UpdateForLayout(layout)

call :Update() on all frames with the given layout

Parameters

layout
the layout to check

Usage

PitBull4:UpdateForLayout("Normal")


You must login to post a comment. Don't have an account? Register to get one!

Table of contents

  1. 1 PitBull4.del(t)
    1. 1.1 Parameters
    2. 1.2 Return value
    3. 1.3 Usage
  2. 2 PitBull4.new()
    1. 2.1 Return value
    2. 2.2 Usage
  3. 3 PitBull4:CallMethodOnModules(method_name, ...)
    1. 3.1 Parameters
  4. 4 PitBull4:CheckGUIDForUnitID(unit, is_pet)
    1. 4.1 Parameters
    2. 4.2 Usage
  5. 5 PitBull4:CheckWackyFramesForGUIDUpdate()
    1. 5.1 Usage
  6. 6 PitBull4:GetState()
    1. 6.1 Return value
    2. 6.2 Usage
  7. 7 PitBull4:IterateFrames(also_hidden)
    1. 7.1 Parameters
    2. 7.2 Return value
    3. 7.3 Usage
  8. 8 PitBull4:IterateFramesForClassification(classification, also_hidden)
    1. 8.1 Parameters
    2. 8.2 Return value
    3. 8.3 Usage
  9. 9 PitBull4:IterateFramesForGUID(guid)
    1. 9.1 Parameters
    2. 9.2 Return value
    3. 9.3 Usage
  10. 10 PitBull4:IterateFramesForGUIDs(...)
    1. 10.1 Parameters
    2. 10.2 Return value
    3. 10.3 Usage
  11. 11 PitBull4:IterateFramesForLayout(layout, also_hidden)
    1. 11.1 Parameters
    2. 11.2 Return value
    3. 11.3 Usage
  12. 12 PitBull4:IterateFramesForName(name, server)
    1. 12.1 Parameters
    2. 12.2 Return value
    3. 12.3 Usage
  13. 13 PitBull4:IterateFramesForUnitID(unit, also_hidden, dont_include_wacky)
    1. 13.1 Parameters
    2. 13.2 Return value
    3. 13.3 Usage
  14. 14 PitBull4:IterateFramesForUnitIDs(...)
    1. 14.1 Parameters
    2. 14.2 Return value
    3. 14.3 Usage
  15. 15 PitBull4:IterateHeaders(also_unused)
    1. 15.1 Parameters
    2. 15.2 Return value
    3. 15.3 Usage
  16. 16 PitBull4:IterateHeadersForLayout(layout, also_hidden)
    1. 16.1 Parameters
    2. 16.2 Return value
    3. 16.3 Usage
  17. 17 PitBull4:IterateHeadersForName(name)
    1. 17.1 Parameters
    2. 17.2 Return value
    3. 17.3 Usage
  18. 18 PitBull4:IterateHeadersForSuperUnitGroup(super_unit_group)
    1. 18.1 Parameters
    2. 18.2 Return value
    3. 18.3 Usage
  19. 19 PitBull4:IterateHeadersForUnitGroup(unit_group)
    1. 19.1 Parameters
    2. 19.2 Return value
    3. 19.3 Usage
  20. 20 PitBull4:IterateLoadOnDemandModules()
    1. 20.1 Return value
    2. 20.2 Usage
  21. 21 PitBull4:IterateMemberFrames(also_hidden)
    1. 21.1 Parameters
    2. 21.2 Return value
    3. 21.3 Usage
  22. 22 PitBull4:IterateNonWackyFrames(also_hidden, only_non_wacky)
    1. 22.1 Parameters
    2. 22.2 Return value
    3. 22.3 Usage
  23. 23 PitBull4:IterateSingletonFrames(also_hidden)
    1. 23.1 Parameters
    2. 23.2 Return value
    3. 23.3 Usage
  24. 24 PitBull4:IterateWackyFrames(also_hidden)
    1. 24.1 Parameters
    2. 24.2 Return value
    3. 24.3 Usage
  25. 25 PitBull4:LoadAndEnableModule(id)
    1. 25.1 Parameters
  26. 26 PitBull4:LoadModules()
    1. 26.1 Usage
  27. 27 PitBull4:OutOfCombatWrapper(func)
    1. 27.1 Parameters
    2. 27.2 Return value
    3. 27.3 Usage
  28. 28 PitBull4:RunOnLeaveCombat(func, ...)
    1. 28.1 Parameters
    2. 28.2 Usage
  29. 29 PitBull4:UpdateForLayout(layout)
    1. 29.1 Parameters
    2. 29.2 Usage

Facts

Date created
Jan 03, 2009
Last updated
Sep 16, 2013

Author