Class Views.Windows.WindowPage
WindowPage represents a page in a window content area.
With the concept of pages, it's possible to have a single window handling multiple content areas, each one with its own set of frames and change pages to switch between them.
Local Functions
views.windows.windowpage.createFrame () | This is just a facade method to call World of Warcraft's CreateFrame. |
views.windows.windowpage.positionContentChildFrames () | Positions the children frames inside the page. |
Methods
views.windows.windowpage:create () | Creates the page frame if it doesn't exist yet. |
views.windows.windowpage:getHeight () | Gets the page's height. |
views.windows.windowpage:hide () | Hides the page frame. |
views.windows.windowpage:setContent (frames) | Sets the page's content, which is a table of frames. |
views.windows.windowpage:show () | Shows the page frame. |
Metamethods
views.windows.windowpage:__construct (pageId) | WindowPage constructor. |
Local Functions
Methods- views.windows.windowpage.createFrame ()
-
This is just a facade method to call World of Warcraft's CreateFrame.
Returns:
-
table
The frame created by CreateFrame
See also:
- views.windows.windowpage.positionContentChildFrames ()
-
Positions the children frames inside the page.
This is an internal method and it shouldn't be called by addons.
Methods
- views.windows.windowpage:create ()
-
Creates the page frame if it doesn't exist yet.
Returns:
-
Views.Windows.WindowPage
The window page instance, for method chaining
- views.windows.windowpage:getHeight ()
- Gets the page's height.
- views.windows.windowpage:hide ()
- Hides the page frame.
- views.windows.windowpage:setContent (frames)
-
Sets the page's content, which is a table of frames.
The Stormwind Library Window Page was designed to accept a list of frames to compose its content.
This method is used to populate the content frame with the frames passed in the frames parameter. The frames then will be positioned sequentially from top to bottom, with the first frame being positioned at the top and the last frame at the bottom. Their width will be the same as the content frame's width and will grow horizontally to the right if the whole page is resized.
Please, read the library documentation for more information on how to work with the frames inside the page's content.
Parameters:
- frames table The list of frames to be placed inside the page
Returns:
-
Views.Windows.WindowPage
The window page instance, for method chaining
Usage:
local frameA = CreateFrame(...) local frameB = CreateFrame(...) local frameC = CreateFrame(...) page:setContent({frameA, frameB, frameC})
- views.windows.windowpage:show ()
- Shows the page frame.