r3filer

r3filer

Class

real/code/r3filer.h

Library

r3code

Description:

Filer Class

See Also

oops/r3root.h

Super Class

r3Root

R3CLID_ROOT

JavaScript

r3Filer

Class Identifier

R3CLID_FILER - 98

Methods

SAVEAS, SAVE, LOAD, REGISTERHANDLER, REGISTERIFFFORMHANDLE, REGISTERSAVER, REGISTERLOADER, ENUMSAVERS, ENUMSECTIONS, FETCHSECTIONBIT, REGISTEREXTERNALFILE, OPENFORMAT, AUTOSAVE, ISAUTOSAVENEWER, MAKEAUTOSAVENAME, ADDNOTIFICATION, REMOVENOTIFICATION, ENUMLOADERS, MAKEINDEXEDNAME, LOAD_A, SAVE_A,

Attributes

FileName, Sections, SectionNames, SaverNames, Selected, NotifyObject, ProgressIndicator, Digits,

Registration

int R3RegisterFilerClass(R3APP *app);

R3FIRM_SAVEAS

Method

SAVEAS

Identifier

R3FIRM_SAVEAS

Return

R3BOOL, TRUE if succeeded

Param 3:

R3TAG*, R3FIRA_FileName, R3FIRA_Sections, R3FIRA_Format

JavaScript

rc = obj.SAVEAS(p3);

Description

Ask filer to save project

R3FIRM_SAVE

Method

SAVE

Identifier

R3FIRM_SAVE

Return

R3BOOL, TRUE if succeeded

JavaScript

rc = obj.SAVE();

Description

Saves project with the default project name. The default name can be set using the R3FIRA_FileName tag.

R3FIRM_LOAD

Method

LOAD

Identifier

R3FIRM_LOAD

Return

R3BOOL, TRUE if succeeded

Param 3:

R3TAG*, R3FIRA_FileName, R3FIRA_Sections, R3FIRA_Replace.

JavaScript

rc = obj.LOAD(p3);

Description

Loads project. Sections, filename and replace information must * be given in the tag list.

R3FIRM_REGISTERHANDLER

Method

REGISTERHANDLER

Identifier

R3FIRM_REGISTERHANDLER

Param 3:

R3TAG*, R3FIRA_Handler, R3FIRA_IffFormId, R3FIRA_IffChunkId, R3FIRA_Name, R3FIRA_WriteMth, R3FIRA_ExportMth, R3FIRA_ImportMth, R3FIRA_ReadMth, R3FIRA_Obligatory,

JavaScript

obj.REGISTERHANDLER(p3);

Description

Register new IFF chunk handler. Class method.

R3FIRM_REGISTERIFFFORMHANDLE

Method

REGISTERIFFFORMHANDLE

Identifier

R3FIRM_REGISTERIFFFORMHANDLE

Param 3:

R3TAG*, R3FIRA_Handler, R3FIRA_IffFormId, R3FIRA_BeginFormMth, R3FIRA_EndFormMth

JavaScript

obj.REGISTERIFFFORMHANDLE(p3);

Description

Register new IFF form handler. Class method.

R3FIRCM_REGISTERSAVER

Method

REGISTERSAVER

Identifier

R3FIRCM_REGISTERSAVER

Param 1:

char*, format name

Param 2:

R3BOOL, native

Param 3:

R3CLID, class id

JavaScript

obj.REGISTERSAVER(p1, p2, p3);

Description

Register new saver class. Class method.

R3FIRCM_REGISTERLOADER

Method

REGISTERLOADER

Identifier

R3FIRCM_REGISTERLOADER

Param 1:

char*, format name

Param 3:

R3CLID, class id

JavaScript

obj.REGISTERLOADER(p1, p3);

Description

Register new loader class. Class method.

R3FIRM_ENUMSAVERS

Method

ENUMSAVERS

Identifier

R3FIRM_ENUMSAVERS

Return

R3INT, return value from the callback

Param 1:

R3OBJ*, callback object

Param 2:

R3INT, callback method

Param 3:

void*, caller data

JavaScript

rc = obj.ENUMSAVERS(p1, p2, p3);

Description

Enumerate registered savers into the given callback object/method. * The callback syntax is: * rc = (int)R3DoA3(p1, p2, clid, name, p3); * Positive return values continue enumeration.

R3FIRM_ENUMSECTIONS

Method

ENUMSECTIONS

Identifier

R3FIRM_ENUMSECTIONS

Return

R3INT, return value from the callback

Param 1:

R3OBJ*, callback object

Param 2:

R3INT, callback method

Param 3:

void*, caller data

JavaScript

rc = obj.ENUMSECTIONS(p1, p2, p3);

Description

Enumerate registered sections to given callback object/method. * The callback syntax is: * rc = (int)R3Do(p1, p2, R3FIRA_Handler, handler_obj, R3FIRA_Name, handler_name, R3FIRA_WriteMth, write_mth, R3FIRA_ExportMth, export_mth, R3FIRA_ImportMth, import_mth, R3FIRA_ReadMth, read_mth, R3FIRA_ChunkIdentifier, identifier, R3TAG_END); * Positive return values continue enumeration.

R3FIRM_FETCHSECTIONBIT

Method

FETCHSECTIONBIT

Identifier

R3FIRM_FETCHSECTIONBIT

Return

R3INT, ordnum of the bit, bit can be generated as 1<<bit

Param 3:

R3INT, chunk id (created with R3MakeID()

JavaScript

rc = obj.FETCHSECTIONBIT(p3);

Description

Fetch 'section bit' corresponding the given chunk id

R3FIRCM_REGISTEREXTERNALFILE

Method

REGISTEREXTERNALFILE

Identifier

R3FIRCM_REGISTEREXTERNALFILE

Param 1:

R3OBJ*, callback object

Param 2:

R3INT, callback method

Param 3:

char*, folder name

JavaScript

obj.REGISTEREXTERNALFILE(p1, p2, p3);

Description

Register external file enumerator. Class method.

R3FIRM_OPENFORMAT

Method

OPENFORMAT

Identifier

R3FIRM_OPENFORMAT

Return

R3OBJ*, file format object

Param 3:

R3TAG*, R3FIRA_FileName

JavaScript

rc = obj.OPENFORMAT(p3);

Description

Open file format for reading. No actual data is read.

R3FIRM_AUTOSAVE

Method

AUTOSAVE

Identifier

R3FIRM_AUTOSAVE

Return

R3BOOL, true if succeeded, FALSE for error.

JavaScript

rc = obj.AUTOSAVE();

Description

Save the current project as autosave file

R3FIRM_ISAUTOSAVENEWER

Method

ISAUTOSAVENEWER

Identifier

R3FIRM_ISAUTOSAVENEWER

Return

R3BOOL, true if autosave file is newer. FALSE if autosave file is older or it doesn't exist.

Param 3:

char*, filename

JavaScript

rc = obj.ISAUTOSAVENEWER(p3);

Description

Check if autosave file for given file name is newer

R3FIRM_MAKEAUTOSAVENAME

Method

MAKEAUTOSAVENAME

Identifier

R3FIRM_MAKEAUTOSAVENAME

Param 1:

char, auto save name

Param 3:

char, base name

JavaScript

obj.MAKEAUTOSAVENAME(p1, p3);

Description

Make autosave file name

R3FIRM_ADDNOTIFICATION

Method

ADDNOTIFICATION

Identifier

R3FIRM_ADDNOTIFICATION

Return

R3BOOL, true if succeeded.

Param 3:

R3TAG*, R3FIRA_PreNotifyCallback, R3FIRA_PostNotifyCallback, R3FIRA_NotifyObject,

JavaScript

rc = obj.ADDNOTIFICATION(p3);

Description

Notify this object for each load / save operations

R3FIRM_REMOVENOTIFICATION

Method

REMOVENOTIFICATION

Identifier

R3FIRM_REMOVENOTIFICATION

Return

R3BOOL, true if found.

Param 3:

R3TAG*, R3FIRA_PreNotifyMethod, R3FIRA_NotifyMethod, R3FIRA_NotifyObject,

JavaScript

rc = obj.REMOVENOTIFICATION(p3);

Description

Remove object from the notification list

R3FIRM_ENUMLOADERS

Method

ENUMLOADERS

Identifier

R3FIRM_ENUMLOADERS

Param 1:

R3OBJ*, callback object

Param 2:

R3INT, callback method

Param 3:

void*, caller specific data

JavaScript

obj.ENUMLOADERS(p1, p2, p3);

Description

Enumerate loader objects

R3FIRM_MAKEINDEXEDNAME

Method

MAKEINDEXEDNAME

Identifier

R3FIRM_MAKEINDEXEDNAME

Return

R3BOOL, true if succeeded

Param 1:

char*, buffer for the resulting string

JavaScript

rc = obj.MAKEINDEXEDNAME(p1, 0);

Description

Create indexed file name. Needed for exporting * all frames in animations.

R3FIRM_LOAD_A

Method

LOAD_A

Identifier

R3FIRM_LOAD_A

JavaScript

obj.LOAD_A();

Description

Private

R3FIRM_SAVE_A

Method

SAVE_A

Identifier

R3FIRM_SAVE_A

JavaScript

obj.SAVE_A();

Description

Private

FileName

Attribute

FileName

Identifier

R3FIRA_FileName

JavaScript type

String

C type

char*

Description

file name

Syntax


jsobj.SetFileName(value);
value = jsobj.GetFileName();


char* value = ...;
R3SetAttrs(r3obj, R3FIRA_FileName, value, R3TAG_END);
char* value;
R3GetAttrs(r3obj, R3FIRA_FileName, &value, R3TAG_END);

Sections

Attribute

Sections

Identifier

R3FIRA_Sections

JavaScript type

Integer

C type

R3INT

Description

bit mask which defines which sections needs to be loaded/saved

Syntax


jsobj.SetSections(value);


R3INT value = ...;
R3SetAttrs(r3obj, R3FIRA_Sections, value, R3TAG_END);

SectionNames

Attribute

SectionNames

Identifier

R3FIRA_SectionNames

JavaScript type

r3List

C type

R3LIST*

Description

section names

Syntax


value = jsobj.GetSectionNames();


R3LIST* value;
R3GetAttrs(r3obj, R3FIRA_SectionNames, &value, R3TAG_END);

SaverNames

Attribute

SaverNames

Identifier

R3FIRA_SaverNames

JavaScript type

r3List

C type

R3LIST*

Description

saver names

Syntax


value = jsobj.GetSaverNames();


R3LIST* value;
R3GetAttrs(r3obj, R3FIRA_SaverNames, &value, R3TAG_END);

Selected

Attribute

Selected

Identifier

R3FIRA_Selected

JavaScript type

r3List

C type

R3LIST*

Description

all/selected - tag for SAVEAS method.

Syntax


jsobj.SetSelected(value);
value = jsobj.GetSelected();


R3LIST* value = ...;
R3SetAttrs(r3obj, R3FIRA_Selected, value, R3TAG_END);
R3LIST* value;
R3GetAttrs(r3obj, R3FIRA_Selected, &value, R3TAG_END);

NotifyObject

Attribute

NotifyObject

Identifier

R3FIRA_NotifyObject

JavaScript type

Object

C type

R3OBJ*

Description

this object is notified when the filer loads a file

Syntax


jsobj.SetNotifyObject(value);


R3OBJ* value = ...;
R3SetAttrs(r3obj, R3FIRA_NotifyObject, value, R3TAG_END);

ProgressIndicator

Attribute

ProgressIndicator

Identifier

R3FIRA_ProgressIndicator

JavaScript type

Object

C type

R3OBJ*

Description

inc/real/code/r3progm.h progress indicator model

Syntax


jsobj.SetProgressIndicator(value);


R3OBJ* value = ...;
R3SetAttrs(r3obj, R3FIRA_ProgressIndicator, value, R3TAG_END);

Digits

Attribute

Digits

Identifier

R3FIRA_Digits

JavaScript type

Integer

C type

R3INT

Description

for indexed mode in animations

Syntax


jsobj.SetDigits(value);
value = jsobj.GetDigits();


R3INT value = ...;
R3SetAttrs(r3obj, R3FIRA_Digits, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3FIRA_Digits, &value, R3TAG_END);

R3FIRERR_CHECKSUM

notification callback

Tags

Tags

R3FIRA_Replace
R3FIRA_Format
R3FIRA_Handler
R3FIRA_WriteMth
R3FIRA_ReadMth
R3FIRA_ExportMth
R3FIRA_ImportMth
R3FIRA_IffChunkId
R3FIRA_Name
R3FIRA_Obligatory
R3FIRA_BeginFormMth
R3FIRA_EndFormMth
R3FIRA_Model
R3FIRA_ChunkIdentifier
R3FIRA_ProjectLoad
R3FIRA_SectionsReadMethod
R3FIRA_CollectExternalFiles
R3FIRA_ProjectSave
R3FIRA_Notify
R3FIRA_FormatClid
R3FIRA_SectionsDone
R3FIRA_NoRecentFileEntry
R3FIRA_SectionsForSelected
R3FIRA_ProjectHandler
R3FIRA_CurrentFrame
R3FIRA_Async
R3FIRA_MapEffects
R3FIRA_ShowProgress