Class URLTab

3DS Max Plug-In SDK

Class URLTab

See Also: Class DragAndDropHandler

 

class URLTab : public Tab<TCHAR*>

Description:

This class is available in release 4.0 and later only.

The URLTab class is a Tab<TCHAR*> utility class that is used by certain components in the Drag and Drop manager to hold and pass around packages of file URLs. The class manages its own local copies of URL strings. This class represents the additional API support by URLTab, over-and-above that provided by any Tab<> template instantiation.

Data Members:

protected:

BOOL downloaded;

This flag is set to indicate the URL package has been downloaded and names will reflect local copies.

Methods:

public:

Prototype:

URLTab();

Remarks:

Constructor.

Default Implementation:

{ downloaded = FALSE; }

Prototype:

~URLTab();

Remarks:

Destructor.

URLTabs manage their own local string element copies, the destructor frees all these strings.

Default Implementation:

{ Clear(); }

Prototype:

URLTab& operator=(const Tab<TCHAR*>& tb);

Remarks:

Assignment operator.

Prototype:

URLTab& operator=(const URLTab& tb);

Remarks:

Assignment operator.

Prototype:

void Add(TCHAR* url);

Remarks:

This method adds a URL string to the package. A local copy of the string will be made.

Parameters:

TCHAR* url

The URL string to add.

Prototype:

void Change(int i, TCHAR* url);

Remarks:

This method replaces the i'th element by deletes the old string, taking a local copy of the new one. This is used by the various loaders to replace a URL with its local copy path name upon download.

Parameters:

int i

The index of the URL to replace.

TCHAR* url

The new URL string.

Prototype:

void Clear();

Remarks:

This method clears the package (deletes all the strings), zeros the Tab<> and resets 'downloaded' to FALSE.