libsswf: sswf::TagSetTabIndex Class Reference

# sswf::TagSetTabIndex Class Reference

Set the tab key index for objects. More...

`#include <libsswf.h>`

Inheritance diagram for sswf::TagSetTabIndex:

List of all members.

## Public Member Functions
int | GetDepth (void) const
| Get the object depth.
int | GetIndex (void) const
| Get the object tab index.
virtual ErrorManager::error_code_t | Save (Data &data)
| Saves the tab index and depth.
void | SetDepth (int depth)
| Set the depth of the object.
void | SetIndex (int timeout)
| Set the tab index for the object.
| TagSetTabIndex (TagBase *parent)
| Initialize the tab index object.
virtual swf_type_t | TypeFlags (void) const
| Defines the type of the TagSetTabIndex.
## Private Member Functions
virtual ErrorManager::error_code_t | ParseTag (swf_tag_t tag, const Data &data)
| Parse data from a file into a SetTabIndex tag.
virtual ErrorManager::error_code_t | PreSave (void)
| Ensures the minimum version.
## Private Attributes
int | f_depth
int | f_index

## Detailed Description

This class is used to define the index of each object which can be visited when the tab key is pressed.

Objects are specified by depth rather than identifiers.

The tab index is a number. Each index should be unique.

See also:
  SWF Alexis' Reference—Set Tab Index

  SWF Alexis' Reference—swf_tag

## Constructor & Destructor Documentation

TagSetTabIndex::TagSetTabIndex | ( | TagBase * | parent | ) |

This object is initialized to a depth of 1 and an index of 1. This represents the very first object.

Parameters:

  `[in]` | parent | The parent object of the TagSetTabIndex tag

References f_depth, and f_index.

## Member Function Documentation

int TagSetTabIndex::GetDepth | ( | void |  | ) | const

This function retrieves the depth as set by the SetDepth() function. The depth is expected to be a non zero value.

The depth is limited to a value between 1 and 65535. Yet, bit 15 is used for other purposes in the TagPlace and thus the limit is 1 to 32767.

Returns:
  The depth of the affected object

See also:
  sswf::TagSetTabIndex::SetDepth()

References f_depth.

int TagSetTabIndex::GetIndex | ( | void |  | ) | const

This function retrieves the tab index as set by the SetIndex() function. The tab index is expected to be a non zero value.

Returns:
  The tab index number

See also:
  sswf::TagSetTabIndex::SetIndex()

References f_index.

ErrorManager::error_code_t TagSetTabIndex::ParseTag | ( | swf_tag_t | tag,
|  | const Data & | data |
| ) |  |  | `[private, virtual]`

This function reads the SetTabIndex tag depth and index.

Parameters:

  `[in]` | tag | The tag that generated this call
  `[in]` | data | The Data buffer from the Flash file being loaded

Returns:
  An error if one occurs, or ErrorManager::ERROR_CODE_NONE

Implements sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_depth, f_index, and sswf::Data::GetShort().

ErrorManager::error_code_t TagSetTabIndex::PreSave | ( | void |  | ) | `[private, virtual]`

This function requests that the movie be at least of version 7.

Returns:
  ErrorManager::ERROR_CODE_NONE when no error occured, an error otherwise

Reimplemented from sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, and sswf::TagBase::MinimumVersion().

ErrorManager::error_code_t TagSetTabIndex::Save | ( | Data & | data | ) | `[virtual]`

This function saves the depth and tab index.

Parameters:

  `[in,out]` | data | The Data buffer where the data is saved

Returns:
  An error if one occurs, or ErrorManager::ERROR_CODE_NONE

Implements sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_depth, f_index, sswf::Data::PutShort(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_SET_TAB_INDEX.

void TagSetTabIndex::SetDepth | ( | int | depth | ) |

This function defines the depth of the object which is assigned the corresponding tab index. This means one can delete and place a new object at that depth and it automatically inherit this index.

Parameters:

  `[in]` | depth | The depth of the object to assign this tab index

See also:
  sswf::TagSetTabIndex::GetDepth()

References f_depth.

void TagSetTabIndex::SetIndex | ( | int | index | ) |

This function defines the tab index of the object which is defined at the corresponding depth. Each TagSetTabIndex should specify a different index or the player will have to choose which object is next.

The index is limited to a value of 1 to 65535. It is suggested that you keep it small.

Parameters:

  `[in]` | index | The tab index for the object at the specified depth

See also:
  sswf::TagSetTabIndex::GetIndex()

References f_index.

TagBase::swf_type_t TagSetTabIndex::TypeFlags | ( | void |  | ) | const`[virtual]`

This function returns SWF_TYPE_DEFINE.

Returns:
  SWF_TYPE_DEFINE

Implements sswf::TagBase.

References SWF_TYPE_DEFINE.

## Member Data Documentation

int sswf::TagSetTabIndex::f_depth`[private]`

Referenced by GetDepth(), ParseTag(), Save(), SetDepth(), and TagSetTabIndex().

int sswf::TagSetTabIndex::f_index`[private]`

Referenced by GetIndex(), ParseTag(), Save(), SetIndex(), and TagSetTabIndex().

The documentation for this class was generated from the following files:

- libsswf.h
- libsswf_tag_settabindex.c++