Module: wcTabFrame

Source:

Members


var $container

The outer container element of the widget.

Type:
Source:

Methods


<static> function constructor(container, parent)

Parameters:
Name Type Description
container external:jQuery~selector | external:jQuery~Object | external:domNode A container element for this layout.
parent module:wcPanel The parent panel object for this widget.
Source:

function addTab(name [, index] [, layout]) -> module:wcLayoutSimple | wcLayoutTable

Adds a new tabbed page into the widget.

Parameters:
Name Type Argument Description
name String The name of the new tab page.
index Number <optional>
If supplied and above -1, will insert the new tab page at the given tab index, otherwise the new tab is appended to the end.
layout module:wcDocker.LAYOUT <optional>
If supplied, will set the type of layout to use for this tab.
Source:
Returns:
- The layout of the newly created tab page.
Type
module:wcLayoutSimple | wcLayoutTable

function closeable(index [, closeable]) -> Boolean

Gets, or Sets whether a tab can be closed (removed) by the user.

Parameters:
Name Type Argument Description
index Number The index of the tab page.
closeable Boolean <optional>
If supplied, assigns whether the tab page can be closed.
Source:
Returns:
- Whether the tab page can be closed.
Type
Boolean

function destroy()

Destroys the widget.

Source:

function faicon(index, icon)

Sets the icon for a tab item using the Font-Awesome library.

Parameters:
Name Type Description
index Number The index of the tab item.
icon String A Font-Awesome icon name (without the 'fa fa-' prefix).
Source:

function fitContents(index [, x] [, y]) -> module:wcDocker~FitContents

Gets, or Sets whether the tab frame should fit to its contents.

Parameters:
Name Type Argument Description
index Number The index of the tab page.
x Boolean <optional>
If supplied, assigns whether the tab page is scrollable in the horizontal direction.
y Boolean <optional>
If supplied, assigns whether the tab page is scrollable in the vertical direction.
Version:
  • 3.0.0
Source:
Returns:
- The current scrollable status of the tab page.
Type
module:wcDocker~FitContents

function icon(index, icon)

Sets the icon for a tab item.

Parameters:
Name Type Description
index Number The index of the tab item.
icon String A CSS class name that represents the icon.
Source:

function layout(index) -> module:wcLayoutSimple | wcLayoutTable | Boolean

Retrieves the layout for a given tab page.

Parameters:
Name Type Description
index Number The tab page index to retrieve.
Source:
Returns:
- The layout of the found tab page, or false.
Type
module:wcLayoutSimple | wcLayoutTable | Boolean

function moveable( [moveable]) -> Boolean

Gets, or Sets whether the tabs can be reordered by the user.

Parameters:
Name Type Argument Description
moveable Boolean <optional>
If supplied, assigns whether tab pages can be reordered.
Source:
Returns:
- Whether tab pages are currently moveable.
Type
Boolean

function moveTab(fromIndex, toIndex) -> external:jQuery~Object

Moves a tab page from a given index to another index.

Parameters:
Name Type Description
fromIndex Number The current tab page index to move from.
toIndex Number The new tab page index to move to.
Source:
Returns:
- The new element of the moved tab, or false if an error occurred.
Type
external:jQuery~Object

function overflowVisible(index [, visible]) -> Boolean

Gets, or Sets whether overflow on a tab area is visible.
Use this if a child element within this panel is intended to 'popup' and be visible outside of its parent area.

Parameters:
Name Type Argument Description
index Number The index of the tab page.
visible Boolean <optional>
If supplied, assigns whether overflow is visible.
Source:
Returns:
- The current overflow visiblity status of the tab page.
Type
Boolean

function removeTab(index) -> Boolean

Removes a tab page from the widget.

Parameters:
Name Type Description
index Number The tab page index to remove.
Source:
Returns:
- Success or failure.
Type
Boolean

function scrollable(index [, x] [, y]) -> module:wcDocker~Scrollable

Gets, or Sets whether a tab page area is scrollable.

Parameters:
Name Type Argument Description
index Number The index of the tab page.
x Boolean <optional>
If supplied, assigns whether the tab page is scrollable in the horizontal direction.
y Boolean <optional>
If supplied, assigns whether the tab page is scrollable in the vertical direction.
Source:
Returns:
- The current scrollable status of the tab page.
Type
module:wcDocker~Scrollable

function tab( [index] [, scrollTo]) -> Number

Gets, or Sets the currently visible tab page.

Parameters:
Name Type Argument Description
index Number <optional>
If supplied, sets the current tab page index.
scrollTo Boolean <optional>
If true, will auto scroll the tab bar until the selected tab is visible.
Source:
Returns:
- The index of the currently visible tab page.
Type
Number

function tabCount() -> Number

Gets the total number of tabs in this frame.

Version:
  • 3.0.0
Source:
Returns:
Type
Number

function tabOrientation( [orientation]) -> module:wcDocker.TAB

Gets, or Sets the tab orientation for the frame. This puts the tabbed widgets visually on any side of the tab frame.

Parameters:
Name Type Argument Description
orientation module:wcDocker.TAB <optional>
Assigns the orientation of the tab items displayed.
Version:
  • 3.0.0
Source:
Returns:
- The current orientation.
Type
module:wcDocker.TAB

function update()

Manually update the contents of this tab frame.

Source: