12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 29 ■ Widget <strong>Reference</strong> 1129VisibleRegionVisibleRegion is an abstract UI type used to describe the common functionality <strong>of</strong>objects that can be placed on the screen, <strong>and</strong> visible. In particular, methods exist toshow <strong>and</strong> hide the frame, <strong>and</strong> change the alpha transparency.VisibleRegion has all the methods from Region, plus the following:GetAlphaReturns the opacity <strong>of</strong> the region relative to its parent.alpha = VisibleRegion:GetAlpha()Returns:alpha—Alpha (opacity) <strong>of</strong> the region (0.0 = fully transparent, 1.0 = fullyopaque) (number)HideHides the region.VisibleRegion:Hide()IsShownReturns whether the region is shown.shown = VisibleRegion:IsShown()Indicates only whether the region has been explicitly shown or hidden—aregion may be explicitly shown but not appear on screen because its parentregion is hidden. See VisibleRegion:IsVisible() to test <strong>for</strong> actualvisibility.Returns:shown—1 if the region is shown; otherwise nil (1nil)IsVisibleReturns whether the region is visible.visible = VisibleRegion:IsVisible()A region is ‘‘visible’’ if it has been explicitly shown (or not explicitly hidden)<strong>and</strong> its parent is visible (that is, all <strong>of</strong> its ancestor frames (parent, parent’sparent, etc) are also shown).A region may be ‘‘visible’’ <strong>and</strong> not appear on screen—it may not have anyanchor points set, its position <strong>and</strong> size may be outside the bounds <strong>of</strong> the screen,or it may not draw anything (e.g. a FontString with no text, a Texture with noimage, or a Frame with no visible children).Returns:visible—1 if the region is visible; otherwise nil (1nil)SetAlphaSets the opacity <strong>of</strong> the region relative to its parent.VisibleRegion:SetAlpha(alpha)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!