sswf::TagScalingGrid Class Reference

Defines a grid to scale windows, buttons and other objects with edges. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagScalingGrid:

sswf::TagButton sswf::TagSprite List of all members.

Public Member Functions

const SRectangleGrid (void) const
 Returns the currently defined grid rectangle.
ErrorManager::error_code_t GridPreSave (void)
 Ensures the minimum version.
ErrorManager::error_code_t GridSave (Data &data, sswf_id_t id)
 Save the scaling grid tag.
void SetGrid (const SRectangle &rect)
 Define the Scaling Grid rectangle.
virtual ~TagScalingGrid ()
 Cleans up the object.

Private Attributes

SRectangle f_grid

Detailed Description

This class was introduced in version 1.8.0.

The Scaling Grid tag defines a grid used to scale a button or a sprite (some window like object which has a border/edge and corners not to be scalled as usual.)

This tag is derived by the TagButton and TagSprite and is not otherwise supposed to be used by itself.

This tag adds the Grid() and SetGrid() functionality to the TagButton and TagSprite.

Internally, it also adds the GridPreSave() and GridSave() functions.

See also:
SWF Alexis' Reference—Define Scaling Grid

SWF Alexis' Reference—swf_tag


Constructor & Destructor Documentation

TagScalingGrid::~TagScalingGrid (  )  [virtual]

The destructor is virtual. It has nothing to do otherwise.


Member Function Documentation

const SRectangle & TagScalingGrid::Grid ( void   )  const

This function returns the currently defined grid rectangle.

Returns:
The grid rectangle

ErrorManager::error_code_t TagScalingGrid::GridPreSave ( void   ) 

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

This function is automatically called by the TagButton::PreSave(Data& data) and TagSprite::PreSave(Data& data) functions.

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

ErrorManager::error_code_t TagScalingGrid::GridSave ( Data data,
sswf_id_t  id 
)

This function saves the button or sprite reference and grid rectangle.

This function is automatically called by the TagButton::PreSave(Data& data) and TagSprite::PreSave(Data& data) functions.

Parameters:
data The Data buffer where the result is saved
id The identification of the button or sprite
Returns:
Zero when no error occur, non-zero otherwise

void TagScalingGrid::SetGrid ( const SRectangle rect  ) 

This function copies the input rectangle as the new Scaling Grid rectangle of the button or sprite.

You use this function directly from the button or sprite as follow:

        TagButton *button;

        ...
        button->SetGrid(my_grid);
        ...

Parameters:
rect The new Scaling Grid rectangle


Member Data Documentation

SRectangle sswf::TagScalingGrid::f_grid [private]


The documentation for this class was generated from the following files:
Generated on Tue Jun 26 02:36:45 2007 for libsswf by  doxygen 1.4.7